@leuffen/themejs1 10.0.5 → 11.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_tpl/_root/docs/_layouts/1_body.html +9 -4
- package/_tpl/_root/docs/_layouts/3_1_navbar.html +8 -0
- package/_tpl/_root/package.json +1 -1
- package/_tpl/legal/datenschutz.de.md +11 -0
- package/_tpl/leistungen/hausarzt-uebersicht.de.md +2 -1
- package/_tpl/pages/downloads.de.md +3 -2
- package/_tpl/pages/praxis-gallery.de.md +2 -2
- package/_tpl/pages/ueber-uns.de.md +3 -3
- package/_tpl/service/info-privatpraxis.de.md +2 -1
- package/_tpl/service/online-anmeldung.de.md +3 -2
- package/_tpl/service/online-bewertung.de.md +2 -1
- package/_tpl/service/online-heilmittelverordnung.de.md +2 -1
- package/_tpl/service/online-patienteninformation.de.md +2 -1
- package/_tpl/service/online-rezept.de.md +3 -2
- package/_tpl/service/online-termin.de.md +2 -1
- package/_tpl/service/online-ueberweisung.de.md +3 -2
- package/_tpl/service/online-videosprechstunde.de.md +2 -1
- package/_tpl/service/online-zuweiser.de.md +2 -1
- package/docs/assets/dist/index.css +107 -64
- package/docs/assets/dist/index.css.map +1 -1
- package/docs/assets/dist/index.js +14845 -6200
- package/docs/assets/dist/index.js.map +1 -1
- package/index.js +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets/dist/index.js","mappings":";;;;;;;;;;;;AAAwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACZwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACTgD;AAChB;;;;;;;;;;;;;;;;;;ACAV;AACK;;AAEQ;AACb;;;;;;;;;;;;;;;;;;;;ACLc;AACA;AACF;AACN;;;;;;;;;;;;;;;;;;;;;;;ACH5B,iBAAiB,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;AACqD;AACL;AACS;AACb;AACrC;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qDAAc;AACrD;AACA,0BAA0B,iEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,wDAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qEAAiB;AAC9C;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;AC3FO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACPA,iBAAiB,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;AAC0C;AACnC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,iCAAiC,uDAAY;AAC7C;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpCA,iBAAiB,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;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA,wDAAwD,IAAI;AAC5D,gDAAgD,IAAI;AACpD;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;;;;AC1BA,iBAAiB,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;AACoC;AACyB;AACX;AACa;AACrB;AACnC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAO;AAClC;AACA,aAAa;AACb;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAO;AACvB;AACA;AACA,0CAA0C,kDAAK;AAC/C,mCAAmC,kDAAK;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,oBAAoB,uDAAW;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,mCAAmC,0EAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0EAAoB;AACvD;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAW;AAC/B;AACA;AACA,gDAAgD,eAAe;AAC/D,8DAA8D,eAAe,YAAY,UAAU,iDAAO,6DAA6D;AACvK,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iDAAO;AACzC;AACA;AACA;AACA;AACA,8DAA8D,eAAe,YAAY,eAAe;AACxG,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAW;AAC/B;AACA,wBAAwB,iDAAK;AAC7B,8DAA8D,eAAe,YAAY,0BAA0B;AACnH,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA;AACA,gDAAgD,eAAe;AAC/D,8DAA8D,eAAe,YAAY,UAAU,iDAAO,6DAA6D;AACvK,wBAAwB,iDAAO,IAAI,QAAQ;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,8DAA8D,eAAe,YAAY,iBAAiB;AAC1G,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA,qBAAqB;AACrB;AACA,8DAA8D,eAAe,YAAY,0BAA0B;AACnH,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,0EAAoB;AACjD;AACA;AACA;AACA,6BAA6B,0EAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC/TA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,sBAAsB,kBAAkB;AACxC,2BAA2B;AAC3B,oBAAoB;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC/BA,iBAAiB,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,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;ACtCA,iBAAiB,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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;AC/CA,iBAAiB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;AC1BA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACvBO;AACP,wBAAwB;AACxB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD,wDAAwD,OAAO;AAC/D;AACA,oBAAoB,QAAQ,aAAa,OAAO,GAAG;AACnD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5BO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBA,iBAAiB,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;AACO;AACP;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;ACVA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACtC;AACP;AACA;AACA,sCAAsC;AACtC;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA;AACA,oCAAoC,8DAAa,CAAC,iDAAO;AACzD;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AC9DA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACJ;AAClC;AACP;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA,kBAAkB,qDAAQ;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACnDA,iBAAiB,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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AAC6C;AACR;AACa;AACb;AACsB;AACd;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO,UAAU,QAAQ,QAAQ;AACzE,mDAAmD,YAAY;AAC/D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+CAA+C;AAC/C,uBAAuB,uEAAiB,YAAY,kBAAkB;AACtE,wBAAwB,uEAAiB,UAAU,UAAU,kBAAkB,EAAE,sBAAsB,UAAU,eAAe,GAAG;AACnI,qBAAqB,uEAAiB,UAAU,uBAAuB,OAAO,QAAQ,MAAM,SAAS,aAAa,uBAAuB,UAAU,mBAAmB,GAAG;AACzK,0DAA0D,uEAAiB,UAAU,SAAS,gBAAgB,eAAe,GAAG;AAChI;AACA,+GAA+G,6EAA6E,4EAA4E;AACxQ;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC/FA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACtC;AACP;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,kCAAkC,qDAAU;AAC5C,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AClDA,iBAAiB,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;AAC6C;AACK;AACb;AACA;AACrC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAO;AACjC;AACA;AACA;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA,0BAA0B,8DAAa;AACvC;AACA;AACA;AACA;AACA;AACA,gCAAgC,qDAAU;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;;;;;;AC3DA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AAC6C;AACc;AACtB;AACa;AACL;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO,UAAU,QAAQ,QAAQ;AACzE,mDAAmD,YAAY;AAC/D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+CAA+C;AAC/C,uBAAuB,uEAAiB,YAAY,kBAAkB;AACtE,wBAAwB,uEAAiB,UAAU,UAAU,kBAAkB,EAAE,sBAAsB,UAAU,eAAe,GAAG;AACnI,qBAAqB,uEAAiB,UAAU,uBAAuB,OAAO,QAAQ,MAAM,SAAS,aAAa,uBAAuB,UAAU,mBAAmB,GAAG;AACzK,oDAAoD,uEAAiB,UAAU,SAAS,gBAAgB,eAAe,GAAG;AAC1H;AACA,yGAAyG,uEAAuE,sEAAsE;AACtP;AACA;AACA;AACA;AACA;AACA,uBAAuB,iDAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8DAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClFA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACmE;AACb;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+DAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAAgB;AACxD;AACA;AACA;AACA;AACA;AACA,IAAI,yDAAa,aAAa,yDAAa;AAC3C;AACiB;;;;;;;;;;;;;;;;;;;;;;AC3DjB,iBAAiB,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;AACwC;AACxC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAQ;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjE4B;AACJ;AACK;AACG;AACM;AACA;AACU;AACR;AACE;AACC;AACD;AACF;AACT;AACG;AACE;AACR;AACF;AACO;AACA;AACF;;;;;;;;;;;;;;;;;;;;ACnBW;AACI;AACF;AACc;AACnD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK;AAC5C,+BAA+B,KAAK;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,+CAA+C,KAAK;AACpD;AACA,wBAAwB,sDAAO;AAC/B;AACA;AACA,6CAA6C,KAAK;AAClD;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,yCAAyC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wDAAQ;AACxB;AACA,kCAAkC;AAClC;AACA,aAAa;AACb;AACA;AACA;AACA,wBAAwB,sDAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACjJyD;AACX;AAC9C;AACA,oCAAoC;AACpC;AACA,6BAA6B;AAC7B,8BAA8B;AAC9B,8BAA8B;AAC9B,4BAA4B;AAC5B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,YAAY;AACZ;AACO;AACP;AACA,eAAe,qEAAiB;AAChC;AACA;AACA,kEAAkE,KAAK;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,iFAAiF,cAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0DAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;AC5EA,iBAAiB,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;AACoC;AACS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6BAA6B;AAC7B;AACA,gCAAgC,sDAAS;AACzC;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;;ACxEa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,gEAAgE,+BAA+B;AAC/F;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mIAAmI;AAC9J;AACA,yEAAyE;AACzE;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA,8DAA8D;AAC9D;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,0BAA0B;AAC1B;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;;;;;;;;;;;;AC5Ga;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD,oBAAoB,mBAAO,CAAC,2DAAoB;AAChD;AACA;AACA;AACA,8HAA8H;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzC+C;AACA;AACR;AACJ;AACM;;;;;;;;;;;;;;;;;ACJzC;AACiE;AAC1D;AACP;AACA,mBAAmB,0EAAiB;AACpC;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,QAAQ;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACtEA,iBAAiB,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;AAC0D;AAC8B;AACzD;AACiB;AACzC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6BAA6B,uCAAI,mEAAmE,iGAAiC;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4DAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,oCAAoC,mEAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;ACxGO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,yCAAyC,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,GAAG;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,iBAAiB;AACjB;AACA;;;;;;;;;;;;;ACzCU;;;;;;;;;;;;;;;;;ACAV,iBAAiB,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;AACsC;AAC/B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8CAAU;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,qBAAqB,UAAU,OAAO;AACpH;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;;AC1CA,iBAAiB,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;AACO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACO;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNkE;AAClE;AACgB;AACsB;AACS;AACR;AACe;AACX;AAClD,YAAY,kFAAoB;AAChC;;;;;;;;;;;;;;;;;;ACTA,iBAAiB,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;AACwD;AACZ;AAC5C;AACO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,oBAAoB,iEAAiB;AACrC;AACA;AACA;AACA;AACA;AACA,sBAAsB,wDAAK;AAC3B;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;;;;;ACpCA,iBAAiB,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;AACgE;AACA;AACT;AACf;AACxC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8BAA8B,yEAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4DAAS;AAC3B;AACA,gBAAgB,gDAAQ;AACxB,sBAAsB,wDAAK;AAC3B;AACA,kBAAkB,wDAAK,MAAM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,yEAAqB;AAC9C;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;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC5GO;AACP;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,QAAQ,0GAA0G;AAC3L,yEAAyE,QAAQ,4FAA4F;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7CO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM,GAAG,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ,4FAA4F;AAC3J,sDAAsD,QAAQ,4FAA4F;AAC1J,qBAAqB,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,WAAW;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvD0D;AAC0B;AAGpF,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBZ,IAAM,kBAAN,cAA8B,6DAAe,CAAC;AAAA,EAE1C,cAAc;AACV,UAAM;AAEN,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB,MAAM,sEAAsB,CAAC;AAAA,MAC7B,KAAK,CAEL;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEM,oBAAmC;AAAA;AACrC,YAAM,0DAAQ,CAAC,CAAC;AAEhB,WAAK,MAAM,OAAO,sEAAsB,CAAC,KAAK,OAAO,OAAK,EAAE,aAAa,KAAK,aAAa,eAAe,CAAC;AAC3G,cAAQ,IAAI,qBAAqB,KAAK,MAAM,IAAI;AAChD,kDAAM,0BAAN,IAAwB;AAAA,IAC5B;AAAA;AAAA,EAEM,uBAAsC;AAAA;AACxC,cAAQ,IAAI,cAAc,IAAI;AAC9B,WAAK,MAAM,OAAO,CAAC;AACnB,kDAAM,6BAAN,IAA2B;AAAA,IAE/B;AAAA;AACJ;AA3BM,kBAAN;AAAA,EADC,0DAAQ,CAAC,GAAG;AAAA,EAAE,+DAAa,CAAC,kBAAkB;AAAA,GACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBwG;AAEjC;AACrB;AAKxD,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAUb,IAAM,aAAN,cAAyB,6DAAe,CAAC;AAAA,EAErC,cAAc;AACV,UAAM;AACN,SAAK,KAAK,IAAI,oEAAc,CAAC,CAAC;AAE9B,YAAQ,IAAI,sEAAsB,CAAC,OAAO;AAC1C,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB,MAAM,sEAAsB,CAAC;AAAA,MAC7B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,KAAK;AAAA,QACD,QAAQ,CAAC,MAAM;AACX,iBAAO,QAAQ,UAAU,CAAC,GAAG,IAAI,gBAAgB,MAAM,SAAS;AAAA,QACpE;AAAA,MACJ;AAAA,IACJ,CAAC;AAED,QAAI,OAAO;AACX,gBAAY,MAAY;AArChC;AAsCY,UAAI,SAAS,OAAO,SAAS,MAAM;AAC/B;AAAA,MACJ;AACA,cAAQ,IAAI,OAAO,SAAS,MAAM,IAAI;AACtC,aAAO,OAAO,SAAS;AACvB,UAAI,MAAM,IAAI,IAAI,OAAO,SAAS,IAAI;AACtC,UAAI,YAAY,IAAI,aAAa,IAAI,WAAW;AAChD,YAAM,YAAY;AAClB,UAAI,OAAO,SAAS,qBAAqB,cAAc,EAAE,CAAC;AAG1D,UAAI,aAAa,mBAAO,CAAC,wDAAa;AACtC,UAAI,kBAAkB,mBAAO,CAAC,oEAAmB;AAEjD,UAAI,KAAK,IAAI,WAAW;AAAA,QACpB,MAAM;AAAA;AAAA,MACV,CAAC;AAED,SAAG,IAAI,eAAe;AAEtB,UAAI,OAAO,sEAAsB,CAAC,eAAe,SAAS;AAC1D,UAAI,SAAS,MAAM;AACf,mBAAW,YAAY;AACvB,aAAK,YAAY,UAAU;AAC3B;AAAA,MACJ;AAEA,eAAS,KAAK,UAAU,IAAI,GAAG,KAAK,OAAO,WAAW;AAGtD,UAAI,WAAU,UAAK,YAAL,YAAgB;AAC9B,UAAI,KAAK,OAAO,eAAe;AAC3B,kBAAU,QAAQ,QAAQ,UAAU,IAAI;AACxC,kBAAU,GAAG,OAAO,OAAO;AAC3B,kBAAU,iBAAiB,UAAU;AAAA,MACzC;AAEA,UAAI,aAAa,SAAS,cAAc,cAAc;AACtD,iBAAW,YAAY;AAEvB,WAAK,YAAY,UAAU;AAAA,IAC/B,IAAG,GAAG;AAAA,EAEV;AACJ;AAhEM,aAAN;AAAA,EAFC,+DAAa,CAAC,kBAAkB;AAAA,EAChC,0DAAQ,CAAC,IAAI;AAAA,GACR;;;;;;;;;;;;;;AClBoD;AAE1D,IAAI,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmHV,sEAAsB,CAAC;AAAA,EAAS;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA,CAAC;AAAA,EAED;AAAA,IACI,aAAa,CAAC,QAAQ;AAAA,EAC1B;AACJ;;;;;;;;;;;;;;;;;AC9H4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA5B;AAA4E;AAE3B;AACgC;AACzC;AACiB;AACA;AAGzD,SAAS,WAAW,UAAkC;AAClD,aAAW,SAAS,YAAY;AAChC,MAAI,SAAS;AACb,MAAI,OAAO,MAAM,UAAU;AAE3B,OAAK,KAAK,SAAS,aAAa,gBAAc;AAC1C,aAAS,KAAK,KAAK,WAAW,UAAU,aAAW;AAC/C,aAAO,mBAAmB,gBACnB,QAAQ,aAAa,YAAY,KAAK;AAAA,IACjD,CAAC;AACD,WAAO,UAAU;AAAA,EACrB,CAAC;AACD,SAAO;AACX;AAEA,QAAQ,KAAK,UAAU;AAGhB,IAAM,qBAAN,cAAiC,YAAY;AAAA,EAA7C;AAAA;AAEH;AACA;AAAA;AAAA,EAGM,cAAc;AAAA;AAChB,UAAI,QAAQ;AACZ,aAAM,MAAM;AACR;AACA,YAAI,YAAY,iBAAiB,IAAI,EAAE,iBAAiB,aAAa;AACrE,YAAI,UAAU,QAAQ,MAAM,MAAM,IAAI;AAClC;AAAA,QACJ;AACA,YAAI,QAAQ,KAAK;AACb,kBAAQ;AACR,kBAAQ,KAAK,uCAAuC,MAAM,kBAAkB,WAAW,UAAU,OAAO,SAAS,IAAI;AAAA,QACzH;AACA,cAAM,0DAAQ,CAAC,KAAK,KAAK;AAAA,MAC7B;AAAA,IACJ;AAAA;AAAA,EAEgB,YAAY;AAAA;AACxB,YAAM,0DAAQ,CAAC,EAAE;AACjB,WAAK,UAAU,IAAI,QAAQ;AAE3B,YAAM,0DAAQ,CAAC,GAAG;AAElB,eAAS,KAAK,UAAU,IAAI,QAAQ;AACpC,eAAS,cAAc,MAAM,EAAE,UAAU,OAAO,QAAQ;AAAA,IAC5D;AAAA;AAAA,EAGM,oBAAoB;AAAA;AAEtB,UAAI,SAAS,IAAI,kDAAM,CAAC,cAAc;AACtC,YAAM,0DAAQ,CAAC,CAAC;AAGhB,UAAI,YAAY,IAAI,mEAAa,CAAC,MAAM;AACxC,YAAM,UAAU,QAAQ,IAAI;AAC5B,YAAM,KAAK,YAAY;AAEvB,yBAAK,sBAAuB,mEAAiB,CAAC,UAAU;AACxD,yBAAK,YAAa,mEAAiB,CAAC,KAAK;AAWzC,UAAI,YAAY,IAAI,2DAAS,CAAC,MAAM;AACpC,YAAM,UAAU,QAAQ,IAAmB;AAG3C,UAAI,iBAAiB,IAAI,qEAAc,CAAC,MAAM;AAC9C,UAAI,oBAAoB,+EAAoB,CAAC;AAC7C,qBAAe,QAAQ,IAAmB;AAG1C,UAAG,KAAK,aAAa,WAAW,GAAG;AAC/B,eAAO,IAAI,4BAA4B;AACvC,QAAC,IAAI,mEAAa,CAAC,EAAG,QAAQ,mBAAK,WAAyB;AAAA,MAChE;AAEA,WAAK,UAAU;AAGf,aAAO,iBAAiB,UAAU,MAAM;AACpC,YAAI,sBAAsB,+EAAoB,CAAC,GAAG;AAC9C;AAAA,QACJ;AACA,4BAAoB,+EAAoB,CAAC;AACzC,eAAO,IAAI,2BAA2B,iBAAiB;AAEvD,uBAAe,QAAQ,IAAmB;AAAA,MAE9C,CAAC;AAAA,IACL;AAAA;AAAA,EAIO,WAAW,SAAiB;AAC/B,SAAK,YAAY;AACjB,SAAK,kBAAkB;AAAA,EAC3B;AACJ;AAxFI;AACA;AAHS,qBAAN;AAAA,EADN,+DAAa,CAAC,cAAc;AAAA,GAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BkC;AACE;AACT;AAIxC,IAAM,YAAN,cAAwB,YAAY;AAAA,EAE1B,oBAAoB;AAAA;AACtB,UAAI,SAAQ,KAAK,aAAa,aAAa;AAC3C,UAAI,OAAO,SAAS,cAAc,MAAM;AACxC,UAAI,SAAS,MAAM;AACf,gBAAQ,MAAM,iCAAiC,QAAQ,cAAc,IAAI;AACzE;AAAA,MACJ;AACA,UAAI,YAAY,IAAI,2DAAS,CAAC,IAAI,kDAAM,CAAC,YAAY,CAAC;AACtD,WAAK,YAAY,KAAK;AAEtB,YAAM,UAAU,QAAQ,IAAI;AAAA,IAGhC;AAAA;AACJ;AAhBM,YAAN;AAAA,EADC,+DAAa,CAAC,YAAY;AAAA,GACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNN;AAAuE;AACtB;AACT;AACW;AAInD,IAAM,YAAN,cAAwB,YAAY;AAAA,EAApC;AAAA;AACI,+BAAmB;AAAA;AAAA,EACnB,IAAI,QAAQ;AACR,WAAO,mBAAK;AAAA,EAChB;AAAA,EACM,oBAAoB;AAAA;AACtB,UAAI,SAAS,IAAI,kDAAM,CAAC,YAAY;AACpC,YAAM,0DAAQ,CAAC,CAAC;AAEhB,UAAI,aAAa,IAAI,6DAAU,CAAC,MAAM;AACtC,WAAK,YAAY,MAAM,WAAW,QAAQ,KAAK,SAAS;AAExD,UAAI,YAAY,IAAI,2DAAS,CAAC,MAAM;AACpC,UAAI,WAAW,SAAS,uBAAuB;AAG/C,eAAS,OAAO,MAAM,UAAU,QAAQ,IAAI,CAAC;AAC7C,WAAK,YAAY;AACjB,WAAK,OAAO,QAAQ;AACpB,yBAAK,QAAS;AAAA,IAClB;AAAA;AACJ;AApBI;AADE,YAAN;AAAA,EADC,+DAAa,CAAC,YAAY;AAAA,GACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACeC,MAAM,yBAAyB;AAAA,EAE3B,SAAS,UAAsD,WAAmB,aAAqB,SAAkB,WAAwB,SAAiB,CAAC,GAAG;AACzK,QAAI,gBAAgB;AAAA,MAChB,aAAa,CAAC;AAAA,MACd,eAAe;AAAA,IACnB;AACA,aAAS,kCAAI,gBAAkB;AAE/B,QAAI,OAAO,WAAW,MAAM,QAAW;AACnC,aAAO,WAAW,IAAI,CAAC;AAAA,IAC3B;AACA,QAAI,OAAO,WAAW,EAAE,cAAc,MAAM,QAAW;AACnD,aAAO,WAAW,EAAE,cAAc,IAAI,CAAC;AAAA,IAC3C;AACA,WAAO,WAAW,EAAE,cAAc,EAAE,KAAK,EAAC,UAAU,WAAW,aAAa,SAAS,WAAW,OAAM,CAAC;AAAA,EAC3G;AAAA,EAGA,IAAI,OAAuB;AACvB,WAAO,OAAO,WAAW,EAAE,cAAc;AAAA,EAC7C;AAAA,EAEA,IAAI,UAAU;AACV,WAAO,KAAK,KAAK,IAAI,OAAK,EAAE,SAAS;AAAA,EACzC;AAAA,EAEO,eAAe,WAAkC;AACpD,WAAO,KAAK,KAAK,KAAK,OAAK,EAAE,cAAc,SAAS;AAAA,EACxD;AAEJ;AAEO,MAAM,yBAAyB,IAAI,yBAAyB;;;;;;;;;;;;;;;;ACrD5D,MAAM,qBAAqB;AAAA,EAC9B,YACW,SACA,UAAwB,MACxB,iBAA0B,MACnC;AAHS;AACA;AACA;AAAA,EAEX;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACT0E;AAG1E,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBH,IAAM,mBAAN,cAA+B,6DAAe,CAAC;AAAA,EAClD,YAAmB,SAAS;AACxB,UAAM;AADS;AAEf,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEM,oBAAoB;AAAA;AACtB,YAAM,6CAAM,0BAAN,IAAwB;AAC9B,WAAK,MAAM,UAAU,KAAK;AAAA,IAE9B;AAAA;AACJ;AAba,mBAAN;AAAA,EAFN,+DAAa,CAAC,YAAY;AAAA,EAC1B,0DAAQ,CAAC,GAAG;AAAA,GACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBb,MAAM,cAAc;AAAA,EAChB;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAO;AACjD;AACO,MAAM,aAAa;AAAA,EAAnB;AAIH,SAAO,OAAiB;AACxB,SAAO,OAAiB;AACxB,SAAO,MAAgB;AACvB,SAAO,OAAiB;AACxB,SAAO,MAAgB;AACvB,SAAO,MAAgB;AAGvB,SAAO,QAAkB;AAAA;AAAA,EAEnB,SAAS;AAAA;AACX,WAAK,OAAO,MAAM,SAAS;AAC3B,WAAK,OAAO,MAAM,SAAS;AAC3B,cAAQ,IAAI,kBAAkB,IAAI;AAClC,WAAK,QAAQ;AAAA,IACjB;AAAA;AAAA,EAGA,YAAY,WAA8B;AACtC,gBAAY,UAAU,KAAK,EAAE,YAAY;AACzC,QAAG,OAAO,KAAK,SAAS,MAAM;AAC1B,aAAO;AACX,WAAO,KAAK,SAAS;AAAA,EACzB;AAAA,EAEA,iBAAkB,YAAgC;AAC9C,aAAQ,UAAU,aAAa;AAC3B,UAAI,OAAO,WAAW,KAAK,OAAK,MAAM,MAAM,MAAM,eAAe,KAAK,YAAY,MAAM;AACpF,eAAO;AAAA,IACf;AACA,WAAO;AAAA,EACX;AAEJ;AAEA,SAAS,WAAW;AAChB,SAAO,IAAI,QAAQ,SAAO;AACtB,UAAM,OAAO,IAAI,MAAM;AACvB,SAAK,MAAM;AACX,SAAK,SAAS,KAAK,UAAU,MAAM;AAC/B,UAAI,KAAK,WAAW,CAAC;AAAA,IACzB;AAAA,EACJ,CAAC;AACL;AAAC;AAGD,SAAS,WAAW;AAChB,SAAO,IAAI,QAAQ,SAAO;AACtB,UAAM,OAAO,IAAI,MAAM;AACvB,SAAK,MAAM;AACX,SAAK,SAAS,KAAK,UAAU,MAAM;AAC/B,UAAI,KAAK,WAAW,CAAC;AAAA,IACzB;AAAA,EACJ,CAAC;AACL;AAAC;AAGD,IAAI,WAAmB;AACvB,IAAI,eAAe,IAAI,aAAa;AAE7B,SAAe,kBAA0C;AAAA;AAE5D,QAAI,aAAa,MAAM;AACnB,iBAAW,CAAC;AACZ,YAAM,aAAa,OAAO;AAC1B,eAAS,QAAQ,CAAC,SAAS,KAAK,YAAY,CAAC;AAAA,IACjD;AAEA,QAAI,aAAa,UAAU,OAAO;AAC9B,aAAO,IAAI,QAAsB,CAAC,YAAY;AAC1C,iBAAS,KAAK,OAAO;AAAA,MACzB,CAAC;AAAA,IACL;AACA,WAAO;AAAA,EAGX;AAAA;;;;;;;;;;;;;;;;;;ACnFyC;AACU;AAM5C,SAAS,eAAe,OAAgB,OAAY,SAAsC;AAG7F,SAAO,MAAM,QAAQ,kBAAkB,CAAC,OAAO,OAAO;AAClD,QAAI,MAAO,yDAAO,CAAC,IAAI,OAAO,SAAS,CAAC,CAAC;AACzC,WAAO;AAAA,EACX,CAAC;AACL;AAEO,MAAM,UAAU;AAAA,EAMnB,YAAY,SAAuE;AAC/E,QAAI,OAAO,YAAY,UAAU;AAC7B,WAAK,UAAU,mEAAiB,CAAC,UAAU;AAC3C,WAAK,QAAQ,YAAY;AAAA,IAC7B,OAAO;AACH,WAAK,UAAU;AAAA,IACnB;AACA,QAAI,KAAK,mBAAmB,qBAAqB;AAC7C,UAAI,KAAK,QAAQ,QAAQ,SAAS,SAAS,GAAG;AAC1C,cAAM,IAAI,MAAM,yDAAyD,KAAK,QAAQ,SAAS;AAAA,MACnG;AAEA,WAAK,UAAU,KAAK,QAAQ,QAAQ,kBAAkB,UAAU,IAAI;AAAA,IACxE;AACA,SAAK,WAAW;AAAA,EAEpB;AAAA,EACA,MAAM,OAAmB;AACrB,QAAI,MAAM,mEAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI;AACpD,QAAI,QAAQ,OAAO,KAAK,OAAO;AAG/B,QAAI,YAAa,eAAe,IAAI,WAAW,OAAO,GAAG;AACzD,SAAK,UAAU,IAAI,QAAQ;AAC3B,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,GAAG,UAAkD;AACxD,QAAI,WAAW,cAAc;AAC7B,QAAI,KAAK,QAAQ,QAAQ,QAAQ,GAAG;AAChC,aAAO,KAAK;AAAA,IAChB;AACA,WAAO,KAAK,QAAQ,cAAc,QAAQ;AAAA,EAC9C;AAAA,EAEO,OAAO,UAA0B;AACpC,SAAK,WAAW,KAAK,GAAG,QAAQ;AAChC,QAAI,KAAK,aAAa,MAAM;AACxB,cAAQ,MAAM,4BAA4B,WAAW,gBAAgB,KAAK,OAAO;AACjF,YAAM,4BAA4B,WAAW;AAAA,IACjD;AACA,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,KAAK,QAAsB,UAAmB,WAA8C,MAAa;AAC5G,UAAM,KAAK,OAAO,iBAAiB,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAmB;AACtE,UAAI,aAAa,MAAM;AACnB,YAAI,SAAS,CAAC;AAAA,MAClB;AACA,WAAK,SAAS,OAAO,CAAC;AAAA,IAC1B,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,KAAK,UAAmB;AAC3B,QAAI,WAAW,IAAI,UAAU,KAAK,OAAO;AACzC,aAAS,OAAO,QAAQ;AACxB,WAAO;AAAA,EACX;AAAA,EAEO,OAAO,SAAoG;AAC9G,QAAI,mBAAmB,WAAW;AAC9B,WAAK,SAAS,OAAO,QAAQ,OAAO;AACpC,aAAO;AAAA,IACX;AACA,QAAI,mBAAmB,UAAU;AAC7B,YAAM,KAAK,OAAO,EAAE,QAAQ,OAAK,KAAK,SAAS,OAAO,CAAC,CAAC;AACxD,aAAO;AAAA,IACX;AACA,QAAI,MAAM,QAAQ,OAAO,KAAK,mBAAmB,UAAU;AACvD,cAAQ,QAAQ,OAAK,KAAK,SAAS,OAAO,CAAC,CAAC;AAC5C,aAAO;AAAA,IACX;AACA,SAAK,SAAS,OAAO,OAAO;AAC5B,WAAO;AAAA,EACX;AAAA,EAEO,QAAoB;AACvB,WAAO,IAAI,UAAU,KAAK,QAAQ,UAAU,IAAI,CAAiC;AAAA,EACrF;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHoD;AAGQ;AACN;AACzB;AAGtB,SAAe,eAAe,QAAiB,UAA8B,OAAgB,IAAI;AAAA;AACpG,QAAI,OAAO,aAAa,UAAU;AAC9B,iBAAW,SAAS,MAAM,GAAG;AAAA,IACjC;AACA,QAAI,QAAQ;AACZ,QAAI,QAAQ;AACZ,WAAO,UAAU,QAAW;AACxB;AACA,UAAI,YAAY;AAChB,eAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACtC,YAAI,cAAc,QAAW;AACzB;AAAA,QACJ;AACA,oBAAY,UAAU,SAAS,CAAC,CAAC;AAAA,MACrC;AACA,cAAQ;AACR,UAAI,UAAU;AACV,cAAM,0DAAQ,CAAC,IAAI;AACvB,UAAI,QAAQ,KAAM;AACd,gBAAQ;AACR,gBAAQ,KAAK,gCAAgC,UAAU,aAAa,MAAM;AAAA,MAC9E;AAAA,IAEJ;AACA,WAAO;AAAA,EACX;AAAA;AAGO,SAAS,YAAY,SAAuB,SAAuB;AApC1E;AAqCI,gBAAQ,eAAR,mBAAoB,aAAa,SAAS;AAC1C,UAAQ,YAAY,OAAO;AAC/B;AAQO,SAAS,qBAAqB,MAAe,UAA2C,QAAiC;AAC5H,MAAI,OAAO,WAAW,MAAM,QAAW;AACnC,WAAO,WAAW,IAAI,CAAC;AAAA,EAC3B;AACA,MAAI,OAAO,WAAW,EAAE,UAAU,MAAM,QAAW;AAC/C,WAAO,WAAW,EAAE,UAAU,IAAI,CAAC;AAAA,EACvC;AACA,SAAO,WAAW,EAAE,UAAU,EAAE,IAAI,IAAI,EAAC,UAAU,OAAM;AAC7D;AAGO,SAAS,aAAa,MAAe,QAAiC;AACzE,SAAO,SAAU,mBAA0D;AACvE,yBAAqB,MAAM,mBAAmB,MAAM;AAAA,EACxD;AACJ;AAGO,SAAS,wBAAwB,SAAuB,gBAA8C;AACzG,MAAI,MAA2B,CAAC;AAChC,QAAM,KAAK,QAAQ,QAAQ,EAAE,QAAQ,WAAS;AAC1C,QAAI,MAAM,QAAQ,cAAc,GAAG;AAC/B,UAAI,KAAK,SAAS,uBAAuB,CAAC;AAAA,IAC9C;AACA,QAAI,IAAI,SAAS,GAAG;AAChB,UAAI,IAAI,SAAS,CAAC,EAAE,OAAO,KAAK;AAAA,IACpC;AAAA,EACJ,CAAC;AACD,SAAO;AACX;AAEO,SAAS,sBAAsB,YAA8B;AAChE,SAAO,WAAW,KAAK,EAAE,QAAQ,UAAU,EAAE,EAAE,QAAQ,SAAS,EAAE,EAAE,KAAK;AAC7E;AASO,SAAS,kBAAkB,OAAwC;AAEtE,MAAI,SAAS,MAAM;AACf,WAAO,CAAC;AAAA,EACZ;AAGA,QAAM,MAA+B,CAAC;AACtC,QAAM,QAAQ,MAAM,KAAK,EAAE,MAAM,GAAG;AACpC,WAAS,QAAQ,OAAO;AACpB,UAAM,QAAQ,KAAK,KAAK,EAAE,MAAM,GAAG;AACnC,QAAI,MAAM,UAAU,GAAG;AACnB,UAAI,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK;AAAA,IACzC;AAAA,EACJ;AAEA,SAAO;AACX;AAGA,IAAI,YAAY;AACT,SAAe,6BAA6B,kBAA2B,SAAuB,aAAuD;AAAA;AACxJ,QAAI,eAA6B,uCAAI,CAAC,sBAAsB,gBAAgB;AAE5E,QAAI,iBAAiB,MAAM;AACvB,UAAIA,YAAW,SAAS,cAAmC,gBAAgB;AAC3E,UAAIA,cAAa,MAAM;AACnB,cAAM,IAAI,uEAAoB,CAAC,yBAAyB,gBAAgB;AAAA,MAC5E;AACA,qBAAeA,UAAS;AAAA,IAC5B;AAIA,QAAI,SAAS,CAAC;AAEd,QAAI,QAAQ,iBAAiB,WAAW;AAKxC,mBAAgB,0DAAc,CAAC,cAAc;AAAA,MACzC,QAAQ,IAAI,MAAM,CAAC,GAAG;AAAA,QAClB,KAAK,SAAU,QAAQ,MAAM;AACzB,iBAAO,MAAM,iBAAiB,cAAc,KAAK,SAAS,CAAC;AAAA,QAC/D;AAAA,MACJ,CAAC;AAAA,IACL,GAAG,OAAO;AAEV,QAAI,QAAQ,SAAS,YAAY,EAAE,yBAAyB,YAAY;AAExE,QAAI,OAAO,CAAC;AAEZ,UAAM,iBAAiB,8BAA8B,EAAE,QAAQ,CAACC,UAAS;AACrE,UAAI,KAAK,SAASA,KAAI,GAAG;AACrB;AAAA,MACJ;AACA,WAAK,KAAKA,KAAI;AAEd,MAAAA,MAAK,aAAa,eAAe,EAAE,WAAW,SAAS,CAAC;AACxD,UAAI,SAASA,MAAK,aAAa,aAAa;AAC5C,UAAI,WAAW,MAAM,KAAK,QAAQ,iBAAiB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,QAAQ,UAAU,IAAI,CAAC;AACpG,UAAI,SAAS,WAAW,GAAG;AACvB,gBAAQ,KAAK,oCAAoC,SAAS,mBAAmB,mBAAmB,eAAeA,KAAI;AACnH;AAAA,MACJ;AACA,UAAIA,MAAK,aAAa,cAAc,KAAK,UAAU;AAC/C,QAAAA,MAAK,YAAY,GAAG,QAAQ;AAAA,MAChC,WAAU,UAAU;AAChB,QAAAA,MAAK,OAAO,GAAG,QAAQ;AAAA,MAC3B;AAAA,IACJ,CAAC;AACD,UAAM,iBAAiB,mBAAmB,EAAE,QAAQ,CAACA,UAAS;AAC1D,UAAI,KAAK,SAASA,KAAI,GAAG;AACrB;AAAA,MACJ;AACA,WAAK,KAAKA,KAAI;AAEd,MAAAA,MAAK,aAAa,eAAe,EAAE,WAAW,SAAS,CAAC;AACxD,UAAI,SAASA,MAAK,aAAa,aAAa;AAC5C,UAAI,WAAW,MAAM,KAAK,QAAQ,iBAAiB,MAAM,CAAC;AAC1D,UAAI,SAAS,WAAW,GAAG;AACvB,gBAAQ,KAAK,oCAAoC,SAAS,mBAAmB,mBAAmB,eAAeA,KAAI;AACnH;AAAA,MACJ;AAEA,UAAIA,MAAK,aAAa,YAAY,GAAG;AACjC,iBAAS,QAAQ,CAAC,YAAY;AAE1B,kBAAQ,UAAU,IAAI,GAAGA,MAAK,aAAa,YAAY,EAAE,MAAM,GAAG,EAAE,OAAO,CAAC,UAAU,UAAU,EAAE,CAAC;AAAA,QACvG,CAAC;AAAA,MACL;AAEA,UAAIA,MAAK,aAAa,cAAc,KAAK,UAAU;AAC/C,QAAAA,MAAK,YAAY,GAAG,QAAQ;AAAA,MAChC,WAAU,UAAU;AAChB,QAAAA,MAAK,OAAO,GAAG,QAAQ;AAAA,MAC3B;AAAA,IACJ,CAAC;AAGD,QAAI,OAAO,MAAM,cAAc,yBAAyB;AACxD,QAAI,SAAS,QAAQ,KAAK,aAAa,YAAY,GAAG;AAClD,UAAI,KAAK,SAAS,IAAI,GAAG;AACrB;AAAA,MACJ;AACA,WAAK,KAAK,IAAI;AAEd,WAAK,aAAa,eAAe,EAAE,WAAW,SAAS,CAAC;AACxD,YAAM,KAAK,QAAQ,QAAQ,EAAE,QAAQ,CAAC,YAAY;AAE9C,gBAAQ,UAAU,IAAI,GAAG,KAAK,aAAa,YAAY,EAAE,MAAM,GAAG,EAAE,OAAO,CAAC,UAAU,UAAU,EAAE,CAAC;AAAA,MACvG,CAAC;AAAA,IACL;AACA,QAAI,SAAS,QAAQ,KAAK,aAAa,cAAc,GAAG;AACpD,WAAK,YAAY,GAAG,MAAM,KAAK,QAAQ,QAAQ,CAAC;AAAA,IACpD,WAAW,SAAS,MAAM;AACtB,WAAK,OAAO,GAAG,MAAM,KAAK,QAAQ,QAAQ,CAAC;AAAA,IAC/C,OAAO;AACH,cAAQ,OAAO;AAAA,IACnB;AAEA,WAAO;AAAA,EACX;AAAA;;;;;;;;;;;;;;;;;;;;;ACpNmD;AAG5C,SAAS,yBAA0B,WAA0B;AAChE,MAAI,QAAc,EAAC,KAAK,CAAC,GAAG,KAAK,CAAC,EAAC;AACnC,MAAI,QAAQ,IAAI,OAAO,iBAAiB,IAAI;AAC5C,YAAU,QAAQ,OAAO,CAAC,OAAe,SAAiB;AACtD,YAAQ,MAAM,UAAU,CAAC;AACzB,QAAI,MAAM,QAAQ,GAAG,MAAM,MAAM,SAAS,KAAM;AAC5C,UAAI,OAAO,MAAM,IAAI,EAAE,UAAU;AAC7B,cAAM,IAAI,EAAE,QAAQ;AACxB,YAAM,IAAI,EAAE,SAAS,MAAM;AAC3B,YAAM,IAAI,EAAE,QAAQ,MAAM,IAAI,EAAE,MAAM,KAAK;AAAA,IAC/C,OAAO;AACH,UAAI,MAAM,MAAM,MAAM,GAAG;AACzB,YAAM,IAAI,EAAE,IAAI,MAAM,CAAC,IAAI,IAAI,KAAK,GAAG,EAAE,KAAK;AAAA,IAClD;AACA,WAAO;AAAA,EACX,CAAC;AACD,SAAO;AACX;AAEO,SAAS,iBAAkB,WAAoB,YAAY,KAAW;AACzE,MAAI,QAAc,CAAC;AACnB,MAAI,QAAQ,IAAI,OAAO,KAAK,cAAc,eAAe,IAAI;AAC7D,YAAU,QAAQ,OAAO,CAAC,UAAkB;AACxC,YAAQ,MAAM,UAAU,CAAC;AACzB,QAAI,MAAM,QAAQ,GAAG,MAAM,IAAI;AAC3B,UAAI,OAAO,MAAM,UAAU;AACvB,cAAM,QAAQ;AAClB,YAAM,SAAS,MAAM;AACrB,YAAM,QAAQ,MAAM,MAAM,KAAK;AAAA,IACnC,OAAO;AACH,UAAI,MAAM,MAAM,MAAM,GAAG;AAEzB,YAAM,IAAI,MAAM,CAAC,IAAI,IAAI,KAAK,GAAG,EAAE,KAAK;AAAA,IAC5C;AACA,WAAO;AAAA,EACX,CAAC;AACD,SAAO;AACX;AAEO,SAAS,kBAAkB,YAA4B;AAC1D,SAAO,iBAAiB,YAAY,GAAG;AAC3C;AAEO,SAAS,cAAc,YAAmC;AAC7D,MAAI,UAAU,WAAW,KAAK;AAC9B,MAAI,MAAM;AACV,YAAU,QAAQ,QAAQ,qBAAqB,CAAC,UAAkB;AAC9D,UAAM;AACN,WAAO;AAAA,EACX,CAAC;AACD,MAAI,QAAQ,kBAAkB,OAAO;AAGrC,MAAI,UAAU,mEAAiB,CAAC,KAAK,KAAK;AAC1C,SAAO;AACX;AAEO,SAAS,kBAAmB,KAAwD;AAEvF,MAAI,QAAsB;AAC1B,MAAI,OAAqB;AAIzB,MAAI,WAAW,IAAI,MAAM,GAAG;AAC5B,SAAM,SAAS,SAAS,GAAG;AACvB,QAAI,MAAM,SAAS,MAAM;AAEzB,QAAI,UAAU;AACd,UAAM,IAAI,QAAQ,mBAAmB,CAAC,GAAG,SAAS;AAC9C,gBAAU;AACV,aAAO;AAAA,IACX,CAAC;AAGD,QAAI,IAAI,KAAK,EAAE,WAAW,GAAG,GAAG;AAE5B,UAAIC,MAAK,SAAS,cAAc,KAAK;AACrC,UAAI,SAAS,SAAS;AAClB,eAAO,MAAM,SAAS,KAAK,GAAG;AAElC,MAAAA,IAAG,YAAY,IAAI,KAAK,EAAE,UAAU,CAAC;AACrC,MAAAA,IAAG,WAAW,QAAQ,CAAC,MAAM,KAAK,OAAO,EAAE,UAAU,IAAI,CAAC,CAAC;AAC3D,MAAAA,IAAG,OAAO;AACV;AAAA,IACJ;AAEA,QAAI,KAAK,cAAc,GAAG;AAK1B,QAAI,UAAU,MAAM;AAChB,cAAQ,OAAO;AAAA,IACnB,OAAO;AACH,UAAI,gBAAgB,qBAAqB;AACrC,aAAK,QAAQ,YAAY,EAAE;AAAA,MAC/B,OAAO;AACH,aAAK,YAAY,EAAE;AAAA,MAEvB;AACA,aAAO;AAAA,IACX;AAAA,EACJ;AACA,SAAO,EAAC,OAAO,KAAI;AACvB;;;;;;;;;;;;;;;;AC3GO,MAAM,OAAO;AAAA,EAEhB,YAAmB,MAAe;AAAf;AAAA,EACnB;AAAA,EACA,OAAO,MAAc;AACjB,YAAQ,IAAI,MAAM,KAAK,OAAO,KAAK,GAAG,IAAI;AAAA,EAC9C;AAAA,EAEA,QAAQ,MAAc;AAClB,YAAQ,KAAK,MAAM,KAAK,OAAO,KAAK,GAAG,IAAI;AAAA,EAC/C;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXsC;AAEY;AACV;AACA;AAGJ;AACG;AACH;AACG;AACS;AAEhB;AACM;AAEf;;;;;;;;;;;;;;;;AChBhB,MAAM,OAAO,IAAK,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,iBAAiB,IAAY,MAAe;AAC/C,QAAK,CAAE,OAAO,WAAW;AACrB,aAAO,WAAW,IAAI,CAAC;AAC3B,QAAK,CAAE,OAAO,WAAW,EAAE,WAAW;AAClC,aAAO,WAAW,EAAE,WAAW,IAAI,CAAC;AAExC,WAAO,WAAW,EAAE,WAAW,EAAE,EAAE,IAAI;AAAA,EAC3C;AAAA,EAGO,sBAAsB,IAA0B;AAnB3D;AAoBQ,QAAI,GAAG,WAAW,GAAG;AACjB,WAAK,GAAG,UAAU,CAAC;AACvB,YAAO,wBAAO,WAAW,MAAlB,mBAAsB,iBAAtB,mBAAqC,QAArC,YAA4C;AAAA,EACvD;AAGJ,EAAG;;;;;;;;;;;;;;;;;ACzBmD;AAGtD,MAAM,WAAW,CAAC,OAAO,MAAM;AAExB,MAAM,gBAAgB;AAAA,EAElB,YAAmB,QAAiB;AAAjB;AAAA,EAC1B;AAAA,EAGO,YAAY,MAAkC;AACjD,QAAK,CAAE,KAAK,aAAa,QAAQ;AAC7B,aAAO;AAEX,QAAI,SAAS,oEAAiB,CAAC,KAAK,aAAa,QAAQ,CAAC;AAG1D,aAAS,OAAO,QAAQ;AACpB,UAAI,SAAS,SAAS,GAAG,GAAG;AACxB,aAAK,MAAM,YAAY,YAAY,KAAK,OAAO,GAAG,CAAC;AACnD;AAAA,MACJ;AACA,WAAK,MAAM,YAAY,cAAc,KAAK,OAAO,GAAG,CAAC;AAAA,IACzD;AAEA,WAAO;AAAA,EACX;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9B0D;AACW;AA0BrE,IAAI,aAAa;AAEV,MAAM,cAAc;AAAA,EAEvB,YAAoB,QAAiB;AAAjB;AAAA,EACpB;AAAA,EAEQ,kBAAkB,MAAgC;AACtD,SAAK,KAAK,CAAC,GAAG,MAAM;AAEhB,UAAI,EAAE,QAAQ,EAAE;AACZ,eAAO;AACX,UAAI,EAAE,QAAQ,EAAE;AACZ,eAAO;AACX,aAAO;AAAA,IACX,CAAC;AAED,QAAI,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,UAAU;AACvD,QAAI,OAAO,QAAQ;AACf,YAAM,KAAK,KAAK,SAAS,CAAC;AAC9B,WAAO,oBAAO,EAAC,OAAO,GAAG,QAAQ,EAAC;AAAA,EACtC;AAAA,EAGQ,cAAc,SAAoB,cAAqC;AAC3E,WAAO,aAAa,iBAAiB,OAAO;AAAA,EAEhD;AAAA,EAEa,QAAQ,MAAoB;AAAA;AACrC,UAAI,YAAY,IAAI,oEAAe,CAAC;AACpC,UAAI,eAAe,MAAM,qEAAe,CAAC;AACzC,eAAS,WAAW,KAAK,iBAAiB,UAAU,GAAU;AAC1D;AACA,YAAI,MAAM,QAAQ,aAAa,KAAK;AACpC,YAAK,CAAE,UAAU,WAAW,GAAG;AAC3B;AAEJ,gBAAQ,aAAa,iBAAiB,GAAG;AAEzC,YAAI,OAAO,UAAU,SAAS,GAAG;AACjC,YAAI,UAAU,KAAK,kBAAkB,KAAK,WAAW;AACrD,gBAAQ,aAAa,SAAS,QAAQ,MAAM,SAAS,CAAC;AACtD,gBAAQ,aAAa,UAAU,QAAQ,OAAO,SAAS,CAAC;AACxD,YAAI,QAAQ,aAAa,KAAK,MAAM;AAChC,kBAAQ,aAAa,OAAO,KAAK,GAAG;AACxC,gBAAQ,aAAa,OAAO,KAAK,OAAO,SAAS,KAAK,cAAc,KAAK,SAAS,YAAY,CAAC,CAAC;AAEhG,YAAI,aAAa,GAAG;AAChB,kBAAQ,aAAa,WAAW,OAAO;AAAA,QAC3C,OAAO;AACH,kBAAQ,aAAa,WAAW,MAAM;AAAA,QAC1C;AAAA,MAKJ;AAAA,IAOJ;AAAA;AAIJ;;;;;;;;;;;;;;;;;;;AC5FO,MAAM,cAAc;AAAA,EACvB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACX;AAGO,SAAS,uBAAgC;AAC5C,MAAI,MAAM;AACV,SAAO,KAAK,WAAW,EAAE,QAAQ,CAAC,QAAQ;AACtC,QAAI,OAAO,cAAc,YAAY,GAAG,GAAG;AACvC,YAAM;AAAA,IACV;AAAA,EACJ,CAAC;AACD,SAAO;AACX;AAEA,MAAM,gBAAgB;AAAA,EAAtB;AACI,kBAAmB,CAAC;AACpB,mBAAoB;AACpB,eAAY;AACZ,cAAe;AACf,cAAe;AACf,cAAe;AACf,cAAe;AACf,cAAe;AACf,eAAgB;AAEhB,uBAAc,CAAC,OAAO,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAAA;AAAA,EAEzD,wBAAwB,aAAsB,MAAiB;AAC3D,QAAI,eAAe,MAAM;AACrB,mBAAa,qBAAqB;AAAA,IACtC;AAGA,QAAI,MAAM,CAAC;AACX,QAAI,KAAK,GAAG,KAAK,MAAM;AACvB,QAAI,YAAY;AAChB,aAAS,MAAM,KAAK,aAAa;AAE7B,UAAI,KAAK,EAAE,MAAM,MAAM;AACnB,cAAM,KAAK,EAAE;AACb,oBAAY;AAAA,MAChB;AACA,UAAI,OAAO,YAAY;AACnB;AAAA,MACJ;AAAA,IACJ;AACA,QAAI,aAAa,KAAK,YAAY,MAAM;AACpC,UAAI,KAAK,GAAG,KAAK,OAAO;AAAA,IAC5B;AACA,UAAM,IAAI,OAAO,CAAC,SAAS,SAAS,EAAE;AACtC,WAAO;AAAA,EACX;AACJ;AAEO,SAAS,cAAc,OAAkC;AAC5D,MAAI,MAAM,IAAI,gBAAgB;AAC9B,MAAI,UAAU;AACd,QAAM,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS;AAC3B,QAAI,UAAU,KAAK,MAAM,iBAAiB;AAC1C,QAAI,YAAY,MAAM;AAClB,UAAI,OAAO,EAAE,KAAK,IAAI;AACtB;AAAA,IACJ;AACA,cAAU,QAAQ,CAAC;AACnB,QAAI,YAAY,IAAI;AAChB,gBAAU;AAAA,IACd;AACA,QAAI,IAAI,OAAO,MAAM,MAAM;AACvB,UAAI,OAAO,IAAI,CAAC;AAAA,IACpB;AAAA,EACJ,CAAC;AACD,SAAO;AACX;AAGO,MAAM,eAAe;AAAA,EAGxB,YAAmB,QAAiB;AAAjB;AAAA,EACnB;AAAA,EAEQ,YAAY,MAAoB;AA1F5C;AA2FQ,UAAM,WAAW;AACjB,QAAK,CAAE,KAAK,aAAa,QAAQ,GAAG;AAChC,UAAIC,YAAU,UAAK,aAAa,OAAO,MAAzB,YAA8B;AAC5C,UAAIA,SAAQ,QAAQ,GAAG,MAAM;AACzB;AACJ,WAAK,aAAa,UAAUA,QAAO;AAAA,IACvC;AACA,QAAI,UAAU,KAAK,aAAa,QAAQ;AACxC,QAAI,oBAAoB,cAAc,OAAO;AAE7C,SAAK,aAAa,SAAS,EAAE;AAE7B,SAAK,UAAU,IAAI,GAAG,kBAAkB,OAAO,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC;AAC5E,SAAK,UAAU,IAAI,GAAG,kBAAkB,wBAAwB,CAAC;AAAA,EAErE;AAAA,EAEA,QAAQ,MAAoB;AACxB,UAAM,KAAK,CAAC,MAAM,GAAG,MAAM,KAAK,KAAK,iBAA8B,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU;AAC1F,WAAK,YAAY,KAAK;AAAA,IAC1B,CAAC;AAAA,EAEL;AAGJ;;;;;;;;;;;;;;;;ACjHO,MAAM,WAAW;AAAA,EAEpB,YAAmB,QAAiB;AAAjB;AAAA,EACnB;AAAA,EAGA,QAAS,QAA0B;AAE/B,aAAS,OAAO,QAAQ,2BAA2B,CAAC,OAAO,MAAM,YAAY;AACzE,UAAI,QAAQ;AAAA,QACR,SAAS,CAAC;AAAA,MACd;AAGA,gBAAU,QAAQ,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG;AAC5F,gBAAU,QAAQ,QAAQ,oCAAoC,CAACC,QAAOC,OAAM,OAAO,UAAU;AACzF,YAAIA,UAAS,SAAS;AAClB,gBAAM,OAAO,EAAE,KAAK,GAAG,MAAM,MAAM,GAAG,CAAC;AACvC,iBAAO;AAAA,QACX;AACA,cAAMA,KAAI,IAAI;AACd,eAAO;AAAA,MACX,CAAC;AAED,cAAQ,MAAM,GAAG,EAAE,QAAQ,CAAC,SAAS;AACjC,eAAO,KAAK,KAAK;AACjB,YAAI,SAAS;AACT;AACJ,YAAI,KAAK,WAAW,GAAG,GAAG;AACtB,gBAAM,OAAO,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC;AAClC;AAAA,QACJ;AACA,cAAM,IAAI,IAAI;AAAA,MAElB,CAAC;AAED,UAAI,UAAU;AACd,eAAQ,QAAQ,OAAO;AACnB,YAAI,SAAS,SAAS;AAClB,qBAAW,WAAW,MAAM,IAAI,EAAE,KAAK,GAAG;AAAA,QAC9C,OAAO;AACH,qBAAW,IAAI,SAAS,MAAM,IAAI;AAAA,QACtC;AAAA,MACJ;AAEA,UAAI,MAAM,IAAI,OAAO,aAAa;AAClC,aAAO;AAAA,IAEX,CAAC;AAED,WAAO;AAAA,EACX;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvDA;AAAmD;AAW5C,MAAM,UAAU;AAAA,EAUnB,YAAmB,QAAiB;AAAjB;AAPnB,gCAAU,SAAS,uBAAuB;AAC1C,iCAAW,CAAC,mBAAK,QAAO;AAExB,uCAA+B,mEAAiB,CAAC,WAAW,EAAC,OAAO,gBAAe,CAAC;AACpF,wCAAgC,mEAAiB,CAAC,OAAO,EAAC,OAAO,UAAS,GAAG,CAAC,GAAG,mBAAK,eAAc;AACpG,yCAAgC,mEAAiB,CAAC,OAAO,EAAC,OAAO,WAAU,GAAG,CAAC,GAAG,mBAAK,eAAc;AAAA,EAGrG;AAAA,EAEQ,kBAAkB,OAAiD;AACvE,WAAO,mBAAK,UAAS,SAAS,OAAO;AACjC,yBAAK,UAAS,IAAI;AAAA,IACtB;AACA,WAAO,mBAAK,UAAS,mBAAK,UAAS,SAAS,CAAC,MAAM,QAAW;AAC1D,yBAAK,UAAS,IAAI;AAAA,IACtB;AACA,WAAO,mBAAK,UAAS,mBAAK,UAAS,SAAS,CAAC;AAAA,EACjD;AAAA,EAGQ,iBAAiB,SAAkB,OAAgB,KAA4B;AACnF,cAAU,QAAQ,YAAY;AAC9B,QAAI,YAAY,KAAK,kBAAkB,KAAK;AAE5C,QAAI,oBAAoB,UAAU,WAAW,CAAC;AAE9C,uBAAK,gBAAkB,mEAAiB,CAAC,KAAK,EAAC,OAAO,aAAa,QAAO,CAAC;AAC3E,WAAO,mBAAK,UAAS,SAAS,OAAO;AACjC,yBAAK,UAAS,KAAK,MAAgB;AAAA,IACvC;AACA,uBAAK,UAAS,KAAK,mBAAK,eAAqB;AAC7C,QAAI,cAAc,mBAAK,UAAS;AAC5B,gBAAU,YAAY,mBAAK,eAAc;AAAA,IAC7C,OAAO;AACH,wBAAkB,OAAO,mBAAK,eAAc;AAAA,IAChD;AACA,uBAAK,iBAAkB,mEAAiB,CAAC,OAAO,EAAC,OAAO,UAAS,GAAG,CAAC,GAAG,mBAAK,eAAc;AAC3F,uBAAK,kBAAmB,mEAAiB,CAAC,OAAO,EAAC,OAAO,WAAU,GAAG,CAAC,GAAG,mBAAK,eAAc;AAC7F,WAAO,mBAAK;AAAA,EAChB;AAAA,EAEA,QAAS,QAA4D;AACjE,QAAI,YAAY;AAChB,uBAAK,SAAQ,OAAO,mBAAK,eAAc;AAKvC,UAAM,KAAK,OAAO,QAAQ,EAAE,QAAQ,CAAC,UAAoB;AACrD,UAAI,iBAAiB,eAAe,MAAM,QAAQ,QAAQ,GAAG;AAEzD,2BAAK,SAAQ,YAAY,KAAK;AAC9B;AAAA,MACJ;AACA,UAAI,iBAAiB,eAAe,MAAM,QAAQ,wFAAwF,GAAG;AACzI,YAAI,QAAQ;AACZ,YAAI,MAAM;AAEV,YAAI,MAAM,QAAQ,mBAAmB,GAAG;AACpC,kBAAQ,YAAY;AACpB,gBAAM;AAAA,QACV,WAAW,MAAM,QAAQ,sDAAsD,GAAG;AAC9E,cAAI,MAAM,QAAQ,aAAa,GAAG;AAC9B,oBAAQ,YAAY;AAAA,UACxB,WAAW,MAAM,QAAQ,aAAa,GAAG;AACrC,oBAAQ,YAAY;AAAA,UACxB,OAAO;AACH,oBAAQ,YAAY,SAAS,MAAM,QAAQ,OAAO,CAAC,CAAC,IAAI;AAAA,UAC5D;AAEA,gBAAM;AAAA,QACV,WAAW,MAAM,QAAQ,IAAI,GAAG;AAC5B,kBAAQ,YAAY;AACpB,gBAAM;AAAA,QACV;AAGA,YAAI,IAAI,KAAK,iBAAiB,MAAM,QAAQ,YAAY,GAAG,OAAO,GAAG;AAErE,UAAE,aAAa,UAAU,MAAM,aAAa,QAAQ,KAAK,EAAE;AAC3D,cAAM,gBAAgB,QAAQ;AAE9B,UAAE,aAAa,SAAS,MAAM,aAAa,OAAO,KAAK,EAAE;AACzD,cAAM,gBAAgB,OAAO;AAE7B,UAAE,UAAU,IAAI,GAAG,MAAM,SAAgB;AACzC,cAAM,aAAa,cAAc,MAAM,aAAa,OAAO,KAAK,EAAE;AAClE,cAAM,aAAa,SAAS,EAAE;AAAA,MAGlC;AACA,UAAI,MAAM,YAAY,QAAS,CAAE,MAAM,UAAU,SAAS,IAAI,GAAG;AAC7D,gBAAQ,IAAI,MAAM,KAAK;AACvB,cAAM,aAAa,wBAAwB,MAAM,aAAa,OAAO,CAAC;AACtE,cAAM,aAAa,SAAS,QAAQ;AAAA,MACxC;AAEA,yBAAK,iBAAgB,YAAY,KAAK;AAAA,IAC1C,CAAC;AAGD,UAAM,KAAK,mBAAK,SAAQ,iBAAiB,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAwB;AACpF,UAAI,MAAM,SAAS,WAAW,GAAG;AAC7B,cAAM,OAAO;AAAA,MACjB;AAAA,IACJ,CAAC;AAGD,UAAM,KAAK,mBAAK,SAAQ,iBAAiB,UAAU,CAAC,EAAE,QAAQ,CAAC,UAAwB;AACnF,UAAI,MAAM,SAAS,WAAW,GAAG;AAC7B,cAAM,OAAO;AAAA,MACjB;AAAA,IACJ,CAAC;AAED,WAAO,mBAAK;AAAA,EAChB;AACJ;AArHI;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnB0D;AAMjC;AAEY;AAQlC,IAAI,oBAA+B,CAAC;AAI3C,kBAAkB,mBAAmB,IAAI,CAAC,OAAgB,QAAQ,SAAuB,WAAoB;AACzG,MAAI,SAAS,QAAQ;AACrB,MAAI,MAAM,4EAAiB,CAAC,KAAK;AAEjC,SAAO,aAAa,IAAI,OAAO,OAAO;AAEtC,QAAM,KAAK,QAAQ,QAAQ,EAAE,QAAQ,CAAC,UAAU;AAC5C,QAAI,KAAK,OAAO,KAAK;AAAA,EACzB,CAAC;AACD,UAAQ,OAAO;AACf,SAAO,IAAI;AACf;AAEA,kBAAkB,aAAa,IAAI,CAAO,OAAgB,QAAQ,SAAuB,WAAoB;AACzG,MAAI,SAAS,QAAQ;AAErB,MAAI,MAAM,WAAW,GAAG,GAAG;AACvB,QAAI,cAAc,SAAS,cAAc,KAAK;AAC9C,WAAO,aAAa,aAAa,OAAO;AACxC,QAAI,aAAa,MAAM,+EAA4B,CAAC,OAAO,SAAS,OAAO;AAC3E,gBAAY,YAAY,UAAU;AAClC,WAAO;AAAA,EAEX,OAAO;AACH,QAAI,MAAM,4EAAiB,CAAC,KAAK;AAEjC,WAAO,aAAa,IAAI,OAAO,OAAO;AAEtC,QAAI,KAAK,OAAO,OAAO;AACvB,WAAO;AAAA,EACX;AACJ;AAGA,kBAAkB,kBAAkB,IAAI,CAAC,OAAgB,QAAQ,SAAuB,WAAoB;AACxG,MAAI,MAAM,4EAAiB,CAAC,KAAK;AAEjC,QAAM,KAAK,QAAQ,QAAQ,EAAE,QAAQ,CAAC,UAAU;AAC5C,QAAI,KAAK,OAAO,KAAK;AAAA,EACzB,CAAC;AACD,UAAQ,OAAO,IAAI,KAAK;AACxB,SAAO;AACX;AAEA,kBAAkB,eAAe,IAAI,CAAC,OAAgB,QAAQ,SAAuB,WAAoB;AACrG,MAAI,SAAS,QAAQ;AACrB,MAAI,cAAc,OAAO;AACzB,cAAY,aAAa,SAAS,MAAM;AACxC,MAAI,OAAO,SAAS,WAAW,GAAG;AAC9B,WAAO,OAAO;AAAA,EAClB;AACA,SAAO;AACX;AAUA,kBAAkB,cAAc,IAAI,CAAC,OAAgB,QAAQ,SAAuB,WAAoB;AACpG,QAAM,aAAa;AACnB,MAAI,QAAQ,UAAU,MAAM,QAAW;AACnC,WAAO;AAAA,EACX;AAEA,MAAI,WAAW,CAAC;AAChB,MAAI,aAAa,QAAQ;AACzB,SAAO,cAAc,wEAAqB,CAAC,iBAAiB,UAAU,EAAE,iBAAiB,cAAc,CAAC,MAAM,OAAO;AACjH,aAAS,KAAK,UAAU;AACxB,eAAW,UAAU,IAAI;AACzB,iBAAa,WAAW;AAAA,EAC5B;AAGA,MAAI,SAAS,QAAQ;AACrB,MAAI,MAAM,4EAAiB,CAAC,KAAK;AAGjC,UAAQ,cAAc,aAAa,IAAI,OAAO,OAAO;AAGrD,MAAI,KAAK,OAAO,OAAO;AACvB,WAAS,QAAQ,CAAC,YAAY;AAC1B,QAAI,KAAK,OAAO,OAAO;AAAA,EAC3B,CAAC;AAED,SAAO;AACX;AAEA,kBAAkB,cAAc,IAAI,CAAC,OAAgB,QAAQ,SAAuB,WAAmB;AACnG,MAAI,MAAM,4EAAiB,CAAC,KAAK;AAEjC,UAAQ,aAAa,SAAS,QAAQ,aAAa,OAAO,IAAI,MAAM,KAAK;AAEzE,SAAO;AACX;AAEA,kBAAkB,YAAY,IAAI,CAAM,OAAgB,QAAQ,SAAuB,WAAoB;AACvG,MAAI,MAAM,WAAW,GAAG,GAAG;AACvB,QAAI,cAAc,SAAS,cAAc,KAAK;AAC9C,UAAM,KAAK,QAAQ,QAAQ,EAAE,QAAQ,CAAC,UAAU;AAC5C,kBAAY,OAAO,KAAK;AAAA,IAC5B,CAAC;AACD,QAAI,aAAa,MAAM,+EAA4B,CAAC,OAAO,aAAa,OAAO;AAE/E,YAAQ,OAAO,UAAU;AACzB,WAAO;AAAA,EACX;AAGA,MAAI,UAAU,MAAM,MAAM,4BAA4B;AACtD,MAAK,CAAE,SAAS;AACZ,YAAQ,MAAM,gCAAgC,OAAO,cAAc,SAAS,oEAAoE;AAChJ,UAAM,iCAAiC,QAAQ;AAAA,EACnD;AACA,SAAO,IAAI,oBAAoB,QAAQ,CAAC,GAAG,eAAe,QAAQ,CAAC,GAAG,cAAc,OAAO;AAC3F,MAAI,cAAc,QAAQ,CAAC;AAE3B,MAAI,OAAO,yDAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;AACzD,MAAI,UAAU,MAAM,iEAAc,CAAC,QAAQ,CAAC,aAAa,YAAY,WAAW,CAAC;AAEjF,MAAI,SAAS,IAAI,QAAQ,OAAO;AAChC,MAAI,QAAQ,iBAAiB,OAAO;AAEpC,SAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,QAAQ;AACjC,QAAI,MAAM,MAAM,iBAAiB,cAAc,IAAI,QAAQ,OAAO,GAAG,CAAC;AACtE,QAAI,QAAQ,IAAI;AACZ,aAAO,GAAG,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,QAAQ,SAAS,EAAE,EAAE,KAAK;AAAA,IACtE;AAAA,EAEJ,CAAC;AACD,SAAO,OAAO,QAAQ,IAAI;AAE1B,SAAO,MAAO,IAAI,QAAQ,WAAU,OAAO,SAAS,MAAM;AAC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7JuD;AAEG;AAChB;AAC0B;AACR;AACV;AAG3C,MAAM,UAAU;AAAA,EAGnB,YAAmB,QAAiB;AAAjB;AAAA,EACnB;AAAA,EAEa,QAAQ,MAAoB;AAAA;AAGrC,eAAS,SAAS,MAAM,KAAK,KAAK,qBAAqB,YAAY,CAAC,GAAG;AACnE,eAAO,MAAM,OAAO,MAAM,MAAM;AAC5B,gBAAM,0DAAQ,CAAC,CAAC;AAAA,QACpB;AAAA,MACJ;AAGA,UAAI,kBAAkB,IAAI,6DAAe,CAAC,KAAK,MAAM;AACrD,WAAK,iBAAiB,UAAU,EAAE,QAAQ,CAACC,UAAS;AAChD,wBAAgB,YAAYA,KAAmB;AAAA,MACnD,CAAC;AAGD,eAAS,SAAS,CAAC,MAAM,GAAG,MAAM,KAAK,KAAK,iBAA8B,GAAG,CAAC,CAAC,GAAG;AAC9E,YAAI,MAAM,sBAAsB,MAAM,MAAM;AACxC;AAAA,QACJ;AACA,cAAM,sBAAsB,IAAI;AAEhC,YAAI,QAAQ,iBAAiB,KAAK;AAGlC,YAAI,OAAO,OAAO,KAAK,kEAAiB;AACxC,iBAAS,OAAO,MAAM,KAAK,IAAI,GAAG;AAE9B,cAAI,aAAa,MAAM,iBAAiB,GAAG;AAC3C,cAAI,eAAe,IAAI;AACnB;AAAA,UACJ;AACA,cAAI,eAAe,iBAAiB,MAAM,aAAa,EAAE,iBAAiB,GAAG,GAAG;AAC5E;AAAA,UACJ;AAGA,uBAAa,wEAAqB,CAAC,UAAU;AAE7C,cAAI,UAAU,kEAAiB,CAAC,GAAG;AACnC,cAAI;AACA,oBAAQ,MAAM,QAAQ,YAAY,MAAwB,OAAO,KAAK,MAAM;AAAA,UAEhF,SAAS,GAAP;AACE,gBAAI,aAAa,8EAAoB,EAAE;AACnC,gBAAE,iBAAiB,MAAM,OAAO;AAChC,mBAAK,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO;AACrC,oBAAM,YAAY,IAAI,sEAAgB,CAAC,EAAE,UAAU,mBAAmB,EAAE,iBAAiB,GAAG,CAAC;AAAA,YACjG,OAAO;AACH,mBAAK,OAAO,KAAK,uBAAuB,GAAG,cAAc,OAAO,gBAAgB,MAAM,OAAO,UAAU;AACvG,oBAAM;AAAA,YACV;AAAA,UACJ;AAAA,QAEJ;AACA,cAAM,KAAK,QAAQ,KAAK;AAAA,MAC5B;AAAA,IAEJ;AAAA;AACJ;;;;;;;;;;;;;;;;;AC1EmD;AAG5C,MAAM,cAAc;AAAA,EAEhB,QAAQ,SAAuB;AAClC,KAAC,SAAS,GAAG,MAAM,KAAK,QAAQ,iBAAiB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAoB;AACjF,QAAE,aAAa,mEAAiB,CAAC,OAAO,EAAC,OAAO,iBAAgB,GAAG,IAAI,EAAE,QAAQ,YAAY,aAAa,MAAM,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,GAAG,EAAE,iBAAiB;AAAA,IAC1K,CAAC;AAAA,EACL;AACJ;;;;;;;;;;;;;;;;ACRO,MAAM,cAAc;AAAA,EAApB;AAGH,SAAO,YAA8C;AAGrD,SAAO,SAA4C;AAAA;AAEvD;;;;;;;;;;;;;;;;ACPO,MAAM,gBAAuD;AAAA,EAEhE,WAAW,KAAsB;AAC7B,WAAO,IAAI,WAAW,KAAK,KAAK,IAAI,WAAW,gBAAgB;AAAA,EACnE;AAAA,EAEA,SAAS,KAAgC;AACrC,QAAI,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,aAAa,CAAC;AAAA,IAClB;AACA,UAAM,IAAI,QAAQ,gBAAgB,UAAU;AAC5C,UAAM,IAAI,QAAQ,UAAU,wBAAwB;AACpD,UAAM,IAAI,QAAQ,iCAAiC,CAAC,IAAI,UAAkB;AACtE,YAAM,MAAM,OAAO,EAAE,QAAQ,CAAC,SAAS;AACnC,YAAI,YAAY;AAAA,UACZ;AAAA,YACI,OAAO,SAAS,KAAK,MAAM,GAAG,EAAE,CAAC,CAAC;AAAA,YAClC,QAAQ,SAAS,KAAK,MAAM,GAAG,EAAE,CAAC,CAAC;AAAA,UACvC;AAAA,QACJ;AAAA,MACJ,CAAC;AAED,aAAO;AAAA,IACX,CAAC;AAED,QAAI,YAAY,KAAK,CAAC,GAAG,MAAM;AAC3B,UAAI,EAAE,QAAQ,EAAE;AACZ,eAAO;AACX,UAAI,EAAE,QAAQ,EAAE;AACZ,eAAO;AACX,aAAO;AAAA,IACX,CAAC;AAED,UAAM,IAAI,QAAQ,qCAAqC,CAAC,IAAI,MAAM,YAAY;AAE1E,UAAI,UAAU,QAAQ,QAAQ,OAAO,GAAG,EAAE,MAAM,GAAG;AACnD,UAAI,WAAW;AACf,UAAI,YAAY,IAAI;AACpB,UAAI,MAAM,KAAK,QAAQ,MAAM,GAAG;AAChC,aAAO;AAAA,IACX,CAAC;AAED,QAAI,SAAS,CAAC,YAAY,WAAW;AACjC,UAAI,UAAU,IAAI,QAAQ,WAAW,WAAW,QAAQ,MAAM,WAAW,MAAM;AAC/E,gBAAU,QAAQ,QAAQ,WAAW,IAAI,WAAW,MAAM,MAAM;AAChE,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,EAEX;AAEJ;;;;;;;;;;;;;;;;;;;;;ACvDc;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAuD;AAIrE,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBN,IAAM,aAAN,cAAyB,8DAAgB,CAAC;AAAA,EAE7C,YACW,MACT;AACE,UAAM;AAFC;AAIP,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB,aAAa;AAAA,MACb;AAAA,MACA,iBAAkB,OAAO,KAAK,IAAI,EAAE,CAAC;AAAA,IACzC,CAAC;AAAA,EACL;AAAA,EAEO,SAAS,OAAgB;AAE5B,SAAK,MAAM,aAAa,IAAI;AAAA,EAChC;AACJ;AAlBa,aAAN;AAAA,EADN,0DAAQ,CAAC,IAAI;AAAA,GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BwD;AAC1B;AAG3C,IAAI,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BX,MAAM,uBAAuB;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,IAAI;AACR;AAGO,IAAM,eAAN,cAA2B,8DAAgB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY/C,YAAY,cAAuB,QAA6B;AAC5D,UAAM;AACN,SAAK,eAAe;AAEpB,aAAS,kCAAI,uBAAyB;AACtC,QAAI,OAAO,OAAO,MAAM;AACpB,aAAO,KAAK,yDAAa,CAAC;AAAA,IAC9B;AACA,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB;AAAA,MACA,WAAW;AAAA,IACf,CAAC;AAAA,EAEL;AAAA,EAEA,KAAwB,OAAuB;AAC3C,QAAI,OAAO,KAAK,YAAY,MAAM,MAAM;AACpC,WAAK,MAAM,IAAK,KAAK,YAAY,MAAM,EAAU,QAAQ,YAAY,KAAK,YAAY;AAC1F,WAAO,MAAM,KAAK,KAAK;AAAA,EAC3B;AAEJ;AAjCa,eAAN;AAAA,EADN,0DAAQ,CAAC,IAAI;AAAA,GACD;;;;;;;;;;;;;;;;ACnCN,SAAS,cAAc,SAAkB,GAAY;AACxD,MAAI,SAAmB;AACvB,MAAI,aAAmB;AACvB,MAAI,mBAAmB,WAAW;AAClC,WAAU,IAAI,GAAG,IAAI,QAAQ,KAAM;AAC/B,cAAU,WAAW,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,gBAAgB,CAAC;AAAA,EAC5E;AACA,SAAO;AACX;;;;;;;;;;;;;;;;;;;;;;;;ACVc;AAEA;AACA;AAC4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHqC;AAE/E,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyEL,MAAM,qBAAqB;AAAA,EAA3B;AACH,SAAO,OAAe;AAAA;AAAA;AAAA;AAAA;AAI1B;AAIO,IAAM,iBAAN,cAA6B,6DAAe,CAAC;AAAA,EAEhD,YAAY,SAAgC,MAAM;AAC9C,UAAM;AACN,QAAI,WAAW;AACX,eAAS,IAAI,qBAAqB;AAEtC,QAAI,QAAQ,oEAAkB,CAAC,EAAC,QAAQ,MAAK,GAAG,kBAAkB;AAClE,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB;AAAA,MACA;AAAA,MACA,KAAK;AAAA,QACD,QAAQ,MAAM;AACV,gBAAM,SAAS,CAAE,MAAM;AACvB,gBAAM,OAAO;AAAA,QACjB;AAAA,MACJ;AAAA,MACA,KAAK;AAAA,QACD,QAAQ,CAAC,MAAM;AAAA,QAEf;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAIJ;AA3Ba,iBAAN;AAAA,EADN,0DAAQ,CAAC,GAAG;AAAA,GACA;;;;;;;;;;;;ACrFA;;;AAGb;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA,uBAAuB;AACvB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,2BAA2B;;;AAG3B,yBAAyB,oCAAoC;;AAE7D;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA,8BAA8B;AAC9B;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD,iDAAiD;AACjD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,mBAAO,CAAC,qDAAU;;AAEvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB;;AAExB,qBAAqB;;AAErB;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA,qCAAqC;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;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;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;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,mCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB;;AAEvB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;;;ACvpBa;;;AAGb;AACA;AACA;;AAEA;AACA,eAAe,oHAA+C;AAC9D,eAAe,kHAA8C;AAC7D,eAAe,gHAA6C;AAC5D,eAAe,gHAA6C;;AAE5D,QAAQ,YAAY;AACpB;;AAEA,QAAQ,OAAO;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,UAAU;AAC3C;AACA;AACA;;AAEA;;AAEA;;AAEA,mDAAmD,EAAE;;AAErD;AACA;;AAEA;;AAEA,yBAAyB,EAAE,cAAc,EAAE,kCAAkC,IAAI;;AAEjF;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,kEAAkE,WAAW;AAC7E;AACA;AACA,cAAc,2BAA2B,QAAQ;AACjD;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU,6BAA6B;;AAEvC;;AAEA,qBAAqB,KAAK;;AAE1B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,yEAAyE,KAAK;AAC9E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA;;AAEA;AACA;;AAEA,6BAA6B,IAAI;;AAEjC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtLa;;AAEb,uBAAuB,mBAAO,CAAC,mEAAe;;AAE9C;AACA,mBAAmB;AACnB,oBAAoB;AACpB;AACA;;AAEA;AACA,gCAAgC;AAChC;;AAEA;;AAEA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC,sBAAsB,qBAAqB;AAC3C;AACA,sBAAsB;AACtB;AACA;AACA,gCAAgC;AAChC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAkC;;;AAGlC,6BAA6B;;AAE7B;AACA,iDAAiD;;AAEjD,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,4DAA4D,IAAI;AAChE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA,gDAAgD;AAChD;AACA;AACA;;;;;;;;;;;;ACzJa;AACb;AACA;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,6DAAY;;AAElC;AACA,8BAA8B,IAAI,MAAM,IAAI;AAC5C;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uBAAuB,IAAI,aAAa;AACxC;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,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,sBAAsB,GAAG;AACzB;AACA;AACA,KAAK;AACL;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,IAAI;AAChB;AACA,UAAU,IAAI;AACd;AACA;AACA;AACA;AACA;AACA,qBAAqB,GAAG;AACxB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mBAAmB;AACnB;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,KAAK;AACL;AACA;AACA,UAAU;AACV;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,8BAA8B;AAC9B;AACA;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,KAAK;AACL;AACA,iBAAiB;AACjB;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACpVA;AACA,UAAU,oBAAoB;AAC9B,WAAW,QAAQ;AACnB,WAAW,KAAK,0CAA0C;AAC1D,aAAa,SAAS;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB,qDAAqD,gBAAgB;AACrE;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,SAAS;AACjB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,OAAO,IAAI;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA,gBAAgB;AAChB,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,IAAI;AAChB,eAAe,GAAG;AAClB,WAAW,GAAG;AACd;AACA,WAAW,QAAQ,mBAAmB;AACtC,YAAY,kBAAkB;AAC9B;AACA,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,MAAM;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA,uCAAuC;AACvC;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,QAAQ;AACjB;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ,YAAY;AACZ,cAAc;AACd;;AAEA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrRa;;;AAGb,6FAAkC;;;;;;;;;;;;ACHlC,yBAAyB;AACzB;AACa;;AAEb;AACA,6HAA2D;;;;;;;;;;;;ACL3D;AACA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;;AAEa;;AAEb;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B;AAC1B,qCAAqC;;;;;;;;;;;;AC3BrC;AACA;AACa;;;AAGb,uBAAuB;;AAEvB,yBAAyB;;AAEzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,oCAAoC;AACpC,4DAA4D;AAC5D;AACA,gCAAgC;AAChC,oBAAoB;AACpB,gCAAgC;AAChC,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA,8CAA8C,cAAc,EAAE;AAC9D,wCAAwC,KAAK,EAAE;AAC/C;;AAEA,8CAA8C,IAAI,OAAO,IAAI;;AAE7D,eAAe,mBAAO,CAAC,qEAAY;;AAEnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA,CAAC;;AAED;AACA,+BAA+B;AAC/B;AACA;;AAEA;AACA,uDAAuD;;AAEvD;AACA,mBAAmB;AACnB;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ,YAAY;AACZ,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wCAAwC;;AAExC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,uBAAuB,mBAAO,CAAC,kFAA6B;;AAE5D;AACA;AACA;AACA;;;AAGA;AACA;AACA,oDAAoD,oCAAoC,MAAM;AAC9F;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,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2BAA2B,GAAG,EAAE,MAAM,KAAK;AACrD,UAAU,yBAAyB,GAAG,EAAE,MAAM,IAAI,MAAM;AACxD,UAAU,mBAAmB,GAAG,EAAE,EAAE,iBAAiB,EAAE,iCAAiC,MAAM;AAC9F,UAAU,2BAA2B,GAAG,EAAE,EAAE,iBAAiB,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX,qFAA8C;AAC9C,6FAAiD;;AAEjD,cAAc;AACd,gBAAgB;AAChB,WAAW;AACX,kBAAkB;AAClB,mBAAmB;AACnB,yBAAyB;AACzB,qBAAqB;AACrB;AACA,kBAAkB;AAClB,sBAAsB;AACtB,eAAe;AACf,oBAAoB;AACpB,sBAAsB;AACtB,mBAAmB;AACnB,gBAAgB;AAChB,0BAA0B;;;;;;;;;;;;AC5T1B;AACa;;;AAGb,oIAA4D;AAC5D,sJAAkE;AAClE,oIAA4D;;;;;;;;;;;;ACN5D;AACA;AACa;;;AAGb,kBAAkB,0GAAsC;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B,OAAO;;AAEjC;AACA;AACA;;AAEA,yBAAyB;;AAEzB;AACA,wCAAwC;;AAExC;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;AC/CA;AACA;AACa;;;AAGb,kBAAkB,0GAAsC;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;;AAEA,uFAAuF;;AAEvF;;AAEA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;;AAGb,mBAAmB,mBAAO,CAAC,sEAAgB;AAC3C,mBAAmB,mBAAO,CAAC,kEAAW;AACtC,mBAAmB,mBAAO,CAAC,8DAAY;AACvC,mBAAmB,mBAAO,CAAC,oEAAe;AAC1C,mBAAmB,mBAAO,CAAC,sEAAgB;AAC3C,mBAAmB,mBAAO,CAAC,wEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,sDAAY;AACvC,mBAAmB,mBAAO,CAAC,4CAAO;AAClC,mBAAmB,mBAAO,CAAC,yDAAU;;;AAGrC;AACA,WAAW,mBAAO,CAAC,4EAAmB;AACtC,QAAQ,mBAAO,CAAC,sEAAgB;AAChC,cAAc,mBAAO,CAAC,kFAAsB;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa;AACrB;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;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,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sCAAsC;AAC9E,WAAW;AACX;AACA;AACA,kBAAkB;AAClB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sCAAsC;AAC9E;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;;;AAGhC;AACA;;AAEA,iBAAiB;AACjB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA,kBAAkB;;AAElB,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA,GAAG;;AAEH;;AAEA,6CAA6C,kCAAkC;;AAE/E;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA,GAAG;;AAEH;;AAEA,6CAA6C,kCAAkC;;AAE/E;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACrkBA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,mBAAO,CAAC,wDAAS;;;AAGvC;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,gFAAqB;AAC/C,kBAAkB,mBAAO,CAAC,8EAAoB;AAC9C,kBAAkB,mBAAO,CAAC,gFAAqB;AAC/C,kBAAkB,mBAAO,CAAC,0FAA0B;AACpD,kBAAkB,mBAAO,CAAC,0EAAkB;AAC5C,kBAAkB,mBAAO,CAAC,8EAAoB;AAC9C,kBAAkB,mBAAO,CAAC,wFAAyB;AACnD,kBAAkB,mBAAO,CAAC,0FAA0B;AACpD,kBAAkB,mBAAO,CAAC,oFAAuB;AACjD,kBAAkB,mBAAO,CAAC,sFAAwB;AAClD,kBAAkB,mBAAO,CAAC,wFAAyB;AACnD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC,kDAAkD,mCAAmC;AACrF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;;AAEd;;AAEA;AACA;;;AAGA,8BAA8B,mBAAO,CAAC,4FAA2B;;;AAGjE;;;;;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb,aAAa,mBAAO,CAAC,wDAAS;;;AAG9B;AACA,sBAAsB,mBAAO,CAAC,sFAAwB;AACtD,sBAAsB,mBAAO,CAAC,8EAAoB;AAClD,sBAAsB,mBAAO,CAAC,gFAAqB;AACnD,sBAAsB,mBAAO,CAAC,kFAAsB;AACpD,sBAAsB,mBAAO,CAAC,4FAA2B;AACzD,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD;AACA;AACA,sBAAsB,mBAAO,CAAC,sFAAwB;AACtD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gCAAgC,OAAO;AACvC;AACA;AACA;;AAEA,uBAAuB,mBAAO,CAAC,wFAAyB;;;AAGxD;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,mBAAO,CAAC,wDAAS;;;AAGvC;AACA;;AAEA;AACA,uBAAuB,mBAAO,CAAC,gFAAqB;AACpD,uBAAuB,mBAAO,CAAC,sFAAwB;AACvD,uBAAuB,mBAAO,CAAC,sFAAwB;AACvD,uBAAuB,mBAAO,CAAC,oFAAuB;AACtD,uBAAuB,mBAAO,CAAC,0FAA0B;AACzD,uBAAuB,kIAAgD;AACvE,uBAAuB,wHAA2C;AAClE,uBAAuB,mBAAO,CAAC,gFAAqB;AACpD,uBAAuB,mBAAO,CAAC,kFAAsB;AACrD,uBAAuB,mBAAO,CAAC,wFAAyB;AACxD,uBAAuB,mBAAO,CAAC,8FAA4B;AAC3D,uBAAuB,mBAAO,CAAC,oFAAuB;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAO,CAAC,kGAA8B;AAC7D,uBAAuB,qIAAmD;AAC1E,uBAAuB,2HAA8C;AACrE;AACA;AACA,uBAAuB,mBAAO,CAAC,oGAA+B;AAC9D;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,cAAc,SAAS;AACvB;AACA;AACA;;;AAGA,+BAA+B,mBAAO,CAAC,gGAA6B;;;AAGpE;;;;;;;;;;;;ACxLA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AChFA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA,YAAY;AACZ,aAAa;AACb;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,oGAAgC;AACtD,sBAAsB,yGAAqC;AAC3D,sBAAsB,wGAAoC;;;AAG1D;;AAEA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;;AAEA,sCAAsC,OAAO;AAC7C;AACA;;AAEA;AACA;;;AAGA;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,SAAS;AAChD;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,2BAA2B;;AAE3B,kDAAkD;;AAElD;AACA,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;;;AAGA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B,2CAA2C,uBAAuB;;AAElE;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/VA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;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,wDAAwD;;AAExD;AACA,qDAAqD;;AAErD;AACA;AACA,gBAAgB;;AAEhB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;AAC9B;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC3RA;;AAEa;;;AAGb;AACA;;AAEA,uDAAuD;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjCA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,uBAAuB;;AAEvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD;;AAEhD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,2BAA2B;;AAE3B;AACA;;AAEA,qBAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjGA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;;AAEA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD;;AAElD,gBAAgB;;AAEhB;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC,yBAAyB;AACzB;;AAEA,iBAAiB;;AAEjB,gBAAgB;;AAEhB;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC5CA;;AAEa;;;AAGb,kBAAkB,mBAAO,CAAC,mFAAuB;AACjD,6BAA6B,yHAAmD;;AAEhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,gCAAgC;;AAEhC,mDAAmD;;AAEnD;;AAEA,cAAc,2BAA2B;AACzC,+CAA+C;AAC/C;;AAEA,qCAAqC;;AAErC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,sDAAsD;;AAEtD;AACA;AACA;;AAEA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzEA;;AAEa;;;AAGb;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;AACA,kCAAkC;;AAElC;AACA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;AClFA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;;AAEA,8CAA8C;;AAE9C,SAAS;AACT;AACA,sBAAsB;;AAEtB;;AAEA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;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,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B;;AAE/B;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA,0DAA0D;;AAE1D;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,MAAM;AACN;AACA,gCAAgC;AAChC;;AAEA,uEAAuE;AACvE;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC3WA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;ACnDa;;;AAGb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,2DAA2D;AAC3D;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;;AAEA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA,sEAAsE;;AAEtE;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA,sCAAsC;;AAEtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;AACpB;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;ACrMA;;AAEa;;AAEb,YAAY,mBAAO,CAAC,yDAAU;AAC9B,cAAc,sGAAkC;;;AAGhD;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB,uBAAuB;AACvB,4BAA4B;AAC5B,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,WAAW;AACrE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;AACA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,WAAW;AAC7C;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;;AAEpB;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,WAAW;AAC7C,6CAA6C;AAC7C;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;;AAEpB;AACA,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACtOA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;;AAEjC;;AAEA,kDAAkD;;AAElD;AACA,uDAAuD;;AAEvD;AACA;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA,uFAAuF;;AAEvF,uCAAuC;;AAEvC;AACA;AACA;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;;AAEA,0FAA0F;;AAE1F;AACA;;AAEA;;AAEA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,sCAAsC;AACtC,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA,4DAA4D;;AAE5D,gBAAgB;;AAEhB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iCAAiC,oBAAoB;AACrD,oDAAoD;;AAEpD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC5Na;;;AAGb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACfa;;AAEb;AACA;;AAEA;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACa;;;AAGb,qBAAqB,6GAAyC;;;AAG9D;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC;;AAEnC,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,gCAAgC,QAAQ;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,mBAAmB;AACxC;AACA;AACA,iDAAiD;;AAEjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7IA;;AAEa;;;AAGb;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACa;;AAEb;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG;AAC1B,2BAA2B,GAAG,yBAAyB,GAAG;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA,uCAAuC;;AAEvC,yCAAyC,aAAa;;AAEtD,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzGA;AACA;AACa;;;AAGb,qBAAqB,2GAAuC;AAC5D,qBAAqB,0GAAsC;AAC3D,qBAAqB,6GAAyC;;AAE9D;AACA;AACA,2BAA2B;;;AAG3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAmB;AACjC;;AAEA;;AAEA,+BAA+B,QAAQ;AACvC,yCAAyC;AACzC;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,wBAAwB,QAAQ;AAChC,uFAAuF;AACvF,4CAA4C;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,wBAAwB,mBAAmB;AAC3C,uFAAuF;AACvF,4CAA4C;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;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;;AAEA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA,uCAAuC;;AAEvC,yCAAyC,aAAa;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACxMA;AACA;AACa;;AAEb,YAAY,mBAAO,CAAC,yDAAU;;;AAG9B;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;;AAEA,sCAAsC,OAAO;AAC7C;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;AAEA,0BAA0B,YAAY;AACtC;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;;AAEa;;;AAGb;AACA,gDAAgD,EAAE,gCAAgC,KAAK,6CAA6C,KAAK;AACzI,6CAA6C,KAAK;;;AAGlD;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;;AAEA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC3EA;;AAEa;;;AAGb;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA;;AAEA;AACA,mEAAmE;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,+EAA+E;;AAE/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACa;;;AAGb;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;;AAEA;AACA;AACA,yBAAyB;AACzB;;AAEA,sBAAsB,iBAAiB;AACvC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,WAAW,0BAA0B;AACrC;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA;AACA;AACa;;;AAGb;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA,gBAAgB;;AAEhB,4DAA4D;;AAE5D;;AAEA,cAAc,oBAAoB;AAClC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,QAAQ;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA,+BAA+B,QAAQ,QAAQ;;AAElC;;AAEb,wBAAwB,mBAAO,CAAC,6EAAoB;AACpD,wBAAwB,kGAA8B;AACtD,wBAAwB,gHAA4C;AACpE,wBAAwB,4GAAwC;;;AAGhE,mCAAmC,IAAI,OAAO,IAAI,GAAG;AACrD,mCAAmC,KAAK,EAAE;;;AAG1C;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;AAEb,cAAc,sGAAkC;;AAEhD;;AAEA,gBAAgB,SAAS,OAAO;;AAEhC,oBAAoB,WAAW,EAAE;AACjC,qCAAqC,gCAAgC;;;AAGrE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,YAAY;AACpC;AACA;AACA,2CAA2C;AAC3C;AACA,2CAA2C;;AAE3C;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN,2BAA2B;;AAE3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;;AAEa;;;AAGb,kBAAkB,8GAAwC;;;AAG1D;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB;AACtB;AACA;;;AAGA;AACA;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;;AAEa;;AAEb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;AACzD,6DAA6D;;AAE7D;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA,+CAA+C;AAC/C;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACvJA;;AAEa;;AAEb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;;AAEzD;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACrJA;;AAEa;;;AAGb;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzDA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;;AAEA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA,4DAA4D;;AAE5D;AACA;AACA;;;;;;;;;;;;AC7CA;;AAEa;;;AAGb,qBAAqB,mBAAO,CAAC,yDAAU;AACvC,qBAAqB,2GAAuC;AAC5D,qBAAqB,0GAAsC;AAC3D,qBAAqB,6GAAyC;;;AAG9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,6DAA6D;;AAE7D;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;;;;;;;;;;;;AC7JA;AACA;AACa;;;AAGb;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA,gBAAgB;;AAEhB,gCAAgC;;AAEhC;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;;AAEA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA;AACA;;AAEa;;;AAGb;AACA,MAAM;;AAEN,oDAAoD,oCAAoC,MAAM;;AAE9F;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,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;;AAE3B,iBAAiB;;AAEjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD;;AAEhD;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA,iBAAiB;;AAEjB;;AAEA;AACA,EAAE;;;;;;;;;;;;ACxFF;;AAEa;;;AAGb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;;AAErB;;AAEA,kCAAkC,SAAS;AAC3C,gCAAgC;AAChC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;;;;;;;;;;;;;ACvMa;;;AAGb;;AAEA;;AAEA;AACA;AACA,eAAe;;AAEf;;AAEA,cAAc,SAAS;AACvB;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oCAAoC,EAAE;AACtC;AACA;;AAEA,gCAAgC,OAAO;AACvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA,0BAA0B;AAC1B;;;AAGA;;;;;;;;;;;;;ACxHa;;;AAGb;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;;AAEA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iCAAiC,OAAO;AACxC;;AAEA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,0BAA0B;AAC1B;;;AAGA;;;;;;;;;;;;;AChGa;;;AAGb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACxBa;;;AAGb,6FAA2C;AAC3C,6FAA2C;AAC3C,6FAA2C;AAC3C,0FAA0C;;;;;;;;;;;;ACN1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,2CAA2C,KAAK;AAChD,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA,qBAAqB;AACrB;AACA;AACA,2CAA2C,OAAO;AAClD;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;;;;;;;;;;;;ACvTA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;ACAa;;AAEb;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;;AAEvB;AACA;AACA,oCAAoC;AACpC,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;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,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,KAAK;AACL,oCAAoC;AACpC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB,6CAA6C,qBAAqB;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;;AAEhD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEsE;AACtE,iEAAe,QAAQ,EAAC;;;;;;;;;;;AC3bxB;;;;;;;;;;ACAA;;;;;;;;;;ACAA,8BAA8B,WAAW,EAAE;;;;;;;;;;ACA3C;;;;;;;;;;;ACAa;;AAEb,kHAA+C;AAC/C,+GAA8C;AAC9C,+GAA8C;AAC9C,4GAA6C;AAC7C,4GAA6C;;;;;;;;;;;ACN7C;;;;;;;;;;;;;ACAwC;;AAExC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACXwC;;AAExC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACnBwC;;AAExC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AChBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACnBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;ACdwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iFAAiF;AACjF;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;;;AAGA;AACA;AACA,+DAA+D,oBAAoB,qBAAqB,wBAAwB,YAAY;AAC5I;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;ACrDwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnBwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBmC;AACY;AACU;AAClB;AACV;AACM;AACA;AACN;AACY;AACI;AACA;AAChB;;;;;;;;;;;;;;;;;;UCZ7B;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;ACLkB;AACI;AACK;AAEA","sources":["webpack://@leuffen/themejs1/./elements/e-card-default/e-card-default.ts","webpack://@leuffen/themejs1/./elements/e-form/e-form.ts","webpack://@leuffen/themejs1/./elements/elements.ts","webpack://@leuffen/themejs1/./index.dev.ts","webpack://@leuffen/themejs1/./index.ts","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/custom-element.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/html.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/htmlFile.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/loadHtml.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/apply.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/create-element.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/debounce.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/debouncer.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/dom-ready.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/elwalk.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/eval.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/ka-set-options.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/query-select.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/sleep.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/storage.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/str-to-camelcase.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomElement.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomFragment.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomModal.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomWrapper.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaHtmlElement.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaModal.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/ka-use.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/functions.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/tpl/template.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/tpl/templatify.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/types.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/accordion/accordion.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/hamburger/hamburger.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/input/input.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/map/map.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/screen/screen.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/index.module.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/Micx.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/formmail/MicxFormmailDefaultBootstrapStyle.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/formmail/MicxFormmailFacade.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/formmail/MicxFormmailHelper.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/formmail/MicxFormmailStyleInterface.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/formmail/MicxFormmailerApi.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/helper/functions.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/hit-index.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/mediastore/MicxCdnImageObserver.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/mediastore/MicxCdnImgElement.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/mediastore/MicxImageUrlDecoderV2.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/dist/mediastore/MicxImageUrlEncoderV2.js","webpack://@leuffen/themejs1/./src.dev/ShowcaseElement.ts","webpack://@leuffen/themejs1/./src.dev/SwitcherElement.ts","webpack://@leuffen/themejs1/./themes/theme1/theme1.dev.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/index.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/component/joda-content-element.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/component/joda-fetch.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/component/joda-split.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/JodaDescriptionManager.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/JodaElementException.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/JodaErrorElement.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/MediaSupport.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/QTemplate.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/functions.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/ka-quick-template.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/helper/logger.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/index.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/joda.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/LayoutProcessor.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodaimageproc.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodaresponsive.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodashorts.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodasplit.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodastyle-commands.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodastyle.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/processor/jodavisualize.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/types/DefaultLayout.ts","webpack://@leuffen/themejs1/./workspaces/jodastyle/src/vendor/LeuCDNImageProc.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/index.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/src/base/tab-pane.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/src/form/form-input.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/src/functions.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/src/index.ts","webpack://@leuffen/themejs1/./workspaces/kasimirjs-kit-bootstrap/src/sidebar/sidebar-wrapper.ts","webpack://@leuffen/themejs1/./node_modules/linkify-it/index.js","webpack://@leuffen/themejs1/./node_modules/linkify-it/lib/re.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/patterns.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/utils.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/entities.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/html_blocks.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/html_re.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/utils.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_destination.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_label.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_title.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_core.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/commonmark.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/default.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/zero.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/renderer.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/ruler.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/blockquote.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/code.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/fence.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/heading.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/hr.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/html_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/lheading.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/list.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/paragraph.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/reference.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/state_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/table.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/linkify.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/normalize.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/replacements.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/smartquotes.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/state_core.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/text_join.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/autolink.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/backticks.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/balance_pairs.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/emphasis.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/entity.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/escape.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/fragments_join.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/html_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/image.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/link.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/linkify.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/newline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/state_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/strikethrough.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/text.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/token.js","webpack://@leuffen/themejs1/./node_modules/mdurl/decode.js","webpack://@leuffen/themejs1/./node_modules/mdurl/encode.js","webpack://@leuffen/themejs1/./node_modules/mdurl/format.js","webpack://@leuffen/themejs1/./node_modules/mdurl/index.js","webpack://@leuffen/themejs1/./node_modules/mdurl/parse.js","webpack://@leuffen/themejs1/./src.dev/dev.scss?7794","webpack://@leuffen/themejs1/./theme1.scss?9331","webpack://@leuffen/themejs1/./node_modules/punycode/punycode.es6.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Cc/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Cf/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/P/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Z/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/index.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/properties/Any/regex.js","webpack://@leuffen/themejs1/./sections/cta-base/cta-base.ts","webpack://@leuffen/themejs1/./sections/cta-form/cta-form.ts","webpack://@leuffen/themejs1/./sections/footer-base/footer-base.ts","webpack://@leuffen/themejs1/./sections/hero-max/hero-max.ts","webpack://@leuffen/themejs1/./sections/hero-ribbon/hero-ribbon.ts","webpack://@leuffen/themejs1/./sections/hero-title-small/hero-title-small.ts","webpack://@leuffen/themejs1/./sections/navbar-blox/navbar-blox.ts","webpack://@leuffen/themejs1/./sections/sec-card-2col/sec-card-2col.ts","webpack://@leuffen/themejs1/./sections/sec-card-feature/sec-card-feature.ts","webpack://@leuffen/themejs1/./sections/sec-legal-content/sec-legal-content.ts","webpack://@leuffen/themejs1/./sections/sec-multi-card/sec-multi-card.ts","webpack://@leuffen/themejs1/./sections/sec-testimonial-ribbon/sec-testimonial-ribbon.ts","webpack://@leuffen/themejs1/./sections/sections.ts","webpack://@leuffen/themejs1/webpack/bootstrap","webpack://@leuffen/themejs1/webpack/runtime/compat get default export","webpack://@leuffen/themejs1/webpack/runtime/define property getters","webpack://@leuffen/themejs1/webpack/runtime/hasOwnProperty shorthand","webpack://@leuffen/themejs1/webpack/runtime/make namespace object","webpack://@leuffen/themejs1/./src.dev/index-dev.ts"],"sourcesContent":["import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"e-card-default\",\n // language=HTML\n `\n <div class=\"card tjs__e-card-default\">\n <slot data-select=\"img\" data-replace></slot>\n <div class=\"card-body text-format p-4\">\n <slot></slot>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"e-form\",\n // language=HTML\n `\n <form class=\"tjs__e-form\" data-micx-formmail-preset=\"default\" data-micx-formmail-sent-message=\"E-Mail erfolgreich gesendet!\">\n <slot></slot>\n </form>\n `);\n","export * from \"./e-card-default/e-card-default\";\nexport * from \"./e-form/e-form\";\n","\nimport \"./theme1.scss\"\nimport \"./src.dev/dev.scss\"\n\nimport \"./themes/theme1/theme1.dev\"\nimport \"@micx/lib-js\";\n","export * from \"./sections/sections\";\nexport * from \"./elements/elements\";\nexport * from \"@leuffen/isl-base\";\nimport \"@leuffen/jodastyle\";\n\n\n\n","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};\nimport { ka_templatify } from \"../tpl/templatify.js\";\nimport { KaTemplate } from \"../tpl/template.js\";\nimport { ka_query_selector } from \"../core/query-select\";\nimport { RemoteTemplate } from \"./htmlFile\";\nexport class KaCustomElement extends HTMLElement {\n constructor(props) {\n super(props);\n /**\n *\n * @protected\n * @var {KaTemplate}\n */\n this.__tpl = null;\n this.__isConnected = false;\n }\n /**\n * The Template associated with this Element\n *\n * @return {KaTemplate}\n */\n get $tpl() {\n return this.__tpl;\n }\n isConnected() {\n return this.isConnected;\n }\n /**\n * @abstract\n * @return {Promise<void>}\n */\n connected($tpl, $this) {\n return __awaiter(this, void 0, void 0, function* () {\n console.warn(\"connected() method not overridden in\", this);\n });\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let callback = this.constructor.__callback;\n if (callback === null) {\n }\n else {\n callback.bind(this);\n }\n if (this.constructor.__tpl !== null) {\n let origTpl = this.constructor.__tpl;\n if (origTpl instanceof RemoteTemplate)\n origTpl = yield origTpl.load();\n let tpl = ka_templatify(origTpl);\n if (this.constructor.__options.shadowDom === true) {\n let shadowDom = this.attachShadow(this.constructor.__options.shadowDomOptions);\n shadowDom.appendChild(tpl);\n }\n else {\n this.appendChild(tpl);\n }\n this.__tpl = new KaTemplate(tpl);\n }\n if (this.constructor.__options.waitEvent !== null) {\n let wd = this.constructor.__options.waitEvent.split(\"@\");\n let eventName = wd[0];\n let target = document;\n if (wd.length === 2) {\n target = ka_query_selector(wd[1]);\n }\n target.addEventListener(eventName, (event) => __awaiter(this, void 0, void 0, function* () {\n callback(this.$tpl, this);\n this.__isConnected = true;\n }));\n return;\n }\n if (callback === null) {\n // Class: Call connected() Method\n yield this.connected(this.$tpl, this);\n this.__isConnected = true;\n return;\n }\n // Function\n callback(this.$tpl, this);\n this.__isConnected = true;\n });\n }\n}\n;\n","export function ka_html(htmlContent) {\n if (htmlContent instanceof HTMLTemplateElement) {\n return htmlContent;\n }\n let e = document.createElement(\"template\");\n e.innerHTML = htmlContent;\n return e;\n}\n","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};\nimport { ka_load_html } from \"./loadHtml\";\nexport class RemoteTemplate {\n constructor(url) {\n this.url = url;\n this.tpl = null;\n }\n /**\n *\n * @return {Promise<HTMLTemplateElement>}\n */\n load() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.tpl === null)\n this.tpl = yield ka_load_html(this.url);\n return this.tpl;\n });\n }\n}\n/**\n * Load the Template on usage from remote location\n *\n *\n * @param url {string}\n * @return {RemoteTemplate}\n */\nfunction htmlUrl(url) {\n return new RemoteTemplate(url);\n}\n","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};\n/**\n *\n * @param url {string}\n * @return {Promise<HTMLTemplateElement>}\n */\nexport function ka_load_html(url) {\n return __awaiter(this, void 0, void 0, function* () {\n let e = document.createElement(\"template\");\n let result = yield fetch(url);\n if (!result.ok) {\n console.error(`[loadHtml] failed to load '${url}'`);\n throw `[loadHtml] failed to load '${url}'`;\n }\n let body = yield result.text();\n e.innerHTML = body;\n return e;\n });\n}\n","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};\nimport { ka_eval } from \"./eval.js\";\nimport { ka_str_to_camel_case } from \"./str-to-camelcase.js\";\nimport { isset, isUndefined } from \"../functions\";\nimport { KaCustomFragment } from \"../element/KaCustomFragment\";\nimport { KaUse } from \"../element/ka-use\";\nexport function ka_apply(selector, scope, recursive = false) {\n if (typeof selector === \"string\")\n selector = KaToolsV1.querySelector(selector);\n let attMap = {\n \"textcontent\": \"textContent\",\n \"htmlcontent\": \"innerHTML\",\n \"innerhtml\": \"innerHTML\",\n };\n for (let attName of selector.getAttributeNames()) {\n //console.log(attName);\n if (!attName.startsWith(\"ka.\")) {\n continue;\n }\n let attVal = selector.getAttribute(attName);\n let attType = attName.split(\".\")[1];\n let attSelector = attName.split(\".\")[2];\n if (typeof attSelector === \"undefined\")\n attSelector = null;\n let registerEventHandler = function (element, action, callbackOrCode, scope) {\n if (typeof element._ka_on === \"undefined\")\n element._ka_on = {};\n if (typeof element._ka_on[action] === \"undefined\")\n element.addEventListener(action, (e) => element._ka_on[action](e));\n element._ka_on[action] = (e) => __awaiter(this, void 0, void 0, function* () {\n scope[\"$event\"] = e;\n if (typeof callbackOrCode === \"function\") {\n return callbackOrCode(e, element, scope);\n }\n else {\n return ka_eval(callbackOrCode, scope, element);\n }\n });\n };\n if (attType === \"on\") {\n let attScope = Object.assign({ $scope: scope }, scope);\n if (attSelector !== null) {\n registerEventHandler(selector, attSelector, attVal, attScope);\n }\n else {\n let callBackMap = KaToolsV1.eval(attVal, attScope, selector);\n for (let curAction in callBackMap) {\n registerEventHandler(selector, curAction, callBackMap[curAction], attScope);\n }\n }\n continue;\n }\n let r = null;\n if (typeof attVal !== \"undefined\" && typeof attVal !== null && attVal !== \"\")\n r = ka_eval(attVal, scope, selector);\n switch (attType) {\n case \"use\":\n if (!(selector instanceof KaUse)) {\n let elem = new KaUse();\n // Copy all attributes from selector to elem\n for (let attName of selector.getAttributeNames()) {\n elem.setAttribute(attName, selector.getAttribute(attName));\n }\n selector.replaceWith(elem);\n selector = elem;\n }\n selector.use(r, scope);\n continue;\n case \"become\":\n if (!(r instanceof HTMLElement)) {\n console.error(\"ka.become is only available on HTMLElements: Used on \", r, \"found in \", selector);\n throw \"ka.become called on non HTMLElement.\";\n }\n let attributes = selector.attributes;\n selector.replaceWith(r);\n continue;\n case \"content\":\n selector.setAttribute(\"ka.stop\", \"\");\n if (typeof r === \"string\") {\n selector.innerHTML = r;\n continue;\n }\n if (!(r instanceof HTMLElement)) {\n console.error(\"ka.content is only available on HTMLElements: Used on \", r, \"found in \", selector);\n throw \"ka.content called on non HTMLElement.\";\n }\n selector.append(r);\n continue;\n case \"scope\":\n if (!(r instanceof Object)) {\n console.error(\"ka.scope must be object type <ka-use/> Elements: Value is \", r, \"found in \", selector);\n throw \"ka.scope insuffient value\";\n }\n selector.setScope(r);\n continue;\n case \"stop\":\n continue;\n case \"debug\":\n console.log(\"ka.debug on element\", selector, \"value:\", r, \"scope:\", scope);\n continue;\n case \"ref\":\n if (isUndefined(scope.$ref))\n scope.$ref = {};\n // Allow ref without parameter to use $ref.$last\n if (r !== null)\n scope.$ref[r] = selector;\n scope.$ref.$last = selector;\n break;\n case \"classlist\":\n if (attSelector !== null) {\n if (r === true) {\n selector.classList.add(attSelector);\n }\n else {\n selector.classList.remove(attSelector);\n }\n break;\n }\n for (let cname in r) {\n if (r[cname] === true) {\n selector.classList.add(cname);\n }\n else {\n selector.classList.remove(cname);\n }\n }\n break;\n case \"style\":\n if (attSelector !== null && attSelector.startsWith(\"--\")) {\n selector.style.setProperty(attSelector, r);\n break;\n }\n if (attSelector !== null) {\n let val = r;\n if (typeof val === \"number\" && [\"left\", \"top\", \"height\", \"width\", \"bottom\", \"right\", \"line-height\", \"font-size\"].indexOf(attSelector) !== -1)\n val = val + \"px\";\n selector.style[ka_str_to_camel_case(attSelector)] = val;\n break;\n }\n for (let cname in r) {\n let val = r[cname];\n if (typeof val === \"number\" && [\"left\", \"top\", \"height\", \"width\", \"bottom\", \"right\", \"line-height\", \"font-size\"].indexOf(cname) !== -1)\n val = val + \"px\";\n selector.style[ka_str_to_camel_case(cname)] = val;\n }\n break;\n case \"bindarray\":\n if (attSelector === \"default\")\n continue;\n if (isUndefined(r)) {\n // Bind default values\n if (selector.hasAttribute(\"ka.bind.default\")) {\n scope = Object.assign({ $scope: scope }, scope);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: ka_eval(selector.getAttribute(\"ka.bind.default\"), scope, selector) });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n }\n if (!Array.isArray(r)) {\n console.error(\"kap:bindarr: Not an array!\", r, selector);\n return;\n }\n if (r.indexOf(selector.value) === -1)\n selector.checked = false;\n else\n selector.checked = true;\n if (typeof selector._kap_bind === \"undefined\") {\n selector.addEventListener(\"change\", (event) => {\n let arr = ka_eval(attVal, scope, selector);\n if (arr.indexOf(selector.value) === -1 && selector.checked)\n arr.push(selector.value);\n if (arr.indexOf(selector.value) !== -1 && !selector.checked)\n arr = arr.filter((e) => e !== selector.value);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: arr });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector._kap_bind = true;\n }\n break;\n case \"bind\":\n if (attSelector === \"default\")\n continue;\n if (isUndefined(r)) {\n // Bind default values\n if (isset(selector.value)) {\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: selector.value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n if (selector.hasAttribute(\"ka.bind.default\")) {\n scope = Object.assign({ $scope: scope }, scope);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: ka_eval(selector.getAttribute(\"ka.bind.default\"), scope, selector) });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n }\n if (selector.type === \"checkbox\" || selector.type === \"radio\") {\n if (selector.hasAttribute(\"value\")) {\n if (r === selector.getAttribute(\"value\"))\n selector.checked = true;\n else\n selector.checked = false;\n }\n else {\n if (r === true)\n selector.checked = true;\n else\n selector.checked = false;\n }\n }\n else {\n selector.value = typeof r !== \"undefined\" ? r : \"\";\n }\n if (typeof selector._kap_bind === \"undefined\") {\n selector.addEventListener(\"change\", (event) => {\n let value = null;\n if (selector.type === \"checkbox\" || selector.type === \"radio\") {\n if (selector.hasAttribute(\"value\")) {\n if (selector.checked === false)\n return;\n value = selector.getAttribute(\"value\");\n }\n else {\n value = selector.checked;\n }\n }\n else {\n value = selector.value;\n }\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector.addEventListener(\"keyup\", (event) => {\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: selector.value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector._kap_bind = true;\n }\n break;\n case \"options\":\n let value = selector.value;\n selector.innerHTML = \"\";\n for (let option in r) {\n if (!Array.isArray(r)) {\n // Object key => value value => text\n selector.appendChild(new Option(r[option], option));\n }\n else {\n // Array\n if (typeof r[option].text !== \"undefined\") {\n selector.appendChild(new Option(r[option].text, r[option].value));\n }\n else {\n // Array value and text will be array value\n selector.appendChild(new Option(r[option], r[option]));\n }\n }\n }\n if (value !== null)\n selector.value = value;\n break;\n case \"attr\":\n if (attSelector !== null) {\n if (r === null || r === false) {\n selector.removeAttribute(attSelector);\n }\n else {\n selector.setAttribute(attSelector, r);\n }\n break;\n }\n for (let cname in r) {\n if (r[cname] === null || r[cname] === false) {\n selector.removeAttribute(cname);\n }\n else {\n selector.setAttribute(cname, r[cname]);\n }\n }\n break;\n case \"prop\":\n if (attSelector !== null) {\n // Set Property directly\n selector[ka_str_to_camel_case(attSelector)] = r;\n break;\n }\n for (let cname in r) {\n selector[ka_str_to_camel_case(cname)] = r[cname];\n }\n break;\n default:\n if (typeof attMap[attType] !== \"undefined\")\n attType = attMap[attType];\n if (typeof selector[attType] === \"undefined\") {\n console.warn(\"apply(): trying to set undefined property \", attType, \"on element\", selector);\n }\n selector[attType] = r;\n break;\n }\n }\n if (recursive) {\n for (let e of selector.children) {\n ka_apply(e, scope, recursive);\n }\n }\n}\n","/**\n * Create a new Element\n *\n * @param tagName {string} The Tag Name\n * @param attributes {string<string>} Attributes to set initially\n * @param appendToElement {HTMLElement}\n * @param children {HTMLElement[]}\n * @return HTMLElement\n */\nexport function ka_create_element(tagName, attributes = null, children = null, appendToElement = null) {\n let e = document.createElement(tagName);\n if (attributes === null)\n attributes = {};\n for (let attName in attributes) {\n e.setAttribute(attName, attributes[attName]);\n }\n if (children instanceof NodeList) {\n children = Array.from(children);\n }\n if (Array.isArray(children)) {\n for (let ce of children) {\n e.appendChild(ce);\n }\n }\n if (typeof children === \"string\") {\n e.innerText = children;\n }\n if (appendToElement !== null) {\n appendToElement.appendChild(e);\n }\n return e;\n}\n","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};\nconst _debounceInterval = { i: null, time: null };\n/**\n * Debounce a event\n *\n *\n *\n * @param min Minimum Time to wait\n * @param max Trigger event automatically after this time\n * @return {Promise<unknown>}\n */\nexport function ka_debounce(min, max = null) {\n return __awaiter(this, void 0, void 0, function* () {\n if (max === null)\n max = min;\n let dbi = _debounceInterval;\n return new Promise((resolve) => {\n if (dbi.time < (+new Date()) - max && dbi.i !== null) {\n return resolve();\n }\n if (dbi.i !== null) {\n return;\n }\n dbi.time = (+new Date());\n dbi.i = window.setTimeout(() => {\n dbi.i = null;\n return resolve();\n }, min);\n });\n });\n}\n","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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _Debouncer_resolve, _Debouncer_interval, _Debouncer_time;\nexport class Debouncer {\n constructor(min = 100, max = null) {\n this.min = min;\n this.max = max;\n _Debouncer_resolve.set(this, []);\n _Debouncer_interval.set(this, null);\n _Debouncer_time.set(this, null);\n }\n debounce(min = this.min, max = this.max) {\n return __awaiter(this, void 0, void 0, function* () {\n if (max === null)\n max = min;\n if (__classPrivateFieldGet(this, _Debouncer_interval, \"f\") !== null) {\n window.clearInterval(__classPrivateFieldGet(this, _Debouncer_interval, \"f\"));\n }\n __classPrivateFieldSet(this, _Debouncer_interval, window.setInterval(() => {\n __classPrivateFieldGet(this, _Debouncer_resolve, \"f\").forEach(r => r());\n __classPrivateFieldSet(this, _Debouncer_resolve, [], \"f\");\n window.clearInterval(__classPrivateFieldGet(this, _Debouncer_interval, \"f\"));\n }, min), \"f\");\n return new Promise((resolve) => {\n __classPrivateFieldGet(this, _Debouncer_resolve, \"f\").push(resolve);\n });\n });\n }\n}\n_Debouncer_resolve = new WeakMap(), _Debouncer_interval = new WeakMap(), _Debouncer_time = new WeakMap();\n","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};\n/**\n * Wait for DomContentLoaded or resolve immediate\n *\n * <example>\n * await MicxToolsVx.domReady();\n * </example>\n *\n * @return {Promise<string>}\n */\nexport function ka_dom_ready() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n if (document.readyState === \"complete\" || document.readyState === \"interactive\")\n return resolve(\"loaded\");\n document.addEventListener(\"DOMContentLoaded\", () => resolve('DOMContentLoaded'));\n });\n });\n}\n","/**\n *\n * @param {HTMLElement} elem\n * @param fn\n * @param recursive\n */\nexport function ka_elwalk(elem, fn, recursive = false, includeFirst = false) {\n if (Array.isArray(elem))\n elem.children = elem;\n if (typeof elem.children === \"undefined\")\n return;\n if (includeFirst && elem instanceof HTMLElement) {\n let ret = fn(elem);\n if (ret === false)\n return false;\n }\n for (let child of elem.children) {\n let ret = fn(child);\n if (ret === false)\n continue; // No recursiion\n if (recursive && typeof child.children !== \"undefined\")\n ka_elwalk(child, fn, recursive);\n }\n}\n","export function ka_eval(stmt, __scope, e, __refs) {\n if (stmt.endsWith(\";\"))\n stmt = stmt.slice(0, -1);\n const reserved = [\"var\", \"null\", \"let\", \"const\", \"function\", \"class\", \"in\", \"of\", \"for\", \"true\", \"false\", \"await\", \"$this\"];\n let r = \"var $this = e;\";\n for (let __name in __scope) {\n if (reserved.indexOf(__name) !== -1)\n continue;\n if (__name.indexOf(\"-\") !== -1) {\n console.error(`Invalid scope key '${__name}': Cannot contain - in scope:`, __scope);\n throw `eval() failed: Invalid scope key: '${__name}': Cannot contain minus char '-'`;\n }\n r += `var ${__name} = __scope['${__name}'];`;\n }\n // If the scope was cloned, the original will be in $scope. This is important when\n // Using events [on.click], e.g.\n if (typeof __scope.$scope === \"undefined\") {\n r += \"var $scope = __scope;\";\n }\n try {\n // console.log(r + '(' + stmt + ')');\n const func = new Function('e', '__scope', r + '; return ' + stmt);\n return func(e, __scope);\n }\n catch (ex) {\n console.error(\"cannot eval() stmt: '\" + stmt + \"': \" + ex, \" on element \", e, ex, \"(context:\", __scope, \")\");\n throw \"eval('\" + stmt + \"') failed: \" + ex;\n }\n}\n","export function ka_set_options(element, options, value = null) {\n element.innerHTML = \"\";\n for (let option in options) {\n if (isNaN(option)) {\n element.appendChild(new Option(options[option], option));\n }\n else {\n if (typeof options[option].text !== \"undefined\") {\n element.appendChild(new Option(options[option].text, options[option].value));\n }\n else {\n element.appendChild(new Option(options[option], options[option]));\n }\n }\n }\n if (value !== null)\n element.value = value;\n}\n","/**\n * Query a Element or trigger an Exception\n *\n * @param query\n * @param parent\n * @param exception\n * @return {HTMLElement}\n */\nexport function ka_query_selector(query, parent = null, exception = null) {\n if (typeof exception === \"undefined\" || exception === null)\n exception = `querySelector '${query}' not found`;\n if (typeof parent === \"undefined\" || parent === null)\n parent = document;\n let e = parent.querySelectorAll(query);\n if (e.length === 0) {\n console.warn(exception, \"on parent: \", parent);\n throw exception;\n }\n return e[0];\n}\n","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};\nexport function ka_sleep(sleepms) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n window.setTimeout(() => {\n return resolve();\n }, sleepms);\n });\n });\n}\n","/**\n * Return a Proxy handling saving / deleting / updating the object in the localStorage\n * @param object\n * @param scopeName\n */\nexport function ka_session_storage(object, scopeName = null) {\n if (scopeName == null) {\n scopeName = \"ka_session_storage\";\n }\n if (object === null) {\n sessionStorage.removeItem(scopeName);\n return;\n }\n if (sessionStorage.getItem(scopeName) == null) {\n sessionStorage.setItem(scopeName, JSON.stringify(object));\n }\n let savedObject = JSON.parse(sessionStorage.getItem(scopeName));\n for (let key in object) {\n if (typeof savedObject[key] === \"undefined\") {\n savedObject[key] = object[key];\n }\n }\n let proxy = new Proxy(savedObject, {\n set: function (target, property, value, receiver) {\n target[property] = value;\n sessionStorage.setItem(scopeName, JSON.stringify(target));\n return true;\n }\n });\n return proxy;\n}\n","/**\n * Transform any input to CamelCase\n *\n * Example: some-class => someClass\n *\n * @param str {string}\n * @return {string}\n */\nexport function ka_str_to_camel_case(str) {\n return str.replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (ltr, idx) => idx === 0 ? ltr.toLowerCase() : ltr.toUpperCase()).replace(/[^a-zA-Z0-9]+/g, '');\n}\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nexport class KaCustomElement extends HTMLElement {\n constructor() {\n super(...arguments);\n this.__ka_stop_render = true; // Stop rendering if this element is reached\n this.html = \"Undefined Template\";\n this.scope = createScopeObject();\n this.tplPrototype = null;\n this.wrapper = null;\n }\n init(scope) {\n this.scope.init(scope);\n return this.scope;\n }\n wrap(fragment) {\n this.wrapper = fragment;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized())\n this.init({});\n // Check template set by customElement annotation\n // Cannot be done in constructor because of async behavior\n if (isset(this.constructor[\"html\"])) {\n this.html = this.constructor[\"html\"];\n }\n if (this.tplPrototype === null) {\n this.tplPrototype = ka_templatify(ka_html(this.html));\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n if (this.wrapper !== null) {\n yield this.wrapper.fragmentConnectedCallback();\n this.append(this.wrapper.wrapTemplate(this.tpl));\n this.wrapper.wrapFinish();\n }\n else {\n this.append(this.tpl);\n }\n this.scope.render();\n });\n }\n disconnectedCallback() {\n if (this.scope.$tpl !== undefined)\n this.scope.$tpl.dispose();\n }\n}\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_sleep } from \"../core/sleep\";\nexport class KaCustomFragment {\n constructor() {\n this.scope = createScopeObject();\n this.html = null;\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]) && this.html === null)\n this.html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.html));\n this.scope.init(scope);\n return this.scope;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n setScope(scope) {\n this.scope.importFrom(scope);\n }\n fragmentConnectedCallback(parentElement) {\n return __awaiter(this, void 0, void 0, function* () {\n parentElement.setAttribute(\"ka.stop\", \"true\");\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n parentElement.append(this.tpl);\n yield ka_sleep(1);\n this.scope.render();\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n","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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _KaCustomModal_main, _KaCustomModal_configDefaults, _KaCustomModal_promise;\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { ka_create_element } from \"../core/create-element\";\nimport { KaTemplate } from \"../tpl/template\";\nexport class KaCustomModal {\n adjustWidth(modalConfig) {\n let w = window.innerWidth;\n if (w > modalConfig.maxWidth)\n w = modalConfig.maxWidth;\n __classPrivateFieldGet(this, _KaCustomModal_main, \"f\").style.width = w + \"px\";\n }\n constructor(tagName = \"ka-modal\", shadowRootInit = null, modalConfig = {}) {\n this.scope = createScopeObject();\n this.__html = \"<div>No Template defined</div>\";\n _KaCustomModal_main.set(this, void 0);\n _KaCustomModal_configDefaults.set(this, {\n parentElement: document.body,\n zIndex: 9999,\n styleBase: \"position:fixed; top:0; bottom:0; left:0; right:0;\",\n styleBackdrop: \"background-color: #999;opacity:0.5;\",\n maxWidth: 800,\n });\n _KaCustomModal_promise.set(this, {\n promise: null,\n reject: null,\n resolve: null,\n });\n let config = __classPrivateFieldGet(this, _KaCustomModal_configDefaults, \"f\");\n config = Object.assign(Object.assign({}, config), modalConfig);\n this.element = ka_create_element(tagName, { hidden: \"hidden\" }, null, config.parentElement);\n this.backdrop = ka_create_element(\"div\", { style: `${config.styleBase};${config.styleBackdrop};z-index:${config.zIndex};` }, null, this.element);\n let master = ka_create_element(\"div\", { style: `position:fixed;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;z-index:${config.zIndex + 1};` }, null, this.element);\n __classPrivateFieldSet(this, _KaCustomModal_main, ka_create_element(\"div\", { style: `;max-height:100%;max-width:100%;` }, null, master), \"f\");\n this.adjustWidth(config);\n __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").promise = new Promise((resolve, reject) => { __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").resolve = resolve; __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").reject = reject; });\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]))\n this.__html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.__html));\n this.scope.init(scope);\n return this.scope;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n setScope(scope) {\n this.scope.importFrom(scope);\n }\n resolve(value) {\n this.element.remove();\n __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").resolve(value);\n }\n show(...params) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n __classPrivateFieldGet(this, _KaCustomModal_main, \"f\").append(this.tpl);\n this.element.removeAttribute(\"hidden\");\n this.scope.render();\n return __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").promise;\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n_KaCustomModal_main = new WeakMap(), _KaCustomModal_configDefaults = new WeakMap(), _KaCustomModal_promise = new WeakMap();\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nexport class KaCustomWrapper {\n constructor() {\n this.scope = createScopeObject();\n this.html = null;\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]) && this.html === null)\n this.html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.html));\n this.scope.init(scope);\n return this.scope;\n }\n wrapTemplate(tpl) {\n this.scope.$content = tpl;\n return this.tpl;\n }\n fragmentConnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.returnedTpl = this.tplPrototype;\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n });\n }\n wrapFinish() {\n return __awaiter(this, void 0, void 0, function* () {\n this.scope.render();\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n","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};\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { isset } from \"../functions\";\n/**\n * @deprecated\n */\nexport class KaHtmlElement extends HTMLElement {\n constructor(shadowRootInit = null) {\n super();\n this.shadowRootInit = shadowRootInit;\n this.addEventListener(\"load\", (e) => console.log(e));\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let htmlTpl = null;\n if (typeof this.html === \"function\") {\n let fn = this.html;\n htmlTpl = yield fn(this);\n }\n else {\n htmlTpl = this.html;\n }\n if (typeof htmlTpl === \"string\")\n htmlTpl = ka_html(htmlTpl);\n let attachTo = this;\n if (this.shadowRootInit !== null) {\n attachTo = this.attachShadow(this.shadowRootInit);\n }\n if (isset(htmlTpl)) {\n let tpl;\n try {\n tpl = ka_templatify(htmlTpl);\n }\n catch (e) {\n console.error(\"Templatify failed on element\", this, \"for template\", htmlTpl);\n throw e;\n }\n this.$tpl = new KaTemplate(tpl);\n attachTo.appendChild(tpl);\n }\n this.connected();\n });\n }\n disconnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n this.$tpl.dispose();\n this.disconnected();\n });\n }\n}\n","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _KaModal_main, _KaModal_configDefaults, _KaModal_promise;\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_create_element } from \"../core/create-element\";\nimport { ka_html } from \"../ce/html\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { createScopeObject } from \"../types\";\nexport class KaModal {\n adjustWidth(modalConfig) {\n let w = window.innerWidth;\n if (w > modalConfig.maxWidth)\n w = modalConfig.maxWidth;\n __classPrivateFieldGet(this, _KaModal_main, \"f\").style.width = w + \"px\";\n }\n constructor(tagName = \"ka-modal\", shadowRootInit = null, modalConfig = {}) {\n this.scope = createScopeObject();\n _KaModal_main.set(this, void 0);\n this.$tpl = null;\n _KaModal_configDefaults.set(this, {\n parentElement: document.body,\n zIndex: 9999,\n styleBase: \"position:fixed; top:0; bottom:0; left:0; right:0;\",\n styleBackdrop: \"background-color: #999;opacity:0.5;\",\n maxWidth: 800,\n });\n _KaModal_promise.set(this, {\n promise: null,\n reject: null,\n resolve: null,\n });\n let config = __classPrivateFieldGet(this, _KaModal_configDefaults, \"f\");\n config = Object.assign(Object.assign({}, config), modalConfig);\n this.element = ka_create_element(tagName, { hidden: \"hidden\" }, null, config.parentElement);\n this.backdrop = ka_create_element(\"div\", { style: `${config.styleBase};${config.styleBackdrop};z-index:${config.zIndex};` }, null, this.element);\n let master = ka_create_element(\"div\", { style: `position:fixed;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;z-index:${config.zIndex + 1};` }, null, this.element);\n __classPrivateFieldSet(this, _KaModal_main, ka_create_element(\"div\", { style: `;max-height:100%;max-width:100%;` }, null, master), \"f\");\n this.adjustWidth(config);\n __classPrivateFieldGet(this, _KaModal_promise, \"f\").promise = new Promise((resolve, reject) => { __classPrivateFieldGet(this, _KaModal_promise, \"f\").resolve = resolve; __classPrivateFieldGet(this, _KaModal_promise, \"f\").reject = reject; });\n }\n render(scope = null) {\n if (this.$tpl === null) {\n let html = this.html;\n if (typeof html === \"string\") {\n html = ka_html(html);\n }\n if (!(html instanceof HTMLTemplateElement)) {\n console.error(\"html is not HtmlTemplateElement\", html, \"on\", this);\n throw \"html is not HtmlTemplateElement\";\n }\n console.log(\"html\", html);\n let elem;\n try {\n elem = ka_templatify(html);\n }\n catch (e) {\n console.log(\"error templatify for element\", this, \":\", e);\n throw e;\n }\n __classPrivateFieldGet(this, _KaModal_main, \"f\").appendChild(elem);\n this.$tpl = new KaTemplate(elem);\n }\n this.$tpl.render(scope);\n }\n resolve(value) {\n this.element.remove();\n __classPrivateFieldGet(this, _KaModal_promise, \"f\").resolve(value);\n }\n show(...params) {\n this.element.removeAttribute(\"hidden\");\n return __classPrivateFieldGet(this, _KaModal_promise, \"f\").promise;\n }\n}\n_KaModal_main = new WeakMap(), _KaModal_configDefaults = new WeakMap(), _KaModal_promise = new WeakMap();\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, isset, random_string } from \"../functions\";\nimport { KaCustomFragment } from \"./KaCustomFragment\";\nlet KaUse = class KaUse extends HTMLElement {\n get component() {\n return this.myComponent;\n }\n set component(val) {\n this.myComponent = val;\n this.innerHTML = \"\";\n this.append(val);\n }\n /**\n * called from ka.use=\"\" by apply()\n *\n * @param val\n */\n use(val, parentScope) {\n if (isset(val[\"setParentScope\"]))\n val[\"setParentScope\"](parentScope);\n this.myComponent = val;\n this.innerHTML = \"\";\n // If not specified scope is the parent scope.\n if (!this.hasAttribute(\"ka.scope\"))\n val[\"setScope\"](parentScope);\n if (val instanceof KaCustomFragment) {\n val.fragmentConnectedCallback(this);\n return;\n }\n this.append(val);\n }\n /**\n * set dedicated scope using ka.scope\n *\n * @param scope\n */\n setScope(scope) {\n if (this.myComponent instanceof KaCustomFragment) {\n this.myComponent.setScope(scope);\n }\n }\n disconnectedCallback() {\n }\n connectedCallback() {\n this.style.display = \"contents\";\n this.setAttribute(\"ka.stop\", \"true\");\n if (this.myComponent instanceof KaCustomFragment) {\n this.myComponent.fragmentConnectedCallback(this);\n }\n }\n};\nKaUse = __decorate([\n customElement(\"ka-use-\" + random_string().toLowerCase())\n], KaUse);\nexport { KaUse };\n","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};\nimport { ka_sleep } from \"./core/sleep\";\n/**\n * Check if parameter is undefined or null\n *\n * @param input\n */\nexport function isset(input) {\n return (typeof input !== \"undefined\" && input !== null);\n}\nexport function isUndefined(input) {\n return (typeof input === \"undefined\");\n}\n/**\n * Defines a customElement\n *\n * Usage as class decorator @customElement(\"some-tag\")\n *\n * @param tagName\n */\nexport function customElement(tagName, template = null) {\n return function (classOrDescriptor) {\n if (template !== null) {\n classOrDescriptor[\"html\"] = template;\n }\n //console.debug(\"registering custom element\", classOrDescriptor, tagName);\n customElements.define(tagName, classOrDescriptor);\n return classOrDescriptor;\n };\n}\nexport function ka_await_element(selector, parent = document, maxWait = 2000) {\n return __awaiter(this, void 0, void 0, function* () {\n let elem = parent.querySelector(selector);\n let rounds = 1;\n while (elem === null && maxWait > 0) {\n let delay = 20 * rounds++;\n yield ka_sleep(delay);\n elem = parent.querySelector(selector);\n maxWait -= delay;\n }\n return elem;\n });\n}\nexport function template(template) {\n return function (classOrDescriptor) {\n classOrDescriptor[\"html\"] = template;\n return classOrDescriptor;\n };\n}\nexport function random_string(len = 12) {\n let result = '';\n let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let charactersLength = characters.length;\n for (let i = 0; i < len; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n","export * from \"./functions\";\nexport * from \"./types\";\nexport * from \"./core/sleep\";\nexport * from \"./core/debounce\";\nexport * from \"./core/create-element\";\nexport * from \"./core/ka-set-options\";\nexport { ka_dom_ready } from \"./core/dom-ready\";\nexport * from \"./element/KaHtmlElement\";\nexport * from \"./element/KaCustomElement\";\nexport * from \"./element/KaCustomFragment\";\nexport * from \"./element/KaCustomWrapper\";\nexport * from \"./element/KaCustomModal\";\nexport * from \"./tpl/template\";\nexport * from \"./element/KaModal\";\nexport * from \"./core/query-select\";\nexport * from \"./core/eval\";\nexport * from \"./ce/html\";\nexport * from \"./tpl/templatify\";\nexport * from \"./core/debouncer\";\nexport * from \"./core/storage\";\n","import { ka_eval } from \"../core/eval.js\";\nimport { ka_elwalk } from \"../core/elwalk.js\";\nimport { ka_apply } from \"../core/apply.js\";\nimport { KaCustomElement } from \"../ce/custom-element.js\";\nexport class KaTemplate {\n constructor(template) {\n this.template = template;\n if (typeof this.template.__kachilds === \"undefined\")\n this.template.__kachilds = [];\n if (typeof this.template.__kasibling === \"undefined\")\n this.template.__kasibling = this.template.nextElementSibling;\n this.__renderCount = 0;\n this.$scope = {};\n }\n _error(msg) {\n console.error(`[ka-template] ${msg} on element`, this.template);\n throw `[ka-template] ${msg} on element` + this.template;\n }\n _appendTemplate() {\n let elements = this.template.content;\n let elList = [];\n for (let curE of elements.children) {\n curE = curE.cloneNode(true);\n curE._ka_maintained_by = this.template.getAttribute(\"_kaidx\");\n elList.push(curE);\n this.template.parentNode.insertBefore(curE, this.template.__kasibling);\n }\n this.template.__kachilds.push(elList);\n }\n _removeLastChild() {\n if (this.template.__kachilds.length === 0)\n return;\n let childs = this.template.__kachilds[this.template.__kachilds.length - 1];\n for (let curE of childs) {\n this.template.parentElement.removeChild(curE);\n }\n this.template.__kachilds.length = this.template.__kachilds.length - 1;\n }\n _renderFor($scope, stmt) {\n //console.log(\"kachilds\", this.template.__kachilds);\n let matches = stmt.match(/^(let)?\\s*(?<target>.+)\\s+(?<type>of|in|repeat)\\s+(?<select>.+)$/);\n if (matches === null) {\n this._error(`Can't parse ka.for='${stmt}'`);\n }\n let selectVal = ka_eval(matches.groups.select, $scope, this.template);\n if (matches.groups.type === \"repeat\") {\n if (typeof selectVal !== \"number\")\n this._error(`Error ka.for='${stmt}': Selected val must be number in repeat loop`);\n selectVal = new Array(selectVal).fill(null);\n }\n let eIndex = 0;\n for (let index in selectVal) {\n let curScope = Object.assign({ $scope: $scope }, $scope);\n curScope[matches.groups.target] = index;\n if (matches.groups.type === \"of\")\n curScope[matches.groups.target] = selectVal[index];\n if (this.template.__kachilds.length < eIndex + 1) {\n //console.log(\"append\", eIndex, this.template.__kachilds.length);\n this._appendTemplate();\n }\n this._maintain(curScope, this.template.__kachilds[eIndex], eIndex);\n eIndex++;\n }\n for (let remIdx = eIndex; remIdx < this.template.__kachilds.length;) {\n this._removeLastChild();\n }\n }\n _maintain($scope, childs, forIndex = 0) {\n for (let child of childs) {\n child._ka_for_index = forIndex;\n ka_elwalk(child, (el) => {\n //console.log(\"walk\", el);\n if (el instanceof HTMLTemplateElement) {\n //console.log(\"maintain\", el);\n let r = new this.constructor(el);\n r.render($scope);\n return false;\n }\n if (typeof el._ka_maintained_by !== \"undefined\" && el._ka_maintained_by !== this.template.getAttribute(\"_kaidx\")) {\n return false;\n }\n ka_apply(el, $scope);\n if ((el instanceof HTMLElement && el.hasAttribute(\"ka.stop\")) || el[\"__ka_stop_render\"]) {\n return false; // Skip Element rendering\n }\n }, true, true);\n }\n }\n _renderIf($scope, stmt) {\n let selectVal = ka_eval(stmt, $scope, this.template);\n if (selectVal === true) {\n if (this.template.__kachilds.length === 0)\n this._appendTemplate();\n this._maintain($scope, this.template.__kachilds[0]);\n }\n else {\n this._removeLastChild();\n }\n }\n /**\n * Remove all rendered element\n */\n dispose() {\n for (; this.template.__kachilds.length > 0;)\n this._removeLastChild();\n }\n setScope($scope) {\n this.$scope = $scope;\n }\n /**\n * Render / Update the Template\n *\n * Once the scope in parameter 1 was set, it will render\n * without any parameters. Scope is available via property $scope\n *\n * @param $scope\n */\n render($scope = null) {\n if ($scope === null)\n $scope = this.$scope;\n this.$scope = $scope;\n this.__renderCount++;\n if (this.template.hasAttribute(\"ka.for\")) {\n this._renderFor($scope, this.template.getAttribute(\"ka.for\"));\n }\n else if (this.template.hasAttribute(\"ka.if\")) {\n this._renderIf($scope, this.template.getAttribute(\"ka.if\"));\n }\n else {\n if (typeof this.template._ka_active === \"undefined\") {\n this._appendTemplate();\n this.template._ka_active = true;\n }\n this._maintain($scope, this.template.__kachilds);\n }\n }\n /**\n * Return true if this template was renderd the first time\n *\n * @returns {boolean}\n */\n isFirstRender() {\n return this.__renderCount === 1;\n }\n}\n;\n","import { ka_query_selector } from \"../core/query-select\";\nimport { ka_elwalk } from \"../core/elwalk.js\";\nfunction quoteattr(s, preserveCR) {\n preserveCR = preserveCR ? ' ' : '\\n';\n return ('' + s) /* Forces the conversion to string. */\n .replace(/&/g, '&') /* This MUST be the 1st replacement. */\n .replace(/'/g, ''') /* The 4 other predefined entities, required. */\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n /*\n You may add other replacements here for HTML only\n (but it's not necessary).\n Or for XML, only if the named entities are defined in its DTD.\n */\n .replace(/\\r\\n/g, preserveCR) /* Must be before the next replacement. */\n .replace(/[\\r\\n]/g, preserveCR);\n ;\n}\nwindow._ka_el_idx = 0;\n/**\n * Generate a renderable Template from <template> Element\n *\n * @param {HTMLElement|string} elem\n * @return {HTMLTemplateElement}\n */\nexport function ka_templatify(elem, returnMode = true) {\n if (typeof elem === \"string\")\n elem = ka_query_selector(elem);\n if (!(elem instanceof Node)) {\n console.error(\"[ka-templatify] Parameter 1 is not a html element: \", elem);\n throw `[ka-templify] Parameter 1 is not a html element: ${elem}`;\n }\n const elIdxName = \"_ka_el_idx\";\n if (window[elIdxName] === null)\n window[elIdxName] = 5;\n window[elIdxName]++;\n if (returnMode) {\n let returnTpl = document.createElement(\"template\");\n returnTpl.setAttribute(\"_kaidx\", (window[elIdxName]).toString());\n /* @var {HTMLTemplateElement} returnTpl */\n returnTpl.innerHTML = elem.innerHTML\n .replace(/\\[\\[(.*?)\\]\\]/g, (matches, m1) => `<span ka.textContent=\"${quoteattr(m1)}\"></span>`);\n ka_templatify(returnTpl.content, false);\n return returnTpl;\n }\n if (elem instanceof HTMLTemplateElement)\n elem = elem.content;\n let wrapElem = (el, attName, attVal) => {\n let tpl = document.createElement(\"template\");\n tpl.setAttribute(\"_kaidx\", (window[elIdxName]).toString());\n let clonedEl = el.cloneNode(true);\n clonedEl.removeAttribute(attName);\n tpl.content.append(clonedEl);\n tpl.setAttribute(attName, attVal);\n el.replaceWith(tpl);\n return tpl;\n };\n ka_elwalk(elem, (el) => {\n //console.log(el);\n if (!(el instanceof HTMLElement))\n return;\n let tpl = null;\n for (let attrName of el.getAttributeNames()) {\n if (attrName === \"ka.for\") {\n tpl = wrapElem(el, \"ka.for\", el.getAttribute(\"ka.for\"));\n ka_templatify(tpl, false);\n break;\n }\n if (attrName === \"ka.if\") {\n tpl = wrapElem(el, \"ka.if\", el.getAttribute(\"ka.if\"));\n ka_templatify(tpl, false);\n break;\n }\n }\n }, true, false);\n}\n","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};\nimport { isset } from \"./functions\";\nimport { Debouncer } from \"./core/debouncer\";\nclass KaDefaultScope {\n constructor() {\n this.__isInitialized = false;\n }\n isInitialized() {\n return this.__isInitialized;\n }\n render() {\n return __awaiter(this, void 0, void 0, function* () {\n this.$tpl.render(this);\n });\n }\n raw() {\n return this.$__scope_orig;\n }\n importFrom(scope) {\n for (let key of Object.keys(scope)) {\n if (key.startsWith(\"$\") || key.startsWith(\"__\"))\n continue;\n this[\"$__scope_orig\"][key] = scope[key];\n }\n }\n dump() {\n return Object.assign({}, this);\n }\n init(scopeDef) {\n if (this.isInitialized())\n throw \"Scope is already initalized\";\n this.__isInitialized = true;\n for (let key of Object.keys(scopeDef)) {\n this[key] = scopeDef[key];\n }\n }\n}\nexport function createScopeObject(init = null) {\n let scopeDef = new KaDefaultScope();\n scopeDef[\"$__scope_orig\"] = scopeDef;\n let proxy = new Proxy(scopeDef, {\n get(target, prop, receiver) {\n if (prop.startsWith(\"$\"))\n return target[prop];\n return target[prop];\n },\n set(target, p, value, receiver) {\n if (target[p] === value)\n return true; // Nothing changed\n target[p] = value;\n let debouncer = new Debouncer(50, 50);\n if (p.startsWith(\"$\") || p.startsWith(\"__\"))\n return true;\n if (isset(scopeDef.$tpl))\n scopeDef.$tpl.render();\n (() => __awaiter(this, void 0, void 0, function* () {\n yield debouncer.debounce();\n }))();\n return true;\n }\n });\n if (init !== null)\n scopeDef.init(init);\n return proxy;\n}\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AccordionLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__image\">\n <div class=\"header\" data-ref=\"header\"></div>\n <div class=\"image\" data-ref=\"image\">\n </div>\n <div class=\"footer\" data-ref=\"footer\"></div>\n </div>\n`;\nclass AccordionLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.accordion_auto_open = \"first\";\n }\n}\nexports.AccordionLayout = AccordionLayout;\nlet Accordion = class Accordion {\n render(element, layout) {\n var _a;\n element.classList.add(\"as__accordion\");\n Array.from(element.querySelectorAll(\":scope > .children > .section-h3 > .content h3\")).forEach((e, i) => __awaiter(this, void 0, void 0, function* () {\n let newElem = (0, embed_1.ka_create_element)(\"a\", { class: \"as__accordion-header\" });\n e.parentNode.parentNode.insertBefore(newElem, e.parentNode);\n newElem.append(e);\n let update = () => {\n element.querySelectorAll(\".section-h3 > .content,.children\").forEach((e) => __awaiter(this, void 0, void 0, function* () {\n e.style.setProperty(\"--orig-height\", e.scrollHeight + \"px\");\n }));\n };\n newElem.onclick = () => {\n var _a;\n update();\n Array.from(newElem.closest(\".children\").children).forEach((e) => {\n if (e === newElem.closest(\".section-h3\"))\n return;\n e.classList.remove(\"open\");\n });\n (_a = newElem.closest(\".section-h3\")) === null || _a === void 0 ? void 0 : _a.classList.toggle(\"open\");\n };\n }));\n console.log(\"acc\", layout);\n if (layout.accordion_auto_open === \"first\") {\n (_a = element.querySelector(\".section-h3\")) === null || _a === void 0 ? void 0 : _a.classList.add(\"open\");\n }\n return element;\n }\n};\nAccordion = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"accordion\", AccordionLayout)\n], Accordion);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HamburgerLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = (0, embed_1.ka_html)(`\n<a class=\"as__hamburger\" href=\"javascript:void(0);\">\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-menu\">Menü</div>\n</a>\n`);\nclass HamburgerLayout extends jodastyle_1.DefaultLayout {\n}\nexports.HamburgerLayout = HamburgerLayout;\nlet Hamburger = class Hamburger {\n render(element, layout) {\n let main = new jodastyle_2.QTemplate(tpl);\n element.append(main.content);\n main.content.addEventListener(\"click\", () => {\n document.body.classList.toggle(\"nav-open\");\n });\n return element;\n }\n};\nHamburger = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"hamburger\", HamburgerLayout)\n], Hamburger);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InputLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\nconst tplDefault = `\n<div class=\"as__input [[layout.style]] [[classes]]\">\n <div data-ref=\"main\"></div>\n <label for=\"[[ id ]]\">[[ label ]]</label>\n</div>\n`;\nconst tplCheckbox = `\n<div class=\"as__input [[classes]] form-check\">\n <div data-ref=\"main\"></div>\n <label class=\"form-check-label\" for=\"[[ id ]]\">\n [[ label ]]\n </label>\n</div>\n`;\nclass InputLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.style = \"form-floating\";\n this.classes = \"\";\n }\n}\nexports.InputLayout = InputLayout;\nlet idCounter = 0;\nlet Input = class Input {\n render(element, layout) {\n var _a, _b, _c, _d;\n let main = new jodastyle_2.QTemplate(tplDefault);\n if (element instanceof HTMLInputElement) {\n if (element.type === \"checkbox\" || element.type === \"radio\") {\n main = new jodastyle_2.QTemplate(tplCheckbox);\n }\n else if (element.type === \"submit\") {\n main = new jodastyle_2.QTemplate(`<div class=\"as__input [[classes]]\"><div data-ref=\"main\"></div></div>`);\n }\n }\n element.id = element.id === \"\" ? \"as__input_\" + idCounter++ : element.id;\n if (element instanceof HTMLSelectElement) {\n let options = [];\n // Default: No preset, no options\n options.push({ value: \"\", label: (_a = element.getAttribute(\"data-initial\")) !== null && _a !== void 0 ? _a : \"\", disabled: true, selected: true });\n if (element.hasAttribute(\"data-options\")) {\n // if dataset.options starts with [ tread as array, if { tread as object\n if (element.dataset.options.startsWith(\"[\")) {\n options.push(...JSON.parse(element.dataset.options).map((o) => {\n return { value: o, label: o };\n }));\n }\n else if (element.dataset.options.startsWith(\"{\")) {\n let data = JSON.parse(element.dataset.options);\n options = Object.keys(data).map((o) => {\n return { value: o, label: data[o] };\n });\n }\n else {\n options.push(...element.dataset.options.split(\",\").map((o) => {\n return { value: o, label: o };\n }));\n }\n }\n for (let option of options) {\n let o = { value: option.value };\n if (option.selected) {\n o[\"selected\"] = \"selected\";\n }\n if (option.disabled) {\n o[\"disabled\"] = \"true\";\n }\n let opt = (0, embed_1.ka_create_element)(\"option\", o, option.label);\n element.append(opt);\n }\n }\n main.parse({\n layout,\n classes: (_b = layout.classes + \" \" + element.getAttribute(\"data-class\")) !== null && _b !== void 0 ? _b : \"\",\n id: element.id,\n label: (_d = (_c = element.getAttribute(\"label\")) !== null && _c !== void 0 ? _c : element.getAttribute(\"name\")) !== null && _d !== void 0 ? _d : element.id\n });\n if (element instanceof HTMLSelectElement) {\n element.classList.add(\"form-select\");\n }\n else if (element instanceof HTMLInputElement && (element.type === \"checkbox\" || element.type === \"radio\")) {\n element.classList.add(\"form-check-input\");\n }\n else if (element instanceof HTMLInputElement && element.type === \"submit\") {\n element.classList.add(\"btn\", \"bn-primary\");\n }\n else {\n element.classList.add(\"form-control\");\n }\n element.parentNode.replaceChild(main.content, element);\n main.select(\"main\").selected.replaceWith(element);\n return main.content;\n }\n};\nInput = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"input\", InputLayout)\n], Input);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MapLayout = void 0;\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__map [[ layout.mapClass ]]\">\n <div class=\"as__map-overlay\" data-ref=\"overlay\">\n <img src=\"[[ layout.mapPreviewUrl ]]\" loading=\"lazy\" width=\"1461\" height=\"729\" alt=\"map preview\" />\n <div>\n <div>\n\n <button class=\"btn btn-secondary mx-auto my-auto btn-lg\" data-ref=\"button\">Mit Google Maps anzeigen</button>\n <p class=\"mx-auto\">Erst nach dem Klick werden Inhalte von Google Maps geladen.</p>\n </div>\n\n </div>\n </div>\n <iframe width=\"100%\" hidden title=\"Google Maps\" height=\"100%\" data-ref=\"iframe\"></iframe>\n <script>\n </script>\n </div>\n`;\nclass MapLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.mapPreviewUrl = \"https://cdn.leuffen.de/hyperpage-components/v1.0/google-maps/maps-preview.jpg\";\n }\n}\nexports.MapLayout = MapLayout;\nlet Map = class Map {\n render(element, layout) {\n let main = new jodastyle_2.QTemplate(tpl);\n main.parse({ layout });\n console.log(\"MAP\");\n if (!element.hasAttribute(\"data-map-url\")) {\n console.warn(\"Missing data-map-url attribute on element\", element);\n }\n main.select(\"button\").selected.addEventListener(\"click\", () => {\n main.select(\"iframe\").selected.removeAttribute(\"hidden\");\n main.select(\"iframe\").selected.setAttribute(\"src\", element.getAttribute(\"data-map-url\"));\n main.select(\"overlay\").selected.setAttribute(\"hidden\", \"true\");\n });\n element.append(main.content);\n return main.content;\n }\n};\nMap = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"map\", MapLayout)\n], Map);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScreenLayout = void 0;\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__screen [[layout.type]]\">\n <div class=\"as__screen-shadow\" style=\"background-image: url([[layout.cdnBaseUrl]]/screens/[[layout.type]]-shadow.svg);\"></div>\n <div class=\"as__screen-image\" data-ref=\"image\"></div>\n <div class=\"as__screen-overlay\" style=\"background-image: url([[layout.cdnBaseUrl]]/screens/[[layout.type]].svg)\"></div>\n </div>\n`;\nclass ScreenLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.cdnBaseUrl = \"https://cdn.leuffen.de/hyperpage-components/v1.0\";\n this.type = \"mobile\";\n }\n}\nexports.ScreenLayout = ScreenLayout;\nlet Screen = class Screen {\n render(element, layout) {\n let q = new jodastyle_2.QTemplate(tpl);\n q.parse({ layout: layout });\n q.content.classList.add(...Array.from(element.classList));\n q.content.setAttribute(\"style\", element.getAttribute(\"style\"));\n element.setAttribute(\"style\", \"\");\n element.parentElement.replaceChild(q.content, element);\n q.select(\"image\").append(element);\n return q.content;\n }\n};\nScreen = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"screen\", ScreenLayout)\n], Screen);\n","export * from \"./elements/accordion/accordion\";\nexport * from \"./elements/hamburger/hamburger\";\nexport * from \"./elements/input/input\";\nexport * from \"./elements/map/map\";\nexport * from \"./elements/screen/screen\";\n","var _a;\nimport { MicxFormmailerApi } from \"./formmail/MicxFormmailerApi\";\nexport class Micx {\n static get formMailerApi() {\n return new MicxFormmailerApi(Micx.subscription_id, Micx.endpoint_root_url + \"/v1/formmailer/send\");\n }\n}\nMicx.endpoint_root_url = \"https://ws.micx.io\";\nMicx.subscription_id = (_a = window[\"micx_subscription_id\"]) !== null && _a !== void 0 ? _a : null;\n","const invalidFeedbackAttr = \"__micxformmail_invalid_feedback\";\nexport class MicxFormmailDefaultBootstrapStyle {\n constructor() {\n this.bntOrigText = \"\";\n }\n markInvalid(el) {\n el.classList.add(\"is-invalid\");\n if (el.dataset.invalidMsg) {\n let node = document.createElement(\"div\");\n node.classList.add(\"invalid-feedback\");\n node.innerHTML = el.dataset.invalidMsg;\n el.insertAdjacentElement(\"afterend\", node);\n el[invalidFeedbackAttr] = node;\n }\n }\n markValid(el) {\n el.classList.add(\"is-valid\");\n }\n setFormInvalid(form) {\n }\n setFormSending(form) {\n let btn = form.querySelector(\"input[type='submit'],button[type='submit']\");\n let orig = \"\";\n if (btn instanceof HTMLInputElement) {\n this.bntOrigText = btn.value;\n btn.value = \"Sending...\";\n }\n else {\n this.bntOrigText = btn.innerHTML;\n btn.innerHTML = \"Sending...\";\n }\n }\n setFormSentError(form) {\n if (this.bntOrigText !== \"\") {\n let btn = form.querySelector(\"input[type='submit'],button[type='submit']\");\n if (btn instanceof HTMLInputElement) {\n btn.value = this.bntOrigText;\n }\n else {\n btn.innerHTML = this.bntOrigText;\n }\n }\n alert(\"[Error] Sending email failed! See browser console for details.\");\n }\n setFormSentOk(form) {\n var _a;\n form.querySelectorAll(\"input,textarea\").forEach(e => e.setAttribute(\"readonly\", \"readonly\"));\n let node = document.createElement(\"div\");\n let message = (_a = form.getAttribute(\"data-micx-formmail-sent-message\")) !== null && _a !== void 0 ? _a : \"E-Mail sent successfully!\";\n node.innerHTML = `<div class='alert alert-success'>${message}</div>`;\n form.querySelector(\"input[type='submit'],button[type='submit']\").replaceWith(node);\n }\n setFormValid(form) {\n }\n unmarkInvalid(el) {\n el.classList.remove(\"is-invalid\");\n }\n unmarkValid(el) {\n el.classList.remove(\"is-valid\");\n }\n resetValidation(form) {\n form.querySelectorAll(\".is-invalid\").forEach((e) => {\n if (e[invalidFeedbackAttr] !== undefined) {\n e[invalidFeedbackAttr].remove();\n delete e[invalidFeedbackAttr];\n }\n e.classList.remove(\"is-invalid\");\n });\n form.querySelectorAll(\".is-valid\").forEach(e => e.classList.remove(\"is-valid\"));\n }\n}\n","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};\nimport { MicxFormmailHelper } from \"./MicxFormmailHelper\";\nimport { MicxFormmailDefaultBootstrapStyle } from \"./MicxFormmailDefaultBootstrapStyle\";\nimport { Micx } from \"../Micx\";\nimport { dom_ready } from \"../helper/functions\";\nexport class MicxFormmailConfig {\n constructor() {\n /**\n * Prevent observed Forms from submitting by pressing Enter\n */\n this.preventEnterSubmitForm = true;\n }\n}\nexport class MicxFormmailFacade {\n constructor(formMailer = Micx.formMailerApi, config = new MicxFormmailConfig(), formatter = new MicxFormmailDefaultBootstrapStyle()) {\n this.formMailer = formMailer;\n this.config = config;\n this.formatter = formatter;\n }\n isMicxFormElement(element) {\n return __awaiter(this, void 0, void 0, function* () {\n if (element.tagName !== \"FORM\")\n element = element.closest(\"form\");\n if (element === null)\n return false;\n if (!element.hasAttribute(\"data-micx-formmail-preset\"))\n return false;\n return true;\n });\n }\n /**\n * Observe for submit events from <form data-micx-formmail-preset=\"default\"> forms\n *\n * @param htmlElement\n */\n observe(htmlElement = null) {\n return __awaiter(this, void 0, void 0, function* () {\n yield dom_ready();\n htmlElement = htmlElement || document.body;\n if (this.config.preventEnterSubmitForm) {\n htmlElement.addEventListener(\"submit\", (e) => __awaiter(this, void 0, void 0, function* () {\n console.log(\"submit\", e);\n if (!this.isMicxFormElement(e.target))\n return;\n e.preventDefault();\n e.stopPropagation();\n }));\n htmlElement.addEventListener('keydown', (event) => __awaiter(this, void 0, void 0, function* () {\n if (!this.isMicxFormElement(event.target))\n return;\n if (event.key === \"Enter\" && event.target[\"type\"] !== \"submit\" && event.target[\"type\"] !== \"textarea\") {\n event.preventDefault();\n }\n }));\n }\n htmlElement.addEventListener(\"click\", (e) => {\n let target = e.target;\n if (!this.isMicxFormElement(target))\n return;\n let button = target.closest(\"button[type='submit'],input[type='submit']\");\n if (button === null)\n return;\n let form = target.closest(\"form\");\n e.preventDefault();\n e.stopPropagation();\n this.processForm(form);\n });\n });\n }\n processForm(form) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n let formCollectedData = MicxFormmailHelper.collectFormData(form);\n this.formatter.resetValidation(form);\n if (formCollectedData.invalidForms.length > 0) {\n for (let el of formCollectedData.invalidForms) {\n this.formatter.markInvalid(el);\n }\n this.formatter.setFormInvalid(form);\n form.dispatchEvent(new Event(\"invalid\", {}));\n return;\n }\n let submitButton = form.querySelector(\"[type='submit']\");\n submitButton.setAttribute(\"disabled\", \"disabled\");\n this.formatter.setFormSending(form);\n try {\n let response = yield this.formMailer.sendData(formCollectedData.formdata, (_a = form.getAttribute(\"data-micx-formmail-preset\")) !== null && _a !== void 0 ? _a : \"default\");\n submitButton.removeAttribute(\"disabled\");\n this.formatter.setFormSentOk(form);\n }\n catch (e) {\n submitButton.removeAttribute(\"disabled\");\n this.formatter.setFormSentError(form);\n }\n });\n }\n}\n","export class MicxFormmailHelper {\n static collectFormData(form) {\n var _a;\n let invalidForms = [];\n let formdata = {};\n let unnamedFieldIndex = 0;\n for (let el of form.querySelectorAll(\"input,select,textarea\")) {\n let valid = el.validity.valid;\n if (el.type.toLowerCase() === \"email\" && el.value.trim() !== \"\") {\n el.value = el.value.trim(); // Trim EMail\n valid = el.validity.valid;\n if (el.value.match(/^[\\p{L}\\d._%+-]+@[\\p{L}\\d.-]+.[\\p{L}]{2,}$/u) === null)\n valid = false;\n }\n if (valid === false)\n invalidForms.push(el);\n if (el.name === \"\" && el.id === \"\") {\n if (el.type !== \"submit\")\n console.warn(\"[Warning] Skipping Form-Element without id or name attribute\", el);\n continue;\n }\n let name = el.name;\n if (name === \"\")\n name = el.id;\n if (name === \"\")\n name = (_a = el.getAttribute(\"label\")) !== null && _a !== void 0 ? _a : \"unnamed_\" + unnamedFieldIndex++;\n name = name.trim();\n if (el.type === \"checkbox\" && el[\"checked\"] === false)\n continue;\n if (name.endsWith(\"[]\")) {\n name = name.slice(0, -2);\n if (!Array.isArray(formdata[name]))\n formdata[name] = [];\n formdata[name].push(el.value);\n }\n else {\n formdata[name] = el.value;\n }\n }\n return { formdata, invalidForms };\n }\n}\n","export {};\n","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};\nimport { MicxlibRev } from \"../index\";\nexport class MicxFormmailerApi {\n constructor(subscription_id, endpoint_url) {\n this.subscription_id = subscription_id;\n this.endpoint_url = endpoint_url;\n console.log('MicxFormmailer constructor');\n }\n sendData(data, preset = \"default\") {\n return __awaiter(this, void 0, void 0, function* () {\n console.log('MicxFormmailer send data', data);\n data[\"__sending_hostname\"] = window.location.href;\n data[\"__micxlib_rev\"] = MicxlibRev;\n // make all keys of data lowercase and replace - and space by _\n let data2 = {};\n for (let key in data) {\n let key2 = key.toLowerCase().replace(/[\\s]/g, \"_\").replace(/-/g, \"\");\n data2[key2] = data[key];\n }\n data = data2;\n let result = yield fetch(this.endpoint_url + `?&subscription_id=${this.subscription_id}&preset=${preset}`, {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify(data),\n cache: \"no-cache\"\n });\n if (!result.ok) {\n let errorMsg = yield result.text();\n console.error(`Formmail Server Error`, errorMsg);\n throw \"Cannot send mail: \" + errorMsg;\n }\n let successMsg = yield result.json();\n });\n }\n}\n","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};\nexport function dom_ready() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n if (document.readyState === \"complete\" || document.readyState === \"interactive\")\n return resolve(\"loaded\");\n document.addEventListener(\"DOMContentLoaded\", () => resolve('DOMContentLoaded'));\n });\n });\n}\nexport function sleep(sleepms) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n window.setTimeout(() => {\n return resolve();\n }, sleepms);\n });\n });\n}\n","var _a, _b;\nlet state = sessionStorage.getItem(\"micx_hit_index\");\nif (state === null) {\n sessionStorage.setItem(\"micx_hit_index\", \"0\");\n}\nsessionStorage.setItem(\"micx_hit_index\", \"\" + (parseInt((_a = sessionStorage.getItem(\"micx_hit_index\")) !== null && _a !== void 0 ? _a : \"0\") + 1));\nexport const hitIndex = parseInt((_b = sessionStorage.getItem(\"micx_hit_index\")) !== null && _b !== void 0 ? _b : \"0\");\n","import { MicxCdnImageObserver } from \"./mediastore/MicxCdnImageObserver\";\nexport const MicxlibRev = \"1.0.6\";\nexport * from './Micx';\nexport * from './formmail/MicxFormmailerApi';\nexport * from './formmail/MicxFormmailStyleInterface';\nexport * from './formmail/MicxFormmailFacade';\nexport * from './formmail/MicxFormmailDefaultBootstrapStyle';\nexport * from './mediastore/MicxCdnImageObserver';\nlet o = new MicxCdnImageObserver();\no.observe();\n","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};\nimport { MicxCdnImgElement } from \"./MicxCdnImgElement\";\nimport { sleep } from \"../helper/functions\";\nlet cdnIdx = 0;\nexport class MicxCdnImageObserver {\n applyToImg(image) {\n if (image[\"micx_cdn_observer\"] === true)\n return;\n image[\"micx_cdn_observer\"] = true;\n if (image.src.indexOf(\"/v2/\") === -1)\n return; // Not a CDN image\n if (!image.hasAttribute(\"micx_cdn_idx\"))\n image.setAttribute(\"micx_cdn_idx\", \"\" + cdnIdx++);\n let e = new MicxCdnImgElement(image, parseInt(image.getAttribute(\"micx_cdn_idx\")));\n }\n observe() {\n return __awaiter(this, void 0, void 0, function* () {\n let round = 1;\n while (true) {\n yield sleep(20 * round++);\n document.querySelectorAll(\"img\").forEach(img => {\n this.applyToImg(img);\n });\n if (round > 50)\n round = 50;\n }\n });\n }\n}\n","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};\nimport { MicxImageUrlDecoderV2 } from \"./MicxImageUrlDecoderV2\";\nimport { MicxImageUrlEncoderV2 } from \"./MicxImageUrlEncoderV2\";\nimport { dom_ready, sleep } from \"../helper/functions\";\nimport { hitIndex } from \"../hit-index\";\nconst loadDirect = 2;\nexport class MicxCdnImgElement {\n constructor(image, index) {\n this.image = image;\n this.isPreloaded = false;\n this.myElementIndex = index;\n let uri = image.src;\n uri.replace(/^(.*?\\/)(v2\\/.*)$/, (p0, base, path) => {\n this.base = base;\n this.path = path;\n return \"\";\n });\n let dimensions = (new MicxImageUrlDecoderV2(this.path)).decode();\n this.setOptimalImageDimensions(dimensions);\n // wait for image to be fully loaded\n let listener = () => {\n this.image.removeEventListener(\"load\", listener);\n this.loadHiRes(dimensions);\n };\n this.image.addEventListener(\"load\", listener);\n if (this.image.complete === true || this.myElementIndex < loadDirect) {\n this.loadHiRes(dimensions);\n }\n }\n loadHiRes(dimensions) {\n return __awaiter(this, void 0, void 0, function* () {\n yield dom_ready();\n // If first load of website: wait 2 seconds to load styles first.\n if (hitIndex === 1) {\n yield sleep(2000);\n }\n yield sleep(40); // Settle image size\n // detect actual dimensions of image element (Fallback innerWidth for Safari Garbage)\n let w = this.image.getBoundingClientRect().width;\n if (w === 0 || w === null)\n w = window.innerWidth;\n // Get best fitting width from dimensions\n let bestWidth = parseInt(dimensions.widths[0]);\n for (let wn of dimensions.widths) {\n let wnI = parseInt(wn);\n if (wnI < w) {\n break;\n }\n bestWidth = wnI;\n }\n let e2 = new MicxImageUrlEncoderV2(dimensions.id, dimensions.filename);\n e2.setReatio(dimensions.aspectRatio);\n e2.addWidth(bestWidth);\n e2.setExtensions(dimensions.extensions);\n let url = this.base + \"/\" + e2.toString();\n if (this.myElementIndex < loadDirect && !this.isPreloaded) {\n this.isPreloaded = true;\n let preloadLink = document.createElement(\"link\");\n preloadLink.setAttribute(\"rel\", \"preload\");\n preloadLink.setAttribute(\"fetchpriority\", \"high\");\n preloadLink.setAttribute(\"as\", \"image\");\n preloadLink.setAttribute(\"href\", url);\n document.head.append(preloadLink);\n }\n let preload = new Image();\n preload.src = url;\n preload.addEventListener(\"load\", () => {\n this.image.setAttribute(\"src\", url);\n this.image.classList.remove(\"micx-image-loader\");\n });\n });\n }\n /**\n * Set the Image Dimensions to the optimal (best width) for the current screen size\n *\n * @private\n */\n setOptimalImageDimensions(dimensions) {\n let aspectRatioMultiplier = dimensions.aspectRatio.split(\"/\").map((v) => parseInt(v));\n // Devide first by second\n let aspectRatio = aspectRatioMultiplier[0] / aspectRatioMultiplier[1];\n let w = parseInt(dimensions.widths[0]);\n for (let wn of dimensions.widths) {\n let wnI = parseInt(wn);\n if (wnI < window.innerWidth) {\n break;\n }\n w = wnI;\n }\n if (this.myElementIndex >= loadDirect) {\n // set lazy loading\n this.image.setAttribute(\"loading\", \"lazy\");\n this.image.setAttribute(\"src\", this.image.getAttribute(\"src\"));\n }\n this.image.setAttribute(\"width\", w.toString());\n this.image.setAttribute(\"height\", (w / aspectRatio).toString());\n this.image.classList.add(\"micx-image-loader\");\n if (this.image.hasAttribute(\"alt\") === false)\n this.image.setAttribute(\"alt\", dimensions.filename);\n }\n}\n","export class MicxImageUrlDecoderV2Result {\n}\nexport class MicxImageUrlDecoderV2 {\n constructor(url) {\n this.url = url;\n }\n decode() {\n const parts = this.url.split('/');\n if (parts.length < 4)\n throw new Error(\"Invalid url format\");\n const id = parts[1];\n let [encodedAspect, encodedWidths] = parts[2].split(\"_\");\n const [filename, extensions] = parts[3].split(\".\");\n encodedWidths = encodedWidths.replaceAll(/([a-zA-Z])/g, (w) => { var _a; return \"-\" + ((_a = MicxImageUrlDecoderV2.WIDTH_SHORTCUTS[w]) !== null && _a !== void 0 ? _a : w) + \"-\"; });\n encodedAspect = encodedAspect.replaceAll(/([a-zA-Z])/g, (w) => { var _a; return (_a = MicxImageUrlDecoderV2.RATIO_SHORTCUTS[w]) !== null && _a !== void 0 ? _a : w; });\n const aspect = encodedAspect.split('-').join('/');\n const widths = encodedWidths.split('-').filter(w => w.trim() !== \"\");\n return {\n id,\n aspectRatio: aspect,\n widths,\n filename,\n extensions: extensions.split(\"_\"),\n };\n }\n}\nMicxImageUrlDecoderV2.RATIO_SHORTCUTS = {\n \"a\": \"1-1\",\n \"b\": \"4-3\",\n \"c\": \"3-2\",\n \"d\": \"16-9\",\n \"e\": \"21-9\",\n \"B\": \"3-4\",\n \"C\": \"2-3\",\n \"D\": \"9-16\",\n \"E\": \"9-21\"\n};\nMicxImageUrlDecoderV2.WIDTH_SHORTCUTS = {\n \"a\": \"260\",\n \"b\": \"414\",\n \"c\": \"896\",\n \"d\": \"1280\",\n \"e\": \"1440\",\n \"f\": \"1920\",\n \"g\": \"2560\",\n};\n","export class MicxImageUrlEncoderV2 {\n constructor(id, filename) {\n this.id = id;\n this.filename = filename;\n this.widths = [];\n this.extensions = [];\n this.ratio = '';\n }\n setAspectRatio(width, height) {\n this.ratio = `${width}-${height}`;\n }\n setReatio(ratio) {\n ratio = ratio.replaceAll(\"/\", \"-\");\n this.ratio = ratio;\n }\n setWidths(widths) {\n console.log(\"set widths\", widths);\n this.widths = widths.map(width => width.toString());\n return this;\n }\n addWidth(width) {\n this.widths.push(width.toString());\n }\n setExtensions(extensions) {\n this.extensions = extensions;\n return this;\n }\n toString() {\n let widths = this.widths.join(\"-\");\n let extensions = this.extensions.join(\"_\");\n let aspect = this.ratio;\n aspect = aspect.replace(/([0-9\\-]+)/, (w) => { var _a; return (_a = MicxImageUrlEncoderV2.RATIO_SHORTCUTS[w]) !== null && _a !== void 0 ? _a : w; });\n widths = widths.replace(/([0-9]+)/g, (w) => { var _a; return (_a = MicxImageUrlEncoderV2.WIDTH_SHORTCUTS[w]) !== null && _a !== void 0 ? _a : w; });\n return `v2/${this.id}/${aspect}_${widths}/${this.filename}.${extensions}`;\n }\n}\nMicxImageUrlEncoderV2.RATIO_SHORTCUTS = {\n \"1-1\": \"a\",\n \"4-3\": \"b\",\n \"3-2\": \"c\",\n \"16-9\": \"d\",\n \"21-9\": \"e\",\n \"3-4\": \"B\",\n \"2-3\": \"C\",\n \"9-16\": \"D\",\n \"9-21\": \"E\"\n};\nMicxImageUrlEncoderV2.WIDTH_SHORTCUTS = {\n \"260\": \"a\",\n \"414\": \"b\",\n \"896\": \"c\",\n \"1280\": \"d\",\n \"1440\": \"e\",\n \"1920\": \"f\",\n \"2560\": \"g\",\n};\n","import {JodaDescriptionManager} from \"@leuffen/jodastyle\";\nimport {customElement, ka_sleep, KaCustomElement, template} from \"@kasimirjs/embed\";\n\n// language=HTML\nconst tpl = `\n<div class=\"row\">\n <div class=\"col col-auto\" ka.for=\"let i of desc \">\n <div class=\"card\">\n <div class=\"card-body p-1 m-1\">\n <div class=\"preview\">\n <iframe ka.prop.src=\"'/html?className=' + i.className\"></iframe>\n <div class=\"overlay\"><a ka.prop.href=\"'/html?className=' + i.className\">Show</a></div>\n </div>\n </div>\n </div>\n </div>\n</div>\n`;\n\n\n\n@template(tpl)@customElement(\"showcase-element\")\nclass ShowcaseElement extends KaCustomElement {\n\n constructor() {\n super();\n\n let scope = this.init({\n desc: JodaDescriptionManager.data,\n $on: {\n\n }\n });\n }\n\n async connectedCallback(): Promise<void> {\n await ka_sleep(1);\n\n this.scope.desc = JodaDescriptionManager.data.filter(e => e.category === this.getAttribute(\"data-category\"));\n console.log(\"connectedCallback\", this.scope.desc);\n super.connectedCallback();\n }\n\n async disconnectedCallback(): Promise<void> {\n console.log(\"disconnect\", this);\n this.scope.desc = [];\n super.disconnectedCallback();\n\n }\n}\n","import {customElement, ka_create_element, KaCustomElement, KaCustomWrapper, template} from \"@kasimirjs/embed\";\nimport {ka_session_storage} from \"@kasimirjs/embed\";\nimport {JodaDescriptionManager, Jodasplit, Logger} from \"@leuffen/jodastyle\";\nimport {SidebarWrapper} from \"@kasimirjs/kit-bootstrap\";\n\n\n\n// language=HTML\nconst tpl2 = `\n<div>\n <select ka.options=\"$scope.desc\" ka.bind=\"$scope.className\" style=\"width:100%\"></select>\n <input ka.bind=\"$scope.text\">\n</div>\n`;\n\n\n@customElement(\"switcher-element\")\n@template(tpl2)\nclass SubElement extends KaCustomElement {\n static html;\n constructor() {\n super();\n this.wrap(new SidebarWrapper());\n\n console.log(JodaDescriptionManager.classes);\n let scope = this.init({\n desc: JodaDescriptionManager.classes,\n text: \"test\",\n className: \"test\",\n $on: {\n change: (e) => {\n window.history.pushState({}, \"\", \"?className=\" + scope.className);\n }\n }\n });\n\n let last = \"\";\n setInterval(async () => {\n if (last === window.location.href) {\n return;\n }\n console.log(window.location.href, last)\n last = window.location.href;\n let url = new URL(window.location.href);\n let className = url.searchParams.get(\"className\");\n scope.className = className;\n let daba = document.getElementsByTagName(\"joda-content\")[0];\n\n\n var MarkdownIt = require('markdown-it');\n var markdownItAttrs = require('markdown-it-attrs');\n\n var md = new MarkdownIt({\n html: true // Erlaubt HTML-Input.\n });\n\n md.use(markdownItAttrs);\n\n let desc = JodaDescriptionManager.getDescription(className);\n if (desc === null) {\n newElement.innerHTML = \"No description found\";\n daba.replaceWith(newElement);\n return;\n }\n\n document.body.classList.add(...desc.config.bodyClasses);\n\n\n let content = desc.example ?? \"No example found\"\n if (desc.config.parseMarkdown) {\n content = content.replace(/\\n{:/gm, \"{:\");\n content = md.render(content);\n content = \"<joda-split>\" + content + \"</joda-split>\";\n }\n\n let newElement = document.createElement(\"joda-content\");\n newElement.innerHTML = content;\n\n daba.replaceWith(newElement);\n }, 100);\n\n }\n}\n\n","import {JodaDescriptionManager} from \"@leuffen/jodastyle\";\n\nlet html =`\n\n<nav layout=\"use: #navbar-blox\">\n <div class=\"brand\">Logo</div>\n <ul class=\"nav-bar-main\">\n <li><a href=\"#home\">Hello World</a></li>\n </ul>\n <ul class=\"nav-menu\">\n <li><a href=\"#home\">Home</a></li>\n </ul>\n</ul>\n</nav>\n\n# Willkommen bei <br>Dr. med. XXX XXX\n{: layout=\"use: #hero-max\"}\n\n\n\n\nFacharzt für Neurologie <br> Facharzt für Psychiatrie\n\n\n## Hero Section\n{: layout=\"use: #hero-ribbon\"}\n\n\n\n\n### Notfall?\n\nSie erreichen den ärztlichen Notdienst unter der Telefon-Nr: [116 117](tel:+49116117)\n\n### Termine & Rezeptabholung\n\nWir sind eine **Terminpraxis**. Für Terminvergaben, Anfragen und Rezeptabholungen beachten Sie bitte\ndie Öffnungszeiten des Empfangs.\n\n### Öffnungszeiten Empfang\n\n{% include el/openhours.html %}\n\n\n## Über mich\n{: layout=\"use: #sec-card-2col\"}\n\n> Dr. med. X. Kelloggs\n\n{: style=\"padding: 4rem\"}\n\n### Werdegang\n\nBerufstätigkeit in der Neurologie, Psychiatrie, Inneren Medizin und Orthopädie.\n\nZuletzt klinisch tätig als Oberarzt einer neurologischen Rehaklinik. Seit 2001 tätig als niedergelassener Neurologe\nund Psychiater.\n\nFocus Empfehlung: 2017, 2018, 2019\n\n\n\n## Medizinischer Schwerpunkt\n{: layout=\"use: #sec-multi-card; cols:2\"}\n\n### Neurologie\n\nInteressengebiete:\n\n- Schlaganfall und Arteriosklerose\n- Parkinsonerkrankung\n- Gedächtnisstörung\n- Prävention und Ernährungsmedizin bei neurologischen Erkrankungen\n\n*Bitte beachten: Bei speziellen Medikamenten für Multiple Sklerose und Myasthenie wenden Sie sich bitte an ein\nspezialisiertes neurologisches Zentrum.*\n\nApparative Untersuchungen:\n\n- Farbduplexsonographie der hirnversorgenden Halsgefäße\n- Messung der Nervenleitgeschwindigkeit bei Verdacht auf Karpaltunnelsyndrom, Polyneuropathie und Ulnaris-Neuropathie\n\nBeispiele für häufigere Beschwerden: Schwäche und Lähmung. Taubheit und Missempfindungen. Schwindel,\nGleichgewichtsstörungen und Gangstörungen. Bewusstseinsstörung. Zittern. Kopfschmerzen und sonstige Schmerzen. Änderung des\nDenkvermögens und der Sprache.\n\n\n### Psychiatrie\n\n- Psychiatrische Diagnostik und Behandlung\n- Interessengebiet: Prävention und Ernährungsmedizin bei psychischen Erkrankungen\n\nBeispiele für häufigere Beschwerden: Anspannung, Unruhe, Reizbarkeit, aufdrängende Gedanken, Grübeln,\nVermeidung, Ängste, Panikanfälle. Vegetative Beschwerden wie Herzklopfen, Atembeschwerden, Schwitzen, Schwindel, usw. Schlafstörungen.\nÄnderung der Stimmung, des Antriebs, des Denkvermögens, der Wahrnehmung und des Verhaltens.\n\n---\n{: .hr}\n\nBei Vorliegen einer Notlage und akuter Beschwerden: wenden Sie sich bitte direkt an die Aufnahme einer\nKlinik. Empfehlung für weitere Informationen: [www.neurologen-und-psychiater-im-netz.org](https://www.neurologen-und-psychiater-im-netz.org)\n\n\n\n\n\n\n\n\n## Kontakt aufnehmen\n{: layout=\"use: #cta-base\"}\n\n[Kontakt](/kontakt)\n\n\n`;\n\nJodaDescriptionManager.addClass(\"page\",\n \"theme1\",\n \"theme1\",\n html,\n []\n ,\n {\n bodyClasses: [\"theme1\"]\n }\n);\n","export * from \"./src/index\";\n\n","import {customElement, ka_create_element, ka_sleep} from \"@kasimirjs/embed\";\nimport {Jodasplit} from \"../processor/jodasplit\";\nimport {Jodastyle} from \"../processor/jodastyle\";\nimport {getCurrentBreakpoint, Jodaresponsive} from \"../processor/jodaresponsive\";\nimport {Logger} from \"../helper/logger\";\nimport {JodaImageProc} from \"../processor/jodaimageproc\";\nimport {Jodavisualize} from \"../processor/jodavisualize\";\n\n\nfunction getCSSRule(ruleName : string) : CSSStyleRule {\n ruleName = ruleName.toLowerCase();\n var result = null;\n var find = Array.prototype.find;\n\n find.call(document.styleSheets, styleSheet => {\n result = find.call(styleSheet.cssRules, cssRule => {\n return cssRule instanceof CSSStyleRule\n && cssRule.selectorText.toLowerCase() == ruleName;\n });\n return result != null;\n });\n return result;\n}\n\nconsole.time(\"jodaTime\");\n\n@customElement(\"joda-content\")\nexport class JodaContentElement extends HTMLElement {\n\n #origContentTemplate: HTMLTemplateElement;\n #outputDiv : HTMLDivElement;\n\n\n async awaitStyles() {\n let index = 0;\n while(true) {\n index++;\n let initValue = getComputedStyle(this).getPropertyValue(\"--joda-init\")\n if (initValue.indexOf(\"true\") !== -1) {\n break;\n }\n if (index > 100) {\n index = 0;\n console.warn(\"Still waiting for --joda-init: true\", this, \"current value:\", initValue, \"on url\", window.location.href);\n }\n await ka_sleep(50 + index);\n }\n }\n\n protected async setLoaded() {\n await ka_sleep(10);\n this.classList.add(\"loaded\");\n\n await ka_sleep(100);\n\n document.body.classList.add(\"loaded\");\n document.querySelector(\"html\").classList.remove(\"loader\");\n }\n\n\n async connectedCallback() {\n\n let logger = new Logger(\"joda-content\");\n await ka_sleep(1);\n\n\n let jodaImage = new JodaImageProc(logger);\n await jodaImage.process(this);\n await this.awaitStyles();\n\n this.#origContentTemplate = ka_create_element(\"template\") as HTMLTemplateElement;\n this.#outputDiv = ka_create_element(\"div\") as HTMLDivElement;\n //this.#origContentTemplate.innerHTML = this.innerHTML;\n //this.innerHTML = \"\";\n //this.appendChild(this.#origContentTemplate);\n //this.appendChild(this.#outputDiv);\n\n\n\n\n\n // Process the content\n let jodaStyle = new Jodastyle(logger);\n await jodaStyle.process(this as HTMLElement);\n\n\n let jodaresponsive = new Jodaresponsive(logger);\n let currentBreakpoint = getCurrentBreakpoint();\n jodaresponsive.process(this as HTMLElement);\n\n // For documentation: Add Class and Tag-Names\n if(this.hasAttribute(\"visualize\")) {\n logger.log(\"Adding class and tag names\");\n (new Jodavisualize()).process(this.#outputDiv as HTMLElement);\n }\n\n this.setLoaded();\n\n\n window.addEventListener(\"resize\", () => {\n if (currentBreakpoint === getCurrentBreakpoint()) {\n return;\n }\n currentBreakpoint = getCurrentBreakpoint();\n logger.log(\"Breakpoint changed to \" + currentBreakpoint);\n\n jodaresponsive.process(this as HTMLElement);\n\n });\n }\n\n\n\n public setContent(content: string) {\n this.innerHTML = content;\n this.connectedCallback()\n }\n}\n","import {customElement} from \"@kasimirjs/embed\";\nimport {Jodastyle} from \"../processor/jodastyle\";\nimport {Logger} from \"../helper/logger\";\n\n\n@customElement('joda-fetch')\nclass JodaFetch extends HTMLElement {\n\n async connectedCallback() {\n let select= this.getAttribute(\"data-select\");\n let elem = document.querySelector(select) as HTMLElement;\n if (elem === null) {\n console.error(\"joda-fetch: Element not found\", select, \"in element\", this);\n return;\n }\n let jodaStyle = new Jodastyle(new Logger(\"joda-fetch\"));\n this.innerHTML = elem.innerHTML\n\n await jodaStyle.process(this);\n\n\n }\n}\n","import {customElement, ka_dom_ready, ka_sleep} from \"@kasimirjs/embed\";\nimport {Jodasplit} from \"../processor/jodasplit\";\nimport {Logger} from \"../helper/logger\";\nimport {Jodashorts} from \"../processor/jodashorts\";\n\n\n@customElement('joda-split')\nclass JodaSplit extends HTMLElement {\n #ready : boolean = false;\n get ready() {\n return this.#ready;\n }\n async connectedCallback() {\n let logger = new Logger(\"joda-split\");\n await ka_sleep(1);\n\n let jodaShorts = new Jodashorts(logger);\n this.innerHTML = await jodaShorts.process(this.innerHTML);\n\n let jodaSplit = new Jodasplit(logger);\n let fragment = document.createDocumentFragment();\n\n\n fragment.append(await jodaSplit.process(this));\n this.innerHTML = \"\";\n this.append(fragment);\n this.#ready = true;\n }\n}\n","\n\ntype Description = {\n category: \"page\"|\"hero\"|\"element\"|\"section\"|\"footer\",\n className: string,\n description: string,\n example : string,\n modifiers: Modifiers[]\n config: Config\n}\n\ninterface Config {\n bodyClasses?: string[];\n parseMarkdown?: boolean;\n}\n\ntype Modifiers = {\n className: string,\n description: string\n}\n\n\nexport class __JodaDescriptionManager {\n\n public addClass(category: \"page\"|\"hero\"|\"element\"|\"section\"|\"footer\", className: string, description: string, example : string, modifiers: Modifiers[], config: Config = {}) {\n let defaultConfig = {\n bodyClasses: [],\n parseMarkdown: true\n }\n config = {...defaultConfig, ...config};\n\n if (window[\"jodastyle\"] === undefined) {\n window[\"jodastyle\"] = {};\n }\n if (window[\"jodastyle\"][\"descriptions\"] === undefined) {\n window[\"jodastyle\"][\"descriptions\"] = [];\n }\n window[\"jodastyle\"][\"descriptions\"].push({category, className, description, example, modifiers, config});\n }\n\n\n get data() : Description[] {\n return window[\"jodastyle\"][\"descriptions\"];\n }\n\n get classes() {\n return this.data.map(e => e.className);\n }\n\n public getDescription(className : string) : Description {\n return this.data.find(e => e.className === className);\n }\n\n}\n\nexport const JodaDescriptionManager = new __JodaDescriptionManager();\n","\n\nexport class JodaElementException {\n constructor(\n public message : string,\n public element : HTMLElement = null,\n public triggerCommand : string = null\n ) {\n }\n}\n","import {customElement, KaCustomElement, template} from \"@kasimirjs/embed\";\n\n\nlet tpl = `\n<style>\n.joda-error {\n display: block;\n background-color: rgba(241,179,179,0.17);\n margin: 1em;\n padding: 1em;\n color: red;\n font-weight: bold;\n border: 3px solid red;\n}\n</style>\n<div class=\"joda-error\">\n [[ message ]]\n</div>\n`;\n\n@customElement('joda-error')\n@template(tpl)\nexport class JodaErrorElement extends KaCustomElement {\n constructor(public message) {\n super();\n let scope = this.init({\n message: message\n });\n }\n\n async connectedCallback() {\n await super.connectedCallback();\n this.scope.message = this.message;\n\n }\n}\n","const bestFormats = [\n \"svg\", \"avif\", \"webp\", \"jpg\", \"jpeg\", \"png\", \"gif\"\n]\nexport class MediaSupport {\n\n\n\n public avif : boolean = null\n public webp : boolean = null\n public jpg : boolean = true\n public jpeg : boolean = true\n public gif : boolean = true\n public png : boolean = true\n\n\n public valid : boolean = false;\n\n async detect() {\n this.webp = await testWebP() as any;\n this.avif = await testAvif() as any;\n console.log(\"Media supports\", this);\n this.valid = true;\n }\n\n\n isSupported(extension : string) : boolean {\n extension = extension.trim().toLowerCase();\n if(typeof this[extension] === \"undefined\")\n return false;\n return this[extension];\n }\n\n getBestExtension (extensions : string[]) : string {\n for(let curExt of bestFormats) {\n if (typeof extensions.find(e => e === curExt) !== \"undefined\" && this.isSupported(curExt))\n return curExt;\n }\n return null;\n }\n\n}\n\nfunction testWebP() {\n return new Promise(res => {\n const webP = new Image();\n webP.src = 'data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA';\n webP.onload = webP.onerror = () => {\n res(webP.height === 2);\n };\n })\n};\n\n\nfunction testAvif() {\n return new Promise(res => {\n const webP = new Image();\n webP.src = 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=';\n webP.onload = webP.onerror = () => {\n res(webP.height === 2);\n };\n })\n};\n\n\nlet promises : any[] = null;\nlet mediaSupport = new MediaSupport();\n\nexport async function getMediaSupport() : Promise<MediaSupport> {\n\n if (promises === null) {\n promises = [];\n await mediaSupport.detect();\n promises.forEach((exec) => exec(mediaSupport));\n }\n\n if (mediaSupport.valid === false) {\n return new Promise<MediaSupport>((resolve) => {\n promises.push(resolve);\n })\n }\n return mediaSupport;\n\n\n}\n","import {ka_eval} from \"@kasimirjs/embed\";\nimport {ka_create_element} from \"@kasimirjs/embed\";\n\n\n/**\n * Searches for occurence of ${javascript expression} and replaces them with the result of the expression\n */\nexport function template_parse(input : string, scope : {}, element: HTMLElement | null) : string {\n // Search for ${...} by preg and replace them with the result of the expression\n\n return input.replace(/\\[\\[(.*?)]]/gmi, (match, p1) => {\n let val = ka_eval(p1, scope, element, {});\n return val;\n });\n}\n\nexport class QTemplate {\n\n public content : HTMLElement | HTMLDivElement\n\n public selected : HTMLElement | HTMLDivElement | null;\n\n constructor(content: HTMLTemplateElement | HTMLElement | HTMLDivElement | string) {\n if (typeof content === \"string\") {\n this.content = ka_create_element(\"template\");\n this.content.innerHTML = content;\n } else {\n this.content = content;\n }\n if (this.content instanceof HTMLTemplateElement) {\n if (this.content.content.children.length > 1) {\n throw new Error(\"Template must have exactly one root element. Found: \" + this.content.innerHTML);\n }\n\n this.content = this.content.content.firstElementChild.cloneNode(true) as HTMLElement | HTMLDivElement;\n }\n this.selected = null;\n\n }\n parse(scope : {}) : this {\n let tpl = ka_create_element(\"template\", {}, [], null) as HTMLTemplateElement;\n tpl.content.append(this.content);\n\n //console.log(\"Parse\", this.content, this.content.toString());\n tpl.innerHTML = template_parse(tpl.innerHTML, scope, tpl);\n this.content = tpl.content.firstElementChild as HTMLElement | HTMLDivElement;\n return this;\n }\n\n /**\n * Returns the element with the given data-ref attribute\n * @param data_ref\n */\n public by(data_ref : string) : HTMLDivElement | HTMLElement {\n let selector = `[data-ref=\"${data_ref}\"]`;\n if (this.content.matches(selector)) {\n return this.content;\n }\n return this.content.querySelector(selector);\n }\n\n public select(data_ref : string) : this {\n this.selected = this.by(data_ref);\n if (this.selected === null) {\n console.error(\"Element with data-ref '\" + data_ref + \"' not found.\", this.content)\n throw \"Element with data-ref '\" + data_ref + \"' not found.\"\n }\n return this;\n }\n\n /**\n * Pick elements by selector and append them to the selected element\n *\n * @param source\n * @param selector\n */\n public pick(source : HTMLElement, selector : string, modifier : (e : HTMLElement) => HTMLElement = null) : this {\n Array.from(source.querySelectorAll(selector)).forEach((e: HTMLElement) => {\n if (modifier !== null) {\n e = modifier(e);\n }\n this.selected.append(e);\n });\n return this;\n }\n\n /**\n * Select and return own wrapper\n *\n * @param data_ref\n */\n public with(data_ref : string) {\n let instance = new QTemplate(this.content);\n instance.select(data_ref);\n return instance;\n }\n\n public append(element : Node | HTMLElement | Array<HTMLElement> | NodeList | DocumentFragment | QTemplate) : this {\n if (element instanceof QTemplate) {\n this.selected.append(element.content);\n return this;\n }\n if (element instanceof NodeList) {\n Array.from(element).forEach(e => this.selected.append(e));\n return this;\n }\n if (Array.isArray(element) || element instanceof NodeList) {\n element.forEach(e => this.selected.append(e));\n return this;\n }\n this.selected.append(element);\n return this;\n }\n\n public clone() : QTemplate {\n return new QTemplate(this.content.cloneNode(true) as HTMLElement | HTMLDivElement);\n }\n\n}\n","import {ka_sleep, template} from \"@kasimirjs/embed\";\nimport {JodaRendererInterface} from \"./JodaRenderer\";\nimport {DefaultLayout} from \"../types/DefaultLayout\";\nimport {JodaElementException} from \"./JodaElementException\";\nimport {QTemplate, template_parse} from \"./QTemplate\";\nimport {Joda} from \"../joda\";\n\n\nexport async function await_property(object : object, property : string[] | string, wait : number = 10) {\n if (typeof property === \"string\") {\n property = property.split(\".\");\n }\n let value = undefined;\n let index = 0;\n while (value === undefined) {\n index++;\n let curObject = object;\n for (let i = 0; i < property.length; i++) {\n if (curObject === undefined) {\n break;\n }\n curObject = curObject[property[i]];\n }\n value = curObject;\n if (value === undefined)\n await ka_sleep(wait);\n if (index > 1000) {\n index = 0;\n console.warn(\"Still waiting for property: \", property, \"in object\", object);\n }\n\n }\n return value;\n}\n\n\nexport function wrapElement(element : HTMLElement, wrapper : HTMLElement) {\n element.parentNode?.insertBefore(wrapper, element);\n wrapper.appendChild(element);\n}\n\n\nexport type JodaUseRenderer = {\n renderer: new() => JodaRendererInterface,\n config: new() => DefaultLayout\n}\n\nexport function registerJodaRenderer(name : string, renderer : new() => JodaRendererInterface, config : new() => DefaultLayout) {\n if (window[\"jodastyle\"] === undefined) {\n window[\"jodastyle\"] = {};\n }\n if (window[\"jodastyle\"][\"renderer\"] === undefined) {\n window[\"jodastyle\"][\"renderer\"] = {};\n }\n window[\"jodastyle\"][\"renderer\"][name] = {renderer, config};\n}\n\n\nexport function jodaRenderer(name : string, config : new() => DefaultLayout) {\n return function (classOrDescriptor: new() => JodaRendererInterface) : void {\n registerJodaRenderer(name, classOrDescriptor, config);\n }\n}\n\n\nexport function splitChildrenBySelector(element : HTMLElement, splitBySelctor : string) : DocumentFragment[] {\n let ret : DocumentFragment[] = [];\n Array.from(element.children).forEach(child => {\n if (child.matches(splitBySelctor)) {\n ret.push(document.createDocumentFragment());\n }\n if (ret.length > 0) {\n ret[ret.length - 1].append(child);\n }\n });\n return ret;\n}\n\nexport function getCleanVariableValue(styleValue : string) : string {\n return styleValue.trim().replace(/^[\"']/g, '').replace(/[\"']$/, '').trim()\n}\n\n\n/**\n * Parse config string formattes as key-value pairs like this: key1: value1; key2: value2; ... into an object.\n *\n * @param input String representing key-value pair separated by colon and each line separated by semicolon\n * @returns Object containing key-value pairs from string\n */\nexport function parseConfigString(input: string): {[key: string]: string} {\n // Check if input is null or undefined\n if (input == null) {\n return {};\n }\n\n // Split input string and filter invalid lines\n const obj: {[key: string]: string} = {};\n const lines = input.trim().split(';');\n for (let line of lines) {\n const parts = line.trim().split(':');\n if (parts.length == 2) {\n obj[parts[0].trim()] = parts[1].trim();\n }\n }\n\n return obj;\n}\n\n\nlet slotIndex = 0;\nexport async function getTemplateFilledWithContent(templateSelector : string, content : HTMLElement, origElement : HTMLElement) : Promise<DocumentFragment> {\n let templateHtml : string|null = Joda.getRegisteredTemplate(templateSelector);\n\n if (templateHtml === null) {\n let template = document.querySelector<HTMLTemplateElement>(templateSelector);\n if (template === null) {\n throw new JodaElementException(\"Template not found: \" + templateSelector);\n }\n templateHtml = template.innerHTML;\n }\n\n\n // Load --layout-* variables to template parser\n let layout = {};\n\n let props = getComputedStyle(origElement);\n\n\n\n // Attention: Chrome cannot list defined CSS Variables!\n templateHtml = template_parse(templateHtml, {\n layout: new Proxy({}, {\n get: function (target, name) {\n return props.getPropertyValue(\"--layout-\" + name.toString());\n }\n })\n }, content);\n\n let clone = document.createRange().createContextualFragment(templateHtml);\n\n let done = [];\n\n clone.querySelectorAll(\"slot[data-select][data-copy]\").forEach((slot) => {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n let select = slot.getAttribute(\"data-select\");\n let selected = Array.from(content.querySelectorAll(select)).map((element) => element.cloneNode(true));\n if (selected.length === 0) {\n console.warn(\"No element found for selector: \" + select + \" in template: \" + templateSelector + \" for slot: \", slot);\n return;\n }\n if (slot.hasAttribute(\"data-replace\") && selected) {\n slot.replaceWith(...selected);\n } else if(selected) {\n slot.append(...selected);\n }\n });\n clone.querySelectorAll(\"slot[data-select]\").forEach((slot) => {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n let select = slot.getAttribute(\"data-select\");\n let selected = Array.from(content.querySelectorAll(select));\n if (selected.length === 0) {\n console.warn(\"No element found for selector: \" + select + \" in template: \" + templateSelector + \" for slot: \", slot);\n return;\n }\n\n if (slot.hasAttribute(\"data-class\")) {\n selected.forEach((element) => {\n // Add all classes from data-class attribute to selected element\n element.classList.add(...slot.getAttribute(\"data-class\").split(\" \").filter((value) => value !== \"\"));\n });\n }\n\n if (slot.hasAttribute(\"data-replace\") && selected) {\n slot.replaceWith(...selected);\n } else if(selected) {\n slot.append(...selected);\n }\n });\n\n // Select <slot> element with no data-select attribute\n let slot = clone.querySelector(\"slot:not([data-select])\");\n if (slot !== null && slot.hasAttribute(\"data-class\")) {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n Array.from(content.children).forEach((element) => {\n // Add all classes from data-class attribute to selected element\n element.classList.add(...slot.getAttribute(\"data-class\").split(\" \").filter((value) => value !== \"\"));\n });\n }\n if (slot !== null && slot.hasAttribute(\"data-replace\")) {\n slot.replaceWith(...Array.from(content.children));\n } else if (slot !== null) {\n slot.append(...Array.from(content.children));\n } else {\n content.remove();\n }\n\n return clone;\n}\n","import {ka_create_element} from \"@kasimirjs/embed\";\n\n\nexport function parseVariableAndStyleStr (varString : string) : any {\n let attrs : any = {\"$\": {}, \"@\": {}};\n let regex = new RegExp(`([@$])[^@^$]+`, \"gi\")\n varString.replace(regex, (match: string, type: string) => {\n match = match.substring(1);\n if (match.indexOf(\"=\") === -1 && type === \"@\" ) {\n if (typeof attrs[type].class === \"undefined\")\n attrs[type].class = \"\";\n attrs[type].class += \" \" + match;\n attrs[type].class = attrs[type].class.trim();\n } else {\n let res = match.split(\"=\");\n attrs[type][res.shift()] = res.join(\"=\").trim();\n }\n return \"\";\n })\n return attrs;\n}\n\nexport function parseVariableStr (varString : string, delimiter = \"@\") : any {\n let attrs : any = {};\n let regex = new RegExp(`\\\\${delimiter}[^${delimiter}]+`, \"gi\")\n varString.replace(regex, (match: string) => {\n match = match.substring(1);\n if (match.indexOf(\"=\") === -1) {\n if (typeof attrs.class === \"undefined\")\n attrs.class = \"\";\n attrs.class += \" \" + match;\n attrs.class = attrs.class.trim();\n } else {\n let res = match.split(\"=\");\n\n attrs[res.shift()] = res.join(\"=\").trim();\n }\n return \"\";\n })\n return attrs;\n}\n\nexport function parseAttributeStr(attrString : string ) : any {\n return parseVariableStr(attrString, \"@\")\n}\n\nexport function createElement(definition : string) : HTMLElement {\n let defRest = definition.trim();\n let tag = \"div\";\n defRest = defRest.replace(/^[a-z0-9_\\:\\-]+/ig, (match: string) => {\n tag = match;\n return \"\";\n })\n let attrs = parseAttributeStr(defRest);\n\n\n let element = ka_create_element(tag, attrs);\n return element;\n}\n\nexport function createElementTree (def : string) : {start: HTMLElement, leaf: HTMLElement} {\n\n let start : HTMLElement = null;\n let leaf : HTMLElement = null;\n\n\n\n let splitted = def.split(\">\");\n while(splitted.length > 0) {\n let cur = splitted.shift();\n\n let refName = null;\n cur = cur.replace(/§([a-z0-9_\\-]+)/, (a, name) => {\n refName = name;\n return \"\";\n });\n\n\n if (cur.trim().startsWith(\"|\")) {\n // TextNode\n let el = document.createElement(\"div\");\n if (splitted.length > 0)\n cur += \">\" + splitted.join(\">\");\n\n el.innerHTML = cur.trim().substring(1);\n el.childNodes.forEach((e) => leaf.append(e.cloneNode(true)));\n el.remove();\n break;\n }\n\n let el = createElement(cur);\n\n /*if (refName !== null)\n this.#refs[refName] = el;\n*/\n if (start === null) {\n start = leaf = el;\n } else {\n if (leaf instanceof HTMLTemplateElement) {\n leaf.content.appendChild(el);\n } else {\n leaf.appendChild(el);\n\n }\n leaf = el;\n }\n }\n return {start, leaf};\n}\n","\nexport class Logger {\n\n constructor(public name : string) {\n }\n log(...args : any[]) {\n console.log(\"[\" + this.name + \"]\", ...args);\n }\n\n warn(...args : any[]) {\n console.warn(\"[\" + this.name + \"]\", ...args);\n }\n}\n","\nexport * from \"./helper/JodaRenderer\";\n\nexport * from \"./component/joda-content-element\";\nexport * from \"./component/joda-fetch\";\nexport * from \"./component/joda-split\";\n\n\nexport * from \"./helper/functions\";\nexport * from \"./helper/JodaRenderer\";\nexport * from \"./helper/QTemplate\";\nexport * from \"./types/DefaultLayout\";\nexport * from \"./helper/JodaDescriptionManager\";\n\nexport * from \"./helper/logger\";\nexport * from \"./processor/jodasplit\";\n\nexport * from \"./joda\";\n","\nexport const Joda = new (class {\n\n /**\n * Register a template instead of adding <template id=\"...\">...</template> to the DOM\n *\n * @param id\n * @param data\n */\n public registerTemplate(id: string, data : string) {\n if ( ! window[\"jodastyle\"] )\n window[\"jodastyle\"] = {};\n if ( ! window[\"jodastyle\"][\"templates\"] )\n window[\"jodastyle\"][\"templates\"] = {};\n\n window[\"jodastyle\"][\"templates\"][id] = data;\n }\n\n\n public getRegisteredTemplate(id: string) : string|null {\n if (id.startsWith(\"#\"))\n id = id.substring(1);\n return window[\"jodastyle\"]?.[\"templates\"]?.[id] ?? null;\n }\n\n\n})();\n","import {Logger} from \"../helper/logger\";\nimport {parseConfigString} from \"../helper/functions\";\n\n\nconst commands = [\"use\", \"wrap\"];\n\nexport class LayoutProcessor {\n\n public constructor(public logger : Logger) {\n }\n\n\n public processNode(node : HTMLElement) : HTMLElement {\n if ( ! node.hasAttribute(\"layout\"))\n return node;\n\n let layout = parseConfigString(node.getAttribute(\"layout\"));\n\n\n for (let key in layout) {\n if (commands.includes(key)) {\n node.style.setProperty(\"--joda-\" + key, layout[key]);\n continue;\n }\n node.style.setProperty(\"--layout-\" + key, layout[key]);\n }\n\n return node;\n }\n\n}\n","import {LeuCDNImageProc} from \"../vendor/LeuCDNImageProc\";\nimport {getMediaSupport, MediaSupport} from \"../helper/MediaSupport\";\nimport {Logger} from \"../helper/logger\";\n\ntype Resolution = {\n width : number,\n height: number\n}\n\nexport type JodaImageMetaData = {\n formats: string[],\n resolutions: Resolution[],\n filename: string,\n alt: string,\n [key : string] : any\n\n getUrl(resolution : Resolution, format : string) : string\n}\n\n\nexport interface JodaImageProcessorInterface {\n isSuitable(url : string) : boolean;\n parseUrl(url : string) : JodaImageMetaData;\n}\n\n\n\nlet imageIndex = 0;\n\nexport class JodaImageProc {\n\n constructor(private logger : Logger) {\n }\n\n private getBestResolution(data: Resolution[]): Resolution {\n data.sort((a, b) => {\n // sort by width ascending\n if (a.width < b.width)\n return -1;\n if (a.width > b.width)\n return 1;\n return 0;\n });\n\n let fit = data.find((e) => e.width >= window.innerWidth);\n if (typeof fit === \"undefined\")\n fit = data[data.length - 1];\n return fit ?? {width: 0, height: 0}\n }\n\n\n private getBestFormat(formats : string[], mediaSupport: MediaSupport) : string {\n return mediaSupport.getBestExtension(formats);\n\n }\n\n public async process(node : HTMLElement) {\n let processor = new LeuCDNImageProc();\n let mediaSupport = await getMediaSupport();\n for (let imgNode of node.querySelectorAll(\"img[src]\") as any) {\n imageIndex++;\n let src = imgNode.getAttribute(\"src\");\n if ( ! processor.isSuitable(src))\n continue;\n\n imgNode.setAttribute(\"data-src-orig\", src);\n\n let data = processor.parseUrl(src);\n let bestFit = this.getBestResolution(data.resolutions);\n imgNode.setAttribute(\"width\", bestFit.width.toString());\n imgNode.setAttribute(\"height\", bestFit.height.toString());\n if (imgNode.getAttribute(\"alt\") === null)\n imgNode.setAttribute(\"alt\", data.alt);\n imgNode.setAttribute(\"src\", data.getUrl(bestFit, this.getBestFormat(data.formats, mediaSupport)));\n\n if (imageIndex < 3) {\n imgNode.setAttribute(\"loading\", \"eager\");\n } else {\n imgNode.setAttribute(\"loading\", \"lazy\");\n }\n\n\n\n\n }\n\n\n\n\n\n\n }\n\n\n\n}\n","import {Logger} from \"../helper/logger\";\n\n\nexport const breakpoints = {\n \"xsm\": 0,\n \"sm\": 576,\n \"md\": 768,\n \"lg\": 992,\n \"xl\": 1200,\n \"xxl\": 1400\n}\n\n\nexport function getCurrentBreakpoint() : string {\n let ret = \"\";\n Object.keys(breakpoints).forEach((key) => {\n if (window.innerWidth >= breakpoints[key]) {\n ret = key;\n }\n });\n return ret;\n}\n\nclass ResponsiveClass {\n always: string[] = [];\n default: string[] = null;\n xsm: null = null;\n xs: string[] = null;\n sm: string[] = null;\n md: string[] = null;\n lg: string[] = null;\n xl: string[] = null;\n xxl: string[] = null;\n\n breakpoints = [\"xsm\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"];\n\n getClassesForBreakpoint(breakpoint : string = null) : string[] {\n if (breakpoint === null) {\n breakpoint = getCurrentBreakpoint();\n }\n\n\n let ret = [];\n ret.push(...this.always);\n let isDefault = true;\n for (let bp of this.breakpoints) {\n //console.log(\"Breakpoint\", bp, this[bp], breakpoint);\n if (this[bp] !== null) {\n ret = this[bp];\n isDefault = false;\n }\n if (bp === breakpoint) {\n break;\n }\n }\n if (isDefault && this.default !== null) {\n ret.push(...this.default);\n }\n ret = ret.filter((item) => item !== \"\");\n return ret;\n };\n}\n\nexport function parseClassStr(input : string) : ResponsiveClass {\n let ret = new ResponsiveClass();\n let pointer = \"always\";\n input.split(\" \").map((item) => {\n let matches = item.match(/\\:([a-zA-Z]*)\\:/);\n if (matches === null) {\n ret[pointer].push(item);\n return;\n }\n pointer = matches[1];\n if (pointer === \"\") {\n pointer = \"default\";\n }\n if (ret[pointer] === null) {\n ret[pointer] = [];\n }\n });\n return ret;\n}\n\n\nexport class Jodaresponsive {\n\n\n constructor(public logger : Logger) {\n }\n\n private processNode(node : HTMLElement) {\n const origAttr = \"data-class-orig\";\n if ( ! node.hasAttribute(origAttr)) {\n let classes = node.getAttribute(\"class\") ?? \"\";\n if (classes.indexOf(\":\") === -1)\n return;\n node.setAttribute(origAttr, classes);\n }\n let classes = node.getAttribute(origAttr);\n let responsiveClasses = parseClassStr(classes);\n\n node.setAttribute(\"class\", \"\");\n\n node.classList.add(...responsiveClasses.always.filter((item) => item !== \"\"));\n node.classList.add(...responsiveClasses.getClassesForBreakpoint());\n\n }\n\n process(node : HTMLElement) {\n Array.from([node, ...Array.from(node.querySelectorAll<HTMLElement>(\"*\"))]).forEach((child) => {\n this.processNode(child);\n });\n\n }\n\n\n}\n","import {Logger} from \"../helper/logger\";\n\n\nexport class Jodashorts {\n\n constructor(public logger : Logger) {\n }\n\n\n process (source : string) : string {\n\n source = source.replace(/\\[([a-z0-9\\-)]+)(.*?)]/g, (match, name, attrStr) => {\n let attrs = {\n \"class\": []\n };\n\n // Search for name=\"value\" or name='value'. Make sure that starting ' matches ending ' using back reference\n attrStr = attrStr.replace(/”/g, '\"').replace(/“/g, '\"').replace(/‘/g, \"'\").replace(/’/g, \"'\");\n attrStr = attrStr.replace(/([a-z0-9\\-\\.]+)=([\"'])(.*?)\\2/mig, (match, name, quote, value) => {\n if (name === \"class\") {\n attrs[\"class\"].push(...value.split(\" \"));\n return \"\";\n }\n attrs[name] = value;\n return \"\";\n });\n\n attrStr.split(\" \").forEach((attr) => {\n attr = attr.trim();\n if (attr === \"\")\n return;\n if (attr.startsWith(\".\")) {\n attrs[\"class\"].push(attr.substr(1));\n return;\n }\n attrs[attr] = \"\";\n\n });\n\n let attrstr = \"\";\n for(let attr in attrs) {\n if (attr === \"class\") {\n attrstr += ` class=\"${attrs[attr].join(\" \")}\"`\n } else {\n attrstr += ` ${attr}=\"${attrs[attr]}\"`\n }\n }\n\n let ret = `<${name}${attrstr}></${name}>`;\n return ret;\n\n });\n\n return source;\n }\n}\n","import {ka_create_element} from \"@kasimirjs/embed\";\nimport {Logger} from \"../helper/logger\";\nimport {LayoutProcessor} from \"./LayoutProcessor\";\n\n\ninterface JodaSplitConfig {\n\n\n}\n\n\nexport class Jodasplit {\n\n\n #target = document.createDocumentFragment();\n #parents = [this.#target];\n\n #currentParent : HTMLElement = ka_create_element(\"section\", {class: \"section-h1pre\"})\n #currentContent : HTMLElement = ka_create_element(\"div\", {class: \"content\"}, [], this.#currentParent);\n #currentChildren: HTMLElement = ka_create_element(\"div\", {class: \"children\"}, [], this.#currentParent);\n\n constructor(public logger : Logger) {\n }\n\n private findParentElement(layer : number) : HTMLElement | DocumentFragment {\n while (this.#parents.length > layer) {\n this.#parents.pop();\n }\n while (this.#parents[this.#parents.length - 1] === undefined) {\n this.#parents.pop();\n }\n return this.#parents[this.#parents.length - 1];\n }\n\n\n private createNewElement(tagName : string, layer : number, tag : string) : HTMLElement {\n tagName = tagName.toLowerCase();\n let curParent = this.findParentElement(layer)\n //console.log(\"createNewElement\", tagName, curParent, this.#parents);\n let curParentChildren = curParent.childNodes[1] as HTMLElement;\n\n this.#currentParent = ka_create_element(tag, {class: \"section-\" + tagName});\n while (this.#parents.length < layer) {\n this.#parents.push(undefined as any);\n }\n this.#parents.push(this.#currentParent as any);\n if (curParent === this.#target) {\n curParent.appendChild(this.#currentParent);\n } else {\n curParentChildren.append(this.#currentParent);\n }\n this.#currentContent = ka_create_element(\"div\", {class: \"content\"}, [], this.#currentParent);\n this.#currentChildren = ka_create_element(\"div\", {class: \"children\"}, [], this.#currentParent);\n return this.#currentParent;\n }\n\n process (source : DocumentFragment | HTMLElement) : DocumentFragment {\n let lastLayer = 1;\n this.#target.append(this.#currentParent);\n\n // Layout Processor now in JodaStyle\n //let layoutProcessor = new LayoutProcessor(this.logger);\n\n Array.from(source.children).forEach((child : Element) => {\n if (child instanceof HTMLElement && child.matches(\"footer\")) {\n // Just copy node\n this.#target.appendChild(child);\n return;\n }\n if (child instanceof HTMLElement && child.matches(\"h1, h2, h3, h4, h5, h6, h7, h8, h9, hr:not(.hr), .section-h2, .section-h3, .section-h4\")) {\n let layer = 1;\n let tag = \"div\";\n\n if (child.matches(\"h1,h2,.section-h2\")) {\n layer = lastLayer = 1;\n tag = \"section\";\n } else if (child.matches(\"h3, h4, h5, h6, h7, h8, h9, .section-h3, .section-h4\")) {\n if (child.matches(\".section-h3\")) {\n layer = lastLayer = 6;\n } else if( child.matches(\".section-h4\")) {\n layer = lastLayer = 8;\n } else {\n layer = lastLayer = parseInt(child.tagName.substr(1)) * 2; // Allow HR in between\n }\n\n tag = \"div\";\n } else if (child.matches(\"hr\")) {\n layer = lastLayer + 1; // hr crates subelement of the last element\n tag = \"div\";\n }\n\n //console.log(\"layer is\", layer, lastLayer, child.tagName, child);\n let e = this.createNewElement(child.tagName.toLowerCase(), layer, tag);\n\n e.setAttribute(\"layout\", child.getAttribute(\"layout\") || \"\");\n child.removeAttribute(\"layout\");\n\n e.setAttribute(\"style\", child.getAttribute(\"style\") || \"\");\n child.removeAttribute(\"style\");\n\n e.classList.add(...child.classList as any);\n child.setAttribute(\"orig-class\", child.getAttribute(\"class\") || \"\");\n child.setAttribute(\"class\", \"\");\n\n //layoutProcessor.processNode(e);\n }\n if (child.tagName === \"HR\" && ! child.classList.contains(\"hr\")) {\n console.log(\"hr\", child);\n child.setAttribute(\"orig-pre-split-class\", child.getAttribute(\"class\"));\n child.setAttribute(\"class\", \"d-none\");\n }\n\n this.#currentContent.appendChild(child);\n });\n\n // Remove empty content elements\n Array.from(this.#target.querySelectorAll(\".children\")).forEach((child : HTMLElement) => {\n if (child.children.length === 0) {\n child.remove();\n }\n });\n\n // Reove empty content elements\n Array.from(this.#target.querySelectorAll(\".content\")).forEach((child : HTMLElement) => {\n if (child.children.length === 0) {\n child.remove();\n }\n });\n\n return this.#target;\n }\n}\n","import {createElementTree} from \"../helper/ka-quick-template\";\nimport {\n await_property,\n getCleanVariableValue,\n getTemplateFilledWithContent,\n JodaUseRenderer\n} from \"../helper/functions\";\nimport {Logger} from \"../helper/logger\";\nimport {ka_eval} from \"@kasimirjs/embed\";\nimport {JodaErrorElement} from \"../helper/JodaErrorElement\";\nimport {JodaElementException} from \"../helper/JodaElementException\";\n\ntype Commands = {\n [command: string]: ((value : string, target : HTMLDivElement, element : HTMLElement, logger : Logger) => HTMLElement|Promise<HTMLElement>);\n}\n\nexport let jodaStyleCommands : Commands = {};\n\n\n\njodaStyleCommands[\"--joda-replace-by\"] = (value : string, target, element : HTMLElement, logger : Logger) => {\n let parent = element.parentElement;\n let ret = createElementTree(value)\n\n parent.replaceChild(ret.start, element);\n\n Array.from(element.children).forEach((child) => {\n ret.leaf.append(child);\n });\n element.remove();\n return ret.leaf;\n}\n\njodaStyleCommands[\"--joda-wrap\"] = async (value : string, target, element : HTMLElement, logger : Logger) => {\n let parent = element.parentElement;\n\n if (value.startsWith(\"#\")) {\n let placeholder = document.createElement(\"div\");\n parent.insertBefore(placeholder, element);\n let newElement = await getTemplateFilledWithContent(value, element, element);\n placeholder.replaceWith(newElement);\n return element;\n\n } else {\n let ret = createElementTree(value)\n\n parent.replaceChild(ret.start, element);\n\n ret.leaf.append(element);\n return element;\n }\n}\n\n\njodaStyleCommands[\"--joda-container\"] = (value : string, target, element : HTMLElement, logger : Logger) => {\n let ret = createElementTree(value)\n\n Array.from(element.children).forEach((child) => {\n ret.leaf.append(child);\n })\n element.append(ret.start);\n return element;\n};\n\njodaStyleCommands[\"--joda-unwrap\"] = (value : string, target, element : HTMLElement, logger : Logger) => {\n let parent = element.parentElement;\n let grandParent = parent.parentElement;\n grandParent.insertBefore(element, parent);\n if (parent.children.length === 0) {\n parent.remove();\n }\n return element;\n};\n\n\n/**\n * --joda-group: @row\n * @param value\n * @param target\n * @param element\n * @param logger\n */\njodaStyleCommands[\"--joda-group\"] = (value : string, target, element : HTMLElement, logger : Logger) => {\n const groupByKey = \"jodaIsGroupedBy\";\n if (element[groupByKey] !== undefined) {\n return element;\n }\n\n let siblings = [];\n let curSibling = element.nextElementSibling;\n while (curSibling && getCleanVariableValue(getComputedStyle(curSibling).getPropertyValue(\"--joda-group\")) === value) {\n siblings.push(curSibling);\n curSibling[groupByKey] = true;\n curSibling = curSibling.nextElementSibling;\n }\n\n\n let parent = element.parentElement;\n let ret = createElementTree(value)\n\n // Insert the Element\n element.parentElement.insertBefore(ret.start, element);\n\n\n ret.leaf.append(element);\n siblings.forEach((sibling) => {\n ret.leaf.append(sibling);\n });\n\n return element;\n}\n\njodaStyleCommands[\"--joda-class\"] = (value : string, target, element : HTMLElement, logger: Logger) => {\n let ret = createElementTree(value)\n\n element.setAttribute(\"class\", element.getAttribute(\"class\") + \" \" + value);\n\n return element;\n}\n\njodaStyleCommands[\"--joda-use\"] = async(value : string, target, element : HTMLElement, logger : Logger) => {\n if (value.startsWith(\"#\")) {\n let placeholder = document.createElement(\"div\");\n Array.from(element.children).forEach((child) => {\n placeholder.append(child);\n });\n let newElement = await getTemplateFilledWithContent(value, placeholder, element);\n\n element.append(newElement);\n return element;\n }\n\n\n let matches = value.match(/([a-z0-9\\_-]+)\\s*\\((.*?)\\)/);\n if ( ! matches) {\n console.error(\"Invalid --joda-use command: \", value, \"in element\", element, \" should be in format: commandName(arg1: value1, arg2: value2, ...)\");\n throw \"Invalid --joda-use command: \" + value + \" should be in format: commandName(arg1: value1, arg2: value2, ...)\";\n }\n logger.log(\"Using renderer: \", matches[1], \"with args: \", matches[2], \"on element\", element);\n let commandName = matches[1];\n //console.log(\"interpret\", \"{\" + matches[2] + \"}\")\n let args = ka_eval(\"{\" + matches[2] + \"}\", {}, target, {});\n let command = await await_property(window, [\"jodastyle\", \"renderer\", commandName]) as JodaUseRenderer;\n\n let config = new command.config();\n let style = getComputedStyle(element);\n\n Object.keys(config).forEach((key) => {\n let val = style.getPropertyValue(\"--layout-\" + key.replace(/\\_/g, \"-\"));\n if (val !== \"\") {\n config[key] = val.replace(/^[\"']/g, '').replace(/[\"']$/, '').trim();\n }\n\n });\n Object.assign(config, args);\n\n return await (new command.renderer).render(element, config);\n}\n","import {jodaStyleCommands} from \"./jodastyle-commands\";\nimport {Logger} from \"../helper/logger\";\nimport {getCleanVariableValue} from \"../helper/functions\";\nimport {ka_sleep} from \"@kasimirjs/embed\";\nimport {JodaElementException} from \"../helper/JodaElementException\";\nimport {JodaErrorElement} from \"../helper/JodaErrorElement\";\nimport {LayoutProcessor} from \"./LayoutProcessor\";\n\n\nexport class Jodastyle {\n\n\n constructor(public logger : Logger) {\n }\n\n public async process(node : HTMLElement) {\n\n // Wait for all joda-split to be ready\n for (let child of Array.from(node.getElementsByTagName(\"joda-split\"))) {\n while (child[\"ready\"] !== true) {\n await ka_sleep(5);\n }\n }\n\n // Run layout-attribute processor (for whole style - already running on joda-split)\n let layoutProcessor = new LayoutProcessor(this.logger);\n node.querySelectorAll(\"[layout]\").forEach((node) => {\n layoutProcessor.processNode(node as HTMLElement);\n });\n\n // Run jodastyle commands\n for (let child of [node, ...Array.from(node.querySelectorAll<HTMLElement>(\"*\"))]) {\n if (child[\"joda-style-processed\"] === true) {\n continue;\n }\n child[\"joda-style-processed\"] = true;\n\n let style = getComputedStyle(child);\n\n\n let keys = Object.keys(jodaStyleCommands);\n for (let key of Array.from(keys)) {\n\n let styleValue = style.getPropertyValue(key);\n if (styleValue === \"\") {\n continue;\n }\n if (styleValue === getComputedStyle(child.parentElement).getPropertyValue(key)) {\n continue; // Inherited from parent\n }\n\n // Replace starting and ending with \" or ' with nothing\n styleValue = getCleanVariableValue(styleValue)\n\n let command = jodaStyleCommands[key];\n try {\n child = await command(styleValue, node as HTMLDivElement, child, this.logger) as HTMLElement;\n\n } catch (e) {\n if (e instanceof JodaElementException) {\n e.triggerCommand = key + \": \" + styleValue;\n this.logger.warn(e.message, e.element);\n child.replaceWith(new JodaErrorElement(e.message + \" (trigger by: \" + e.triggerCommand + \")\"));\n } else {\n this.logger.warn(\"Unhandled exception\", e, \"on element\", child, \"triggered by\", key + \": \" + styleValue);\n throw e;\n }\n }\n\n }\n await this.process(child); // Recursive parse replaced elements\n }\n\n }\n}\n","import {ka_create_element} from \"@kasimirjs/embed\";\n\n\nexport class Jodavisualize {\n\n public process(element : HTMLElement) {\n [element, ...Array.from(element.querySelectorAll(\"*\"))].forEach((e : HTMLElement) => {\n e.insertBefore(ka_create_element(\"div\", {class: \"joda-visualize\"}, `<${e.tagName.toLowerCase()} class=\"${Array.from(e.classList).join(\", \")}\">`), e.firstElementChild);\n });\n }\n}\n","\n\nexport class DefaultLayout {\n\n\n public container : \"container\" | \"container-fluid\" = \"container\";\n\n\n public break1: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" = \"xl\";\n\n}\n","import {JodaImageMetaData, JodaImageProcessorInterface} from \"../processor/jodaimageproc\";\n\n\nexport class LeuCDNImageProc implements JodaImageProcessorInterface {\n\n isSuitable(url: string): boolean {\n return url.startsWith(\"cdn\") || url.startsWith(\"data:image,cdn\");\n }\n\n parseUrl(url: string): JodaImageMetaData {\n let ret = {\n formats: [],\n resolutions: []\n } as JodaImageMetaData;\n url = url.replace(\"cdn+https://\", \"https://\");\n url = url.replace(\"cdn://\", \"https://cdn.leuffen.de\");\n url = url.replace(/\\/(([0-9]+x[0-9]+|[,_])+)\\//ig, (p0, sizes: string) => {\n sizes.split(/[,_]/g).forEach((size) => {\n ret.resolutions.push(\n {\n width: parseInt(size.split(\"x\")[0]),\n height: parseInt(size.split(\"x\")[1])\n }\n )\n });\n\n return \"/@size@/\";\n })\n\n ret.resolutions.sort((a, b) => {\n if (a.width < b.width)\n return -1;\n if (a.width > b.width)\n return 1;\n return 0;\n });\n\n url = url.replace(/([a-z0-9_\\-]+)\\.([a-z0-9\\,_]+)$/ig, (p0, name, formats) => {\n //console.log(\"detect name\", name, formats);\n ret.formats = formats.replace(/,/gm, \"_\").split(\"_\");\n ret.filename = name;\n ret[\"__filename\"] = name;\n ret.alt = name.replace(/_+/, \" \");\n return \"@file@\";\n })\n\n ret.getUrl = (resolution, format) => {\n let loadUrl = url.replace(/@size@/g, resolution.width + \"x\" + resolution.height);\n loadUrl = loadUrl.replace(/@file@/g, ret.filename + \".\" + format);\n return loadUrl;\n };\n\n return ret;\n\n }\n\n}\n","\nexport * from './src/index'\n","\nimport {KaCustomFragment, KaScope, template} from \"@kasimirjs/embed\";\n\n\n// language=html\nconst html = `\n <div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" ka.for=\"let tabName in tabs\">\n <a class=\"nav-link\" ka.classlist.fw-bold=\"selectedTabName === tabName\" ka.classlist.active=\"selectedTabName === tabName\" ka.on.click=\"$scope.selectedTabName = tabName\" aria-current=\"page\" href=\"javascript:void(0)\">[[ tabName ]]</a>\n </li>\n </ul>\n <div class=\"p-3 border\">\n <div ka.for=\"let curTabName in tabs\">\n <div ka.if=\"curTabName === selectedTabName\" >\n <div ka.use=\"tabs[curTabName]\" ka.scope=\"targetScope\"></div>\n </div>\n </div>\n </div>\n \n</div>\n`\ntype KitTabs = {\n [tabName : string]: HTMLElement | KaCustomFragment\n}\n@template(html)\nexport class KitTabPane extends KaCustomFragment {\n\n constructor(\n public tabs : KitTabs\n ) {\n super();\n\n let scope = this.init({\n targetScope: null,\n tabs,\n selectedTabName : Object.keys(tabs)[0]\n })\n }\n\n public setScope(scope: KaScope) {\n // Override default behaviou and pass scope to next\n this.scope[\"targetScope\"] = scope;\n }\n}\n","import {KaCustomFragment, KaScope, template} from \"@kasimirjs/embed\";\nimport {random_string} from \"../functions\";\n\n\nlet html = `\n<div class=\"row g-3 align-items-center\">\n <div class=\"col-auto\">\n <label ka.attr.for=\"config.id\" class=\"col-form-label\">[[ config.title ]]</label>\n </div>\n <div class=\"col-auto\">\n <input ka.if=\"config.type !== 'select' && config.type !== 'textarea'\" ka.attr.readonly=\"config.readonly === true\" ka.attr.type=\"config.type\" ka.id=\"config.id\" ka.bind=\"%%bind%%\" class=\"form-control\" aria-describedby=\"passwordHelpInline\">\n </div>\n <div class=\"col-auto\">\n <span id=\"passwordHelpInline\" class=\"form-text\">\n Must be 8-20 characters long.\n </span>\n </div>\n</div>\n\n`\ntype KitFormInputConfig = {\n name?: string,\n title?: string,\n type? : string,\n id? : string,\n readonly?: boolean,\n\n\n}\n\nconst KitFormInputDefaults = {\n title: \"\",\n type: \"text\",\n id: null as string\n}\n\n@template(html)\nexport class KitFormInput extends KaCustomFragment {\n\n private bindSelector : string;\n\n /**\n * Example:\n *\n * new KitFormInput(\"$scope.name\", {title: \"Name:\"});\n *\n * @param bindSelector\n * @param config\n */\n constructor(bindSelector : string, config : KitFormInputConfig) {\n super();\n this.bindSelector = bindSelector;\n\n config = {...KitFormInputDefaults, ...config};\n if (config.id === null) {\n config.id = random_string();\n }\n let scope = this.init({\n config,\n bindValue: bindSelector\n });\n\n }\n\n init<T extends KaScope>(scope: T): KaScope | T {\n if (typeof this.constructor[\"html\"] !== \"undefined\")\n this[\"html\"] = (this.constructor['html'] as any).replace(\"%%bind%%\", this.bindSelector) as string;\n return super.init(scope);\n }\n\n}\n","\n\nexport function random_string(length : number = 8) : string {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for ( var i = 0; i < length; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n","export * from \"./functions\"\n\nexport * from \"./base/tab-pane\"\nexport * from \"./form/form-input\"\nexport * from \"./sidebar/sidebar-wrapper\";\n\n","// language=HTML\nimport {ka_session_storage, KaCustomWrapper, template} from \"@kasimirjs/embed\";\n\nconst tpl = `\n <style>\n .sidepanel {\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n border: 0;\n width: 250px;\n z-index: 99999;\n transform: translateX(100%);\n transition: all 0.3s ease-in-out;\n\n\n background: linear-gradient(0deg, rgb(37, 32, 32) 0%, rgba(0, 0, 0, 1) 100%);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n padding: 5px\n }\n\n .sidepanel .activator {\n position: absolute;\n top: 38vh;\n height: 50px;\n width: 50px;\n left: -50px;\n cursor: pointer;\n background: linear-gradient(90deg, rgb(68, 63, 63) 0%, rgba(0, 0, 0, 1) 100%);\n z-index: 99999;\n color: #fff;\n border-radius: 20% 0 0 20%;\n box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);\n opacity: 0.8;\n transition: opacity 0.3s ease-in-out;\n }\n\n .sidepanel .activator svg {\n width: 100%;\n height: 100%;\n padding: 10px\n }\n\n .sidepanel.active .activator {\n opacity: 0.8;\n box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);\n }\n\n .sidepanel .activator:hover {\n opacity: 1;\n }\n\n .sidepanel.active {\n transform: translateX(0);\n box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);\n }\n\n .sidepanel .content {\n color: #fff;\n height: 100%;\n overflow: scroll;\n }\n\n </style>\n\n <nav class=\"sidepanel\" ka.classlist.active=\"state.active\">\n <div class=\"activator\" ka.on.click=\"$fn.toggle()\" ka.content=\"$scope.config.icon\">B</div>\n <div class=\"content\">\n <div ka.content=\"$content\"></div>\n </div>\n </nav>\n`;\n\n\n\nexport class SidebarWrapperConfig {\n public icon: string = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-gear\" viewBox=\"0 0 16 16\">\n <path d=\"M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z\"/>\n <path d=\"M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z\"/>\n</svg>`;\n}\n\n\n@template(tpl)\nexport class SidebarWrapper extends KaCustomWrapper {\n\n constructor(config : SidebarWrapperConfig = null) {\n super();\n if (config === null)\n config = new SidebarWrapperConfig();\n\n let state = ka_session_storage({active: false}, \"switcher-element\");\n let scope = this.init({\n state: state,\n config: config,\n $fn: {\n toggle: () => {\n state.active = ! state.active;\n scope.render();\n }\n },\n $on: {\n change: (e) => {\n\n }\n }\n });\n }\n\n\n\n}\n","'use strict';\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Helpers\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\nfunction isString(obj) { return _class(obj) === '[object String]'; }\nfunction isObject(obj) { return _class(obj) === '[object Object]'; }\nfunction isRegExp(obj) { return _class(obj) === '[object RegExp]'; }\nfunction isFunction(obj) { return _class(obj) === '[object Function]'; }\n\n\nfunction escapeRE(str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&'); }\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\n\nvar defaultSchemas = {\n 'http:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp(\n '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n );\n }\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp(\n '^' +\n self.re.src_auth +\n // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n self.re.src_port +\n self.re.src_host_terminator +\n self.re.src_path,\n\n 'i'\n );\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') { return 0; }\n if (pos >= 3 && text[pos - 3] === '/') { return 0; }\n return tail.match(self.re.no_http)[0].length;\n }\n return 0;\n }\n },\n 'mailto:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp(\n '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n );\n }\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n return 0;\n }\n }\n};\n\n/*eslint-disable max-len*/\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n\n/*eslint-enable max-len*/\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = require('./lib/re')(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options);\n\n // Cache last tested result. Used to skip repeating steps on next `match` call.\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n this.__schema__ = '';\n this.__text_cache__ = '';\n\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n\n this.re = {};\n\n compile(this);\n}\n\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) { return false; }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos;\n\n // try to scan for link with schema - that's the most simple rule\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ ||\n (shift === this.__index__ && next > this.__last_index__)) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0, result = [];\n\n // Try to take previous element from cache, if .test() called before\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n }\n\n // Cut head if cache was used\n var tail = shift ? text.slice(shift) : text;\n\n // Scan string until end reached\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n\n\n/**\n * LinkifyIt#matchAtStart(text) -> Match|null\n *\n * Returns fully-formed (not fuzzy) link if it starts at the beginning\n * of the string, and null otherwise.\n **/\nLinkifyIt.prototype.matchAtStart = function matchAtStart(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) return null;\n\n var m = this.re.schema_at_start.exec(text);\n if (!m) return null;\n\n var len = this.testSchemaAt(text, m[2], m[0].length);\n if (!len) return null;\n\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n\n return createMatch(this, 0);\n};\n\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [ list ];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list)\n .sort()\n .filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n })\n .reverse();\n\n compile(this);\n return this;\n};\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize(match) {\n\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n if (!match.schema) { match.url = 'http://' + match.url; }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile() {\n};\n\n\nmodule.exports = LinkifyIt;\n","'use strict';\n\n\nmodule.exports = function (opts) {\n var re = {};\n opts = opts || {};\n\n // Use direct extract instead of `regenerate` to reduse browserified size\n re.src_Any = require('uc.micro/properties/Any/regex').source;\n re.src_Cc = require('uc.micro/categories/Cc/regex').source;\n re.src_Z = require('uc.micro/categories/Z/regex').source;\n re.src_P = require('uc.micro/categories/P/regex').source;\n\n // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');\n\n // \\p{\\Z\\Cc} (white spaces + control)\n re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');\n\n // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n var text_separators = '[><\\uff5c]';\n\n // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';\n // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 =\n\n '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';\n\n // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n\n re.src_port =\n\n '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n\n re.src_host_terminator =\n\n '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +\n '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n\n re.src_path =\n\n '(?:' +\n '[/?#]' +\n '(?:' +\n '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-;]).|' +\n '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n \"\\\\'(?=\" + re.src_pseudo_letter + '|[-])|' + // allow `I'm_king` if no pair found\n '\\\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in \"google search\" links (#66, #81).\n // github has ... in commit range links,\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // - params separator\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]|$)|' +\n (opts['---'] ?\n '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n :\n '\\\\-+|'\n ) +\n ',(?!' + re.src_ZCc + '|$)|' + // allow `,,,` in paths\n ';(?!' + re.src_ZCc + '|$)|' + // allow `;` if not followed by space-like char\n '\\\\!+(?!' + re.src_ZCc + '|[!]|$)|' + // allow `!!!` in paths, but not at the end\n '\\\\?(?!' + re.src_ZCc + '|[?]|$)' +\n ')+' +\n '|\\\\/' +\n ')?';\n\n // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n re.src_email_name =\n\n '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n\n re.src_xn =\n\n 'xn--[a-z0-9\\\\-]{1,59}';\n\n // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root =\n\n // Allow letters & digits (http://test1)\n '(?:' +\n re.src_xn +\n '|' +\n re.src_pseudo_letter + '{1,63}' +\n ')';\n\n re.src_domain =\n\n '(?:' +\n re.src_xn +\n '|' +\n '(?:' + re.src_pseudo_letter + ')' +\n '|' +\n '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n ')';\n\n re.src_host =\n\n '(?:' +\n // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/*_root*/ + ')' +\n ')';\n\n re.tpl_host_fuzzy =\n\n '(?:' +\n re.src_ip4 +\n '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n ')';\n\n re.tpl_host_no_ip_fuzzy =\n\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n\n re.src_host_strict =\n\n re.src_host + re.src_host_terminator;\n\n re.tpl_host_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_host_terminator;\n\n re.src_host_port_strict =\n\n re.src_host + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_no_ip_fuzzy_strict =\n\n re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;\n\n\n ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n\n // Rude test fuzzy links by host, for quick deny\n re.tpl_host_fuzzy_test =\n\n 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n\n re.tpl_email_fuzzy =\n\n '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n\n re.tpl_link_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n\n re.tpl_link_no_ip_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n\n return re;\n};\n","'use strict';\n\nconst patternsConfig = require('./patterns.js');\n\nconst defaultOptions = {\n leftDelimiter: '{',\n rightDelimiter: '}',\n allowedAttributes: []\n};\n\nmodule.exports = function attributes(md, options_) {\n let options = Object.assign({}, defaultOptions);\n options = Object.assign(options, options_);\n\n const patterns = patternsConfig(options);\n\n function curlyAttrs(state) {\n const tokens = state.tokens;\n\n for (let i = 0; i < tokens.length; i++) {\n for (let p = 0; p < patterns.length; p++) {\n const pattern = patterns[p];\n let j = null; // position of child with offset 0\n const match = pattern.tests.every(t => {\n const res = test(tokens, i, t);\n if (res.j !== null) { j = res.j; }\n return res.match;\n });\n if (match) {\n pattern.transform(tokens, i, j);\n if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {\n // retry, may be several inline attributes\n p--;\n }\n }\n }\n }\n }\n\n md.core.ruler.before('linkify', 'curly_attributes', curlyAttrs);\n};\n\n/**\n * Test if t matches token stream.\n *\n * @param {array} tokens\n * @param {number} i\n * @param {object} t Test to match.\n * @return {object} { match: true|false, j: null|number }\n */\nfunction test(tokens, i, t) {\n const res = {\n match: false,\n j: null // position of child\n };\n\n const ii = t.shift !== undefined\n ? i + t.shift\n : t.position;\n\n if (t.shift !== undefined && ii < 0) {\n // we should never shift to negative indexes (rolling around to back of array)\n return res;\n }\n\n const token = get(tokens, ii); // supports negative ii\n\n\n if (token === undefined) { return res; }\n\n for (const key of Object.keys(t)) {\n if (key === 'shift' || key === 'position') { continue; }\n\n if (token[key] === undefined) { return res; }\n\n if (key === 'children' && isArrayOfObjects(t.children)) {\n if (token.children.length === 0) {\n return res;\n }\n let match;\n const childTests = t.children;\n const children = token.children;\n if (childTests.every(tt => tt.position !== undefined)) {\n // positions instead of shifts, do not loop all children\n match = childTests.every(tt => test(children, tt.position, tt).match);\n if (match) {\n // we may need position of child in transform\n const j = last(childTests).position;\n res.j = j >= 0 ? j : children.length + j;\n }\n } else {\n for (let j = 0; j < children.length; j++) {\n match = childTests.every(tt => test(children, j, tt).match);\n if (match) {\n res.j = j;\n // all tests true, continue with next key of pattern t\n break;\n }\n }\n }\n\n if (match === false) { return res; }\n\n continue;\n }\n\n switch (typeof t[key]) {\n case 'boolean':\n case 'number':\n case 'string':\n if (token[key] !== t[key]) { return res; }\n break;\n case 'function':\n if (!t[key](token[key])) { return res; }\n break;\n case 'object':\n if (isArrayOfFunctions(t[key])) {\n const r = t[key].every(tt => tt(token[key]));\n if (r === false) { return res; }\n break;\n }\n // fall through for objects !== arrays of functions\n default:\n throw new Error(`Unknown type of pattern test (key: ${key}). Test should be of type boolean, number, string, function or array of functions.`);\n }\n }\n\n // no tests returned false -> all tests returns true\n res.match = true;\n return res;\n}\n\nfunction isArrayOfObjects(arr) {\n return Array.isArray(arr) && arr.length && arr.every(i => typeof i === 'object');\n}\n\nfunction isArrayOfFunctions(arr) {\n return Array.isArray(arr) && arr.length && arr.every(i => typeof i === 'function');\n}\n\n/**\n * Get n item of array. Supports negative n, where -1 is last\n * element in array.\n * @param {array} arr\n * @param {number} n\n */\nfunction get(arr, n) {\n return n >= 0 ? arr[n] : arr[arr.length + n];\n}\n\n// get last element of array, safe - returns {} if not found\nfunction last(arr) {\n return arr.slice(-1)[0] || {};\n}\n","'use strict';\n/**\n * If a pattern matches the token stream,\n * then run transform.\n */\n\nconst utils = require('./utils.js');\n\nmodule.exports = options => {\n const __hr = new RegExp('^ {0,3}[-*_]{3,} ?'\n + utils.escapeRegExp(options.leftDelimiter)\n + '[^' + utils.escapeRegExp(options.rightDelimiter) + ']');\n\n return ([\n {\n /**\n * ```python {.cls}\n * for i in range(10):\n * print(i)\n * ```\n */\n name: 'fenced code blocks',\n tests: [\n {\n shift: 0,\n block: true,\n info: utils.hasDelimiters('end', options)\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i];\n const start = token.info.lastIndexOf(options.leftDelimiter);\n const attrs = utils.getAttrs(token.info, start, options);\n utils.addAttrs(attrs, token);\n token.info = utils.removeDelimiter(token.info, options);\n }\n }, {\n /**\n * bla `click()`{.c} {.d}\n *\n * differs from 'inline attributes' as it does\n * not have a closing tag (nesting: -1)\n */\n name: 'inline nesting 0',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n shift: -1,\n type: (str) => str === 'image' || str === 'code_inline'\n }, {\n shift: 0,\n type: 'text',\n content: utils.hasDelimiters('start', options)\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const endChar = token.content.indexOf(options.rightDelimiter);\n const attrToken = tokens[i].children[j - 1];\n const attrs = utils.getAttrs(token.content, 0, options);\n utils.addAttrs(attrs, attrToken);\n if (token.content.length === (endChar + options.rightDelimiter.length)) {\n tokens[i].children.splice(j, 1);\n } else {\n token.content = token.content.slice(endChar + options.rightDelimiter.length);\n }\n }\n }, {\n /**\n * | h1 |\n * | -- |\n * | c1 |\n *\n * {.c}\n */\n name: 'tables',\n tests: [\n {\n // let this token be i, such that for-loop continues at\n // next token after tokens.splice\n shift: 0,\n type: 'table_close'\n }, {\n shift: 1,\n type: 'paragraph_open'\n }, {\n shift: 2,\n type: 'inline',\n content: utils.hasDelimiters('only', options)\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i + 2];\n const tableOpen = utils.getMatchingOpeningToken(tokens, i);\n const attrs = utils.getAttrs(token.content, 0, options);\n // add attributes\n utils.addAttrs(attrs, tableOpen);\n // remove <p>{.c}</p>\n tokens.splice(i + 1, 3);\n }\n }, {\n /**\n * *emphasis*{.with attrs=1}\n */\n name: 'inline attributes',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n shift: -1,\n nesting: -1 // closing inline tag, </em>{.a}\n }, {\n shift: 0,\n type: 'text',\n content: utils.hasDelimiters('start', options)\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n const openingToken = utils.getMatchingOpeningToken(tokens[i].children, j - 1);\n utils.addAttrs(attrs, openingToken);\n token.content = content.slice(content.indexOf(options.rightDelimiter) + options.rightDelimiter.length);\n }\n }, {\n /**\n * - item\n * {.a}\n */\n name: 'list softbreak',\n tests: [\n {\n shift: -2,\n type: 'list_item_open'\n }, {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -2,\n type: 'softbreak'\n }, {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('only', options)\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n let ii = i - 2;\n while (tokens[ii - 1] &&\n tokens[ii - 1].type !== 'ordered_list_open' &&\n tokens[ii - 1].type !== 'bullet_list_open') { ii--; }\n utils.addAttrs(attrs, tokens[ii - 1]);\n tokens[i].children = tokens[i].children.slice(0, -2);\n }\n }, {\n /**\n * - nested list\n * - with double \\n\n * {.a} <-- apply to nested ul\n *\n * {.b} <-- apply to root <ul>\n */\n name: 'list double softbreak',\n tests: [\n {\n // let this token be i = 0 so that we can erase\n // the <p>{.a}</p> tokens below\n shift: 0,\n type: (str) =>\n str === 'bullet_list_close' ||\n str === 'ordered_list_close'\n }, {\n shift: 1,\n type: 'paragraph_open'\n }, {\n shift: 2,\n type: 'inline',\n content: utils.hasDelimiters('only', options),\n children: (arr) => arr.length === 1\n }, {\n shift: 3,\n type: 'paragraph_close'\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i + 2];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n const openingToken = utils.getMatchingOpeningToken(tokens, i);\n utils.addAttrs(attrs, openingToken);\n tokens.splice(i + 1, 3);\n }\n }, {\n /**\n * - end of {.list-item}\n */\n name: 'list item end',\n tests: [\n {\n shift: -2,\n type: 'list_item_open'\n }, {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('end', options)\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);\n utils.addAttrs(attrs, tokens[i - 2]);\n const trimmed = content.slice(0, content.lastIndexOf(options.leftDelimiter));\n token.content = last(trimmed) !== ' ' ?\n trimmed : trimmed.slice(0, -1);\n }\n }, {\n /**\n * something with softbreak\n * {.cls}\n */\n name: '\\n{.a} softbreak then curly in start',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -2,\n type: 'softbreak'\n }, {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('only', options)\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const attrs = utils.getAttrs(token.content, 0, options);\n // find last closing tag\n let ii = i + 1;\n while (tokens[ii + 1] && tokens[ii + 1].nesting === -1) { ii++; }\n const openingToken = utils.getMatchingOpeningToken(tokens, ii);\n utils.addAttrs(attrs, openingToken);\n tokens[i].children = tokens[i].children.slice(0, -2);\n }\n }, {\n /**\n * horizontal rule --- {#id}\n */\n name: 'horizontal rule',\n tests: [\n {\n shift: 0,\n type: 'paragraph_open'\n },\n {\n shift: 1,\n type: 'inline',\n children: (arr) => arr.length === 1,\n content: (str) => str.match(__hr) !== null,\n },\n {\n shift: 2,\n type: 'paragraph_close'\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i];\n token.type = 'hr';\n token.tag = 'hr';\n token.nesting = 0;\n const content = tokens[i + 1].content;\n const start = content.lastIndexOf(options.leftDelimiter);\n const attrs = utils.getAttrs(content, start, options);\n utils.addAttrs(attrs, token);\n token.markup = content;\n tokens.splice(i + 1, 2);\n }\n }, {\n /**\n * end of {.block}\n */\n name: 'end of block',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -1,\n content: utils.hasDelimiters('end', options),\n type: (t) => t !== 'code_inline' && t !== 'math_inline'\n }\n ]\n }\n ],\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);\n let ii = i + 1;\n while (tokens[ii + 1] && tokens[ii + 1].nesting === -1) { ii++; }\n const openingToken = utils.getMatchingOpeningToken(tokens, ii);\n utils.addAttrs(attrs, openingToken);\n const trimmed = content.slice(0, content.lastIndexOf(options.leftDelimiter));\n token.content = last(trimmed) !== ' ' ?\n trimmed : trimmed.slice(0, -1);\n }\n }\n ]);\n};\n\n// get last element of array or string\nfunction last(arr) {\n return arr.slice(-1)[0];\n}\n","/**\n * parse {.class #id key=val} strings\n * @param {string} str: string to parse\n * @param {int} start: where to start parsing (including {)\n * @returns {2d array}: [['key', 'val'], ['class', 'red']]\n */\nexports.getAttrs = function (str, start, options) {\n // not tab, line feed, form feed, space, solidus, greater than sign, quotation mark, apostrophe and equals sign\n const allowedKeyChars = /[^\\t\\n\\f />\"'=]/;\n const pairSeparator = ' ';\n const keySeparator = '=';\n const classChar = '.';\n const idChar = '#';\n\n const attrs = [];\n let key = '';\n let value = '';\n let parsingKey = true;\n let valueInsideQuotes = false;\n\n // read inside {}\n // start + left delimiter length to avoid beginning {\n // breaks when } is found or end of string\n for (let i = start + options.leftDelimiter.length; i < str.length; i++) {\n if (str.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {\n if (key !== '') { attrs.push([key, value]); }\n break;\n }\n const char_ = str.charAt(i);\n\n // switch to reading value if equal sign\n if (char_ === keySeparator && parsingKey) {\n parsingKey = false;\n continue;\n }\n\n // {.class} {..css-module}\n if (char_ === classChar && key === '') {\n if (str.charAt(i + 1) === classChar) {\n key = 'css-module';\n i += 1;\n } else {\n key = 'class';\n }\n parsingKey = false;\n continue;\n }\n\n // {#id}\n if (char_ === idChar && key === '') {\n key = 'id';\n parsingKey = false;\n continue;\n }\n\n // {value=\"inside quotes\"}\n if (char_ === '\"' && value === '' && !valueInsideQuotes) {\n valueInsideQuotes = true;\n continue;\n }\n if (char_ === '\"' && valueInsideQuotes) {\n valueInsideQuotes = false;\n continue;\n }\n\n // read next key/value pair\n if ((char_ === pairSeparator && !valueInsideQuotes)) {\n if (key === '') {\n // beginning or ending space: { .red } vs {.red}\n continue;\n }\n attrs.push([key, value]);\n key = '';\n value = '';\n parsingKey = true;\n continue;\n }\n\n // continue if character not allowed\n if (parsingKey && char_.search(allowedKeyChars) === -1) {\n continue;\n }\n\n // no other conditions met; append to key/value\n if (parsingKey) {\n key += char_;\n continue;\n }\n value += char_;\n }\n\n if (options.allowedAttributes && options.allowedAttributes.length) {\n const allowedAttributes = options.allowedAttributes;\n\n return attrs.filter(function (attrPair) {\n const attr = attrPair[0];\n\n function isAllowedAttribute (allowedAttribute) {\n return (attr === allowedAttribute\n || (allowedAttribute instanceof RegExp && allowedAttribute.test(attr))\n );\n }\n\n return allowedAttributes.some(isAllowedAttribute);\n });\n\n }\n return attrs;\n\n};\n\n/**\n * add attributes from [['key', 'val']] list\n * @param {array} attrs: [['key', 'val']]\n * @param {token} token: which token to add attributes\n * @returns token\n */\nexports.addAttrs = function (attrs, token) {\n for (let j = 0, l = attrs.length; j < l; ++j) {\n const key = attrs[j][0];\n if (key === 'class') {\n token.attrJoin('class', attrs[j][1]);\n } else if (key === 'css-module') {\n token.attrJoin('css-module', attrs[j][1]);\n } else {\n token.attrPush(attrs[j]);\n }\n }\n return token;\n};\n\n/**\n * Does string have properly formatted curly?\n *\n * start: '{.a} asdf'\n * end: 'asdf {.a}'\n * only: '{.a}'\n *\n * @param {string} where to expect {} curly. start, end or only.\n * @return {function(string)} Function which testes if string has curly.\n */\nexports.hasDelimiters = function (where, options) {\n\n if (!where) {\n throw new Error('Parameter `where` not passed. Should be \"start\", \"end\" or \"only\".');\n }\n\n /**\n * @param {string} str\n * @return {boolean}\n */\n return function (str) {\n // we need minimum three chars, for example {b}\n const minCurlyLength = options.leftDelimiter.length + 1 + options.rightDelimiter.length;\n if (!str || typeof str !== 'string' || str.length < minCurlyLength) {\n return false;\n }\n\n function validCurlyLength (curly) {\n const isClass = curly.charAt(options.leftDelimiter.length) === '.';\n const isId = curly.charAt(options.leftDelimiter.length) === '#';\n return (isClass || isId)\n ? curly.length >= (minCurlyLength + 1)\n : curly.length >= minCurlyLength;\n }\n\n let start, end, slice, nextChar;\n const rightDelimiterMinimumShift = minCurlyLength - options.rightDelimiter.length;\n switch (where) {\n case 'start':\n // first char should be {, } found in char 2 or more\n slice = str.slice(0, options.leftDelimiter.length);\n start = slice === options.leftDelimiter ? 0 : -1;\n end = start === -1 ? -1 : str.indexOf(options.rightDelimiter, rightDelimiterMinimumShift);\n // check if next character is not one of the delimiters\n nextChar = str.charAt(end + options.rightDelimiter.length);\n if (nextChar && options.rightDelimiter.indexOf(nextChar) !== -1) {\n end = -1;\n }\n break;\n\n case 'end':\n // last char should be }\n start = str.lastIndexOf(options.leftDelimiter);\n end = start === -1 ? -1 : str.indexOf(options.rightDelimiter, start + rightDelimiterMinimumShift);\n end = end === str.length - options.rightDelimiter.length ? end : -1;\n break;\n\n case 'only':\n // '{.a}'\n slice = str.slice(0, options.leftDelimiter.length);\n start = slice === options.leftDelimiter ? 0 : -1;\n slice = str.slice(str.length - options.rightDelimiter.length);\n end = slice === options.rightDelimiter ? str.length - options.rightDelimiter.length : -1;\n break;\n\n default:\n throw new Error(`Unexpected case ${where}, expected 'start', 'end' or 'only'`);\n }\n\n return start !== -1 && end !== -1 && validCurlyLength(str.substring(start, end + options.rightDelimiter.length));\n };\n};\n\n/**\n * Removes last curly from string.\n */\nexports.removeDelimiter = function (str, options) {\n const start = escapeRegExp(options.leftDelimiter);\n const end = escapeRegExp(options.rightDelimiter);\n\n const curly = new RegExp(\n '[ \\\\n]?' + start + '[^' + start + end + ']+' + end + '$'\n );\n const pos = str.search(curly);\n\n return pos !== -1 ? str.slice(0, pos) : str;\n};\n\n/**\n * Escapes special characters in string s such that the string\n * can be used in `new RegExp`. For example \"[\" becomes \"\\\\[\".\n *\n * @param {string} s Regex string.\n * @return {string} Escaped string.\n */\nfunction escapeRegExp (s) {\n return s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\nexports.escapeRegExp = escapeRegExp;\n\n/**\n * find corresponding opening block\n */\nexports.getMatchingOpeningToken = function (tokens, i) {\n if (tokens[i].type === 'softbreak') {\n return false;\n }\n // non closing blocks, example img\n if (tokens[i].nesting === 0) {\n return tokens[i];\n }\n\n const level = tokens[i].level;\n const type = tokens[i].type.replace('_close', '_open');\n\n for (; i >= 0; --i) {\n if (tokens[i].type === type && tokens[i].level === level) {\n return tokens[i];\n }\n }\n\n return false;\n};\n\n\n/**\n * from https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js\n */\nconst HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nconst HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nconst HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nexports.escapeHtml = function (str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n};\n","'use strict';\n\n\nmodule.exports = require('./lib/');\n","// HTML5 entities map: { name -> utf16string }\n//\n'use strict';\n\n/*eslint quotes:0*/\nmodule.exports = require('entities/lib/maps/entities.json');\n","// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\n'use strict';\n\n\nmodule.exports = [\n 'address',\n 'article',\n 'aside',\n 'base',\n 'basefont',\n 'blockquote',\n 'body',\n 'caption',\n 'center',\n 'col',\n 'colgroup',\n 'dd',\n 'details',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'section',\n 'source',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n];\n","// Regexps to match html elements\n\n'use strict';\n\nvar attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\n\nvar unquoted = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar single_quoted = \"'[^']*'\";\nvar double_quoted = '\"[^\"]*\"';\n\nvar attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';\n\nvar attribute = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)';\n\nvar open_tag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>';\n\nvar close_tag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>';\nvar comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';\nvar processing = '<[?][\\\\s\\\\S]*?[?]>';\nvar declaration = '<![A-Z]+\\\\s+[^>]*>';\nvar cdata = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>';\n\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\n\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n","// Utilities\n//\n'use strict';\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction isString(obj) { return _class(obj) === '[object String]'; }\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n}\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\n\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str; }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) { return escaped; }\n return replaceEntityPattern(match, entity);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n return false;\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) { return true; }\n switch (code) {\n case 0x09: // \\t\n case 0x0A: // \\n\n case 0x0B: // \\v\n case 0x0C: // \\f\n case 0x0D: // \\r\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n return false;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\nvar UNICODE_PUNCT_RE = require('uc.micro/categories/P/regex');\n\n// Currently without astral characters support.\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n}\n\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21/* ! */:\n case 0x22/* \" */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x27/* ' */:\n case 0x28/* ( */:\n case 0x29/* ) */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2C/* , */:\n case 0x2D/* - */:\n case 0x2E/* . */:\n case 0x2F/* / */:\n case 0x3A/* : */:\n case 0x3B/* ; */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x3F/* ? */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7C/* | */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' ');\n\n // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n }\n\n // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n return str.toLowerCase().toUpperCase();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nexports.lib = {};\nexports.lib.mdurl = require('mdurl');\nexports.lib.ucmicro = require('uc.micro');\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\n// exports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n","// Just a shortcut for bulk export\n'use strict';\n\n\nexports.parseLinkLabel = require('./parse_link_label');\nexports.parseLinkDestination = require('./parse_link_destination');\nexports.parseLinkTitle = require('./parse_link_title');\n","// Parse link destination\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkDestination(str, pos, max) {\n var code, level,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === 0x0A /* \\n */) { return result; }\n if (code === 0x3C /* < */) { return result; }\n if (code === 0x3E /* > */) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n // no closing '>'\n return result;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) { break; }\n\n // ascii control characters\n if (code < 0x20 || code === 0x7F) { break; }\n\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n if (str.charCodeAt(pos + 1) === 0x20) { break; }\n pos += 2;\n continue;\n }\n\n if (code === 0x28 /* ( */) {\n level++;\n if (level > 32) { return result; }\n }\n\n if (code === 0x29 /* ) */) {\n if (level === 0) { break; }\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) { return result; }\n if (level !== 0) { return result; }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.lines = lines;\n result.pos = pos;\n result.ok = true;\n return result;\n};\n","// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n'use strict';\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level, found, marker, prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n if (marker === 0x5B /* [ */) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n }\n\n // restore old state\n state.pos = oldPos;\n\n return labelEnd;\n};\n","// Parse link title\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkTitle(str, pos, max) {\n var code,\n marker,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) { return result; }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }\n\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) { marker = 0x29; }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x28 /* ( */ && marker === 0x29 /* ) */) {\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos++;\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n","// Main parser class\n\n'use strict';\n\n\nvar utils = require('./common/utils');\nvar helpers = require('./helpers');\nvar Renderer = require('./renderer');\nvar ParserCore = require('./parser_core');\nvar ParserBlock = require('./parser_block');\nvar ParserInline = require('./parser_inline');\nvar LinkifyIt = require('linkify-it');\nvar mdurl = require('mdurl');\nvar punycode = require('punycode');\n\n\nvar config = {\n default: require('./presets/default'),\n zero: require('./presets/zero'),\n commonmark: require('./presets/commonmark')\n};\n\n////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n\n return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%');\n}\n\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`<br />`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `<br>`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with <pre... internal wrapper is skipped.\n *\n * ##### Example\n *\n * ```javascript\n * // commonmark mode\n * var md = require('markdown-it')('commonmark');\n *\n * // default mode\n * var md = require('markdown-it')();\n *\n * // enable everything\n * var md = require('markdown-it')({\n * html: true,\n * linkify: true,\n * typographer: true\n * });\n * ```\n *\n * ##### Syntax highlighting\n *\n * ```js\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;\n * } catch (__) {}\n * }\n *\n * return ''; // use external default escaping\n * }\n * });\n * ```\n *\n * Or with full wrapper override (if you need assign class to `<pre>`):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '<pre class=\"hljs\"><code>' +\n * hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +\n * '</code></pre>';\n * } catch (__) {}\n * }\n *\n * return '<pre class=\"hljs\"><code>' + md.utils.escapeHtml(str) + '</code></pre>';\n * }\n * });\n * ```\n *\n **/\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.inline = new ParserInline();\n\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.block = new ParserBlock();\n\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.core = new ParserCore();\n\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n this.renderer = new Renderer();\n\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n this.linkify = new LinkifyIt();\n\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n this.validateLink = validateLink;\n\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n this.normalizeLink = normalizeLink;\n\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n this.normalizeLinkText = normalizeLinkText;\n\n\n // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n this.utils = utils;\n\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n this.helpers = utils.assign({}, helpers);\n\n\n this.options = {};\n this.configure(presetName);\n\n if (options) { this.set(options); }\n}\n\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n var self = this, presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name'); }\n }\n\n if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty'); }\n\n if (presets.options) { self.set(presets.options); }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.enable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.disable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n\n state.inlineMode = true;\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `<p>` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\n\nmodule.exports = MarkdownIt;\n","/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n // First 2 params - rule name & source. Secondary array - list of rules,\n // which can be terminated by this one.\n [ 'table', require('./rules_block/table'), [ 'paragraph', 'reference' ] ],\n [ 'code', require('./rules_block/code') ],\n [ 'fence', require('./rules_block/fence'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'blockquote', require('./rules_block/blockquote'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'hr', require('./rules_block/hr'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'list', require('./rules_block/list'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'reference', require('./rules_block/reference') ],\n [ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'heading', require('./rules_block/heading'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'lheading', require('./rules_block/lheading') ],\n [ 'paragraph', require('./rules_block/paragraph') ]\n];\n\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });\n }\n}\n\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) { break; }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.sCount[line] < state.blkIndent) { break; }\n\n // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) { break; }\n }\n\n // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) { return; }\n\n state = new this.State(src, md, env, outTokens);\n\n this.tokenize(state, state.line, state.lineMax);\n};\n\n\nParserBlock.prototype.State = require('./rules_block/state_block');\n\n\nmodule.exports = ParserBlock;\n","/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n [ 'normalize', require('./rules_core/normalize') ],\n [ 'block', require('./rules_core/block') ],\n [ 'inline', require('./rules_core/inline') ],\n [ 'linkify', require('./rules_core/linkify') ],\n [ 'replacements', require('./rules_core/replacements') ],\n [ 'smartquotes', require('./rules_core/smartquotes') ],\n // `text_join` finds `text_special` tokens (for escape sequences)\n // and joins them with the rest of the text\n [ 'text_join', require('./rules_core/text_join') ]\n];\n\n\n/**\n * new Core()\n **/\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n var i, l, rules;\n\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = require('./rules_core/state_core');\n\n\nmodule.exports = Core;\n","/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\nvar _rules = [\n [ 'text', require('./rules_inline/text') ],\n [ 'linkify', require('./rules_inline/linkify') ],\n [ 'newline', require('./rules_inline/newline') ],\n [ 'escape', require('./rules_inline/escape') ],\n [ 'backticks', require('./rules_inline/backticks') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').tokenize ],\n [ 'emphasis', require('./rules_inline/emphasis').tokenize ],\n [ 'link', require('./rules_inline/link') ],\n [ 'image', require('./rules_inline/image') ],\n [ 'autolink', require('./rules_inline/autolink') ],\n [ 'html_inline', require('./rules_inline/html_inline') ],\n [ 'entity', require('./rules_inline/entity') ]\n];\n\n// `rule2` ruleset was created specifically for emphasis/strikethrough\n// post-processing and may be changed in the future.\n//\n// Don't use this for anything except pairs (plugins working with `balance_pairs`).\n//\nvar _rules2 = [\n [ 'balance_pairs', require('./rules_inline/balance_pairs') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').postProcess ],\n [ 'emphasis', require('./rules_inline/emphasis').postProcess ],\n // rules for pairs separate '**' into its own text tokens, which may be left unused,\n // rule below merges unused segments back with the rest of the text\n [ 'fragments_join', require('./rules_inline/fragments_join') ]\n];\n\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline() {\n var i;\n\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n}\n\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n var ok, i, pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) { break; }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) { state.pos++; }\n cache[pos] = state.pos;\n};\n\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n if (ok) { break; }\n }\n }\n\n if (ok) {\n if (state.pos >= end) { break; }\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n\n this.tokenize(state);\n\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\n\nParserInline.prototype.State = require('./rules_inline/state_inline');\n\n\nmodule.exports = ParserInline;\n","// Commonmark default options\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: true, // Enable HTML tags in source\n xhtmlOut: true, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'normalize',\n 'block',\n 'inline',\n 'text_join'\n ]\n },\n\n block: {\n rules: [\n 'blockquote',\n 'code',\n 'fence',\n 'heading',\n 'hr',\n 'html_block',\n 'lheading',\n 'list',\n 'reference',\n 'paragraph'\n ]\n },\n\n inline: {\n rules: [\n 'autolink',\n 'backticks',\n 'emphasis',\n 'entity',\n 'escape',\n 'html_inline',\n 'image',\n 'link',\n 'newline',\n 'text'\n ],\n rules2: [\n 'balance_pairs',\n 'emphasis',\n 'fragments_join'\n ]\n }\n }\n};\n","// markdown-it default options\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 100 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {},\n block: {},\n inline: {}\n }\n};\n","// \"Zero\" preset, with nothing enabled. Useful for manual configuring of simple\n// modes. For example, to parse bold/italic only.\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'normalize',\n 'block',\n 'inline',\n 'text_join'\n ]\n },\n\n block: {\n rules: [\n 'paragraph'\n ]\n },\n\n inline: {\n rules: [\n 'text'\n ],\n rules2: [\n 'balance_pairs',\n 'fragments_join'\n ]\n }\n }\n};\n","/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n'use strict';\n\n\nvar assign = require('./common/utils').assign;\nvar unescapeAll = require('./common/utils').unescapeAll;\nvar escapeHtml = require('./common/utils').escapeHtml;\n\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar default_rules = {};\n\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '<code' + slf.renderAttrs(token) + '>' +\n escapeHtml(tokens[idx].content) +\n '</code>';\n};\n\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '<pre' + slf.renderAttrs(token) + '><code>' +\n escapeHtml(tokens[idx].content) +\n '</code></pre>\\n';\n};\n\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n langAttrs = '',\n highlighted, i, arr, tmpAttrs, tmpToken;\n\n if (info) {\n arr = info.split(/(\\s+)/g);\n langName = arr[0];\n langAttrs = arr.slice(2).join('');\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf('<pre') === 0) {\n return highlighted + '\\n';\n }\n\n // If language exists, inject class gently, without modifying original token.\n // May be, one day we will add .deepClone() for token and simplify this part, but\n // now we prefer to keep things local.\n if (info) {\n i = token.attrIndex('class');\n tmpAttrs = token.attrs ? token.attrs.slice() : [];\n\n if (i < 0) {\n tmpAttrs.push([ 'class', options.langPrefix + langName ]);\n } else {\n tmpAttrs[i] = tmpAttrs[i].slice();\n tmpAttrs[i][1] += ' ' + options.langPrefix + langName;\n }\n\n // Fake token just to render attributes\n tmpToken = {\n attrs: tmpAttrs\n };\n\n return '<pre><code' + slf.renderAttrs(tmpToken) + '>'\n + highlighted\n + '</code></pre>\\n';\n }\n\n\n return '<pre><code' + slf.renderAttrs(token) + '>'\n + highlighted\n + '</code></pre>\\n';\n};\n\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] =\n slf.renderInlineAsText(token.children, options, env);\n\n return slf.renderToken(tokens, idx, options);\n};\n\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '<br />\\n' : '<br>\\n';\n};\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n';\n};\n\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer() {\n\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return '<b>'; };\n * md.renderer.rules.strong_close = function () { return '</b>'; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) { return ''; }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx];\n\n // Tight list paragraphs\n if (token.hidden) {\n return '';\n }\n\n // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n }\n\n // Add token name, e.g. `<img`\n result += (token.nesting === -1 ? '</' : '<') + token.tag;\n\n // Encode attributes, e.g. `<img src=\"foo\"`\n result += this.renderAttrs(token);\n\n // Add a slash for self-closing tags, e.g. `<img src=\"foo\" /`\n if (token.nesting === 0 && options.xhtmlOut) {\n result += ' /';\n }\n\n // Check if we need to add a newline after this tag\n if (token.block) {\n needLf = true;\n\n if (token.nesting === 1) {\n if (idx + 1 < tokens.length) {\n nextToken = tokens[idx + 1];\n\n if (nextToken.type === 'inline' || nextToken.hidden) {\n // Block-level tag containing an inline tag.\n //\n needLf = false;\n\n } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n // Opening tag + closing tag of the same type. E.g. `<li></li>`.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n\n return result;\n};\n\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n } else if (tokens[i].type === 'softbreak') {\n result += '\\n';\n }\n }\n\n return result;\n};\n\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n var i, len, type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[tokens[i].type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n","/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n'use strict';\n\n\n/**\n * new Ruler()\n **/\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n if (chain && rule.alt.indexOf(chain) < 0) { return; }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + name); }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n this.__rules__.forEach(function (rule) { rule.enabled = false; });\n\n this.enable(list, ignoreInvalid);\n};\n\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n\n // Chain can be empty, if rules disabled. But we still have to return Array.\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n","// Block quotes\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n isOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }\n\n // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n if (silent) { return true; }\n\n // set offset past spaces and \">\"\n initial = offset = state.sCount[startLine] + 1;\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[startLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks = [ state.bMarks[startLine] ];\n state.bMarks[startLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n oldBSCount = [ state.bsCount[startLine] ];\n state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n lastLineEmpty = pos >= max;\n\n oldSCount = [ state.sCount[startLine] ];\n state.sCount[startLine] = offset - initial;\n\n oldTShift = [ state.tShift[startLine] ];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n\n // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n isOutdented = state.sCount[nextLine] < state.blkIndent;\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {\n // This line is inside the blockquote.\n\n // set offset past spaces and \">\"\n initial = offset = state.sCount[nextLine] + 1;\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) { break; }\n\n // Case 3: another tag found.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n\n // A negative indentation means that this is a paragraph continuation\n //\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [ startLine, 0 ];\n\n state.md.block.tokenize(state, startLine, nextLine);\n\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n state.blkIndent = oldIndent;\n\n return true;\n};\n","// Code block (4 spaces padded)\n\n'use strict';\n\n\nmodule.exports = function code(state, startLine, endLine/*, silent*/) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) { return false; }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n\n state.line = last;\n\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\\n';\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// fences (``` lang, ~~~ lang)\n\n'use strict';\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker, len, params, nextLine, mem, token, markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (pos + 3 > max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n\n len = pos - mem;\n\n if (len < 3) { return false; }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60 /* ` */) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n }\n\n // Since start is found, we can report success here in validation mode\n if (silent) { return true; }\n\n // search end of block\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) { continue; }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) { continue; }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n\n if (pos < max) { continue; }\n\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.sCount[startLine];\n\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// heading (#, ##, ...)\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch, level, tmp, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23/* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || (pos < max && !isSpace(ch))) { return false; }\n\n if (silent) { return true; }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n\n return true;\n};\n","// Horizontal rule\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker, cnt, ch, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x5F/* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 of them\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && !isSpace(ch)) { return false; }\n if (ch === marker) { cnt++; }\n }\n\n if (cnt < 3) { return false; }\n\n if (silent) { return true; }\n\n state.line = startLine + 1;\n\n token = state.push('hr', 'hr', 0);\n token.map = [ startLine, state.line ];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n\n return true;\n};\n","// HTML block\n\n'use strict';\n\n\nvar block_names = require('../common/html_blocks');\nvar HTML_OPEN_CLOSE_TAG_RE = require('../common/html_re').HTML_OPEN_CLOSE_TAG_RE;\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nvar HTML_SEQUENCES = [\n [ /^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i, true ],\n [ /^<!--/, /-->/, true ],\n [ /^<\\?/, /\\?>/, true ],\n [ /^<![A-Z]/, />/, true ],\n [ /^<!\\[CDATA\\[/, /\\]\\]>/, true ],\n [ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\\\s|/?>|$))', 'i'), /^$/, true ],\n [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false ]\n];\n\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i, nextLine, token, lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (!state.md.options.html) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) { break; }\n }\n\n if (i === HTML_SEQUENCES.length) { return false; }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1;\n\n // If we are here - we detected HTML block.\n // Let's roll down till block end.\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) { nextLine++; }\n break;\n }\n }\n }\n\n state.line = nextLine;\n\n token = state.push('html_block', '', 0);\n token.map = [ startLine, nextLine ];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n\n return true;\n};\n","// lheading (---, ===)\n\n'use strict';\n\n\nmodule.exports = function lheading(state, startLine, endLine/*, silent*/) {\n var content, terminate, i, l, token, pos, max, level, marker,\n nextLine = startLine + 1, oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph');\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n //\n // Check for underline in setext header\n //\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = (marker === 0x3D/* = */ ? 1 : 2);\n break;\n }\n }\n }\n }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line - 1 ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","// Lists\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x2B/* + */) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine];\n\n // List marker should have at least 2 chars (digit + dot)\n if (pos + 1 >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) { return -1; }\n\n continue;\n }\n\n // found valid marker\n if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n break;\n }\n\n return -1;\n }\n\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i, l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n nextLine,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n isTerminatingParagraph = false,\n tight = true;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n if (state.listIndent >= 0 &&\n state.sCount[startLine] - state.listIndent >= 4 &&\n state.sCount[startLine] < state.blkIndent) {\n return false;\n }\n\n // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.sCount[startLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n }\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.slice(start, posAfterMarker - 1));\n\n // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n if (isTerminatingParagraph && markerValue !== 1) return false;\n\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n\n } else {\n return false;\n }\n\n // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;\n }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // For validation mode we can terminate immediately\n if (silent) { return true; }\n\n // Start list\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n if (markerValue !== 1) {\n token.attrs = [ [ 'start', markerValue ] ];\n }\n\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [ startLine, 0 ];\n token.markup = String.fromCharCode(markerCharCode);\n\n //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = initial + indentAfterMarker;\n\n // Run subparser & write tokens\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [ startLine, 0 ];\n if (isOrdered) {\n token.info = state.src.slice(start, posAfterMarker - 1);\n }\n\n // change current state, then restore it after parser subcall\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldSCount = state.sCount[startLine];\n\n // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n\n state.tight = true;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.sCount[startLine] = offset;\n\n if (contentStart >= max && state.isEmpty(startLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, startLine, endLine, true);\n }\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);\n\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[startLine] = oldTShift;\n state.sCount[startLine] = oldSCount;\n state.tight = oldTight;\n\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) { break; }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { break; }\n\n // fail if terminating block found\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n start = state.bMarks[nextLine] + state.tShift[nextLine];\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n }\n\n // Finalize list\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n token.markup = String.fromCharCode(markerCharCode);\n\n listLines[1] = nextLine;\n state.line = nextLine;\n\n state.parentType = oldParentType;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n","// Paragraph\n\n'use strict';\n\n\nmodule.exports = function paragraph(state, startLine/*, endLine*/) {\n var content, terminate, i, l, token, oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph'),\n endLine = state.lineMax;\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph';\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine;\n\n token = state.push('paragraph_open', 'p', 1);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('paragraph_close', 'p', -1);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","'use strict';\n\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }\n\n // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&\n state.src.charCodeAt(pos - 1) !== 0x5C/* \\ */) {\n if (pos + 1 === max) { return false; }\n if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }\n break;\n }\n }\n\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n terminatorRules = state.md.block.ruler.getRules('reference');\n\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x5B /* [ */) {\n return false;\n } else if (ch === 0x5D /* ] */) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A /* \\n */) {\n lines++;\n } else if (ch === 0x5C /* \\ */) {\n pos++;\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n if (!res.ok) { return false; }\n\n href = state.md.normalizeLink(res.str);\n if (!state.md.validateLink(href)) { return false; }\n\n pos = res.pos;\n lines += res.lines;\n\n // save cursor state, we could require to rollback later\n destEndPos = pos;\n destEndLineNo = lines;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n }\n\n // skip trailing spaces until the rest of the line\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n }\n\n // Reference can not terminate anything. This check is for safety only.\n /*istanbul ignore if*/\n if (silent) { return true; }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = { title: title, href: href };\n }\n\n state.parentType = oldParentType;\n\n state.line = startLine + lines + 1;\n return true;\n};\n","// Parser state class\n\n'use strict';\n\nvar Token = require('../token');\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n\n this.src = src;\n\n // link to parser instance\n this.md = md;\n\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n this.sCount = []; // indents for each line (tabs expanded)\n\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n this.bsCount = [];\n\n // block parser variables\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n this.parentType = 'root';\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++; }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n\n if (nesting < 0) this.level--; // closing tag\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n }\n return pos;\n};\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break; }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i, lineIndent, ch, first, last, queue, lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n};\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token;\n\n\nmodule.exports = StateBlock;\n","// GFM table, https://github.github.com/gfm/#tables-extension-\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n return state.src.slice(pos, max);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n isEscaped = false,\n lastPos = 0,\n current = '';\n\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x7c/* | */) {\n if (!isEscaped) {\n // pipe separating cells, '|'\n result.push(current + str.substring(lastPos, pos));\n current = '';\n lastPos = pos + 1;\n } else {\n // escaped pipe, '\\|'\n current += str.substring(lastPos, pos - 1);\n lastPos = pos;\n }\n }\n\n isEscaped = (ch === 0x5c/* \\ */);\n pos++;\n\n ch = str.charCodeAt(pos);\n }\n\n result.push(current + str.substring(lastPos));\n\n return result;\n}\n\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, l, nextLine, columns, columnCount, token,\n aligns, t, tableLines, tbodyLines, oldParentType, terminate,\n terminatorRules, firstCh, secondCh;\n\n // should have at least two lines\n if (startLine + 2 > endLine) { return false; }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) { return false; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }\n\n // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n firstCh = state.src.charCodeAt(pos++);\n if (firstCh !== 0x7C/* | */ && firstCh !== 0x2D/* - */ && firstCh !== 0x3A/* : */) { return false; }\n\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n secondCh = state.src.charCodeAt(pos++);\n if (secondCh !== 0x7C/* | */ && secondCh !== 0x2D/* - */ && secondCh !== 0x3A/* : */ && !isSpace(secondCh)) {\n return false;\n }\n\n // if first character is '-', then second character must not be a space\n // (due to parsing ambiguity with list)\n if (firstCh === 0x2D/* - */ && isSpace(secondCh)) { return false; }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n\n columns = lineText.split('|');\n aligns = [];\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) { return false; }\n if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A/* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) { return false; }\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n // header row will define an amount of columns in the entire table,\n // and align row should be exactly the same (the rest of the rows can differ)\n columnCount = columns.length;\n if (columnCount === 0 || columnCount !== aligns.length) { return false; }\n\n if (silent) { return true; }\n\n oldParentType = state.parentType;\n state.parentType = 'table';\n\n // use 'blockquote' lists for termination because it's\n // the most similar to tables\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [ startLine, 0 ];\n\n token = state.push('thead_open', 'thead', 1);\n token.map = [ startLine, startLine + 1 ];\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ startLine, startLine + 1 ];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.children = [];\n\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) { break; }\n lineText = getLine(state, nextLine).trim();\n if (!lineText) { break; }\n if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n if (nextLine === startLine + 2) {\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [ startLine + 2, 0 ];\n }\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ nextLine, nextLine + 1 ];\n\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n\n token = state.push('td_close', 'td', -1);\n }\n token = state.push('tr_close', 'tr', -1);\n }\n\n if (tbodyLines) {\n token = state.push('tbody_close', 'tbody', -1);\n tbodyLines[1] = nextLine;\n }\n\n token = state.push('table_close', 'table', -1);\n tableLines[1] = nextLine;\n\n state.parentType = oldParentType;\n state.line = nextLine;\n return true;\n};\n","'use strict';\n\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [ 0, 1 ];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n","'use strict';\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n","// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n'use strict';\n\n\nvar arrayReplaceAt = require('../common/utils').arrayReplaceAt;\n\n\nfunction isLinkOpen(str) {\n return /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nmodule.exports = function linkify(state) {\n var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,\n level, htmlLinkLevel, url, fullUrl, urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) { return; }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' ||\n !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n\n htmlLinkLevel = 0;\n\n // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i];\n\n // Skip content of markdown links\n if (currentToken.type === 'link_close') {\n i--;\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n continue;\n }\n\n // Skip content of html tag links\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n if (htmlLinkLevel > 0) { continue; }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n\n text = currentToken.content;\n links = state.md.linkify.match(text);\n\n // Now split string to nodes\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n // forbid escape sequence at the start of the string,\n // this avoids http\\://example.com/ from being linkified as\n // http:<a href=\"//example.com/\">//example.com/</a>\n if (links.length > 0 &&\n links[0].index === 0 &&\n i > 0 &&\n tokens[i - 1].type === 'text_special') {\n links = links.slice(1);\n }\n\n for (ln = 0; ln < links.length; ln++) {\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { continue; }\n\n urlText = links[ln].text;\n\n // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n lastPos = links[ln].lastIndex;\n }\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n }\n\n // replace current node\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n","// Normalize input string\n\n'use strict';\n\n\n// https://spec.commonmark.org/0.29/#line-ending\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\n\nmodule.exports = function normalize(state) {\n var str;\n\n // Normalize newlines\n str = state.src.replace(NEWLINES_RE, '\\n');\n\n // Replace NULL characters\n str = str.replace(NULL_RE, '\\uFFFD');\n\n state.src = str;\n};\n","// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// (p) (P) -> §\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n'use strict';\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - multiplications 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content\n .replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\\u2014')\n // en-dash\n .replace(/(^|\\s)--(?=\\s|$)/mg, '$1\\u2013')\n .replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, '$1\\u2013');\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n\n }\n};\n","// Convert straight quotation marks to typographic ones\n//\n'use strict';\n\n\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = '\\u2019'; /* ’ */\n\n\nfunction replaceAt(str, index, ch) {\n return str.slice(0, index) + ch + str.slice(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,\n isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,\n canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) { break; }\n }\n stack.length = j + 1;\n\n if (token.type !== 'text') { continue; }\n\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) { break; }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = (t[0] === \"'\");\n\n // Find previous character,\n // default to space if it's the beginning of the line\n //\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n }\n\n // Find next character,\n // default to space if it's the end of the line\n //\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // Replace quotes in the middle of punctuation sequence, but not\n // in the middle of the words, i.e.:\n //\n // 1. foo \" bar \" baz - not replaced\n // 2. foo-\"-bar-\"-baz - replaced\n // 3. foo\"bar\"baz - not replaced\n //\n canOpen = isLastPunctChar;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n if (stack[j].level < thisLevel) { break; }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n }\n\n // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(\n tokens[item.token].content, item.pos, openQuote);\n\n pos += closeQuote.length - 1;\n if (item.token === i) { pos += openQuote.length - 1; }\n\n text = token.content;\n max = text.length;\n\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline' ||\n !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n","// Core state object\n//\n'use strict';\n\nvar Token = require('../token');\n\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token;\n\n\nmodule.exports = StateCore;\n","// Join raw text tokens with the rest of the text\n//\n// This is set as a separate rule to provide an opportunity for plugins\n// to run text replacements after text join, but before escape join.\n//\n// For example, `\\:)` shouldn't be replaced with an emoji.\n//\n'use strict';\n\n\nmodule.exports = function text_join(state) {\n var j, l, tokens, curr, max, last,\n blockTokens = state.tokens;\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline') continue;\n\n tokens = blockTokens[j].children;\n max = tokens.length;\n\n for (curr = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text_special') {\n tokens[curr].type = 'text';\n }\n }\n\n for (curr = last = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n }\n};\n","// Process autolinks '<protocol:...>'\n\n'use strict';\n\n\n/*eslint max-len:0*/\nvar EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;\nvar AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)$/;\n\n\nmodule.exports = function autolink(state, silent) {\n var url, fullUrl, token, ch, start, max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n start = state.pos;\n max = state.posMax;\n\n for (;;) {\n if (++pos >= max) return false;\n\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x3C /* < */) return false;\n if (ch === 0x3E /* > */) break;\n }\n\n url = state.src.slice(start + 1, pos);\n\n if (AUTOLINK_RE.test(url)) {\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n if (EMAIL_RE.test(url)) {\n fullUrl = state.md.normalizeLink('mailto:' + url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n return false;\n};\n","// Parse backticks\n\n'use strict';\n\n\nmodule.exports = function backtick(state, silent) {\n var start, max, marker, token, matchStart, matchEnd, openerLength, closerLength,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60/* ` */) { return false; }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n // scan marker length\n while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n marker = state.src.slice(start, pos);\n openerLength = marker.length;\n\n if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n }\n\n matchStart = matchEnd = pos;\n\n // Nothing found in the cache, scan until the end of the line (or until marker is found)\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n\n // scan marker length\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }\n\n closerLength = matchEnd - matchStart;\n\n if (closerLength === openerLength) {\n // Found matching closer length.\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart)\n .replace(/\\n/g, ' ')\n .replace(/^ (.+) $/, '$1');\n }\n state.pos = matchEnd;\n return true;\n }\n\n // Some different length found, put it in cache as upper limit of where closer can be found\n state.backticks[closerLength] = matchStart;\n }\n\n // Scanned through the end, didn't find anything\n state.backticksScanned = true;\n\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n};\n","// For each opening emphasis-like marker find a matching closing one\n//\n'use strict';\n\n\nfunction processDelimiters(state, delimiters) {\n var closerIdx, openerIdx, closer, opener, minOpenerIdx, newMinOpenerIdx,\n isOddMatch, lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n if (!max) return;\n\n // headerIdx is the first delimiter of the current (where closer is) delimiter run\n var headerIdx = 0;\n var lastTokenIdx = -2; // needs any value lower than -1\n var jumps = [];\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx];\n\n jumps.push(0);\n\n // markers belong to same delimiter run if:\n // - they have adjacent tokens\n // - AND markers are the same\n //\n if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {\n headerIdx = closerIdx;\n }\n\n lastTokenIdx = closer.token;\n\n // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n closer.length = closer.length || 0;\n\n if (!closer.close) continue;\n\n // Previously calculated lower bounds (previous fails)\n // for each marker, each delimiter length modulo 3,\n // and for whether this closer can be an opener;\n // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [ -1, -1, -1, -1, -1, -1 ];\n }\n\n minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)];\n\n openerIdx = headerIdx - jumps[headerIdx] - 1;\n\n newMinOpenerIdx = openerIdx;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n opener = delimiters[openerIdx];\n\n if (opener.marker !== closer.marker) continue;\n\n if (opener.open && opener.end < 0) {\n\n isOddMatch = false;\n\n // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ?\n jumps[openerIdx - 1] + 1 :\n 0;\n\n jumps[closerIdx] = closerIdx - openerIdx + lastJump;\n jumps[openerIdx] = lastJump;\n\n closer.open = false;\n opener.end = closerIdx;\n opener.close = false;\n newMinOpenerIdx = -1;\n // treat next token as start of run,\n // it optimizes skips in **<...>**a**<...>** pathological case\n lastTokenIdx = -2;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx;\n }\n }\n}\n\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n processDelimiters(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process *this* and _that_\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i, scanned, token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n continue;\n }\n\n // Process only opening markers\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`\n //\n isStrong = i > 0 &&\n delimiters[i - 1].end === startDelim.end + 1 &&\n // check that first two markers match and adjacent\n delimiters[i - 1].marker === startDelim.marker &&\n delimiters[i - 1].token === startDelim.token - 1 &&\n // check that last two markers are adjacent (we can safely assume they match)\n delimiters[startDelim.end + 1].token === endDelim.token + 1;\n\n ch = String.fromCharCode(startDelim.marker);\n\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process html entity - {, ¯, ", ...\n\n'use strict';\n\nvar entities = require('../common/entities');\nvar has = require('../common/utils').has;\nvar isValidEntityCode = require('../common/utils').isValidEntityCode;\nvar fromCodePoint = require('../common/utils').fromCodePoint;\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nmodule.exports = function entity(state, silent) {\n var ch, code, match, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26/* & */) return false;\n\n if (pos + 1 >= max) return false;\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n\n token = state.push('text_special', '', 0);\n token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) {\n token = state.push('text_special', '', 0);\n token.content = entities[match[1]];\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n\n return false;\n};\n","// Process escaped chars and hardbreaks\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nmodule.exports = function escape(state, silent) {\n var ch1, ch2, origStr, escapedStr, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) return false;\n pos++;\n\n // '\\' at the end of the inline block\n if (pos >= max) return false;\n\n ch1 = state.src.charCodeAt(pos);\n\n if (ch1 === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++;\n // skip leading whitespaces from next line\n while (pos < max) {\n ch1 = state.src.charCodeAt(pos);\n if (!isSpace(ch1)) break;\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n\n escapedStr = state.src[pos];\n\n if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {\n ch2 = state.src.charCodeAt(pos + 1);\n\n if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {\n escapedStr += state.src[pos + 1];\n pos++;\n }\n }\n\n origStr = '\\\\' + escapedStr;\n\n if (!silent) {\n token = state.push('text_special', '', 0);\n\n if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n token.content = escapedStr;\n } else {\n token.content = origStr;\n }\n\n token.markup = origStr;\n token.info = 'escape';\n }\n\n state.pos = pos + 1;\n return true;\n};\n","// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n'use strict';\n\n\nmodule.exports = function fragments_join(state) {\n var curr, last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n","// Process html tags\n\n'use strict';\n\n\nvar HTML_TAG_RE = require('../common/html_re').HTML_TAG_RE;\n\n\nfunction isLinkOpen(str) {\n return /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nmodule.exports = function html_inline(state, silent) {\n var ch, match, max, token,\n pos = state.pos;\n\n if (!state.md.options.html) { return false; }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21/* ! */ &&\n ch !== 0x3F/* ? */ &&\n ch !== 0x2F/* / */ &&\n !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) { return false; }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = state.src.slice(pos, pos + match[0].length);\n\n if (isLinkOpen(token.content)) state.linkLevel++;\n if (isLinkClose(token.content)) state.linkLevel--;\n }\n state.pos += match[0].length;\n return true;\n};\n","// Process \n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( <href> \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( <href> \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n\n state.md.inline.parse(\n content,\n state.md,\n state.env,\n tokens = []\n );\n\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push([ 'title', title ]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process [link](<to> \"stuff\")\n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n token,\n href = '',\n title = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( <href> \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( <href> \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n }\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [ [ 'href', href ] ];\n if (title) {\n attrs.push([ 'title', title ]);\n }\n\n state.linkLevel++;\n state.md.inline.tokenize(state);\n state.linkLevel--;\n\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process links like https://example.org/\n\n'use strict';\n\n\n// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\nvar SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;\n\n\nmodule.exports = function linkify(state, silent) {\n var pos, max, match, proto, link, url, fullUrl, token;\n\n if (!state.md.options.linkify) return false;\n if (state.linkLevel > 0) return false;\n\n pos = state.pos;\n max = state.posMax;\n\n if (pos + 3 > max) return false;\n if (state.src.charCodeAt(pos) !== 0x3A/* : */) return false;\n if (state.src.charCodeAt(pos + 1) !== 0x2F/* / */) return false;\n if (state.src.charCodeAt(pos + 2) !== 0x2F/* / */) return false;\n\n match = state.pending.match(SCHEME_RE);\n if (!match) return false;\n\n proto = match[1];\n\n link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));\n if (!link) return false;\n\n url = link.url;\n\n // disallow '*' at the end of the link (conflicts with emphasis)\n url = url.replace(/\\*+$/, '');\n\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) return false;\n\n if (!silent) {\n state.pending = state.pending.slice(0, -proto.length);\n\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'linkify';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'linkify';\n token.info = 'auto';\n }\n\n state.pos += url.length - proto.length;\n return true;\n};\n","// Proceess '\\n'\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function newline(state, silent) {\n var pmax, max, ws, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n // Find whitespaces tail of pending chars.\n ws = pmax - 1;\n while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;\n\n state.pending = state.pending.slice(0, ws);\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }\n\n state.pos = pos;\n return true;\n};\n","// Inline parser state\n\n'use strict';\n\n\nvar Token = require('../token');\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n\n // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n this.cache = {};\n\n // List of emphasis-like delimiters for current tag\n this.delimiters = [];\n\n // Stack of delimiter lists for upper level tags\n this._prev_delimiters = [];\n\n // backtick length => last seen position\n this.backticks = {};\n this.backticksScanned = false;\n\n // Counter used to disable inline linkify-it execution\n // inside <a> and markdown links\n this.linkLevel = 0;\n}\n\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n};\n\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n this._prev_delimiters.push(this.delimiters);\n this.delimiters = [];\n token_meta = { delimiters: this.delimiters };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n};\n\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start, lastChar, nextChar, count, can_open, can_close,\n isLastWhiteSpace, isLastPunctChar,\n isNextWhiteSpace, isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start);\n\n // treat beginning of the line as a whitespace\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }\n\n count = pos - start;\n\n // treat end of the line as a whitespace\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n};\n\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token;\n\n\nmodule.exports = StateInline;\n","// ~~strike through~~\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i, scanned, token, len, ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x7E/* ~ */) { return false; }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) { return false; }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n\n state.delimiters.push({\n marker: marker,\n length: 0, // disable \"rule of 3\" length checks meant for emphasis\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i, j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E/* ~ */) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' &&\n state.tokens[endDelim.token - 1].content === '~') {\n\n loneMarkers.push(endDelim.token - 1);\n }\n }\n\n // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n'use strict';\n\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A/* \\n */:\n case 0x21/* ! */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2D/* - */:\n case 0x3A/* : */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) { return false; }\n\n if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n state.pos = pos;\n\n return true;\n};\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n","// Token class\n\n'use strict';\n\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n this.tag = tag;\n\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n this.attrs = null;\n\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n this.map = null;\n\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n this.nesting = nesting;\n\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n this.level = 0;\n\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n this.children = null;\n\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n this.content = '';\n\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n this.markup = '';\n\n /**\n * Token#info -> String\n *\n * Additional information:\n *\n * - Info string for \"fence\" tokens\n * - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n * - The string value of the item marker for ordered-list \"list_item_open\" tokens\n **/\n this.info = '';\n\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n this.meta = null;\n\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n this.block = false;\n\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n this.hidden = false;\n}\n\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) { return -1; }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) { return i; }\n }\n return -1;\n};\n\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [ attrData ];\n }\n};\n\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [ name, value ];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name), value = null;\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n return value;\n};\n\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([ name, value ]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\n\nmodule.exports = Token;\n","\n'use strict';\n\n\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i, ch, cache = decodeCache[exclude];\n if (cache) { return cache; }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n}\n\n\n// Decode percent-encoded string.\n//\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n\n return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {\n var i, l, b1, b2, b3, b4, chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);\n\n if (chr < 0x80) {\n result += '\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);\n\n if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n result += '\\ufffd\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += '\\ufffd\\ufffd\\ufffd\\ufffd';\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += '\\ufffd';\n }\n\n return result;\n });\n}\n\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\n\n\nmodule.exports = decode;\n","\n'use strict';\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n","\n'use strict';\n\n\nmodule.exports = function format(url) {\n var result = '';\n\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n\n return result;\n};\n","'use strict';\n\n\nmodule.exports.encode = require('./encode');\nmodule.exports.decode = require('./decode');\nmodule.exports.format = require('./format');\nmodule.exports.parse = require('./parse');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = [ '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t' ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [ '{', '}', '|', '\\\\', '^', '`' ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = [ '\\'' ].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),\n hostEndingChars = [ '/', '?', '#' ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n /* eslint-disable no-script-url */\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n };\n /* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, slashesDenoteHost) {\n var i, l, lowerProto, hec, slashes,\n rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') { hostEnd--; }\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost(host);\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n }\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function(host) {\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nmodule.exports = urlParse;\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","module.exports=/[\\0-\\x1F\\x7F-\\x9F]/","module.exports=/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/","module.exports=/[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","module.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","'use strict';\n\nexports.Any = require('./properties/Any/regex');\nexports.Cc = require('./categories/Cc/regex');\nexports.Cf = require('./categories/Cf/regex');\nexports.P = require('./categories/P/regex');\nexports.Z = require('./categories/Z/regex');\n","module.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"cta-base\",\n // language=HTML\n `\n\n <div class=\"tjs__cta-base\">\n <div class=\"[[layout.container]]\">\n <slot></slot>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"cta-form\",\n // language=HTML\n `\n <form class=\"tjs__cta-form\" data-micx-formmail-preset=\"default\" data-micx-formmail-sent-message=\"E-Mail erfolgreich gesendet!\">\n <div class=\"container\">\n <slot data-select=\":scope h2\"></slot>\n </div>\n <div class=\"wrapper\">\n <div class=\"container\">\n <div class=\"row g-3\">\n <slot data-select=\".section-hr\" data-replace=\"\"></slot>\n\n </div>\n </div>\n </div>\n\n </form>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"footer-base\",\n // language=HTML\n `\n\n <div class=\"tjs__footer-base [[layout.class]]\">\n <div class=\"[[layout.container]] h-100\">\n <div class=\"row\">\n <slot data-select=\".section-h3 > .content\" data-class=\":: col-12 :xl: col\"></slot>\n </div>\n </div>\n <div class=\"subfooter\">\n <slot data-select=\"#minifooter\"></slot>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"hero-max\",\n // language=HTML\n `\n\n <div class=\"tjs__hero-max [[layout.class]] [[layout.autoheight === false ? '' : 'tjs__hero-max--autoheight' ]]\">\n <slot data-select=\"img\"></slot>\n <div class=\"tjs__hero-max--out-wrapper \">\n <div class=\"tjs__hero-max--container [[layout.container]]\">\n <div class=\"tjs__hero-max--inner-wrapper\">\n <div class=\"tjs__hero-max--section-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"hero-ribbon\",\n // language=HTML\n `\n\n <div class=\"tjs__hero-ribbon\">\n <div class=\"tjs__hero-ribbon--wrapper\">\n <div class=\"tjs__hero-ribbon--container [[layout.container]]\">\n <div class=\"row \">\n\n <slot data-select=\".section-h3 > .content\"></slot>\n\n </div>\n </div>\n </div>\n\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"hero-title-small\",\n // language=HTML\n `\n\n <div class=\"tjs__hero-title-small\">\n <div class=\"imagewrapper\">\n <slot data-select=\"img\" data-replace=\"true\"></slot>\n </div>\n\n <slot></slot>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"navbar-blox\",\n // language=HTML\n `\n\n <div class=\"tjs__navbar-blox\">\n <div class=\"wrapper\">\n <div class=\"firstline\">\n <div class=\"tjs__content [[ layout.container ]]\">\n <slot data-select=\".brand\" data-copy data-replace></slot>\n </div>\n </div>\n\n <div class=\"secondline\" style=\"box-shadow: 0px 1px 2px #00000029;background: white\">\n <div class=\"[[ layout.container ]]\">\n <div class=\"tjs__row1\">\n\n\n <div class=\"tjs__logo :: mobile :md: \" href=\"/\" aria-label=\"Home\">\n <slot data-select=\".brand\" data-replace></slot>\n </div>\n\n\n\n <div class=\"tjs__row2\">\n <div class=\"tjs__nav-main\" >\n\n <slot data-select=\".nav-bar-main\" data-replace></slot>\n\n </div>\n\n\n <div class=\"tjs__hamburger\">\n <div class=\"use-hamburger :: justify-content-center :lg: text-start\"\n style=\"display: flex; padding-right:20px; align-items: center; justify-content: right; height:100%;width:100%\"></div>\n </div>\n </div>\n\n\n </div>\n <div class=\"sidenav-positioner\">\n <div class=\"sidenav\">\n <slot data-select=\".nav-menu\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-card-2col\",\n // language=HTML\n `\n\n <div class=\"tjs__sec-card-2col\">\n <div class=\"tjs__sec-card-2col--container [[layout.container]]\">\n <div class=\"row\">\n <div class=\"tjs__sec-card-2col--col-start col-12 col-md-6 text-format p-4 p-lg-5 order-2 order-md-1 tjs__section-text\">\n <slot></slot>\n </div>\n <div class=\"tjs__sec-card-2col--col-end col-12 col-md-6 image-side order-1 order-md-2\">\n <slot data-select=\"img, .children > .section-hr.aside\" data-replace></slot>\n </div>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-card-feature\",\n // language=HTML\n `\n <div class=\"tjs__sec-card-feature [[layout.class]]\">\n <div class=\"container\">\n <div class=\"header_image\">\n <slot data-select=\":scope > .content img, map\" data-replace></slot>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-lg-6 text-format p-4 p-lg-5 tjs__section-text\">\n <slot></slot>\n </div>\n <div class=\"col-12 col-lg-6 text-format p-4 p-lg-5\">\n <slot data-select=\":scope > .children\"></slot>\n </div>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-legal-content\",\n // language=HTML\n `\n\n <div class=\"tjs__sec-legal-content :: mobile :lg:\">\n <div class=\"out-wrapper\">\n <div class=\"container p-0\">\n <div class=\"inner-wrapper :: p-4 :lg: p-5\">\n <div class=\"tjs__section-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-multi-card\",\n // language=HTML\n `\n\n <div class=\"tjs__sec-multi-card\">\n <div class=\"container header\">\n <slot data-select=\":scope > .content\"></slot>\n </div>\n <div class=\"container\">\n <div class=\"row g-3 row-cols-1 row-cols-lg-[[ layout.cols ?? 3 ]]\">\n <slot data-select=\":scope > .children > *\" data-replace=\"\"></slot>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-testimonial-ribbon\",\n // language=HTML\n `\n\n <div class=\"tjs__sec-testimonial-ribbon :: mobile :lg:\">\n <div class=\"tjs__sec-testimonial-ribbon--wrapper\">\n <div class=\"tjs__sec-testimonial-ribbon--container [[layout.container]] :: :xl: mt-0\">\n <div class=\"row\">\n <div class=\"col-lg-3 image-round mx-auto :: :xl: my-auto\">\n <div class=\"ratio ratio-1x1\">\n <slot data-select=\"img\" data-replace=\"\"></slot>\n </div>\n\n </div>\n <div class=\"col-lg-9 text-format :: :lg: my-auto\">\n <slot></slot>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n `);\n","\nimport \"./navbar-blox/navbar-blox\";\nimport \"./sec-legal-content/sec-legal-content\";\nimport \"./sec-testimonial-ribbon/sec-testimonial-ribbon\";\nimport \"./sec-card-2col/sec-card-2col\";\nimport \"./hero-max/hero-max\";\nimport \"./hero-ribbon/hero-ribbon\";\nimport \"./footer-base/footer-base\";\nimport \"./cta-base/cta-base\";\nimport \"./sec-multi-card/sec-multi-card\";\nimport \"./sec-card-feature/sec-card-feature\";\nimport \"./hero-title-small/hero-title-small\";\nimport \"./cta-form/cta-form\";\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nimport \"../index\";\nimport \"../index.dev\";\nimport \"./SwitcherElement\";\n\nimport \"./ShowcaseElement\";\n"],"names":["template","slot","el","classes","match","name","node"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"assets/dist/index.js","mappings":";;;;;;;;;;;;AAAwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACTwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACVwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACTgC;AACQ;AACI;AACI;;;;;;;;;;;;;;ACHR;;AAExC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;;;;ACnBsB;AACK;;AAEQ;AACb;;;;;;;;;;;;;;;;;;;;;;;;;ACLwB;;AAEV;AACA;AACF;AACN;AACC;AACJ;;AAEC;AACG;;AAE7B,8DAAa;;;;;;;;;;;;;;;;;;;;;;;ACZb,iBAAiB,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;AACqD;AACL;AACS;AACb;AACrC;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qDAAc;AACrD;AACA,0BAA0B,iEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,wDAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qEAAiB;AAC9C;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnCA,iBAAiB,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;AAC0C;AACnC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,iCAAiC,uDAAY;AAC7C;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpCA,iBAAiB,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;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA,wDAAwD,IAAI;AAC5D,gDAAgD,IAAI;AACpD;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;;;;AC1BA,iBAAiB,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;AACoC;AACyB;AACX;AACa;AACrB;AACnC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAO;AAClC;AACA,aAAa;AACb;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAO;AACvB;AACA;AACA,0CAA0C,kDAAK;AAC/C,mCAAmC,kDAAK;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,oBAAoB,uDAAW;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,mCAAmC,0EAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0EAAoB;AACvD;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAW;AAC/B;AACA;AACA,gDAAgD,eAAe;AAC/D,8DAA8D,eAAe,YAAY,UAAU,iDAAO,6DAA6D;AACvK,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iDAAO;AACzC;AACA;AACA;AACA;AACA,8DAA8D,eAAe,YAAY,eAAe;AACxG,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAW;AAC/B;AACA,wBAAwB,iDAAK;AAC7B,8DAA8D,eAAe,YAAY,0BAA0B;AACnH,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA;AACA,gDAAgD,eAAe;AAC/D,8DAA8D,eAAe,YAAY,UAAU,iDAAO,6DAA6D;AACvK,wBAAwB,iDAAO,IAAI,QAAQ;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,8DAA8D,eAAe,YAAY,iBAAiB;AAC1G,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;AACA;AACA,qBAAqB;AACrB;AACA,8DAA8D,eAAe,YAAY,0BAA0B;AACnH,wBAAwB,iDAAO,IAAI,QAAQ;AAC3C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,0EAAoB;AACjD;AACA;AACA;AACA,6BAA6B,0EAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACtVA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC,sBAAsB,kBAAkB;AACxC,2BAA2B;AAC3B,oBAAoB;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC/BA,iBAAiB,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,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;ACtCA,iBAAiB,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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;AC/CA,iBAAiB,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;AC1BA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACvBO;AACP,wBAAwB;AACxB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD,wDAAwD,OAAO;AAC/D;AACA,oBAAoB,QAAQ,aAAa,OAAO,GAAG;AACnD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5BO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACO;AACP;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBA,iBAAiB,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;AACO;AACP;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACO,uCAAuC;AAC9C;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;;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,YAAY;AACZ;AACO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;ACVA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACc;AACpD;AACP;AACA;AACA,sCAAsC;AACtC,oCAAoC;AACpC;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA;AACA,oCAAoC,8DAAa,CAAC,iDAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA;AACA;AACA,8CAA8C,kCAAkC;AAChF;AACA,oBAAoB,uEAAiB,WAAW,qCAAqC;AACrF,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AClFA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACJ;AAClC;AACP;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA,kBAAkB,qDAAQ;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACnDA,iBAAiB,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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AAC6C;AACR;AACa;AACb;AACsB;AACd;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO,UAAU,QAAQ,QAAQ;AACzE,mDAAmD,YAAY;AAC/D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+CAA+C;AAC/C,uBAAuB,uEAAiB,YAAY,kBAAkB;AACtE,wBAAwB,uEAAiB,UAAU,UAAU,kBAAkB,EAAE,sBAAsB,UAAU,eAAe,GAAG;AACnI,qBAAqB,uEAAiB,UAAU,uBAAuB,OAAO,QAAQ,MAAM,SAAS,aAAa,uBAAuB,UAAU,mBAAmB,GAAG;AACzK,0DAA0D,uEAAiB,UAAU,SAAS,gBAAgB,eAAe,GAAG;AAChI;AACA,+GAA+G,6EAA6E,4EAA4E;AACxQ;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kCAAkC,qDAAU;AAC5C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC/FA,iBAAiB,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;AAC6C;AACR;AACa;AACb;AACQ;AACtC;AACP;AACA,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA,aAAa,iDAAK;AAClB,gCAAgC,8DAAa,CAAC,iDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,kCAAkC,qDAAU;AAC5C,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AClDA,iBAAiB,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;AAC6C;AACK;AACb;AACA;AACrC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAO;AACjC;AACA;AACA;AACA;AACA,gBAAgB,iDAAK;AACrB;AACA;AACA,0BAA0B,8DAAa;AACvC;AACA;AACA;AACA;AACA;AACA,gCAAgC,qDAAU;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;;;;;;AC3DA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AAC6C;AACc;AACtB;AACa;AACL;AACtC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E,qBAAqB,yDAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO,UAAU,QAAQ,QAAQ;AACzE,mDAAmD,YAAY;AAC/D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+CAA+C;AAC/C,uBAAuB,uEAAiB,YAAY,kBAAkB;AACtE,wBAAwB,uEAAiB,UAAU,UAAU,kBAAkB,EAAE,sBAAsB,UAAU,eAAe,GAAG;AACnI,qBAAqB,uEAAiB,UAAU,uBAAuB,OAAO,QAAQ,MAAM,SAAS,aAAa,uBAAuB,UAAU,mBAAmB,GAAG;AACzK,oDAAoD,uEAAiB,UAAU,SAAS,gBAAgB,eAAe,GAAG;AAC1H;AACA,yGAAyG,uEAAuE,sEAAsE;AACtP;AACA;AACA;AACA;AACA;AACA,uBAAuB,iDAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8DAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qDAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClFA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACmE;AACb;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iDAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+DAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAAgB;AACxD;AACA;AACA;AACA;AACA;AACA,IAAI,yDAAa,aAAa,yDAAa;AAC3C;AACiB;;;;;;;;;;;;;;;;;;;;;;;;;AC3DjB,iBAAiB,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;AACwC;AACxC;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAQ;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL;AACO,iDAAiD,6BAA6B;AACrF;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5I4B;AACJ;AACK;AACG;AACM;AACA;AACU;AACR;AACE;AACC;AACD;AACF;AACT;AACG;AACE;AACR;AACF;AACO;AACA;AACF;;;;;;;;;;;;;;;;;;;;ACnBW;AACI;AACF;AACc;AACnD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK;AAC5C,+BAA+B,KAAK;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,+CAA+C,QAAQ;AACvD;AACA,wBAAwB,sDAAO;AAC/B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sDAAO;AAC5B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,kCAAkC,yCAAyC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wDAAQ;AACxB;AACA,kCAAkC;AAClC;AACA,aAAa;AACb;AACA;AACA;AACA,wBAAwB,sDAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC9JyD;AACX;AAC9C;AACA,oCAAoC;AACpC;AACA,6BAA6B;AAC7B,8BAA8B;AAC9B,8BAA8B;AAC9B,4BAA4B;AAC5B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AAAC;AACL;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,YAAY;AACZ;AACO;AACP;AACA,eAAe,qEAAiB;AAChC;AACA;AACA,kEAAkE,KAAK;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,iFAAiF,cAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0DAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;AC/EA,iBAAiB,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;AACoC;AACS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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;AACO;AACP;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,4BAA4B,sDAAS;AACrC;AACA;AACA,YAAY,iDAAK;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC1EA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AAC8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,8DAAgB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0DAAQ;AACZ;AACA;AACsB;;;;;;;;;;;;;;;;;;AC/CtB,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AAC8D;AACjB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,8DAAgB;AAC9D;AACA;AACA;AACA,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,wBAAwB,yDAAa;AACrC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0DAAQ;AACZ;AACA;AACwB;;;;;;;;;;;;;;AC/DxB,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,iBAAiB,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;AACkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,6DAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI,+DAAa;AACjB;;;;;;;;;;;;;;;;AC7DO;AACP;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACR4B;AACI;AACE;AACC;AACO;AACN;;;;;;;;;;;;;;;;;;ACLpC,iBAAiB,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;AACiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO,wBAAwB,2DAAa;AAC5C;AACA;AACA;AACA;AACA,kCAAkC,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB,eAAe;AAC1D;AACA,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;;;;;AC/EA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA;AACiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,6DAAe;AACjE;AACA;AACA;AACA;AACA,oBAAoB,oEAAkB,GAAG,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI,0DAAQ;AACZ;AACA;AAC0B;;;;;;;;;;;;ACnHb;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,gEAAgE,+BAA+B;AAC/F;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mIAAmI;AAC9J;AACA,yEAAyE;AACzE;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA,8DAA8D;AAC9D;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iCAAiC;AACjC,qBAAqB;AACrB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7Ha;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;;AAEA;;AAEA;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;;;;;;;;;;;;AC7Ca;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD,oBAAoB,mBAAO,CAAC,kFAAoB;AAChD;AACA;AACA;AACA,8HAA8H;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzCa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,6GAAgC;AACrD,aAAa,mBAAO,CAAC,6GAAgC;AACrD,aAAa,mBAAO,CAAC,6FAAwB;AAC7C,aAAa,mBAAO,CAAC,qFAAoB;AACzC,aAAa,mBAAO,CAAC,iGAA0B;AAC/C,aAAa,mBAAO,CAAC,iIAA0C;;;;;;;;;;;;ACrBlD;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,6FAAwB;AACpD,yBAAyB,mBAAO,CAAC,uGAA6B;AAC9D,iBAAiB,mBAAO,CAAC,iFAAkB;AAC3C,wBAAwB,mBAAO,CAAC,qGAA4B;AAC5D,yBAAyB,mBAAO,CAAC,iGAA0B;AAC3D,oBAAoB,mBAAO,CAAC,uFAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oCAAoC;AACjF;AACA,iCAAiC,0CAA0C;AAC3E;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,aAAa;AACb;AACA;AACA;AACA;AACA,uEAAuE,UAAU,iBAAiB;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,0BAA0B;AAC1B;AACA;;;;;;;;;;;;ACzJa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,6FAAwB;AACpD,iBAAiB,mBAAO,CAAC,iFAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCa;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,oBAAoB,mBAAO,CAAC,6FAAwB;AACpD,iBAAiB,mBAAO,CAAC,iFAAkB;AAC3C,qBAAqB,mBAAO,CAAC,+FAAyB;AACtD,yBAAyB,mBAAO,CAAC,iGAA0B;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,GAAG,gCAAgC;AACjE;AACA,8EAA8E;AAC9E;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,8DAA8D;AACjH;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,gCAAgC;AAChC,8BAA8B;;;;;;;;;;;;ACpDjB;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;;;;;;;;;;;ACVf;AACb;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,uEAAkB;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,iCAAiC;AACjC,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB;AACA;AACA;AACA;;;;;;;;;;;;AC7Da;AACb,8CAA6C,EAAE,aAAa,EAAC;;;;;;;;;;;;ACDhD;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,sBAAsB;;;;;;;;;;;;ACbT;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,sBAAsB;AACtB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,6DAA6D;AAC7D;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;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,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,iBAAiB;;;;;;;;;;;;ACzGJ;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC;AACtC,sBAAsB;AACtB,mBAAmB;AACnB,4BAA4B;AAC5B,oBAAoB;AACpB,+BAA+B;AAC/B,6BAA6B;AAC7B,yBAAyB;AACzB,oCAAoC;AACpC,+BAA+B;AAC/B,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,+BAA+B,mBAAO,CAAC,qGAAwB;AAC/D,oBAAoB,mBAAO,CAAC,+EAAa;AACzC,eAAe,mBAAO,CAAC,+DAAS;AAChC,2BAA2B,mBAAO,CAAC,6FAAoB;AACvD,sCAAsC;AACtC;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,KAAK;AACL;AACA;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,cAAc;AAC3F;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;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,YAAY;AAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,6GAA6G,gFAAgF;AAC7L;AACA,KAAK;AACL;;;;;;;;;;;;AC9Ta;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,wBAAwB;AACxB,yBAAyB;AACzB,qBAAqB;AACrB,yBAAyB;AACzB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,gCAAgC,UAAU,IAAI,UAAU;AACxD;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,KAAK;AACL;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,aAAa;AACb;;;;;;;;;;;;ACnGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdwB;AACW;AACV;AACA;AACJ;AACG;AACH;AACG;AACU;AAChB;AACM;AACE;AACjB;;;;;;;;;;;;ACZV;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,YAAY;AACZ;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,CAAC;;;;;;;;;;;;AC7BY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,oBAAoB,mBAAO,CAAC,uFAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;;;;;;;;;;;ACvBV;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,GAAG,mBAAmB;AAC5C,4BAA4B;AAC5B,qBAAqB;AACrB,mBAAmB;AACnB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sBAAsB;;;;;;;;;;;;ACxGT;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB;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,aAAa;AACb;AACA;AACA;AACA,0CAA0C,sBAAsB;AAChE;AACA;AACA,mCAAmC,KAAK,IAAI,YAAY;AACxD;AACA;AACA,0BAA0B,KAAK,EAAE,QAAQ,KAAK,KAAK;AACnD;AACA,SAAS;AACT;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC/CL;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,gBAAgB,mBAAO,CAAC,uEAAkB;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,wBAAwB;AAC/G,oFAAoF,kBAAkB;AACtG,qFAAqF,mBAAmB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,6BAA6B;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,kBAAkB;AAC1H,yGAAyG,mBAAmB;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;;;;;;;;;;;;ACvKa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,4BAA4B,mBAAO,CAAC,uGAA6B;AACjE,oBAAoB,mBAAO,CAAC,uFAAqB;AACjD,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,CAAC;AACD,6CAA6C;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,0CAA0C;AAC1C;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,KAAK;AACL;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD;AACrD;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,iCAAiC,mBAAmB;AACpD,sCAAsC,mBAAmB,KAAK,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC5LY;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,6BAA6B,mBAAO,CAAC,oGAAsB;AAC3D,oBAAoB,mBAAO,CAAC,uFAAqB;AACjD,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C,+BAA+B,mBAAO,CAAC,6GAAgC;AACvE,2BAA2B,mBAAO,CAAC,qGAA4B;AAC/D,0BAA0B,mBAAO,CAAC,8FAAmB;AACrD;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,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,SAAS;AACT;AACA;AACA,iBAAiB;;;;;;;;;;;;AChFJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,gBAAgB,mBAAO,CAAC,uEAAkB;AAC1C;AACA;AACA;AACA,mEAAmE,yBAAyB,MAAM,0BAA0B,SAAS,mCAAmC;AACxK,SAAS;AACT;AACA;AACA,qBAAqB;;;;;;;;;;;;ACXR;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;;;;;;;;;;;;;;ACTgC;AACV;AAC3C;AACA;AACA,SAAS,mDAAe,aAAa,mDAAe,uBAAuB,mDAAe;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mEAAiB,cAAc,8CAA8C;AACnG,sBAAsB,mEAAiB,cAAc;AACrD;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBM;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,wCAAwC;AAC/C;AACA,2CAA2C;AAC3C;AACA;AACA;AAC+B;AACQ;AACU;AACjB;AACD;AACQ;;;;;;;;;;;;;;ACvBvC,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACiD;AACjD;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI,eAAe;AAC5B;AACA;AACA;AACA,IAAI,+DAAa;AACjB;;;;;;;;;;;;;;;;;AC9BA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,iBAAiB,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;AACqD;AACJ;AACD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8DAAY;AAC9B;AACA;AACA;AACA;AACA,8BAA8B,mEAAiB,SAAS,WAAW;AACnE,oBAAoB,mEAAiB,QAAQ,8DAA8D;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,4CAA4C,2CAA2C;AACvF,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI,+DAAa;AACjB;AAC2B;;;;;;;;;;;AC5D3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,oBAAoB;AAChF;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;;;;;;;;;;;;;;;ACnEA,iBAAiB,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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AAC2C;AACe;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,UAAU,8DAAY;AACtB,UAAU,0DAAQ;AAClB,SAAS,mDAAe,aAAa,mDAAe,uBAAuB,mDAAe;AAC1F;AACA;AACA;AACA,CAAC;;;;;;;;;;;AClED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB,GAAG,8CAA8C;AACvG;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,mEAAmE,oBAAoB,qDAAqD,EAAE,oDAAoD;AAChP;AACA;AACA;AACA,8DAA8D,mBAAmB,GAAG,8CAA8C;AAClI,0CAA0C,uFAAuF,oBAAoB,qDAAqD;AAC1M;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW,IAAI,UAAU;AAC1F,6CAA6C,aAAa,EAAE,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;;AC1HA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,iBAAiB,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;AAC2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAAQ;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,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,IAAI,+DAAa;AACjB;;;;;;;;;;;;;;;;;;;ACzDA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,iBAAiB,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;AAC4F;AACrC;AACF;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8DAAY;AAC9B,kBAAkB,0DAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAW;AAC3C;AACA;AACA;AACA;AACA,0BAA0B,mEAAiB,UAAU,+CAA+C;AACpG;AACA;AACA;AACA,gBAAgB,mEAAiB,QAAQ,kCAAkC,6BAA6B,iEAAc;AACtH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,IAAI,+DAAa;AACjB;AACA;AAC+B;;;;;;;;;;;;;;;;;;;AC5D/B,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,kBAAkB,SAAI,IAAI,SAAI;AAC9B;AACA;AACA,iBAAiB,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;AAC4F;AACrC;AACF;AACrD;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,mDAAmD,iEAAc;AACjE,qCAAqC,iEAAc;AACnD;AACA;AACA,kBAAkB,0DAAQ;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAAQ;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kBAAkB,8DAAY;AAC9B,kBAAkB,0DAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAW;AAC3C;AACA;AACA,+BAA+B,mEAAiB,UAAU,+BAA+B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI,+DAAa;AACjB;AACA;AAC+B;;;;;;;;;;;;;;;;AClHxB;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACVwC;AACF;AACa;AACP;AACV;AACmB;;;;;;;;;;;;;;;;ACL9C;AACP;;;;;;;;;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,MAAM;AACrB;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,IAAI,6BAA6B;AACjC;AACA;AACA,4DAA4D;AAC5D;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,mC;;;;;;;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0C;;;;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yC;;;;;;;;;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,+CAA+C,MAAM;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,eAAe,kEAAgB;AAC/B;AACA,gBAAgB,0DAAQ;AACxB;AACA;AACA;AACA;AACA;AACO;AACP,YAAY,iBAAiB;AAC7B;AACA,4DAA4D,QAAQ;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,KAAK;AAC5D;AACA;AACA;AACA;AACA,0CAA0C,+BAA+B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;;;;;AClJA;AACA;AACA;AACA;AACA;AACiC;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;AACO;AACP;AACA,eAAe,8CAAI;AACnB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,qC;;;;;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wCAAwC;AACtE;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,gBAAgB,iBAAiB;AACjC,oCAAoC,gBAAgB,KAAK,oBAAoB;AAC7E,eAAe,8CAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,mD;;;;;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACiC;AACjC;AACA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,gBAAgB,OAAO;AACvB,oCAAoC,gBAAgB,KAAK,oBAAoB;AAC7E,eAAe,8CAAI;AACnB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,gD;;;;;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,eAAe,8CAAI;AACnB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,uC;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,0CAA0C,MAAM;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;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,8BAA8B;AACjF,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,mBAAmB,8CAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,8CAAI;AACvB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA,iC;;;;;;;;;;;;;;;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,sDAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iC;;;;;;;;;;;;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB;AAC1B;AACA;AACgE;AAChE;AACA,WAAW,6BAA6B;AACX;AAC7B;AACA,QAAQ,4GAA4G;AACpH;AACA;AACA;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;AACA;AACA,+CAA+C,MAAM;AACrD;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,eAAe;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,kCAAkC,cAAc;AAChD;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,gBAAgB,WAAW;AAC3B;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,gFAAgF;AAChF,yCAAyC,8BAA8B;AACvE,uBAAuB,WAAW;AAClC;AACA;AACA;AACA,sEAAsE,8BAA8B;AACpG,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAAkB;AACxD;AACA;AACA;AACA,+BAA+B,+DAAkB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,MAAM;AAC/F,4CAA4C,eAAe;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,qBAAqB;AACrB;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8BAA8B;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,4DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,gBAAgB;AAC3F;AACA,mCAAmC,8BAA8B;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,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,oCAAoC,gBAAgB,EAAE,cAAc;AACpE;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,wDAAwD,gBAAgB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;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,KAAK;AACL;AACA,4C;;;;;;;;;;;;;;;;;;;;;;ACzlCA;AACA,wCAAwC,0DAA0D;AAClG;AAC6F;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,qBAAqB,UAAU,EAAE;AAClG;AACA,iBAAiB,oCAAoC;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,4IAA4I,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,GAAG;AAChL;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,sDAAsD,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,GAAG,EAAE;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,cAAc,GAAG,EAAE;AACtL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA,iEAAiE,EAAE;AACnE;AACA;AACA;AACA,sDAAsD,EAAE;AACxD;AACA,wFAAwF,wBAAwB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gEAAgE,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mEAAC,UAAU,mEAAC;AAC1B;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,cAAc,6DAAC;AACf,gBAAgB,oEAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3eF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC,QAAQ,2BAA2B;AACnC,QAAQ,2BAA2B;AACnC,QAAQ,2BAA2B;AACnC,QAAQ,4BAA4B;AACpC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,GAAG,sCAAsC,0BAA0B;AACzF;AACA,IAAI,oCAAoC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;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,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,QAAQ,mIAAmI,2IAA2I;AACtR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG,kCAAkC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB,6BAA6B;AAC1D;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb;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;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,KAAK;AACL;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,kFAAkF,6BAA6B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD;AACA;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,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;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,8CAA8C,cAAc,yHAAyH,oBAAoB;AACzM;AACA;AACA;AACA;AACA;AACA,gFAAgF,sBAAsB,oCAAoC,kCAAkC,0BAA0B,EAAE;AACxM,2GAA2G,EAAE,oBAAoB,EAAE,IAAI,EAAE;AACzI,6HAA6H,sCAAsC;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,WAAW,8DAA8D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6CAA6C;AACxD;AACA;AACA;AACA,mBAAmB,gHAAgH;AACnI,UAAU,kCAAkC,mBAAmB;AAC/D;AACA;AACA;AACA;AACA,4BAA4B,OAAO,iDAAiD,qBAAqB;AACzG;AACA;AACA;AACA,QAAQ,sDAAsD,mBAAmB;AACjF;AACA;AACA,eAAe,uCAAuC,WAAW,mBAAmB;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;AACA;AACA,YAAY,MAAM,YAAY,aAAa;AAC3C;AACA;AACA,WAAW,cAAc;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,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,iBAAiB;AACtF;AACA;AACA;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,aAAa,2FAA2F;AACxG;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;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,kGAAkG,eAAe;AACjH;AACA,iBAAiB,eAAe;AAChC,aAAa;AACb;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uEAAuE;AACpF,UAAU,uBAAuB;AACjC;AACA;AACA,YAAY,UAAU;AACtB,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAgC;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,cAAc,iBAAiB;AAC/B;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB,SAAS,6BAA6B,EAAE;AAC3E,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU,SAAS,6BAA6B,EAAE;AAC9D,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;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,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,EAAE;AAC7C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA8CE;;;;;;;;;;;;;;;;;;;;ACz7B4H;AACxE;AACgB;AACvB;AAC/C,iBAAiB,aAAa,+BAA+B,4BAA4B,aAAa,mBAAmB,kBAAkB,cAAc,QAAQ,UAAU,WAAW,YAAY,eAAe,WAAW,cAAc,wBAAwB,qBAAqB,gBAAgB,cAAc,gBAAgB,kBAAkB,yBAAyB,iBAAiB,4BAA4B,6CAA6C,+BAA+B,kEAAkE,6CAA6C,UAAU,6CAA6C,mEAAmE,sDAAsD,oDAAoD,sDAAsD,oDAAoD,sDAAsD,oDAAoD,KAAK,sBAAsB,oBAAoB,kBAAkB,cAAc,kBAAkB,MAAM,8BAA8B,eAAe,oBAAoB,qDAAqD,oBAAoB,oDAAoD,oBAAoB,qDAAqD;AAC93C;AACA,sEAAsE,QAAQ;AAC9E;AACA;AACA;AACA,sBAAsB,2CAAC;AACvB;AACA;AACA;AACA;AACA,WAAW,wDAAC;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,iFAAC;AACpE;AACA;AACA,YAAY,8CAAC;AACb;AACA,EAAE,2DAAC,GAAG,+CAA+C;AACrD;AACA;AACA,EAAE,2DAAC,GAAG,2BAA2B;AACjC;AACA;AACA,EAAE,2DAAC,GAAG,yDAAyD;AAC/D;AACA;AACA,EAAE,oEAAC,CAAC,8EAAC;AACL;AACA;AACA,EAAE,gEAAC;AACH;AAGE;;;;;;;;;;;;;;;;;;;;;;;;;;AC9CkI;AACpG;AACyH;AACxF;AACiB;AACf;AACN;AAChC;AAC7B,kBAAkB,6CAA6C,6BAA6B,iCAAiC,8CAA8C,8BAA8B,8BAA8B,qCAAqC,8CAA8C,0BAA0B,wCAAwC,mCAAmC,eAAe,oBAAoB,qBAAqB,cAAc,IAAI,YAAY,MAAM,YAAY,gBAAgB,aAAa,MAAM,mBAAmB,gBAAgB,eAAe,oCAAoC,6DAA6D,mCAAmC,2BAA2B,kEAAkE,0CAA0C,0CAA0C,iCAAiC,+CAA+C;AACj+B;AACA;AACA,CAAC,wCAAwC,0DAA0D,6CAA6C,4BAA4B,kRAAkR,iHAAiH;AAC/iB,oDAAoD,OAAO;AAC3D;AACA,CAAC;AACD,uQAAuQ;AACvQ;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA,6BAA6B,QAAQ;AACrC,uBAAuB,gEAAgE,0CAA0C,6OAA6O,yBAAyB;AACvY;AACA,CAAC;AACD,MAAM,gEAAC;AACP,qBAAqB,2CAAC,QAAQ,2DAAC,GAAG,2BAA2B,UAAU,2DAAC,GAAG,2BAA2B,UAAU,2DAAC,GAAG,qDAAqD,UAAU,2DAAC,GAAG,yDAAyD,UAAU,wDAAC;AAC3P;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yCAAC;AACZ,yCAAyC,qBAAqB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB,yCAAC,+CAA+C,qBAAqB,wBAAwB;AAC/H;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8EAAC;AACX;AACA;AACA;AACA;AACA;AACA,iCAAiC,6EAAE;AACnC;AACA,mIAAmI,6DAAC;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAC;AACb;AACA,+BAA+B,sBAAsB,SAAS,UAAU,UAAU,YAAY,WAAW,mCAAmC,kCAAkC,6BAA6B,cAAc,eAAe,6BAA6B,aAAa,cAAc,gBAAgB,YAAY,aAAa,IAAI,cAAc,qBAAqB,MAAM,gBAAgB,MAAM,yBAAyB,iBAAiB,KAAK,iBAAiB,MAAM,kBAAkB,yBAAyB,mDAAmD,qBAAqB,sBAAsB,YAAY,SAAS,SAAS,YAAY,WAAW,SAAS,kBAAkB,OAAO,MAAM,QAAQ,WAAW,QAAQ,kBAAkB,MAAM,OAAO,WAAW,kCAAkC,4BAA4B,kCAAkC,QAAQ,kBAAkB,MAAM,YAAY,YAAY,2BAA2B,aAAa,MAAM,YAAY,cAAc;AAC79B;AACA;AACA,CAAC,wCAAwC,0DAA0D,6CAA6C,4BAA4B,kRAAkR,iHAAiH;AAC/iB,oDAAoD,OAAO;AAC3D;AACA,CAAC;AACD,uQAAuQ;AACvQ;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA,6BAA6B,QAAQ;AACrC,uBAAuB,gEAAgE,0CAA0C,6OAA6O,yBAAyB;AACvY;AACA,CAAC;AACD,MAAM,gEAAC;AACP,qBAAqB,2CAAC,QAAQ,2DAAC,GAAG,0DAA0D;AAC5F;AACA,8BAA8B,gEAAE,qBAAqB,gEAAE,kKAAkK,4DAAE;AAC3N;AACA;AACA;AACA,OAAO;AACP,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8EAAC;AACrC;AACA;AACA;AACA,UAAU,8EAAC;AACX;AACA;AACA,IAAI,2DAAE;AACN;AACA;AACA,WAAW,yCAAC;AACZ;AACA,yCAAyC,0DAAE,iBAAiB;AAC5D,yCAAyC,0DAAE,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAC;AACb;AACA,+BAA+B,sBAAsB,SAAS,UAAU,UAAU,YAAY,WAAW,mCAAmC,kCAAkC,6BAA6B,cAAc,eAAe,6BAA6B,aAAa,cAAc,gBAAgB,YAAY,aAAa,IAAI,cAAc,qBAAqB,MAAM,gBAAgB,MAAM,yBAAyB,iBAAiB,KAAK,iBAAiB,MAAM,mDAAmD,0BAA0B,6BAA6B,eAAe,qBAAqB,cAAc,YAAY,YAAY,uBAAuB,sCAAsC,iBAAiB,mCAAmC,aAAa,gBAAgB,MAAM,qBAAqB,kCAAkC,iBAAiB,WAAW,aAAa,6BAA6B,WAAW,6BAA6B,cAAc,aAAa,mCAAmC,aAAa,kBAAkB,YAAY,cAAc,WAAW,kBAAkB,aAAa,YAAY,qBAAqB,gBAAgB,aAAa,YAAY,oBAAoB,mBAAmB,SAAS;AAC1tC;AACA;AACA,CAAC,wCAAwC,0DAA0D,6CAA6C,4BAA4B,oRAAoR,mHAAmH;AACnjB,oDAAoD,OAAO;AAC3D;AACA,CAAC;AACD;AACA;AACA,6BAA6B,QAAQ;AACrC,uBAAuB;AACvB;AACA,CAAC;AACD,MAAM,gEAAC;AACP,kCAAkC,2CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,aAAa;AAChH;AACA;AACA,IAAI,2DAAE;AACN;AACA;AACA,WAAW,yCAAC;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8CAAC;AACd;AACA;AACA;AACA;AACA,kBAAkB,cAAc,0BAA0B,2BAA2B,sCAAsC,YAAY,WAAW,SAAS,cAAc,eAAe,gBAAgB,iBAAiB,cAAc,eAAe,mBAAmB,oBAAoB,qBAAqB,wBAAwB,0BAA0B,mBAAmB,iBAAiB,eAAe,UAAU,qBAAqB,UAAU,SAAS,oBAAoB,sBAAsB,qDAAqD,kBAAkB,cAAc,0BAA0B,4BAA4B,wBAAwB,0BAA0B,uBAAuB,gBAAgB,kBAAkB,cAAc,iBAAiB,sBAAsB,WAAW,YAAY,mBAAmB,+BAA+B;AACv2B;AACA;AACA,CAAC,wCAAwC,0DAA0D,6CAA6C,4BAA4B,kRAAkR,iHAAiH;AAC/iB,oDAAoD,OAAO;AAC3D;AACA,CAAC;AACD,uQAAuQ;AACvQ;AACA,GAAG;AACH;AACA,KAAK;AACL;AACA,6BAA6B,QAAQ;AACrC,uBAAuB,gEAAgE,0CAA0C,4OAA4O,yBAAyB;AACtY;AACA,CAAC;AACD,MAAM,gEAAC;AACP,sBAAsB,0EAAE,CAAC,oEAAE,CAAC,2CAAC,UAAU,2DAAC,GAAG,2BAA2B,UAAU,2DAAC,GAAG,4BAA4B,UAAU,2DAAC,GAAG,2BAA2B,UAAU,wDAAC,WAAW,wDAAC,WAAW,8DAAE,aAAa,6BAA6B,eAAe;AACtP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sJAAsJ,mBAAmB;AACzK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yCAAC;AACZ,uBAAuB,+BAA+B,EAAE,yBAAyB,EAAE,sCAAsC;AACzH,cAAc,qEAAE;AAChB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,mBAAmB;AAC9E;AACA;AACA,oFAAoF,mEAAE,2BAA2B,6DAAC,MAAM,sDAAsD;AAC9K,8FAA8F,6DAAC;AAC/F,WAAW,uEAAuE;AAClF,uFAAuF,6DAAC;AACxF;AACA;AACA;AACA;AACA,cAAc,8EAAC;AACf;AACA;AACA,6DAA6D,mBAAmB;AAChF;AACA;AACA;AACA,kBAAkB,sEAAE,UAAU,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAC;AACb;AACA;AAKE;;;;;;;;;;;;;;;;;;;;AC7ViG;AAClC;AACiB;AACtB;AAC5D,8BAA8B,sBAAsB,SAAS,UAAU,UAAU,YAAY,WAAW,mCAAmC,kCAAkC,6BAA6B,cAAc,eAAe,6BAA6B,aAAa,cAAc,gBAAgB,YAAY,aAAa,IAAI,cAAc,qBAAqB,MAAM,gBAAgB,MAAM,yBAAyB,iBAAiB,KAAK,iBAAiB,MAAM,gDAAgD,iCAAiC,6CAA6C,oDAAoD,kBAAkB,kCAAkC,eAAe,MAAM,QAAQ,aAAa,UAAU,gBAAgB,gBAAgB,aAAa,UAAU,kBAAkB,cAAc,cAAc,cAAc,WAAW,aAAa,sBAAsB,WAAW,YAAY,yCAAyC,wCAAwC,qCAAqC,uBAAuB,kBAAkB,0BAA0B,QAAQ,aAAa,WAAW,mBAAmB,8BAA8B,mBAAmB,0CAA0C,YAAY,8BAA8B,0BAA0B,aAAa,MAAM,aAAa,WAAW,YAAY,4BAA4B,iBAAiB,cAAc,qBAAqB,sBAAsB,YAAY,QAAQ,aAAa,WAAW,mBAAmB,8BAA8B,mBAAmB,gBAAgB,YAAY,uBAAuB,0BAA0B,aAAa,UAAU,UAAU,mCAAmC,eAAe,MAAM,OAAO,WAAW,YAAY,iCAAiC,WAAW,cAAc,iBAAiB,UAAU;AACp1D;AACA,sEAAsE,QAAQ;AAC9E;AACA;AACA;AACA,sBAAsB,2CAAC;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iFAAC,sFAAsF,4DAAC,KAAK,2DAAC,iFAAiF,4DAAC;AACrO;AACA;AACA,WAAW,yCAAC;AACZ;AACA;AACA;AACA,iBAAiB;AACjB,gBAAgB,qEAAC,GAAG,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qEAAC,GAAG,0BAA0B;AAC9C,qBAAqB,cAAc;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAC;AACb;AACA,EAAE,2DAAC,GAAG,4BAA4B;AAClC;AACA;AACA,EAAE,2DAAC,GAAG,4BAA4B;AAClC;AACA;AACA,EAAE,2DAAC,GAAG,4CAA4C;AAClD;AACA;AACA,EAAE,wDAAC;AACH;AACA;AACA,EAAE,gEAAC;AACH;AAGE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnFF;AACA;AACA;AACA;AACA,wCAAwC,0DAA0D;AAClG;AACA;AACA;AACA,IAAI,yBAAyB;AAC7B,IAAI,2BAA2B;AAC/B,IAAI,2BAA2B;AAC/B,IAAI,2BAA2B;AAC/B,IAAI,4BAA4B;AAChC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,EAAE;AAC7C;AACA;AACA;AACA;AACA,6BAA6B,QAAQ;AACrC;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;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;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,eAAe;AACf;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB,GAAG,gBAAgB;AAC/E;AACA;AACA,8BAA8B,iBAAiB,GAAG,gBAAgB;AAClE;AACA;AACA,gCAAgC,iBAAiB,GAAG,gBAAgB;AACpE;AACA;AACA,4BAA4B,iBAAiB,GAAG,gBAAgB,IAAI,YAAY;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW,IAAI,GAAG,GAAG,aAAa;AACvE;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;AACA;AACA,GAAG;AACH;AACA;AACA,oKAAoK,UAAU;AAC9K,4CAA4C,UAAU,oEAAoE,UAAU;AACpI,GAAG,6KAA6K,UAAU,gEAAgE,UAAU;AACpQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH;AACxH;AACA,mCAAmC,iCAAiC;AACpE;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kPAAkP,WAAW,6CAA6C,aAAa;AACvT;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBE;;;;;;;;;;;;;;;;;ACxS4M;AAC9M;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,aAAa,eAAe,6EAAC;AAC7B;AACA;AACA;AACA,aAAa,MAAM,6EAAC;AACpB;AACA;AACA;AACA,mEAAmE,6EAAC,aAAa,6EAAC;AAClF,aAAa;AACb;AACA,WAAW,MAAM,6EAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6EAAC;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,uDAAuD;AACvD;AACA;AACA,cAAc,EAAE,IAAI,EAAE,EAAE,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uOAAuO;AACvO;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gBAAgB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,gBAAgB;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,kBAAkB,+DAAC;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kHAAkH,6DAAC,6BAA6B,4EAAC;AACjJ;AACA;AACA;AACA,4EAA4E,iEAAC;AAC7E;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,+FAA+F,4CAA4C;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uCAAuC,0DAA0D,2RAA2R,gHAAgH;AAC7e,oDAAoD,OAAO;AAC3D;AACA,CAAC;AACD,mJAAmJ,QAAQ;AAC3J,uBAAuB,0DAA0D,oBAAoB;AACrG;AACA,CAAC;AACD,qBAAqB,0EAAC,CAAC,oEAAC,qBAAqB,8DAAC,aAAa,kBAAkB;AAC7E;AACA,wDAAwD,6DAAC,sBAAsB,4EAAC;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4EAAC;AACf,0EAA0E,WAAW;AACrF;AACA;AACA;AACA;AACA,iGAAiG,4EAAC;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGE;;;;;;;;;;;;;;;;;;;;;;;ACnOW;;;AAGb;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA,uBAAuB;AACvB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,2BAA2B;;;AAG3B,yBAAyB,oCAAoC;;AAE7D;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA,8BAA8B;AAC9B;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD,iDAAiD;AACjD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,mBAAO,CAAC,qDAAU;;AAEvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB;;AAExB,qBAAqB;;AAErB;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA,qCAAqC;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;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;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;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,mCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB;;AAEvB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;;;ACvpBa;;;AAGb;AACA;AACA;;AAEA;AACA,eAAe,oHAA+C;AAC9D,eAAe,kHAA8C;AAC7D,eAAe,gHAA6C;AAC5D,eAAe,gHAA6C;;AAE5D,QAAQ,YAAY;AACpB;;AAEA,QAAQ,OAAO;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,UAAU;AAC3C;AACA;AACA;;AAEA;;AAEA;;AAEA,mDAAmD,EAAE;;AAErD;AACA;;AAEA;;AAEA,yBAAyB,EAAE,cAAc,EAAE,kCAAkC,IAAI;;AAEjF;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,kEAAkE,WAAW;AAC7E;AACA;AACA,cAAc,2BAA2B,QAAQ;AACjD;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU,6BAA6B;;AAEvC;;AAEA,qBAAqB,KAAK;;AAE1B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,yEAAyE,KAAK;AAC9E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA;;AAEA;AACA;;AAEA,6BAA6B,IAAI;;AAEjC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,sBAAsB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,KAAK,gBAAgB;AACtD;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,2BAA2B;AACpD;AACA;AACA;AACA;AACA;AACwD;AACZ;AACN;AACb;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,+CAA+C,MAAM;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4CAA4C;AAC1D,IAAI,oBAAoB;AACxB;AACO,yBAAyB,kEAAe;AAC/C;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,2BAA2B,gDAAM;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY;AAChD;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uC;;;;;;;;;;;;;;;;;;;;AChPA;AACA;AACA;AACA;AACA;AAC4D;AACP;AACtB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;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,MAAM;AACN;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;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,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mDAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,6BAA6B,oDAAS;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,oBAAoB;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,yEAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClPA;AACA;AACA;AACA;AACA;AACsC;AACtC,QAAQ,wBAAwB,EAAE,8CAAI;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,6C;;;;;;;;;;;;;;;;;AClLA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AAC0C;AACwB;AAClE,gCAAgC,oDAAS;AACzC;AACA;AACA,8BAA8B,mDAAQ;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,eAAe,kDAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACO,iBAAiB,wDAAS;AACjC,qC;;;;;;;;;;;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACyC;AACyB;AAClE;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+DAAc;AACzC;AACA,eAAe,iDAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAO;AACtB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;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,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACO,YAAY,8DAAS;AAC5B,+B;;;;;;;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AAC0C;AACwB;AAClE;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAS;AACzC;AACA;AACA,8BAA8B,mDAAQ;AACtC;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,8BAA8B,KAAK,GAAG,OAAO;AAC7C,SAAS;AACT;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,eAAe,kDAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAA2B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,OAAO;AACP;AACA;AACA,SAAS;AACT;AACO,iBAAiB,wDAAS;AACjC,qC;;;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qC;;;;;;;;;;;;;;;;;;;;;ACrBA;AACA;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,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,0CAA0C,MAAM;AAChD;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,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,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;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,2CAA2C;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,oCAAoC,WAAW,MAAM,UAAU,KAAK,WAAW,IAAI,WAAW,MAAM,gBAAgB;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gBAAgB;AACtD;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;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;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;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,0DAA0D,gBAAgB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+BAA+B;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,4EAA4E,IAAI;AAChF,+EAA+E,KAAK;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;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;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,wCAAwC,eAAe;AACvD;AACA;AACA;AACA,yCAAyC,sCAAsC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,MAAM,aAAa,MAAM;AACnE;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM,SAAS,kBAAkB;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,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;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,mEAAmE;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,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,MAAM;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;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,iBAAiB;AACjB;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,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;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,iBAAiB;AACjB;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,mCAAmC,EAAE;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,wBAAwB;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,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,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,oCAAoC,kBAAkB,eAAe,KAAK;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,WAAW,cAAc;AACzB;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C,WAAW,gBAAgB,IAAI,cAAc;AAC7C;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA,IAAI;AACJ;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uEAAuE,UAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,6IAA6I;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;;;;;;;;;;ACz+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,0FAA0F,MAAM;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,wBAAwB,8CAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACO,uBAAuB,6CAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACO,0BAA0B,gDAAU;AAC3C,kC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpJ8iB;AAC9iB;;;;;;;;;;;;;;;;;ACD8C;AAC9C;;;;;;;;;;;;;;;;;;ACDwC;AACxC;;;;;;;;;;;;;;;;;ACD8C;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACD0H;AAC1H;;;;;;;;;;;;;;;;;;;;;;ACDgC;AAChC;;;;;;;;;;;;ACDa;;AAEb,uBAAuB,mBAAO,CAAC,mEAAe;;AAE9C;AACA,aAAa,uBAAuB;AACpC;AACA,aAAa,6DAA6D;AAC1E;AACA,aAAa,6CAA6C;AAC1D;AACA,aAAa,6CAA6C;AAC1D;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS,2CAA2C;AAClE,cAAc,SAAS,6CAA6C;AACpE,cAAc,oBAAoB;AAClC;AACA,aAAa,eAAe;AAC5B;AACA,aAAa,kBAAkB;AAC/B;AACA,aAAa,kBAAkB;AAC/B;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,kDAAkD;AAChE;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB,cAAc,SAAS,iCAAiC,YAAY;AACpE;AACA,aAAa,0BAA0B;AACvC;AACA,aAAa,QAAQ,gCAAgC,YAAY;AACjE,cAAc,SAAS,oCAAoC,YAAY;AACvE,cAAc,SAAS,sCAAsC,YAAY;AACzE,cAAc,8BAA8B;AAC5C,cAAc,8BAA8B;AAC5C,cAAc,kBAAkB;AAChC,cAAc,8BAA8B;AAC5C,cAAc,8BAA8B;AAC5C,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AACjC,cAAc,MAAM;AACpB;;AAEA,WAAW,SAAS;AACpB;AACA,mBAAmB;AACnB,oBAAoB;AACpB;AACA;;AAEA;AACA,WAAW,YAAY;AACvB,WAAW,UAAU;AACrB;AACA;AACA,gCAAgC;AAChC;;AAEA;;AAEA;AACA,aAAa,WAAW;AACxB;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC,sBAAsB,qBAAqB;AAC3C;AACA,sBAAsB;AACtB;AACA;AACA,gCAAgC;AAChC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,kEAAkE,aAAa,KAAK,cAAc;AAClG;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,aAAa;AACb;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAkC;;;AAGlC,6BAA6B;;AAE7B;AACA,iDAAiD;;AAEjD,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,4DAA4D,IAAI;AAChE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,gDAAgD;AAChD,WAAW,iBAAiB;AAC5B,aAAa;AACb;AACA;AACA;AACA;;;;;;;;;;;;AChOa;AACb;AACA;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,6DAAY;;AAElC;AACA,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA;AACA,8BAA8B,IAAI,MAAM,IAAI;AAC5C;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uBAAuB,IAAI,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;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,sBAAsB,GAAG;AACzB;AACA;AACA,KAAK;AACL;AACA;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,iDAAiD,wBAAwB,SAAS;AAClF;AACA;AACA;AACA;AACA,6CAA6C,wBAAwB,SAAS;AAC9E;AACA,KAAK;AACL;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;AACA,0BAA0B,OAAO;AACjC,yCAAyC;;AAEzC;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,gBAAgB;AACxD;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8DAA8D,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,IAAI;AAChB;AACA,UAAU,IAAI;AACd;AACA;AACA;AACA;AACA;AACA,qBAAqB,GAAG;AACxB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,UAAU;AACV;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,8BAA8B;AAC9B;AACA;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,KAAK;AACL;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClgBA;AACA,aAAa,mBAAmB;AAChC,aAAa,qBAAqB;AAClC,aAAa,2BAA2B;AACxC,aAAa,8BAA8B;AAC3C,aAAa,8BAA8B;AAC3C;AACA;AACA,UAAU,oBAAoB;AAC9B,WAAW,QAAQ;AACnB,WAAW,QAAQ,0CAA0C;AAC7D,WAAW,SAAS;AACpB,aAAa,gBAAgB;AAC7B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB,qDAAqD,gBAAgB;AACrE;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,SAAS;AACjB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,OAAO,IAAI;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB;AACA;AACA,gBAAgB;AAChB,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,IAAI;AAChB,eAAe,GAAG;AAClB,WAAW,GAAG;AACd;AACA,WAAW,sBAAsB,mBAAmB;AACpD,WAAW,SAAS;AACpB,YAAY,kBAAkB;AAC9B;AACA,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,MAAM;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA,uCAAuC;AACvC;AACA,oBAAoB;;AAEpB;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAAS,QAAQ;AACjB;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ,YAAY;AACZ,cAAc;AACd;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChTa;;;AAGb,6FAAkC;;;;;;;;;;;;ACHlC,yBAAyB;AACzB;AACa;;AAEb;AACA,6HAA2D;;;;;;;;;;;;ACL3D;AACA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;;AAEa;;AAEb;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B;AAC1B,qCAAqC;;;;;;;;;;;;AC3BrC;AACA;AACa;;;AAGb,uBAAuB;;AAEvB,yBAAyB;;AAEzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,oCAAoC;AACpC,4DAA4D;AAC5D;AACA,gCAAgC;AAChC,oBAAoB;AACpB,gCAAgC;AAChC,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA,8CAA8C,cAAc,EAAE;AAC9D,wCAAwC,KAAK,EAAE;AAC/C;;AAEA,8CAA8C,IAAI,OAAO,IAAI;;AAE7D,eAAe,mBAAO,CAAC,qEAAY;;AAEnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA,CAAC;;AAED;AACA,+BAA+B;AAC/B;AACA;;AAEA;AACA,uDAAuD;;AAEvD;AACA,mBAAmB;AACnB;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ,YAAY;AACZ,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wCAAwC;;AAExC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,uBAAuB,mBAAO,CAAC,kFAA6B;;AAE5D;AACA;AACA;AACA;;;AAGA;AACA;AACA,oDAAoD,oCAAoC,MAAM;AAC9F;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,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2BAA2B,GAAG,EAAE,MAAM,KAAK;AACrD,UAAU,yBAAyB,GAAG,EAAE,MAAM,IAAI,MAAM;AACxD,UAAU,mBAAmB,GAAG,EAAE,EAAE,iBAAiB,EAAE,iCAAiC,MAAM;AAC9F,UAAU,2BAA2B,GAAG,EAAE,EAAE,iBAAiB,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX,qFAA8C;AAC9C,6FAAiD;;AAEjD,cAAc;AACd,gBAAgB;AAChB,WAAW;AACX,kBAAkB;AAClB,mBAAmB;AACnB,yBAAyB;AACzB,qBAAqB;AACrB;AACA,kBAAkB;AAClB,sBAAsB;AACtB,eAAe;AACf,oBAAoB;AACpB,sBAAsB;AACtB,mBAAmB;AACnB,gBAAgB;AAChB,0BAA0B;;;;;;;;;;;;AC5T1B;AACa;;;AAGb,oIAA4D;AAC5D,sJAAkE;AAClE,oIAA4D;;;;;;;;;;;;ACN5D;AACA;AACa;;;AAGb,kBAAkB,0GAAsC;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0BAA0B,OAAO;;AAEjC;AACA;AACA;;AAEA,yBAAyB;;AAEzB;AACA,wCAAwC;;AAExC;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;AC/CA;AACA;AACa;;;AAGb,kBAAkB,0GAAsC;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;;AAEA,uFAAuF;;AAEvF;;AAEA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;;AAGb,mBAAmB,mBAAO,CAAC,sEAAgB;AAC3C,mBAAmB,mBAAO,CAAC,kEAAW;AACtC,mBAAmB,mBAAO,CAAC,8DAAY;AACvC,mBAAmB,mBAAO,CAAC,oEAAe;AAC1C,mBAAmB,mBAAO,CAAC,sEAAgB;AAC3C,mBAAmB,mBAAO,CAAC,wEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,sDAAY;AACvC,mBAAmB,mBAAO,CAAC,4CAAO;AAClC,mBAAmB,mBAAO,CAAC,yDAAU;;;AAGrC;AACA,WAAW,mBAAO,CAAC,4EAAmB;AACtC,QAAQ,mBAAO,CAAC,sEAAgB;AAChC,cAAc,mBAAO,CAAC,kFAAsB;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAa;AACrB;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;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,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sCAAsC;AAC9E,WAAW;AACX;AACA;AACA,kBAAkB;AAClB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sCAAsC;AAC9E;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;;;AAGhC;AACA;;AAEA,iBAAiB;AACjB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA,kBAAkB;;AAElB,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA,GAAG;;AAEH;;AAEA,6CAA6C,kCAAkC;;AAE/E;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA,GAAG;;AAEH;;AAEA,6CAA6C,kCAAkC;;AAE/E;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACrkBA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,mBAAO,CAAC,wDAAS;;;AAGvC;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,gFAAqB;AAC/C,kBAAkB,mBAAO,CAAC,8EAAoB;AAC9C,kBAAkB,mBAAO,CAAC,gFAAqB;AAC/C,kBAAkB,mBAAO,CAAC,0FAA0B;AACpD,kBAAkB,mBAAO,CAAC,0EAAkB;AAC5C,kBAAkB,mBAAO,CAAC,8EAAoB;AAC9C,kBAAkB,mBAAO,CAAC,wFAAyB;AACnD,kBAAkB,mBAAO,CAAC,0FAA0B;AACpD,kBAAkB,mBAAO,CAAC,oFAAuB;AACjD,kBAAkB,mBAAO,CAAC,sFAAwB;AAClD,kBAAkB,mBAAO,CAAC,wFAAyB;AACnD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC,kDAAkD,mCAAmC;AACrF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;;AAEd;;AAEA;AACA;;;AAGA,8BAA8B,mBAAO,CAAC,4FAA2B;;;AAGjE;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb,aAAa,mBAAO,CAAC,wDAAS;;;AAG9B;AACA,sBAAsB,mBAAO,CAAC,sFAAwB;AACtD,sBAAsB,mBAAO,CAAC,8EAAoB;AAClD,sBAAsB,mBAAO,CAAC,gFAAqB;AACnD,sBAAsB,mBAAO,CAAC,kFAAsB;AACpD,sBAAsB,mBAAO,CAAC,4FAA2B;AACzD,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD;AACA;AACA,sBAAsB,mBAAO,CAAC,sFAAwB;AACtD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gCAAgC,OAAO;AACvC;AACA;AACA;;AAEA,uBAAuB,mBAAO,CAAC,wFAAyB;;;AAGxD;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,mBAAO,CAAC,wDAAS;;;AAGvC;AACA;;AAEA;AACA,uBAAuB,mBAAO,CAAC,gFAAqB;AACpD,uBAAuB,mBAAO,CAAC,sFAAwB;AACvD,uBAAuB,mBAAO,CAAC,sFAAwB;AACvD,uBAAuB,mBAAO,CAAC,oFAAuB;AACtD,uBAAuB,mBAAO,CAAC,0FAA0B;AACzD,uBAAuB,kIAAgD;AACvE,uBAAuB,wHAA2C;AAClE,uBAAuB,mBAAO,CAAC,gFAAqB;AACpD,uBAAuB,mBAAO,CAAC,kFAAsB;AACrD,uBAAuB,mBAAO,CAAC,wFAAyB;AACxD,uBAAuB,mBAAO,CAAC,8FAA4B;AAC3D,uBAAuB,mBAAO,CAAC,oFAAuB;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAO,CAAC,kGAA8B;AAC7D,uBAAuB,qIAAmD;AAC1E,uBAAuB,2HAA8C;AACrE;AACA;AACA,uBAAuB,mBAAO,CAAC,oGAA+B;AAC9D;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,cAAc,SAAS;AACvB;AACA;AACA;;;AAGA,+BAA+B,mBAAO,CAAC,gGAA6B;;;AAGpE;;;;;;;;;;;;AC/LA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;AChFA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA,YAAY;AACZ,aAAa;AACb;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb,sBAAsB,oGAAgC;AACtD,sBAAsB,yGAAqC;AAC3D,sBAAsB,wGAAoC;;;AAG1D;;AAEA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;;AAEA,sCAAsC,OAAO;AAC7C;AACA;;AAEA;AACA;;;AAGA;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,SAAS;AAChD;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,2BAA2B;;AAE3B,kDAAkD;;AAElD;AACA,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;;;AAGA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;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;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B,2CAA2C,uBAAuB;;AAElE;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/VA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;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,wDAAwD;;AAExD;AACA,mDAAmD;;AAEnD;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;AAC9B;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjOA;;AAEa;;;AAGb;AACA;;AAEA,uDAAuD;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjCA;;AAEa;;;AAGb;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,uBAAuB;;AAEvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD;;AAEhD;AACA;AACA;AACA;;AAEA;;AAEA;AACA,2BAA2B;;AAE3B;AACA;;AAEA,qBAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjGA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;;AAEA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD;;AAElD,gBAAgB;;AAEhB;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC,yBAAyB;AACzB;;AAEA,iBAAiB;;AAEjB,gBAAgB;;AAEhB;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC5CA;;AAEa;;;AAGb,kBAAkB,mBAAO,CAAC,mFAAuB;AACjD,6BAA6B,yHAAmD;;AAEhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,gCAAgC;;AAEhC,mDAAmD;;AAEnD;;AAEA,cAAc,2BAA2B;AACzC,+CAA+C;AAC/C;;AAEA,qCAAqC;;AAErC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,sDAAsD;;AAEtD;AACA;AACA;;AAEA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzEA;;AAEa;;;AAGb;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;AACA,kCAAkC;;AAElC;AACA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;AClFA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;;AAEA,8CAA8C;;AAE9C,SAAS;AACT;AACA,sBAAsB;;AAEtB;;AAEA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;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,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,+BAA+B;;AAE/B;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA,yDAAyD;;AAEzD;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,MAAM;AACN;AACA,gCAAgC;AAChC;;AAEA,uEAAuE;AACvE;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzWA;;AAEa;;;AAGb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;AClDa;;;AAGb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,2DAA2D;AAC3D;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS,gDAAgD;AACzD;AACA;AACA,wDAAwD;;AAExD;AACA,sCAAsC;;AAEtC;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;;AAEA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA,sEAAsE;;AAEtE;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA,sCAAsC;;AAEtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;AACpB;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;ACrMA;;AAEa;;AAEb,YAAY,mBAAO,CAAC,yDAAU;AAC9B,cAAc,sGAAkC;;;AAGhD;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB,uBAAuB;AACvB,4BAA4B;AAC5B,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,WAAW;AACrE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;AACA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,WAAW;AAC7C;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;;AAEpB;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,WAAW;AAC7C,6CAA6C;AAC7C;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;;AAEpB;AACA,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACtOA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;;AAEjC;;AAEA,kDAAkD;;AAElD;AACA,uDAAuD;;AAEvD;AACA;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA,uFAAuF;;AAEvF,uCAAuC;;AAEvC;AACA;AACA;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;;AAEA,0FAA0F;;AAE1F;AACA;;AAEA;;AAEA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,+BAA+B;AAC/B;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,sCAAsC;AACtC,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA,4DAA4D;;AAE5D,gBAAgB;;AAEhB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iCAAiC,oBAAoB;AACrD,oDAAoD;;AAEpD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA,qBAAqB;AACrB,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC5Na;;;AAGb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACfa;;AAEb;AACA;;AAEA;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACa;;;AAGb,qBAAqB,6GAAyC;;;AAG9D;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC;;AAEnC,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,gCAAgC,QAAQ;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,mBAAmB;AACxC;AACA;AACA,iDAAiD;;AAEjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7IA;;AAEa;;;AAGb;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACa;;AAEb;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG;AAC1B,2BAA2B,GAAG,yBAAyB,GAAG;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA,uCAAuC;;AAEvC,yCAAyC,aAAa;;AAEtD,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACxGA;AACA;AACa;;;AAGb,qBAAqB,2GAAuC;AAC5D,qBAAqB,0GAAsC;AAC3D,qBAAqB,6GAAyC;;AAE9D;AACA;AACA,2BAA2B;;;AAG3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAmB;AACjC;;AAEA;;AAEA,+BAA+B,QAAQ;AACvC,yCAAyC;AACzC;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,wBAAwB,QAAQ;AAChC,uFAAuF;AACvF,4CAA4C;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,wBAAwB,mBAAmB;AAC3C,uFAAuF;AACvF,4CAA4C;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;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;;AAEA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA,uCAAuC;;AAEvC,yCAAyC,aAAa;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACxMA;AACA;AACa;;AAEb,YAAY,mBAAO,CAAC,yDAAU;;;AAG9B;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;;;AAGA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;;AAEA,sCAAsC,OAAO;AAC7C;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;AAEA,0BAA0B,YAAY;AACtC;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;;AAEa;;;AAGb;AACA,gDAAgD,EAAE,gCAAgC,KAAK,6CAA6C,KAAK;AACzI,6CAA6C,KAAK;;;AAGlD;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;;AAEA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC3EA;;AAEa;;;AAGb;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA;;AAEA;AACA,mEAAmE;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,+EAA+E;;AAE/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACa;;;AAGb;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;;AAEA;AACA;AACA,yBAAyB;AACzB;;AAEA,sBAAsB,iBAAiB;AACvC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,WAAW,0BAA0B;AACrC;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA;AACA;AACa;;;AAGb;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA,gBAAgB;;AAEhB,4DAA4D;;AAE5D;;AAEA,cAAc,oBAAoB;AAClC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,QAAQ;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA,+BAA+B,QAAQ,QAAQ;;AAElC;;AAEb,wBAAwB,mBAAO,CAAC,6EAAoB;AACpD,wBAAwB,kGAA8B;AACtD,wBAAwB,gHAA4C;AACpE,wBAAwB,4GAAwC;;;AAGhE,mCAAmC,IAAI,OAAO,IAAI,GAAG;AACrD,mCAAmC,KAAK,EAAE;;;AAG1C;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtDA;;AAEa;;AAEb,cAAc,sGAAkC;;AAEhD;;AAEA,gBAAgB,SAAS,OAAO;;AAEhC,oBAAoB,WAAW,EAAE;AACjC,qCAAqC,gCAAgC;;;AAGrE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa;;;AAGb;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,YAAY;AACpC;AACA;AACA,2CAA2C;AAC3C;AACA,2CAA2C;;AAE3C;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN,2BAA2B;;AAE3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;;AAEa;;;AAGb,kBAAkB,8GAAwC;;;AAG1D;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB;AACtB;AACA;;;AAGA;AACA;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;;AAEa;;AAEb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;AACzD,6DAA6D;;AAE7D;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA,+CAA+C;AAC/C;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACvJA;;AAEa;;AAEb,2BAA2B,iHAA6C;AACxE,2BAA2B,sGAAkC;;;AAG7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;;AAEzD;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,6CAA6C;AAC7C;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACrJA;;AAEa;;;AAGb;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;AC7DA;;AAEa;;AAEb,cAAc,sGAAkC;;;AAGhD;AACA;;AAEA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA,4DAA4D;;AAE5D;AACA;AACA;;;;;;;;;;;;AC7CA;;AAEa;;;AAGb,qBAAqB,mBAAO,CAAC,yDAAU;AACvC,qBAAqB,2GAAuC;AAC5D,qBAAqB,0GAAsC;AAC3D,qBAAqB,6GAAyC;;;AAG9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,6DAA6D;;AAE7D;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;;;;;;;;;;;;AC7JA;AACA;AACa;;;AAGb;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA,gBAAgB;;AAEhB,gCAAgC;;AAEhC;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;;AAEA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA;AACA;;AAEa;;;AAGb;AACA,MAAM;;AAEN,oDAAoD,oCAAoC,MAAM;;AAE9F;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,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;;AAE3B,iBAAiB;;AAEjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD;;AAEhD;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA,iBAAiB;;AAEjB;;AAEA;AACA,EAAE;;;;;;;;;;;;ACxFF;;AAEa;;;AAGb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;;AAErB;;AAEA,kCAAkC,SAAS;AAC3C,gCAAgC;AAChC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;;;;;;;;;;;;;ACvMa;;;AAGb;;AAEA;;AAEA;AACA;AACA,eAAe;;AAEf;;AAEA,cAAc,SAAS;AACvB;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oCAAoC,EAAE;AACtC;AACA;;AAEA,gCAAgC,OAAO;AACvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;;;AAGA,0BAA0B;AAC1B;;;AAGA;;;;;;;;;;;;;ACxHa;;;AAGb;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;;AAEA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,cAAc,oBAAoB;AAClC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iCAAiC,OAAO;AACxC;;AAEA;AACA,qBAAqB,EAAE;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,0BAA0B;AAC1B;;;AAGA;;;;;;;;;;;;;AChGa;;;AAGb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACxBa;;;AAGb,6FAA2C;AAC3C,6FAA2C;AAC3C,6FAA2C;AAC3C,0FAA0C;;;;;;;;;;;;ACN1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;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;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,2CAA2C,KAAK;AAChD,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA,qBAAqB;AACrB;AACA;AACA,2CAA2C,OAAO;AAClD;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;;;;;;;;;;;;;;;;;;;;;ACvTa;;AAEb;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;;AAEvB;AACA;AACA,oCAAoC;AACpC,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;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,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,KAAK;AACL,oCAAoC;AACpC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB,6CAA6C,qBAAqB;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;;AAEhD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEsE;AACtE,iEAAe,QAAQ,EAAC;;;;;;;;;;;AC3bxB,mC;;;;;;;;;;ACAA,sO;;;;;;;;;;ACAA,8BAA8B,WAAW,EAAE,w0D;;;;;;;;;;ACA3C,yE;;;;;;;;;;;ACAa;;AAEb,kHAA+C;AAC/C,+GAA8C;AAC9C,+GAA8C;AAC9C,4GAA6C;AAC7C,4GAA6C;;;;;;;;;;;ACN7C,iJ;;;;;;;;;;;;;ACAwC;;AAExC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACXwC;;AAExC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;ACrBwC;;AAExC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AChBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACpBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;ACdwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;;AAEA;;;AAGA,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACrBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;;;AAGA;AACA;AACA;AACA;AACA,KAAK;;;;;;;;;;;;;;ACjBmC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iFAAiF;AACjF;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;;;AAGA;AACA;AACA,+DAA+D,oBAAoB,qBAAqB,wBAAwB,YAAY;AAC5I;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACpDA;AACgE;;AAEhE;;AAEA;;AAEA;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;;AAEA,oDAAI;;;;;;;;;;;;;;AC9CoC;;;;;AAKxC,oDAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;AC7BwC;;;AAGxC,oDAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrBwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;ACpBwC;;AAExC,oDAAI;AACJ;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAI;AACJ;AACA;;AAEA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC/BwC;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBmC;AACY;AACN;AACM;AACU;AAClB;AACV;AACM;AACA;AACN;AACY;AACI;AACA;AAChB;AACY;AACd;AACI;;;;;;;;;;;;;;ACjBS;;;AAGxC,oDAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChBqD;AAC0B;AAGpF,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBZ,IAAM,kBAAN,cAA8B,6DAAe,CAAC;AAAA,EAE1C,cAAc;AACV,UAAM;AAEN,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB,MAAM,sEAAsB,CAAC;AAAA,MAC7B,KAAK,CAEL;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEM,oBAAmC;AAAA;AACrC,YAAM,0DAAQ,CAAC,CAAC;AAEhB,WAAK,MAAM,OAAO,sEAAsB,CAAC,KAAK,OAAO,OAAK,EAAE,aAAa,KAAK,aAAa,eAAe,CAAC;AAC3G,cAAQ,IAAI,qBAAqB,KAAK,MAAM,IAAI;AAChD,kDAAM,0BAAN,IAAwB;AAAA,IAC5B;AAAA;AAAA,EAEM,uBAAsC;AAAA;AACxC,cAAQ,IAAI,cAAc,IAAI;AAC9B,WAAK,MAAM,OAAO,CAAC;AACnB,kDAAM,6BAAN,IAA2B;AAAA,IAE/B;AAAA;AACJ;AA3BM,kBAAN;AAAA,EADC,0DAAQ,CAAC,GAAG;AAAA,EAAE,+DAAa,CAAC,kBAAkB;AAAA,GACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBwG;AAEjC;AACrB;AAKxD,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAUb,IAAM,aAAN,cAAyB,6DAAe,CAAC;AAAA,EAErC,cAAc;AACV,UAAM;AACN,SAAK,KAAK,IAAI,oEAAc,CAAC,CAAC;AAE9B,YAAQ,IAAI,sEAAsB,CAAC,OAAO;AAC1C,QAAI,QAAQ,KAAK,KAAK;AAAA,MAClB,MAAM,sEAAsB,CAAC;AAAA,MAC7B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,KAAK;AAAA,QACD,QAAQ,CAAC,MAAM;AACX,iBAAO,QAAQ,UAAU,CAAC,GAAG,IAAI,gBAAgB,MAAM,SAAS;AAAA,QACpE;AAAA,MACJ;AAAA,IACJ,CAAC;AAED,QAAI,OAAO;AACX,gBAAY,MAAY;AArChC;AAsCY,UAAI,SAAS,OAAO,SAAS,MAAM;AAC/B;AAAA,MACJ;AACA,cAAQ,IAAI,OAAO,SAAS,MAAM,IAAI;AACtC,aAAO,OAAO,SAAS;AACvB,UAAI,MAAM,IAAI,IAAI,OAAO,SAAS,IAAI;AACtC,UAAI,YAAY,IAAI,aAAa,IAAI,WAAW;AAChD,YAAM,YAAY;AAClB,UAAI,OAAO,SAAS,qBAAqB,cAAc,EAAE,CAAC;AAG1D,UAAI,aAAa,mBAAO,CAAC,wDAAa;AACtC,UAAI,kBAAkB,mBAAO,CAAC,oEAAmB;AAEjD,UAAI,KAAK,IAAI,WAAW;AAAA,QACpB,MAAM;AAAA;AAAA,MACV,CAAC;AAED,SAAG,IAAI,eAAe;AAEtB,UAAI,OAAO,sEAAsB,CAAC,eAAe,SAAS;AAC1D,UAAI,SAAS,MAAM;AACf,mBAAW,YAAY;AACvB,aAAK,YAAY,UAAU;AAC3B;AAAA,MACJ;AAEA,eAAS,KAAK,UAAU,IAAI,GAAG,KAAK,OAAO,WAAW;AAGtD,UAAI,WAAU,UAAK,YAAL,YAAgB;AAC9B,UAAI,KAAK,OAAO,eAAe;AAC3B,kBAAU,QAAQ,QAAQ,UAAU,IAAI;AACxC,kBAAU,GAAG,OAAO,OAAO;AAC3B,kBAAU,iBAAiB,UAAU;AAAA,MACzC;AAEA,UAAI,aAAa,SAAS,cAAc,cAAc;AACtD,iBAAW,YAAY;AAEvB,WAAK,YAAY,UAAU;AAAA,IAC/B,IAAG,GAAG;AAAA,EAEV;AACJ;AAhEM,aAAN;AAAA,EAFC,+DAAa,CAAC,kBAAkB;AAAA,EAChC,0DAAQ,CAAC,IAAI;AAAA,GACR;;;;;;;;;;;;;AClBN;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACA0D;AAE1D,IAAI,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmHV,sEAAsB,CAAC;AAAA,EAAS;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA,CAAC;AAAA,EAED;AAAA,IACI,aAAa,CAAC,QAAQ;AAAA,EAC1B;AACJ;;;;;;;UC9HA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;ACLkB;AACI;AACK;AAEA","sources":["webpack://@leuffen/themejs1/./elements/button-group/button-group.ts","webpack://@leuffen/themejs1/./elements/download-links/download-links.ts","webpack://@leuffen/themejs1/./elements/e-form/e-form.ts","webpack://@leuffen/themejs1/./elements/elements.ts","webpack://@leuffen/themejs1/./elements/hero-slide/hero-slide.ts","webpack://@leuffen/themejs1/./index.dev.ts","webpack://@leuffen/themejs1/./index.ts","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/custom-element.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/html.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/htmlFile.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/ce/loadHtml.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/apply.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/create-element.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/debounce.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/debouncer.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/dom-ready.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/elwalk.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/eval.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/ka-set-options.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/query-select.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/sleep.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/storage.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/core/str-to-camelcase.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomElement.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomFragment.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomModal.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaCustomWrapper.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaHtmlElement.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/KaModal.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/element/ka-use.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/functions.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/tpl/template.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/tpl/templatify.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/embed/dist/types.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/base/tab-pane.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/form/form-input.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/form/quick-input.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/functions.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/modals/flex-modal.js","webpack://@leuffen/themejs1/./node_modules/@kasimirjs/kit-bootstrap/dist/sidebar/sidebar-wrapper.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/accordion/accordion.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/hamburger/hamburger.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/input/input.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/map/map.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/navbar-switch1/navbar-switch1.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/elements/screen/screen.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/isl-base/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/component/joda-content-element.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/component/joda-fetch.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/component/joda-split.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/JodaDescriptionManager.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/JodaElementException.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/JodaErrorElement.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/JodaRenderer.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/JodaSiteConfig.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/QTemplate.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/functions.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/ka-quick-template.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/helper/logger.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/index.module.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/joda.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/LayoutProcessor.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodaresponsive.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodashorts.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodasplit.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodastyle-commands.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodastyle.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/processor/jodavisualize.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/jodastyle/dist/types/DefaultLayout.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/details-title/details-title.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/scroll-to-top/scroll-to-top.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/scrollspy/scrollspy.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/slider/liscom-slider.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/slideshow/slideshow.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liscom/dist/typewriter-element/typewriter-element.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/business/office-hours.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/components/liweco-collapse-openhour-table.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/components/liweco-news.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/components/liweco-vacation-modal.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/helper/functions.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/index.js","webpack://@leuffen/themejs1/./node_modules/@leuffen/liweco-base/dist/types/leu-openhours.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/css-tag.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/base.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/custom-element.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/event-options.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/property.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/query-all.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/query-async.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/query.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/decorators/state.js","webpack://@leuffen/themejs1/./node_modules/@lit/reactive-element/development/reactive-element.js","webpack://@leuffen/themejs1/./node_modules/@micx/lib-js/index.js","webpack://@leuffen/themejs1/./node_modules/@nextrap/nt-framework/index.js","webpack://@leuffen/themejs1/./node_modules/@nextrap/nte-burger/index.js","webpack://@leuffen/themejs1/./node_modules/@nextrap/nte-nav/index.js","webpack://@leuffen/themejs1/./node_modules/@nextrap/nte-offcanvas/index.js","webpack://@leuffen/themejs1/./node_modules/@trunkjs/browser-utils/index.js","webpack://@leuffen/themejs1/./node_modules/@trunkjs/responsive/index.js","webpack://@leuffen/themejs1/./node_modules/linkify-it/index.js","webpack://@leuffen/themejs1/./node_modules/linkify-it/lib/re.js","webpack://@leuffen/themejs1/./node_modules/lit-element/development/lit-element.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/async-directive.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/directive-helpers.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/directive.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/directives/class-map.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/directives/ref.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/directives/style-map.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/is-server.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/lit-html.js","webpack://@leuffen/themejs1/./node_modules/lit-html/development/static.js","webpack://@leuffen/themejs1/./node_modules/lit/decorators.js","webpack://@leuffen/themejs1/./node_modules/lit/directives/class-map.js","webpack://@leuffen/themejs1/./node_modules/lit/directives/ref.js","webpack://@leuffen/themejs1/./node_modules/lit/directives/style-map.js","webpack://@leuffen/themejs1/./node_modules/lit/index.js","webpack://@leuffen/themejs1/./node_modules/lit/static-html.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/patterns.js","webpack://@leuffen/themejs1/./node_modules/markdown-it-attrs/utils.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/entities.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/html_blocks.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/html_re.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/common/utils.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_destination.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_label.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/helpers/parse_link_title.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/index.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_core.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/parser_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/commonmark.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/default.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/presets/zero.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/renderer.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/ruler.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/blockquote.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/code.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/fence.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/heading.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/hr.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/html_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/lheading.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/list.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/paragraph.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/reference.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/state_block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_block/table.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/block.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/linkify.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/normalize.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/replacements.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/smartquotes.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/state_core.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_core/text_join.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/autolink.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/backticks.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/balance_pairs.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/emphasis.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/entity.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/escape.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/fragments_join.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/html_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/image.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/link.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/linkify.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/newline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/state_inline.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/strikethrough.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/rules_inline/text.js","webpack://@leuffen/themejs1/./node_modules/markdown-it/lib/token.js","webpack://@leuffen/themejs1/./node_modules/mdurl/decode.js","webpack://@leuffen/themejs1/./node_modules/mdurl/encode.js","webpack://@leuffen/themejs1/./node_modules/mdurl/format.js","webpack://@leuffen/themejs1/./node_modules/mdurl/index.js","webpack://@leuffen/themejs1/./node_modules/mdurl/parse.js","webpack://@leuffen/themejs1/./node_modules/punycode/punycode.es6.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Cc/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Cf/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/P/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/categories/Z/regex.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/index.js","webpack://@leuffen/themejs1/./node_modules/uc.micro/properties/Any/regex.js","webpack://@leuffen/themejs1/./sections/cta-base/cta-base.ts","webpack://@leuffen/themejs1/./sections/cta-form/cta-form.ts","webpack://@leuffen/themejs1/./sections/footer-base/footer-base.ts","webpack://@leuffen/themejs1/./sections/hero-ribbon/hero-ribbon.ts","webpack://@leuffen/themejs1/./sections/hero-title-small/hero-title-small.ts","webpack://@leuffen/themejs1/./sections/image-gallery1/image-gallery1.ts","webpack://@leuffen/themejs1/./sections/infobox/infobox.ts","webpack://@leuffen/themejs1/./sections/navbar-blox/navbar-blox.ts","webpack://@leuffen/themejs1/./sections/navbar-switch2/navbar-switch2.ts","webpack://@leuffen/themejs1/./sections/sec-card-2col/sec-card-2col.ts","webpack://@leuffen/themejs1/./sections/sec-card-feature/sec-card-feature.ts","webpack://@leuffen/themejs1/./sections/sec-legal-content/sec-legal-content.ts","webpack://@leuffen/themejs1/./sections/sec-multi-card/sec-multi-card.ts","webpack://@leuffen/themejs1/./sections/sec-testimonial-ribbon/sec-testimonial-ribbon.ts","webpack://@leuffen/themejs1/./sections/sections.ts","webpack://@leuffen/themejs1/./sections/subheader/subheader.ts","webpack://@leuffen/themejs1/./src.dev/ShowcaseElement.ts","webpack://@leuffen/themejs1/./src.dev/SwitcherElement.ts","webpack://@leuffen/themejs1/./src.dev/dev.scss?7794","webpack://@leuffen/themejs1/./theme1.scss?9331","webpack://@leuffen/themejs1/./themes/theme1/theme1.dev.ts","webpack://@leuffen/themejs1/webpack/bootstrap","webpack://@leuffen/themejs1/webpack/runtime/compat get default export","webpack://@leuffen/themejs1/webpack/runtime/define property getters","webpack://@leuffen/themejs1/webpack/runtime/hasOwnProperty shorthand","webpack://@leuffen/themejs1/webpack/runtime/make namespace object","webpack://@leuffen/themejs1/./src.dev/index-dev.ts"],"sourcesContent":["import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"button-group\",\n // language=HTML\n `\n <div class=\"tjs-button-group\">\n <slot></slot>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"download-links\",\n // language=HTML\n `\n <div class=\"tjs__download-links [[layout.class]]\">\n <slot data-select=\"a\"></slot>\n <slot></slot>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"e-form\",\n // language=HTML\n `\n <form class=\"tjs__e-form\" data-micx-formmail-preset=\"default\" data-micx-formmail-sent-message=\"Übertragung erfolgreich!\">\n <slot></slot>\n </form>\n `);\n","export * from \"./e-form/e-form\";\nexport * from \"./hero-slide/hero-slide\";\nexport * from \"./button-group/button-group\";\nexport * from \"./download-links/download-links\";\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"hero-slide\",\n // language=HTML\n `\n\n <article class=\"hero-slide :: mobile :lg: desktop\">\n <slot></slot>\n </article>\n\n `,\n {\n cols: 6\n },\n {\n onAfterConnectedCallback: (el) => {\n\n }\n }\n\n);\n","\nimport \"./theme1.scss\"\nimport \"./src.dev/dev.scss\"\n\nimport \"./themes/theme1/theme1.dev\"\nimport \"@micx/lib-js\";\n","import {liscom_enable} from \"@leuffen/liscom\";\n\nexport * from \"./sections/sections\";\nexport * from \"./elements/elements\";\nexport * from \"@leuffen/isl-base\";\nimport \"@leuffen/jodastyle\";\nimport \"@leuffen/liweco-base\"\nimport \"@leuffen/liscom\";\n\nimport \"@nextrap/nte-nav\";\nimport \"@trunkjs/responsive\";\n\nliscom_enable();\n\n\n\n","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};\nimport { ka_templatify } from \"../tpl/templatify.js\";\nimport { KaTemplate } from \"../tpl/template.js\";\nimport { ka_query_selector } from \"../core/query-select\";\nimport { RemoteTemplate } from \"./htmlFile\";\nexport class KaCustomElement extends HTMLElement {\n constructor(props) {\n super(props);\n /**\n *\n * @protected\n * @var {KaTemplate}\n */\n this.__tpl = null;\n this.__isConnected = false;\n }\n /**\n * The Template associated with this Element\n *\n * @return {KaTemplate}\n */\n get $tpl() {\n return this.__tpl;\n }\n isConnected() {\n return this.isConnected;\n }\n /**\n * @abstract\n * @return {Promise<void>}\n */\n connected($tpl, $this) {\n return __awaiter(this, void 0, void 0, function* () {\n console.warn(\"connected() method not overridden in\", this);\n });\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let callback = this.constructor.__callback;\n if (callback === null) {\n }\n else {\n callback.bind(this);\n }\n if (this.constructor.__tpl !== null) {\n let origTpl = this.constructor.__tpl;\n if (origTpl instanceof RemoteTemplate)\n origTpl = yield origTpl.load();\n let tpl = ka_templatify(origTpl);\n if (this.constructor.__options.shadowDom === true) {\n let shadowDom = this.attachShadow(this.constructor.__options.shadowDomOptions);\n shadowDom.appendChild(tpl);\n }\n else {\n this.appendChild(tpl);\n }\n this.__tpl = new KaTemplate(tpl);\n }\n if (this.constructor.__options.waitEvent !== null) {\n let wd = this.constructor.__options.waitEvent.split(\"@\");\n let eventName = wd[0];\n let target = document;\n if (wd.length === 2) {\n target = ka_query_selector(wd[1]);\n }\n target.addEventListener(eventName, (event) => __awaiter(this, void 0, void 0, function* () {\n callback(this.$tpl, this);\n this.__isConnected = true;\n }));\n return;\n }\n if (callback === null) {\n // Class: Call connected() Method\n yield this.connected(this.$tpl, this);\n this.__isConnected = true;\n return;\n }\n // Function\n callback(this.$tpl, this);\n this.__isConnected = true;\n });\n }\n}\n;\n","function replaceLineBreaksAndTrimHtmlTags(html) {\n // This regular expression matches HTML tags and captures their content\n const regex = /<[^>]+>/g;\n // This function will be used in the replace method to process each match\n function cleanTag(match) {\n // Replace all sequences of whitespace with a single space and trim trailing space before '>'\n return match.replace(/\\s+/g, ' ').replace(/\\s+>$/, '>');\n }\n // Replace line breaks within each tag and trim trailing spaces before '>'\n return html.replace(regex, cleanTag);\n}\nfunction returnFirstOriginalLineThatIsDifferent(original, generated) {\n let originalLines = original.trim().split(\"\\n\");\n let generatedLines = generated.trim().split(\"\\n\");\n // trim all lines\n originalLines = originalLines.map((line) => line.trim());\n generatedLines = generatedLines.map((line) => line.trim());\n // Remove linebreaks whithin html attributes\n for (let i = 0; i < originalLines.length; i++) {\n if (originalLines[i] !== generatedLines[i]) {\n return \"Line `\" + (i + 1) + \": \" + originalLines[i].trim() + \"`\";\n }\n }\n return null;\n}\nexport function ka_html(htmlContent) {\n if (htmlContent instanceof HTMLTemplateElement) {\n return htmlContent;\n }\n let e = document.createElement(\"template\");\n e.innerHTML = htmlContent;\n htmlContent = replaceLineBreaksAndTrimHtmlTags(htmlContent);\n if (e.innerHTML.split(\"\\n\").length !== htmlContent.split(\"\\n\").length)\n console.error(\"ka_html(): HTML Parsing Error (possibly due to invalid HTML in template) in \" + returnFirstOriginalLineThatIsDifferent(htmlContent, e.innerHTML), htmlContent, e.innerHTML);\n return e;\n}\n","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};\nimport { ka_load_html } from \"./loadHtml\";\nexport class RemoteTemplate {\n constructor(url) {\n this.url = url;\n this.tpl = null;\n }\n /**\n *\n * @return {Promise<HTMLTemplateElement>}\n */\n load() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.tpl === null)\n this.tpl = yield ka_load_html(this.url);\n return this.tpl;\n });\n }\n}\n/**\n * Load the Template on usage from remote location\n *\n *\n * @param url {string}\n * @return {RemoteTemplate}\n */\nfunction htmlUrl(url) {\n return new RemoteTemplate(url);\n}\n","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};\n/**\n *\n * @param url {string}\n * @return {Promise<HTMLTemplateElement>}\n */\nexport function ka_load_html(url) {\n return __awaiter(this, void 0, void 0, function* () {\n let e = document.createElement(\"template\");\n let result = yield fetch(url);\n if (!result.ok) {\n console.error(`[loadHtml] failed to load '${url}'`);\n throw `[loadHtml] failed to load '${url}'`;\n }\n let body = yield result.text();\n e.innerHTML = body;\n return e;\n });\n}\n","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};\nimport { ka_eval } from \"./eval.js\";\nimport { ka_str_to_camel_case } from \"./str-to-camelcase.js\";\nimport { isset, isUndefined } from \"../functions\";\nimport { KaCustomFragment } from \"../element/KaCustomFragment\";\nimport { KaUse } from \"../element/ka-use\";\nexport function ka_apply(selector, scope, recursive = false) {\n var _a;\n if (typeof selector === \"string\")\n selector = KaToolsV1.querySelector(selector);\n let attMap = {\n \"textcontent\": \"textContent\",\n \"htmlcontent\": \"innerHTML\",\n \"innerhtml\": \"innerHTML\",\n };\n for (let attName of selector.getAttributeNames()) {\n //console.log(attName);\n if (!attName.startsWith(\"ka.\")) {\n continue;\n }\n let attVal = selector.getAttribute(attName);\n let attType = attName.split(\".\")[1];\n let attSelector = attName.split(\".\")[2];\n if (typeof attSelector === \"undefined\")\n attSelector = null;\n let registerEventHandler = function (element, action, callbackOrCode, scope) {\n if (typeof element._ka_on === \"undefined\")\n element._ka_on = {};\n if (typeof element._ka_on[action] === \"undefined\")\n element.addEventListener(action, (e) => element._ka_on[action](e));\n element._ka_on[action] = (e) => __awaiter(this, void 0, void 0, function* () {\n scope[\"$event\"] = e;\n if (typeof callbackOrCode === \"function\") {\n return callbackOrCode(e, element, scope);\n }\n else {\n return ka_eval(callbackOrCode, scope, element);\n }\n });\n };\n if (attType === \"on\") {\n let attScope = Object.assign({ $scope: scope }, scope);\n if (attSelector !== null) {\n registerEventHandler(selector, attSelector, attVal, attScope);\n }\n else {\n let callBackMap = KaToolsV1.eval(attVal, attScope, selector);\n for (let curAction in callBackMap) {\n registerEventHandler(selector, curAction, callBackMap[curAction], attScope);\n }\n }\n continue;\n }\n let r = null;\n if (typeof attVal !== \"undefined\" && typeof attVal !== null && attVal !== \"\")\n r = ka_eval(attVal, scope, selector);\n switch (attType) {\n case \"use\":\n if (!(selector instanceof KaUse)) {\n let elem = new KaUse();\n // Copy all attributes from selector to elem\n for (let attName of selector.getAttributeNames()) {\n elem.setAttribute(attName, selector.getAttribute(attName));\n }\n selector.replaceWith(elem);\n selector = elem;\n }\n selector.use(r, scope);\n continue;\n case \"become\":\n // ka.become=\"variable\" => Replace the current element with the value of the variable (must be HTMLElement)\n // e.g. to connect a Component defined in a variable to the DOM\n if (!(r instanceof HTMLElement)) {\n console.error(\"ka.become is only available on HTMLElements: Used on \", r, \"found in \", selector);\n throw \"ka.become called on non HTMLElement.\";\n }\n let attributes = selector.attributes;\n selector.replaceWith(r);\n continue;\n case \"content\":\n // ka.content=\"variable\" => Add the element to the current element\n selector.setAttribute(\"ka.stop\", \"\");\n if (typeof r === \"string\") {\n selector.innerHTML = r;\n continue;\n }\n if (r === null || r === false) {\n selector.innerHTML = \"\";\n continue;\n }\n if (!(r instanceof HTMLElement)) {\n console.error(\"ka.content is only available on HTMLElements: Used on \", r, \"found in \", selector);\n throw \"ka.content called on non HTMLElement.\";\n }\n if (selector.firstElementChild === r)\n continue;\n selector.innerHTML = \"\";\n selector.append(r);\n continue;\n case \"scope\":\n if (!(r instanceof Object)) {\n console.error(\"ka.scope must be object type <ka-use/> Elements: Value is \", r, \"found in \", selector);\n throw \"ka.scope insuffient value\";\n }\n selector.setScope(r);\n continue;\n case \"stop\":\n continue;\n case \"debug\":\n console.log(\"ka.debug on element\", selector, \"value:\", r, \"scope:\", scope);\n continue;\n case \"ref\":\n if (isUndefined(scope.$ref))\n scope.$ref = {};\n // Allow ref without parameter to use $ref.$last\n if (r !== null)\n scope.$ref[r] = selector;\n scope.$ref.$last = selector;\n break;\n case \"classlist\":\n if (attSelector !== null) {\n if (r === true) {\n selector.classList.add(attSelector);\n }\n else {\n selector.classList.remove(attSelector);\n }\n break;\n }\n if (typeof r === \"string\") {\n // Split and add all classes\n r = r.split(\" \").filter((e) => e.trim() !== \"\");\n }\n if (Array.isArray(r)) {\n for (let cname of r) {\n if (cname.trim() === \"\")\n continue;\n selector.classList.add(cname);\n }\n break;\n }\n for (let cname in r) {\n if (r[cname] === true) {\n selector.classList.add(cname);\n }\n else {\n selector.classList.remove(cname);\n }\n }\n break;\n case \"style\":\n if (attSelector !== null && attSelector.startsWith(\"--\")) {\n selector.style.setProperty(attSelector, r);\n break;\n }\n if (attSelector !== null) {\n let val = r;\n if (typeof val === \"number\" && [\"left\", \"top\", \"height\", \"width\", \"bottom\", \"right\", \"line-height\", \"font-size\"].indexOf(attSelector) !== -1)\n val = val + \"px\";\n selector.style[ka_str_to_camel_case(attSelector)] = val;\n break;\n }\n for (let cname in r) {\n let val = r[cname];\n if (typeof val === \"number\" && [\"left\", \"top\", \"height\", \"width\", \"bottom\", \"right\", \"line-height\", \"font-size\"].indexOf(cname) !== -1)\n val = val + \"px\";\n selector.style[ka_str_to_camel_case(cname)] = val;\n }\n break;\n case \"bindarray\":\n if (attSelector === \"default\")\n continue;\n if (isUndefined(r)) {\n // Bind default values\n if (selector.hasAttribute(\"ka.bind.default\")) {\n scope = Object.assign({ $scope: scope }, scope);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: ka_eval(selector.getAttribute(\"ka.bind.default\"), scope, selector) });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n }\n if (!Array.isArray(r)) {\n console.error(\"kap:bindarr: Not an array!\", r, selector);\n return;\n }\n if (r.indexOf(selector.value) === -1)\n selector.checked = false;\n else\n selector.checked = true;\n if (typeof selector._kap_bind === \"undefined\") {\n selector.addEventListener(\"change\", (event) => {\n let arr = ka_eval(attVal, scope, selector);\n if (arr.indexOf(selector.value) === -1 && selector.checked)\n arr.push(selector.value);\n if (arr.indexOf(selector.value) !== -1 && !selector.checked)\n arr = arr.filter((e) => e !== selector.value);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: arr });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector._kap_bind = true;\n }\n break;\n case \"bind\":\n if (attSelector === \"default\")\n continue;\n if (isUndefined(r)) {\n // Bind default values\n if (isset(selector.value)) {\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: selector.value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n if (selector.hasAttribute(\"ka.bind.default\")) {\n scope = Object.assign({ $scope: scope }, scope);\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: ka_eval(selector.getAttribute(\"ka.bind.default\"), scope, selector) });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n r = scope.__curVal;\n }\n }\n if (selector.type === \"checkbox\" || selector.type === \"radio\") {\n if (selector.hasAttribute(\"value\")) {\n if (r === selector.getAttribute(\"value\"))\n selector.checked = true;\n else\n selector.checked = false;\n }\n else {\n if (r === true)\n selector.checked = true;\n else\n selector.checked = false;\n }\n }\n else {\n selector.value = typeof r !== \"undefined\" ? r : \"\";\n }\n if (typeof selector._kap_bind === \"undefined\") {\n selector.addEventListener(\"change\", (event) => {\n let value = null;\n if (selector.type === \"checkbox\" || selector.type === \"radio\") {\n if (selector.hasAttribute(\"value\")) {\n if (selector.checked === false)\n return;\n value = selector.getAttribute(\"value\");\n }\n else {\n value = selector.checked;\n }\n }\n else {\n value = selector.value;\n }\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector.addEventListener(\"keyup\", (event) => {\n scope = Object.assign(Object.assign({ $scope: scope }, scope), { __curVal: selector.value });\n ka_eval(`${attVal} = __curVal`, scope, selector);\n if (scope.$on && scope.$on.change)\n scope.$on.change(event);\n });\n selector._kap_bind = true;\n }\n break;\n case \"options\":\n let value = selector.value;\n selector.innerHTML = \"\";\n for (let option in r) {\n if (!Array.isArray(r)) {\n // Object key => value value => text\n selector.appendChild(new Option(r[option], option));\n }\n else {\n // Array\n if (((_a = r[option]) === null || _a === void 0 ? void 0 : _a.text) !== undefined) {\n selector.appendChild(new Option(r[option].text, r[option].value));\n }\n else {\n // Array value and text will be array value\n selector.appendChild(new Option(r[option], r[option]));\n }\n }\n }\n if (value !== null)\n selector.value = value;\n break;\n case \"attr\":\n if (attSelector !== null) {\n if (r === null || r === false) {\n selector.removeAttribute(attSelector);\n }\n else {\n selector.setAttribute(attSelector, r);\n }\n break;\n }\n for (let cname in r) {\n if (r[cname] === null || r[cname] === false) {\n selector.removeAttribute(cname);\n }\n else {\n selector.setAttribute(cname, r[cname]);\n }\n }\n break;\n case \"prop\":\n if (attSelector !== null) {\n // Set Property directly\n selector[ka_str_to_camel_case(attSelector)] = r;\n break;\n }\n for (let cname in r) {\n selector[ka_str_to_camel_case(cname)] = r[cname];\n }\n break;\n default:\n if (typeof attMap[attType] !== \"undefined\")\n attType = attMap[attType];\n if (typeof selector[attType] === \"undefined\") {\n console.warn(\"apply(): trying to set undefined property \", attType, \"on element\", selector);\n }\n selector[attType] = r;\n break;\n }\n }\n if (recursive) {\n for (let e of selector.children) {\n ka_apply(e, scope, recursive);\n }\n }\n}\n","/**\n * Create a new Element\n *\n * @param tagName {string} The Tag Name\n * @param attributes {string<string>} Attributes to set initially\n * @param appendToElement {HTMLElement}\n * @param children {HTMLElement[]}\n * @return HTMLElement\n */\nexport function ka_create_element(tagName, attributes = null, children = null, appendToElement = null) {\n let e = document.createElement(tagName);\n if (attributes === null)\n attributes = {};\n for (let attName in attributes) {\n e.setAttribute(attName, attributes[attName]);\n }\n if (children instanceof NodeList) {\n children = Array.from(children);\n }\n if (Array.isArray(children)) {\n for (let ce of children) {\n e.appendChild(ce);\n }\n }\n if (typeof children === \"string\") {\n e.innerText = children;\n }\n if (appendToElement !== null) {\n appendToElement.appendChild(e);\n }\n return e;\n}\n","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};\nconst _debounceInterval = { i: null, time: null };\n/**\n * Debounce a event\n *\n *\n *\n * @param min Minimum Time to wait\n * @param max Trigger event automatically after this time\n * @return {Promise<unknown>}\n */\nexport function ka_debounce(min, max = null) {\n return __awaiter(this, void 0, void 0, function* () {\n if (max === null)\n max = min;\n let dbi = _debounceInterval;\n return new Promise((resolve) => {\n if (dbi.time < (+new Date()) - max && dbi.i !== null) {\n return resolve();\n }\n if (dbi.i !== null) {\n return;\n }\n dbi.time = (+new Date());\n dbi.i = window.setTimeout(() => {\n dbi.i = null;\n return resolve();\n }, min);\n });\n });\n}\n","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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _Debouncer_resolve, _Debouncer_interval, _Debouncer_time;\nexport class Debouncer {\n constructor(min = 100, max = null) {\n this.min = min;\n this.max = max;\n _Debouncer_resolve.set(this, []);\n _Debouncer_interval.set(this, null);\n _Debouncer_time.set(this, null);\n }\n debounce(min = this.min, max = this.max) {\n return __awaiter(this, void 0, void 0, function* () {\n if (max === null)\n max = min;\n if (__classPrivateFieldGet(this, _Debouncer_interval, \"f\") !== null) {\n window.clearInterval(__classPrivateFieldGet(this, _Debouncer_interval, \"f\"));\n }\n __classPrivateFieldSet(this, _Debouncer_interval, window.setInterval(() => {\n __classPrivateFieldGet(this, _Debouncer_resolve, \"f\").forEach(r => r());\n __classPrivateFieldSet(this, _Debouncer_resolve, [], \"f\");\n window.clearInterval(__classPrivateFieldGet(this, _Debouncer_interval, \"f\"));\n }, min), \"f\");\n return new Promise((resolve) => {\n __classPrivateFieldGet(this, _Debouncer_resolve, \"f\").push(resolve);\n });\n });\n }\n}\n_Debouncer_resolve = new WeakMap(), _Debouncer_interval = new WeakMap(), _Debouncer_time = new WeakMap();\n","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};\n/**\n * Wait for DomContentLoaded or resolve immediate\n *\n * <example>\n * await MicxToolsVx.domReady();\n * </example>\n *\n * @return {Promise<string>}\n */\nexport function ka_dom_ready() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n if (document.readyState === \"complete\" || document.readyState === \"interactive\")\n return resolve(\"loaded\");\n document.addEventListener(\"DOMContentLoaded\", () => resolve('DOMContentLoaded'));\n });\n });\n}\n","/**\n *\n * @param {HTMLElement} elem\n * @param fn\n * @param recursive\n */\nexport function ka_elwalk(elem, fn, recursive = false, includeFirst = false) {\n if (Array.isArray(elem))\n elem.children = elem;\n if (typeof elem.children === \"undefined\")\n return;\n if (includeFirst && elem instanceof HTMLElement) {\n let ret = fn(elem);\n if (ret === false)\n return false;\n }\n for (let child of elem.children) {\n let ret = fn(child);\n if (ret === false)\n continue; // No recursiion\n if (recursive && typeof child.children !== \"undefined\")\n ka_elwalk(child, fn, recursive);\n }\n}\n","export function ka_eval(stmt, __scope, e, __refs) {\n if (stmt.endsWith(\";\"))\n stmt = stmt.slice(0, -1);\n const reserved = [\"var\", \"null\", \"let\", \"const\", \"function\", \"class\", \"in\", \"of\", \"for\", \"true\", \"false\", \"await\", \"$this\"];\n let r = \"var $this = e;\";\n for (let __name in __scope) {\n if (reserved.indexOf(__name) !== -1)\n continue;\n if (__name.indexOf(\"-\") !== -1) {\n console.error(`Invalid scope key '${__name}': Cannot contain - in scope:`, __scope);\n throw `eval() failed: Invalid scope key: '${__name}': Cannot contain minus char '-'`;\n }\n r += `var ${__name} = __scope['${__name}'];`;\n }\n // If the scope was cloned, the original will be in $scope. This is important when\n // Using events [on.click], e.g.\n if (typeof __scope.$scope === \"undefined\") {\n r += \"var $scope = __scope;\";\n }\n try {\n // console.log(r + '(' + stmt + ')');\n const func = new Function('e', '__scope', r + '; return ' + stmt);\n return func(e, __scope);\n }\n catch (ex) {\n console.error(\"cannot eval() stmt: '\" + stmt + \"': \" + ex, \" on element \", e, ex, \"(context:\", __scope, \")\");\n throw \"eval('\" + stmt + \"') failed: \" + ex;\n }\n}\n","export function ka_set_options(element, options, value = null) {\n element.innerHTML = \"\";\n for (let option in options) {\n if (isNaN(option)) {\n element.appendChild(new Option(options[option], option));\n }\n else {\n if (typeof options[option].text !== \"undefined\") {\n element.appendChild(new Option(options[option].text, options[option].value));\n }\n else {\n element.appendChild(new Option(options[option], options[option]));\n }\n }\n }\n if (value !== null)\n element.value = value;\n}\n","/**\n * Query a Element or trigger an Exception\n *\n * @param query\n * @param parent\n * @param exception\n * @return {HTMLElement}\n */\nexport function ka_query_selector(query, parent = null, exception = null) {\n if (typeof exception === \"undefined\" || exception === null)\n exception = `querySelector '${query}' not found`;\n if (typeof parent === \"undefined\" || parent === null)\n parent = document;\n let e = parent.querySelectorAll(query);\n if (e.length === 0) {\n console.warn(exception, \"on parent: \", parent);\n throw exception;\n }\n return e[0];\n}\n","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};\nexport function ka_sleep(sleepms) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n window.setTimeout(() => {\n return resolve();\n }, sleepms);\n });\n });\n}\n","/**\n * Return a Proxy handling saving / deleting / updating the object in the localStorage\n * @param object\n * @param scopeName\n */\nexport function ka_session_storage(object = {}, scopeName = null) {\n if (scopeName == null) {\n scopeName = \"ka_session_storage\";\n }\n if (object === null) {\n sessionStorage.removeItem(scopeName);\n return;\n }\n if (sessionStorage.getItem(scopeName) == null) {\n sessionStorage.setItem(scopeName, JSON.stringify(object));\n }\n let savedObject = JSON.parse(sessionStorage.getItem(scopeName));\n for (let key in object) {\n if (typeof savedObject[key] === \"undefined\") {\n savedObject[key] = object[key];\n }\n }\n let proxy = new Proxy(savedObject, {\n set: function (target, property, value, receiver) {\n target[property] = value;\n sessionStorage.setItem(scopeName, JSON.stringify(target));\n return true;\n }\n });\n return proxy;\n}\n","/**\n * Transform any input to CamelCase\n *\n * Example: some-class => someClass\n *\n * @param str {string}\n * @return {string}\n */\nexport function ka_str_to_camel_case(str) {\n return str.replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (ltr, idx) => idx === 0 ? ltr.toLowerCase() : ltr.toUpperCase()).replace(/[^a-zA-Z0-9]+/g, '');\n}\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_create_element } from \"../core/create-element\";\nexport class KaCustomElement extends HTMLElement {\n constructor() {\n super(...arguments);\n this.__ka_stop_render = true; // Stop rendering if this element is reached\n this.shadowRootConfig = {}; // Activate shadowRoot\n this.html = \"Undefined Template\";\n this.scope = createScopeObject();\n this.tplPrototype = null;\n this.wrapper = null;\n this.tpl = null;\n }\n init(scope, autorender = true) {\n this.scope.init(scope);\n return this.scope;\n }\n wrap(fragment) {\n this.wrapper = fragment;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n // @ts-nocheck\n connectedCallback() {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized())\n this.init({});\n // Check template set by customElement annotation\n // Cannot be done in constructor because of async behavior\n if (isset(this.constructor[\"html\"])) {\n this.html = this.constructor[\"html\"];\n }\n if (isset(this.constructor[\"shadowRootConfig\"])) {\n this.shadowRootConfig = this.constructor[\"shadowRootConfig\"];\n }\n if (this.tplPrototype === null) {\n this.tplPrototype = ka_templatify(ka_html(this.html));\n }\n if (this.tpl !== null) {\n // Already rendered (reconnected element)\n return;\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n // Adding Shadow Root\n let domRoot = this;\n if (this.shadowRootConfig.mode !== null && this.shadowRootConfig.mode !== undefined) {\n domRoot = this.attachShadow({ mode: this.shadowRootConfig.mode });\n (_a = this.shadowRootConfig.stylesheets) === null || _a === void 0 ? void 0 : _a.forEach((stylesheet) => {\n ka_create_element(\"link\", { rel: \"stylesheet\", href: stylesheet }, null, domRoot);\n });\n }\n if (this.wrapper !== null) {\n yield this.wrapper.fragmentConnectedCallback();\n domRoot.append(this.wrapper.wrapTemplate(this.tpl));\n this.wrapper.wrapFinish();\n }\n else {\n domRoot.append(this.tpl);\n }\n this.scope.render();\n });\n }\n disconnectedCallback() {\n if (this.scope.$tpl !== undefined)\n this.scope.$tpl.dispose();\n }\n}\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_sleep } from \"../core/sleep\";\nexport class KaCustomFragment {\n constructor() {\n this.scope = createScopeObject();\n this.html = null;\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]) && this.html === null)\n this.html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.html));\n this.scope.init(scope);\n return this.scope;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n setScope(scope) {\n this.scope.importFrom(scope);\n }\n fragmentConnectedCallback(parentElement) {\n return __awaiter(this, void 0, void 0, function* () {\n parentElement.setAttribute(\"ka.stop\", \"true\");\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n parentElement.append(this.tpl);\n yield ka_sleep(1);\n this.scope.render();\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n","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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _KaCustomModal_main, _KaCustomModal_configDefaults, _KaCustomModal_promise;\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { ka_create_element } from \"../core/create-element\";\nimport { KaTemplate } from \"../tpl/template\";\nexport class KaCustomModal {\n adjustWidth(modalConfig) {\n let w = window.innerWidth;\n if (w > modalConfig.maxWidth)\n w = modalConfig.maxWidth;\n __classPrivateFieldGet(this, _KaCustomModal_main, \"f\").style.width = w + \"px\";\n }\n constructor(tagName = \"ka-modal\", shadowRootInit = null, modalConfig = {}) {\n this.scope = createScopeObject();\n this.__html = \"<div>No Template defined</div>\";\n _KaCustomModal_main.set(this, void 0);\n _KaCustomModal_configDefaults.set(this, {\n parentElement: document.body,\n zIndex: 9999,\n styleBase: \"position:fixed; top:0; bottom:0; left:0; right:0;\",\n styleBackdrop: \"background-color: #999;opacity:0.5;\",\n maxWidth: 800,\n });\n _KaCustomModal_promise.set(this, {\n promise: null,\n reject: null,\n resolve: null,\n });\n let config = __classPrivateFieldGet(this, _KaCustomModal_configDefaults, \"f\");\n config = Object.assign(Object.assign({}, config), modalConfig);\n this.element = ka_create_element(tagName, { hidden: \"hidden\" }, null, config.parentElement);\n this.backdrop = ka_create_element(\"div\", { style: `${config.styleBase};${config.styleBackdrop};z-index:${config.zIndex};` }, null, this.element);\n let master = ka_create_element(\"div\", { style: `position:fixed;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;z-index:${config.zIndex + 1};` }, null, this.element);\n __classPrivateFieldSet(this, _KaCustomModal_main, ka_create_element(\"div\", { style: `;max-height:100%;max-width:100%;` }, null, master), \"f\");\n this.adjustWidth(config);\n __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").promise = new Promise((resolve, reject) => { __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").resolve = resolve; __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").reject = reject; });\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]))\n this.__html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.__html));\n this.scope.init(scope);\n return this.scope;\n }\n setParentScope(scope) {\n this.scope.$parent = scope;\n }\n setScope(scope) {\n this.scope.importFrom(scope);\n }\n resolve(value) {\n this.element.remove();\n __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").resolve(value);\n }\n show(...params) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n __classPrivateFieldGet(this, _KaCustomModal_main, \"f\").append(this.tpl);\n this.element.removeAttribute(\"hidden\");\n this.scope.render();\n return __classPrivateFieldGet(this, _KaCustomModal_promise, \"f\").promise;\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n_KaCustomModal_main = new WeakMap(), _KaCustomModal_configDefaults = new WeakMap(), _KaCustomModal_promise = new WeakMap();\n","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};\nimport { createScopeObject } from \"../types\";\nimport { isset } from \"../functions\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { KaTemplate } from \"../tpl/template\";\nexport class KaCustomWrapper {\n constructor() {\n this.scope = createScopeObject();\n this.html = null;\n }\n init(scope) {\n // Check template set by customElement annotation\n if (isset(this.constructor[\"html\"]) && this.html === null)\n this.html = this.constructor[\"html\"];\n if (!isset(this.tplPrototype))\n this.tplPrototype = ka_templatify(ka_html(this.html));\n this.scope.init(scope);\n return this.scope;\n }\n wrapTemplate(tpl) {\n this.scope.$content = tpl;\n return this.tpl;\n }\n fragmentConnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.scope.isInitialized()) {\n this.init({});\n }\n this.returnedTpl = this.tplPrototype;\n this.tpl = this.tplPrototype.cloneNode(true);\n this.scope.$tpl = new KaTemplate(this.tpl);\n });\n }\n wrapFinish() {\n return __awaiter(this, void 0, void 0, function* () {\n this.scope.render();\n });\n }\n fragmentDisconnectedCallback() {\n this.scope.$tpl.dispose();\n }\n}\n","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};\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { ka_html } from \"../ce/html\";\nimport { isset } from \"../functions\";\n/**\n * @deprecated\n */\nexport class KaHtmlElement extends HTMLElement {\n constructor(shadowRootInit = null) {\n super();\n this.shadowRootInit = shadowRootInit;\n this.addEventListener(\"load\", (e) => console.log(e));\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let htmlTpl = null;\n if (typeof this.html === \"function\") {\n let fn = this.html;\n htmlTpl = yield fn(this);\n }\n else {\n htmlTpl = this.html;\n }\n if (typeof htmlTpl === \"string\")\n htmlTpl = ka_html(htmlTpl);\n let attachTo = this;\n if (this.shadowRootInit !== null) {\n attachTo = this.attachShadow(this.shadowRootInit);\n }\n if (isset(htmlTpl)) {\n let tpl;\n try {\n tpl = ka_templatify(htmlTpl);\n }\n catch (e) {\n console.error(\"Templatify failed on element\", this, \"for template\", htmlTpl);\n throw e;\n }\n this.$tpl = new KaTemplate(tpl);\n attachTo.appendChild(tpl);\n }\n this.connected();\n });\n }\n disconnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n this.$tpl.dispose();\n this.disconnected();\n });\n }\n}\n","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _KaModal_main, _KaModal_configDefaults, _KaModal_promise;\nimport { KaTemplate } from \"../tpl/template\";\nimport { ka_create_element } from \"../core/create-element\";\nimport { ka_html } from \"../ce/html\";\nimport { ka_templatify } from \"../tpl/templatify\";\nimport { createScopeObject } from \"../types\";\nexport class KaModal {\n adjustWidth(modalConfig) {\n let w = window.innerWidth;\n if (w > modalConfig.maxWidth)\n w = modalConfig.maxWidth;\n __classPrivateFieldGet(this, _KaModal_main, \"f\").style.width = w + \"px\";\n }\n constructor(tagName = \"ka-modal\", shadowRootInit = null, modalConfig = {}) {\n this.scope = createScopeObject();\n _KaModal_main.set(this, void 0);\n this.$tpl = null;\n _KaModal_configDefaults.set(this, {\n parentElement: document.body,\n zIndex: 9999,\n styleBase: \"position:fixed; top:0; bottom:0; left:0; right:0;\",\n styleBackdrop: \"background-color: #999;opacity:0.5;\",\n maxWidth: 800,\n });\n _KaModal_promise.set(this, {\n promise: null,\n reject: null,\n resolve: null,\n });\n let config = __classPrivateFieldGet(this, _KaModal_configDefaults, \"f\");\n config = Object.assign(Object.assign({}, config), modalConfig);\n this.element = ka_create_element(tagName, { hidden: \"hidden\" }, null, config.parentElement);\n this.backdrop = ka_create_element(\"div\", { style: `${config.styleBase};${config.styleBackdrop};z-index:${config.zIndex};` }, null, this.element);\n let master = ka_create_element(\"div\", { style: `position:fixed;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;z-index:${config.zIndex + 1};` }, null, this.element);\n __classPrivateFieldSet(this, _KaModal_main, ka_create_element(\"div\", { style: `;max-height:100%;max-width:100%;` }, null, master), \"f\");\n this.adjustWidth(config);\n __classPrivateFieldGet(this, _KaModal_promise, \"f\").promise = new Promise((resolve, reject) => { __classPrivateFieldGet(this, _KaModal_promise, \"f\").resolve = resolve; __classPrivateFieldGet(this, _KaModal_promise, \"f\").reject = reject; });\n }\n render(scope = null) {\n if (this.$tpl === null) {\n let html = this.html;\n if (typeof html === \"string\") {\n html = ka_html(html);\n }\n if (!(html instanceof HTMLTemplateElement)) {\n console.error(\"html is not HtmlTemplateElement\", html, \"on\", this);\n throw \"html is not HtmlTemplateElement\";\n }\n console.log(\"html\", html);\n let elem;\n try {\n elem = ka_templatify(html);\n }\n catch (e) {\n console.log(\"error templatify for element\", this, \":\", e);\n throw e;\n }\n __classPrivateFieldGet(this, _KaModal_main, \"f\").appendChild(elem);\n this.$tpl = new KaTemplate(elem);\n }\n this.$tpl.render(scope);\n }\n resolve(value) {\n this.element.remove();\n __classPrivateFieldGet(this, _KaModal_promise, \"f\").resolve(value);\n }\n show(...params) {\n this.element.removeAttribute(\"hidden\");\n return __classPrivateFieldGet(this, _KaModal_promise, \"f\").promise;\n }\n}\n_KaModal_main = new WeakMap(), _KaModal_configDefaults = new WeakMap(), _KaModal_promise = new WeakMap();\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, isset, random_string } from \"../functions\";\nimport { KaCustomFragment } from \"./KaCustomFragment\";\nlet KaUse = class KaUse extends HTMLElement {\n get component() {\n return this.myComponent;\n }\n set component(val) {\n this.myComponent = val;\n this.innerHTML = \"\";\n this.append(val);\n }\n /**\n * called from ka.use=\"\" by apply()\n *\n * @param val\n */\n use(val, parentScope) {\n if (isset(val[\"setParentScope\"]))\n val[\"setParentScope\"](parentScope);\n this.myComponent = val;\n this.innerHTML = \"\";\n // If not specified scope is the parent scope.\n if (!this.hasAttribute(\"ka.scope\"))\n val[\"setScope\"](parentScope);\n if (val instanceof KaCustomFragment) {\n val.fragmentConnectedCallback(this);\n return;\n }\n this.append(val);\n }\n /**\n * set dedicated scope using ka.scope\n *\n * @param scope\n */\n setScope(scope) {\n if (this.myComponent instanceof KaCustomFragment) {\n this.myComponent.setScope(scope);\n }\n }\n disconnectedCallback() {\n }\n connectedCallback() {\n this.style.display = \"contents\";\n this.setAttribute(\"ka.stop\", \"true\");\n if (this.myComponent instanceof KaCustomFragment) {\n this.myComponent.fragmentConnectedCallback(this);\n }\n }\n};\nKaUse = __decorate([\n customElement(\"ka-use-\" + random_string().toLowerCase())\n], KaUse);\nexport { KaUse };\n","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};\nimport { ka_sleep } from \"./core/sleep\";\n/**\n * Check if parameter is undefined or null\n *\n * @param input\n */\nexport function isset(input) {\n return (typeof input !== \"undefined\" && input !== null);\n}\nexport function isUndefined(input) {\n return (typeof input === \"undefined\");\n}\n/**\n * Defines a customElement\n *\n * Usage as class decorator @customElement(\"some-tag\")\n *\n * @param tagName\n */\n// @ts-nocheck\nexport function customElement(tagName = null, template = null) {\n return function (classOrDescriptor) {\n if (template !== null) {\n classOrDescriptor[\"html\"] = template;\n }\n if (window[\"_kasi_defined_custom_elements\"] === undefined) {\n window[\"_kasi_defined_custom_elements\"] = [];\n }\n if (tagName === null) {\n if (window[\"_kasi_anon_element_id\"] === undefined) {\n window[\"_kasi_anon_element_id\"] = 0;\n }\n tagName = \"kasimirjs-anon-element-\" + window[\"_kasi_anon_element_id\"]++;\n }\n //console.debug(\"registering custom element\", classOrDescriptor, tagName);\n if (!window[\"_kasi_defined_custom_elements\"].includes(tagName)) {\n customElements.define(tagName, classOrDescriptor);\n window[\"_kasi_defined_custom_elements\"].push(tagName);\n }\n return classOrDescriptor;\n };\n}\n// @ts-nocheck\nexport function ka_await_element(selector, parent = document, maxWait = 2000) {\n return __awaiter(this, void 0, void 0, function* () {\n let elem = parent.querySelector(selector);\n let rounds = 1;\n while (elem === null && maxWait > 0) {\n let delay = 20 * rounds++;\n yield ka_sleep(delay);\n elem = parent.querySelector(selector);\n maxWait -= delay;\n }\n return elem;\n });\n}\nexport function template(template, shadowRootConfig = { mode: null, stylesheets: [] }) {\n return function (classOrDescriptor) {\n classOrDescriptor[\"html\"] = template;\n classOrDescriptor[\"shadowRootConfig\"] = shadowRootConfig;\n return classOrDescriptor;\n };\n}\nexport function random_string(len = 12) {\n let result = '';\n let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let charactersLength = characters.length;\n for (let i = 0; i < len; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\nexport function timeTo(date) {\n const now = new Date();\n let seconds = Math.floor((date.getTime() - now.getTime()) / 1000);\n if (seconds < 0) {\n return 'today';\n }\n let interval = seconds / 31536000;\n if (interval > 1) {\n return 'In ' + Math.floor(interval) + \" years\";\n }\n interval = seconds / 2592000;\n if (interval > 1) {\n return 'In ' + Math.floor(interval) + \" months\";\n }\n interval = seconds / 604800;\n if (interval > 1) {\n return 'In ' + Math.floor(interval) + \" weeks\";\n }\n interval = seconds / 86400;\n if (interval >= 1) {\n return 'In ' + Math.floor(interval) + \" days\";\n }\n return 'today';\n}\nexport function timeAgo(date) {\n const now = new Date();\n const seconds = Math.floor((now.getTime() - date.getTime()) / 1000);\n let interval = seconds / 31536000;\n if (interval > 1) {\n return Math.floor(interval) + \" years ago\";\n }\n interval = seconds / 2592000;\n if (interval > 1) {\n return Math.floor(interval) + \" months ago\";\n }\n interval = seconds / 86400;\n if (interval > 1) {\n return Math.floor(interval) + \" days ago\";\n }\n interval = seconds / 3600;\n if (interval > 1) {\n return Math.floor(interval) + \" hours ago\";\n }\n interval = seconds / 60;\n if (interval > 1) {\n return Math.floor(interval) + \" minutes ago\";\n }\n return Math.floor(seconds) + \" seconds ago\";\n}\nexport function timeToNow(date) {\n const now = new Date();\n let seconds = Math.floor((date.getTime() - now.getTime()) / 1000);\n // use timeao if date is in the past or timeTo if date is in the future\n if (seconds < 0) {\n return timeAgo(date);\n }\n else {\n return timeTo(date);\n }\n}\n","export * from \"./functions\";\nexport * from \"./types\";\nexport * from \"./core/sleep\";\nexport * from \"./core/debounce\";\nexport * from \"./core/create-element\";\nexport * from \"./core/ka-set-options\";\nexport { ka_dom_ready } from \"./core/dom-ready\";\nexport * from \"./element/KaHtmlElement\";\nexport * from \"./element/KaCustomElement\";\nexport * from \"./element/KaCustomFragment\";\nexport * from \"./element/KaCustomWrapper\";\nexport * from \"./element/KaCustomModal\";\nexport * from \"./tpl/template\";\nexport * from \"./element/KaModal\";\nexport * from \"./core/query-select\";\nexport * from \"./core/eval\";\nexport * from \"./ce/html\";\nexport * from \"./tpl/templatify\";\nexport * from \"./core/debouncer\";\nexport * from \"./core/storage\";\n","import { ka_eval } from \"../core/eval.js\";\nimport { ka_elwalk } from \"../core/elwalk.js\";\nimport { ka_apply } from \"../core/apply.js\";\nimport { KaCustomElement } from \"../ce/custom-element.js\";\nexport class KaTemplate {\n constructor(template) {\n this.template = template;\n if (typeof this.template.__kachilds === \"undefined\")\n this.template.__kachilds = [];\n if (typeof this.template.__kasibling === \"undefined\")\n this.template.__kasibling = this.template.nextElementSibling;\n this.__renderCount = 0;\n this.$scope = {};\n }\n _error(msg) {\n console.error(`[ka-template] ${msg} on element`, this.template);\n throw `[ka-template] ${msg} on element` + this.template;\n }\n _appendTemplate() {\n let elements = this.template.content;\n let elList = [];\n for (let curE of elements.children) {\n curE = curE.cloneNode(true);\n curE._ka_maintained_by = this.template.getAttribute(\"_kaidx\");\n elList.push(curE);\n this.template.parentNode.insertBefore(curE, this.template.__kasibling);\n }\n this.template.__kachilds.push(elList);\n }\n _removeLastChild() {\n if (this.template.__kachilds.length === 0)\n return;\n let childs = this.template.__kachilds[this.template.__kachilds.length - 1];\n for (let curE of childs) {\n this.template.parentElement.removeChild(curE);\n }\n this.template.__kachilds.length = this.template.__kachilds.length - 1;\n }\n _renderFor($scope, forStmt, forIfStmt) {\n //console.log(\"kachilds\", this.template.__kachilds);\n let matches = forStmt.match(/^(let)?\\s*(?<target>.+)\\s+(?<type>of|in|repeat)\\s+(?<select>.+?)\\s*(indexby\\s*(?<indexby>.+)|)$/);\n if (matches === null) {\n this._error(`Can't parse ka.for='${forStmt}'`);\n }\n let selectVal = ka_eval(matches.groups.select, $scope, this.template);\n if (matches.groups.type === \"repeat\") {\n if (typeof selectVal !== \"number\")\n this._error(`Error ka.for='${forStmt}': Selected val must be number in repeat loop`);\n selectVal = new Array(selectVal).fill(null);\n }\n let indexBy = null;\n if (matches.groups.indexby) {\n indexBy = matches.groups.indexby;\n }\n let eIndex = 0;\n for (let index in selectVal) {\n let curScope = Object.assign({ $scope: $scope }, $scope);\n curScope[matches.groups.target] = index;\n if (indexBy !== null)\n curScope[indexBy] = eIndex;\n if (matches.groups.type === \"of\")\n curScope[matches.groups.target] = selectVal[index];\n if (this.template.__kachilds.length < eIndex + 1) {\n //console.log(\"append\", eIndex, this.template.__kachilds.length);\n this._appendTemplate();\n }\n // Skip element if ka.for-if statement is not true\n if (forIfStmt !== null) {\n if (!ka_eval(forIfStmt, curScope, this.template)) {\n console.log(\"skip line\");\n continue; // Skip this node\n }\n }\n this._maintain(curScope, this.template.__kachilds[eIndex], eIndex);\n eIndex++;\n }\n for (let remIdx = eIndex; remIdx < this.template.__kachilds.length;) {\n this._removeLastChild();\n }\n }\n _maintain($scope, childs, forIndex = 0) {\n for (let child of childs) {\n child._ka_for_index = forIndex;\n ka_elwalk(child, (el) => {\n //console.log(\"walk\", el);\n if (el instanceof HTMLTemplateElement) {\n //console.log(\"maintain\", el);\n let r = new this.constructor(el);\n r.render($scope);\n return false;\n }\n if (typeof el._ka_maintained_by !== \"undefined\" && el._ka_maintained_by !== this.template.getAttribute(\"_kaidx\")) {\n return false;\n }\n ka_apply(el, $scope);\n if ((el instanceof HTMLElement && el.hasAttribute(\"ka.stop\")) || el[\"__ka_stop_render\"]) {\n return false; // Skip Element rendering\n }\n }, true, true);\n }\n }\n _renderIf($scope, stmt) {\n let selectVal = ka_eval(stmt, $scope, this.template);\n if (selectVal === true) {\n if (this.template.__kachilds.length === 0)\n this._appendTemplate();\n this._maintain($scope, this.template.__kachilds[0]);\n }\n else {\n this._removeLastChild();\n }\n }\n /**\n * Remove all rendered element\n */\n dispose() {\n for (; this.template.__kachilds.length > 0;)\n this._removeLastChild();\n }\n setScope($scope) {\n this.$scope = $scope;\n }\n /**\n * Render / Update the Template\n *\n * Once the scope in parameter 1 was set, it will render\n * without any parameters. Scope is available via property $scope\n *\n * @param $scope\n */\n render($scope = null) {\n if ($scope === null)\n $scope = this.$scope;\n this.$scope = $scope;\n this.__renderCount++;\n if (this.template.hasAttribute(\"ka.for\")) {\n this._renderFor($scope, this.template.getAttribute(\"ka.for\"), this.template.getAttribute(\"ka.for-if\"));\n }\n else if (this.template.hasAttribute(\"ka.if\")) {\n this._renderIf($scope, this.template.getAttribute(\"ka.if\"));\n }\n else {\n if (typeof this.template._ka_active === \"undefined\") {\n this._appendTemplate();\n this.template._ka_active = true;\n }\n this._maintain($scope, this.template.__kachilds);\n }\n }\n /**\n * Return true if this template was renderd the first time\n *\n * @returns {boolean}\n */\n isFirstRender() {\n return this.__renderCount === 1;\n }\n}\n;\n","import { ka_query_selector } from \"../core/query-select\";\nimport { ka_elwalk } from \"../core/elwalk.js\";\nfunction quoteattr(s, preserveCR) {\n preserveCR = preserveCR ? ' ' : '\\n';\n return ('' + s) /* Forces the conversion to string. */\n .replace(/&/g, '&') /* This MUST be the 1st replacement. */\n .replace(/'/g, ''') /* The 4 other predefined entities, required. */\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n /*\n You may add other replacements here for HTML only\n (but it's not necessary).\n Or for XML, only if the named entities are defined in its DTD.\n */\n .replace(/\\r\\n/g, preserveCR) /* Must be before the next replacement. */\n .replace(/[\\r\\n]/g, preserveCR);\n ;\n}\nwindow._ka_el_idx = 0;\n/**\n * Generate a renderable Template from <template> Element\n *\n * @param {HTMLElement|string} elem\n * @return {HTMLTemplateElement}\n */\nexport function ka_templatify(elem, returnMode = true) {\n if (typeof elem === \"string\")\n elem = ka_query_selector(elem);\n if (!(elem instanceof Node)) {\n console.error(\"[ka-templatify] Parameter 1 is not a html element: \", elem);\n throw `[ka-templify] Parameter 1 is not a html element: ${elem}`;\n }\n const elIdxName = \"_ka_el_idx\";\n if (window[elIdxName] === null)\n window[elIdxName] = 5;\n window[elIdxName]++;\n if (returnMode) {\n let returnTpl = document.createElement(\"template\");\n returnTpl.setAttribute(\"_kaidx\", (window[elIdxName]).toString());\n /* @var {HTMLTemplateElement} returnTpl */\n returnTpl.innerHTML = elem.innerHTML\n .replace(/\\[\\[(.*?)\\]\\]/g, (matches, m1) => `<span ka.textContent=\"${quoteattr(m1)}\"></span>`);\n ka_templatify(returnTpl.content, false);\n return returnTpl;\n }\n if (elem instanceof HTMLTemplateElement)\n elem = elem.content;\n let wrapElem = (el, attName, attVal) => {\n let tpl = document.createElement(\"template\");\n tpl.setAttribute(\"_kaidx\", (window[elIdxName]).toString());\n let clonedEl = el.cloneNode(true);\n clonedEl.removeAttribute(attName);\n tpl.content.append(clonedEl);\n tpl.setAttribute(attName, attVal);\n el.replaceWith(tpl);\n return tpl;\n };\n ka_elwalk(elem, (el) => {\n //console.log(el);\n if (!(el instanceof HTMLElement))\n return;\n let tpl = null;\n for (let attrName of el.getAttributeNames()) {\n if (attrName === \"ka.for\") {\n tpl = wrapElem(el, \"ka.for\", el.getAttribute(\"ka.for\"));\n let forIfStmt = el.getAttribute(\"ka.for-if\");\n if (forIfStmt !== null)\n tpl.setAttribute(\"ka.for-if\", forIfStmt);\n ka_templatify(tpl, false);\n break;\n }\n if (attrName === \"ka.if\") {\n tpl = wrapElem(el, \"ka.if\", el.getAttribute(\"ka.if\"));\n ka_templatify(tpl, false);\n break;\n }\n }\n }, true, false);\n}\n","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};\nimport { isset } from \"./functions\";\nimport { Debouncer } from \"./core/debouncer\";\nclass KaDefaultScope {\n constructor() {\n this.__isInitialized = false;\n }\n isInitialized() {\n return this.__isInitialized;\n }\n render() {\n return __awaiter(this, void 0, void 0, function* () {\n this.$tpl.render(this);\n });\n }\n raw() {\n return this.$__scope_orig;\n }\n importFrom(scope) {\n for (let key of Object.keys(scope)) {\n if (key.startsWith(\"$\") || key.startsWith(\"__\"))\n continue;\n this[\"$__scope_orig\"][key] = scope[key];\n }\n }\n dump() {\n return Object.assign({}, this);\n }\n init(scopeDef) {\n if (this.isInitialized())\n throw \"Scope is already initalized\";\n this.__isInitialized = true;\n for (let key of Object.keys(scopeDef)) {\n this[key] = scopeDef[key];\n }\n }\n}\nexport function createScopeObject(init = null) {\n let scopeDef = new KaDefaultScope();\n scopeDef[\"$__scope_orig\"] = scopeDef;\n let setAction = (target, p, value, receiver) => {\n if (target[p] === value)\n return true; // Nothing changed\n target[p] = value;\n let debouncer = new Debouncer(50, 50);\n if (p.startsWith(\"$\") || p.startsWith(\"__\"))\n return true;\n if (isset(scopeDef.$tpl))\n scopeDef.$tpl.render();\n (() => __awaiter(this, void 0, void 0, function* () {\n yield debouncer.debounce();\n }))();\n return true;\n };\n let getAction = (target, prop, receiver) => {\n if (prop.startsWith(\"$\"))\n return target[prop];\n return target[prop];\n };\n let proxy = new Proxy(scopeDef, {\n get: getAction,\n set: setAction,\n });\n if (init !== null)\n scopeDef.init(init);\n return proxy;\n}\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { KaCustomFragment, template } from \"@kasimirjs/embed\";\n// language=html\nconst html = `\n <div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" ka.for=\"let tabName in tabs\">\n <a class=\"nav-link\" ka.classlist.fw-bold=\"selectedTabName === tabName\" ka.classlist.active=\"selectedTabName === tabName\" ka.on.click=\"$scope.selectedTabName = tabName\" aria-current=\"page\" href=\"javascript:void(0)\">[[ tabName ]]</a>\n </li>\n </ul>\n <div class=\"p-3 border\">\n <div ka.for=\"let curTabName in tabs\">\n <div ka.if=\"curTabName === selectedTabName\" >\n <div ka.use=\"tabs[curTabName]\" ka.scope=\"targetScope\"></div>\n </div>\n </div>\n </div>\n \n</div>\n`;\nlet KitTabPane = class KitTabPane extends KaCustomFragment {\n constructor(tabs) {\n super();\n this.tabs = tabs;\n let scope = this.init({\n targetScope: null,\n tabs,\n selectedTabName: Object.keys(tabs)[0]\n });\n }\n setScope(scope) {\n // Override default behaviou and pass scope to next\n this.scope[\"targetScope\"] = scope;\n }\n};\nKitTabPane = __decorate([\n template(html),\n __metadata(\"design:paramtypes\", [Object])\n], KitTabPane);\nexport { KitTabPane };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nimport { KaCustomFragment, template } from \"@kasimirjs/embed\";\nimport { random_string } from \"../functions\";\nlet html = `\n<div class=\"row g-3 align-items-center\">\n <div class=\"col-auto\">\n <label ka.attr.for=\"config.id\" class=\"col-form-label\">[[ config.title ]]</label>\n </div>\n <div class=\"col-auto\">\n <input ka.if=\"config.type !== 'select' && config.type !== 'textarea'\" ka.attr.readonly=\"config.readonly === true\" ka.attr.type=\"config.type\" ka.id=\"config.id\" ka.bind=\"%%bind%%\" class=\"form-control\" aria-describedby=\"passwordHelpInline\">\n </div>\n <div class=\"col-auto\">\n <span id=\"passwordHelpInline\" class=\"form-text\">\n Must be 8-20 characters long.\n </span>\n </div>\n</div>\n\n`;\nconst KitFormInputDefaults = {\n title: \"\",\n type: \"text\",\n id: null\n};\nlet KitFormInput = class KitFormInput extends KaCustomFragment {\n /**\n * Example:\n *\n * new KitFormInput(\"$scope.name\", {title: \"Name:\"});\n *\n * @param bindSelector\n * @param config\n */\n constructor(bindSelector, config) {\n super();\n this.bindSelector = bindSelector;\n config = Object.assign(Object.assign({}, KitFormInputDefaults), config);\n if (config.id === null) {\n config.id = random_string();\n }\n let scope = this.init({\n config,\n bindValue: bindSelector\n });\n }\n init(scope) {\n if (typeof this.constructor[\"html\"] !== \"undefined\")\n this[\"html\"] = this.constructor['html'].replace(\"%%bind%%\", this.bindSelector);\n return super.init(scope);\n }\n};\nKitFormInput = __decorate([\n template(html),\n __metadata(\"design:paramtypes\", [String, Object])\n], KitFormInput);\nexport { KitFormInput };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nimport { customElement, KaCustomElement } from \"@kasimirjs/embed\";\n// language=HTML\nconst tpl = `\n <div class=\"mb-1 row\" ka.if=\"type === 'text'\">\n <label ka.attr.for=\"id\" class=\"col-sm-2 col-form-label\">[[label]]</label>\n <div class=\"col-sm-10\">\n <input type=\"text\" ka.bind=\"$scope.value\" class=\"form-control-plaintext form-control-sm bg-white\" ka.attr.id=\"id\">\n </div>\n </div>\n <div class=\"form-check form-switch mb-1\" ka.if=\"type === 'switch'\">\n <input class=\"form-check-input\" type=\"checkbox\" ka.bind=\"$scope.value\" role=\"switch\" ka.attr.id=\"id\">\n <label class=\"form-check-label\" ka.attr.for=\"id\">[[ label ]]</label>\n </div>\n\n`;\nvar elementIndex = 1;\nlet QuickInput = class QuickInput extends KaCustomElement {\n get value() {\n return this.scope.value;\n }\n set value(value) {\n this.scope.value = value;\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n var _a, _b, _c, _d, _e;\n return __awaiter(this, void 0, void 0, function* () {\n let scope = this.init({\n id: (_a = this.dataset.id) !== null && _a !== void 0 ? _a : \"quick-form-element-\" + elementIndex++,\n type: (_b = this.dataset.type) !== null && _b !== void 0 ? _b : \"text\",\n name: (_c = this.dataset.name) !== null && _c !== void 0 ? _c : \"data-name unset\",\n label: (_e = (_d = this.dataset.label) !== null && _d !== void 0 ? _d : this.dataset.name) !== null && _e !== void 0 ? _e : \"data-label unset\",\n $on: {\n change: (e) => {\n //this.dispatchEvent(new Event(\"change\"));\n }\n }\n });\n _super.connectedCallback.call(this);\n });\n }\n};\nQuickInput = __decorate([\n customElement(\"quick-input\", tpl)\n], QuickInput);\n","export function random_string(length = 8) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n","export * from \"./functions\";\nexport * from \"./base/tab-pane\";\nexport * from \"./form/form-input\";\nexport * from \"./form/quick-input\";\nexport * from \"./sidebar/sidebar-wrapper\";\nexport * from \"./modals/flex-modal\";\n","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};\nimport { KaCustomModal } from \"@kasimirjs/embed\";\nconst html = `\n<div class=\"modal d-block\" tabindex=\"-1\">\n <div class=\"modal-dialog modal-xl\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">%%title%%</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" ka.on.click=\"$fn.close()\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n %%body%%\n </div>\n <div class=\"modal-footer\">\n \n %%buttons%%\n </div>\n </div>\n </div>\n</div>`;\nexport class FlexModalConfig {\n constructor() {\n this.title = \"unnamed\";\n this.size = \"xl\";\n }\n}\nexport class FlexModal extends KaCustomModal {\n /**\n *\n * Example:\n * const m = new FlexModal(\"My Title\", \"<div>[[message]]</div>\", [`<button ka.on.click=\"$fn.resolve()\">Save</button>`]);\n * let result = await m.show({message: \"Hello World\"});\n * console.log(result.message);\n *\n * @param title\n * @param body\n * @param buttons\n * @param initScope\n */\n constructor(title, body, buttons = null, initScope = {}) {\n super();\n this.initScope = initScope;\n if (buttons === null)\n buttons = [`<button type=\"button\" class=\"btn btn-secondary\" ka.on.click=\"$fn.close()\">Close</button>`]; // Add close button if no buttons are present.\n this.__html = html.replace(\"%%title%%\", title).replace(\"%%body%%\", body).replace(\"%%buttons%%\", buttons.join(\" \"));\n }\n /**\n *\n *\n * @param scope Optional Scope to pass to the modal\n * @param parser Optional Callback to parse the return value before resolving the promise\n */\n show(scope = {}, parser = (scope) => { return scope; }) {\n const _super = Object.create(null, {\n show: { get: () => super.show }\n });\n return __awaiter(this, void 0, void 0, function* () {\n let defaultScope = this.initScope;\n let instance = this;\n let myScope = this.init(Object.assign(Object.assign({}, defaultScope), scope));\n if (!myScope.$fn)\n myScope.$fn = {};\n myScope.$fn['close'] = () => {\n this.resolve(null);\n };\n myScope.$fn['resolve'] = () => {\n this.resolve(parser(myScope));\n };\n return _super.show.call(this);\n });\n }\n}\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n// language=HTML\nimport { ka_session_storage, KaCustomWrapper, template } from \"@kasimirjs/embed\";\nconst tpl = `\n <style>\n .sidepanel {\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n border: 0;\n width: 250px;\n z-index: 99999;\n transform: translateX(100%);\n transition: all 0.3s ease-in-out;\n\n\n background: linear-gradient(0deg, rgb(37, 32, 32) 0%, rgba(0, 0, 0, 1) 100%);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n padding: 5px\n }\n\n .sidepanel .activator {\n position: absolute;\n top: 38vh;\n height: 50px;\n width: 50px;\n left: -50px;\n cursor: pointer;\n background: linear-gradient(90deg, rgb(68, 63, 63) 0%, rgba(0, 0, 0, 1) 100%);\n z-index: 99999;\n color: #fff;\n border-radius: 20% 0 0 20%;\n box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);\n opacity: 0.8;\n transition: opacity 0.3s ease-in-out;\n }\n\n .sidepanel .activator svg {\n width: 100%;\n height: 100%;\n padding: 10px\n }\n\n .sidepanel.active .activator {\n opacity: 0.8;\n box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);\n }\n\n .sidepanel .activator:hover {\n opacity: 1;\n }\n\n .sidepanel.active {\n transform: translateX(0);\n box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);\n }\n\n .sidepanel .content {\n color: #fff;\n height: 100%;\n overflow: scroll;\n }\n\n </style>\n\n <nav class=\"sidepanel\" ka.classlist.active=\"state.active\">\n <div class=\"activator\" ka.on.click=\"$fn.toggle()\" ka.content=\"$scope.config.icon\">B</div>\n <div class=\"content\">\n <div ka.content=\"$content\"></div>\n </div>\n </nav>\n`;\nexport class SidebarWrapperConfig {\n constructor() {\n this.icon = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-gear\" viewBox=\"0 0 16 16\">\n <path d=\"M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z\"/>\n <path d=\"M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z\"/>\n</svg>`;\n }\n}\nlet SidebarWrapper = class SidebarWrapper extends KaCustomWrapper {\n constructor(config = null) {\n super();\n if (config === null)\n config = new SidebarWrapperConfig();\n let state = ka_session_storage({ active: false }, \"switcher-element\");\n let scope = this.init({\n state: state,\n config: config,\n $fn: {\n toggle: () => {\n state.active = !state.active;\n scope.render();\n }\n },\n $on: {\n change: (e) => {\n }\n }\n });\n }\n};\nSidebarWrapper = __decorate([\n template(tpl),\n __metadata(\"design:paramtypes\", [SidebarWrapperConfig])\n], SidebarWrapper);\nexport { SidebarWrapper };\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AccordionLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__image\">\n <div class=\"header\" data-ref=\"header\"></div>\n <div class=\"image\" data-ref=\"image\">\n </div>\n <div class=\"footer\" data-ref=\"footer\"></div>\n </div>\n`;\nclass AccordionLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.accordion_auto_open = \"first\";\n }\n}\nexports.AccordionLayout = AccordionLayout;\nlet Accordion = class Accordion {\n render(element, layout) {\n var _a;\n element.classList.add(\"as__accordion\");\n Array.from(element.querySelectorAll(\":scope > .children > .section-h3 > .content h3\")).forEach((e, i) => __awaiter(this, void 0, void 0, function* () {\n let newElem = (0, embed_1.ka_create_element)(\"a\", { class: \"as__accordion-header\" });\n e.parentNode.parentNode.insertBefore(newElem, e.parentNode);\n newElem.append(e);\n let update = () => {\n element.querySelectorAll(\".section-h3 > .content,.children\").forEach((e) => __awaiter(this, void 0, void 0, function* () {\n e.style.setProperty(\"--orig-height\", e.scrollHeight + \"px\");\n }));\n };\n newElem.onclick = () => {\n var _a;\n update();\n Array.from(newElem.closest(\".children\").children).forEach((e) => {\n if (e === newElem.closest(\".section-h3\"))\n return;\n e.classList.remove(\"open\");\n });\n (_a = newElem.closest(\".section-h3\")) === null || _a === void 0 ? void 0 : _a.classList.toggle(\"open\");\n };\n }));\n console.log(\"acc\", layout);\n if (layout.accordion_auto_open === \"first\") {\n (_a = element.querySelector(\".section-h3\")) === null || _a === void 0 ? void 0 : _a.classList.add(\"open\");\n }\n return element;\n }\n};\nAccordion = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"accordion\", AccordionLayout)\n], Accordion);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HamburgerLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = (0, embed_1.ka_html)(`\n<a class=\"as__hamburger\" href=\"javascript:void(0);\" aria-label=\"Menü\">\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-bar\" ></div>\n <div class=\"as__hamburger-menu\">Menü</div>\n</a>\n`);\nclass HamburgerLayout extends jodastyle_1.DefaultLayout {\n}\nexports.HamburgerLayout = HamburgerLayout;\nlet Hamburger = class Hamburger {\n render(element, layout) {\n let main = new jodastyle_2.QTemplate(tpl);\n element.append(main.content);\n main.content.addEventListener(\"click\", () => {\n document.body.classList.toggle(\"nav-open\");\n });\n return element;\n }\n};\nHamburger = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"hamburger\", HamburgerLayout)\n], Hamburger);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InputLayout = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\nconst tplDefault = `\n<div class=\"as__input [[layout.style]] [[classes]]\">\n <div data-ref=\"main\"></div>\n <label for=\"[[ id ]]\">[[ label ]]</label>\n</div>\n`;\nconst tplCheckbox = `\n<div class=\"as__input [[classes]] form-check\">\n <div data-ref=\"main\"></div>\n <label class=\"form-check-label\" for=\"[[ id ]]\">\n [[ label ]]\n </label>\n</div>\n`;\nclass InputLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.style = \"form-floating\";\n this.classes = \"\";\n }\n}\nexports.InputLayout = InputLayout;\nlet idCounter = 0;\nlet Input = class Input {\n render(element, layout) {\n var _a, _b, _c, _d;\n let main = new jodastyle_2.QTemplate(tplDefault);\n if (element instanceof HTMLInputElement) {\n if (element.type === \"hidden\") {\n return element;\n }\n if (element.type === \"checkbox\" || element.type === \"radio\") {\n main = new jodastyle_2.QTemplate(tplCheckbox);\n }\n else if (element.type === \"submit\") {\n main = new jodastyle_2.QTemplate(`<div class=\"as__input [[classes]]\"><div data-ref=\"main\"></div></div>`);\n }\n }\n element.id = element.id === \"\" ? \"as__input_\" + idCounter++ : element.id;\n if (element instanceof HTMLSelectElement) {\n let options = [];\n // Default: No preset, no options\n options.push({ value: \"\", label: (_a = element.getAttribute(\"data-initial\")) !== null && _a !== void 0 ? _a : \"\", disabled: true, selected: true });\n if (element.hasAttribute(\"data-options\")) {\n // if dataset.options starts with [ tread as array, if { tread as object\n if (element.dataset.options.startsWith(\"[\")) {\n options.push(...JSON.parse(element.dataset.options).map((o) => {\n return { value: o, label: o };\n }));\n }\n else if (element.dataset.options.startsWith(\"{\")) {\n let data = JSON.parse(element.dataset.options);\n options = Object.keys(data).map((o) => {\n return { value: o, label: data[o] };\n });\n }\n else {\n options.push(...element.dataset.options.split(\",\").map((o) => {\n return { value: o, label: o };\n }));\n }\n }\n for (let option of options) {\n let o = { value: option.value };\n if (option.selected) {\n o[\"selected\"] = \"selected\";\n }\n if (option.disabled) {\n o[\"disabled\"] = \"true\";\n }\n let opt = (0, embed_1.ka_create_element)(\"option\", o, option.label);\n element.append(opt);\n }\n }\n let label = (_c = (_b = element[\"name\"]) !== null && _b !== void 0 ? _b : element.id) !== null && _c !== void 0 ? _c : \"undefinded\";\n if (element instanceof HTMLInputElement && (element.type === \"checkbox\" || element.type === \"radio\")) {\n label = element.value;\n }\n if (element.hasAttribute(\"label\")) {\n label = element.getAttribute(\"label\");\n }\n if (element.hasAttribute(\"data-label\")) {\n label = element.getAttribute(\"data-label\");\n }\n main.parse({\n layout,\n classes: (_d = layout.classes + \" \" + element.getAttribute(\"class\")) !== null && _d !== void 0 ? _d : \"\",\n id: element.id,\n label: label\n });\n element.setAttribute(\"class\", \"\");\n if (element instanceof HTMLSelectElement) {\n element.classList.add(\"form-select\");\n }\n else if (element instanceof HTMLInputElement && (element.type === \"checkbox\" || element.type === \"radio\")) {\n element.classList.add(\"form-check-input\");\n }\n else if (element instanceof HTMLInputElement && element.type === \"submit\") {\n element.classList.add(\"btn\", \"btn-primary\");\n }\n else {\n element.classList.add(\"form-control\");\n if (!element.hasAttribute(\"placeholder\")) {\n element.setAttribute(\"placeholder\", label); // Important to have a placeholder for floating label\n }\n }\n element.parentNode.replaceChild(main.content, element);\n main.select(\"main\").selected.replaceWith(element);\n return main.content;\n }\n};\nInput = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"input\", InputLayout)\n], Input);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MapLayout = void 0;\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__map [[ layout.mapClass ]]\">\n <div class=\"as__map-overlay\" data-ref=\"overlay\">\n <img src=\"[[ layout.mapPreviewUrl ]]\" loading=\"lazy\" width=\"1461\" height=\"729\" alt=\"map preview\" />\n <div>\n <div>\n\n <button class=\"btn btn-secondary mx-auto my-auto btn-lg\" data-ref=\"button\">Mit Google Maps anzeigen</button>\n <p class=\"mx-auto\">Erst nach dem Klick werden Inhalte von Google Maps geladen.</p>\n </div>\n\n </div>\n </div>\n <iframe width=\"100%\" hidden title=\"Google Maps\" height=\"100%\" data-ref=\"iframe\"></iframe>\n <script>\n </script>\n </div>\n`;\nclass MapLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.mapPreviewUrl = \"https://cdn.leuffen.de/hyperpage-components/v1.0/google-maps/maps-preview.jpg\";\n }\n}\nexports.MapLayout = MapLayout;\nlet Map = class Map {\n render(element, layout) {\n var _a;\n let main = new jodastyle_2.QTemplate(tpl);\n main.parse({ layout });\n let mapUrl = (_a = window[\"mapUrl\"]) !== null && _a !== void 0 ? _a : null;\n if (element.hasAttribute(\"data-map-url\")) {\n mapUrl = element.getAttribute(\"data-map-url\");\n }\n if (mapUrl === null) {\n console.warn(\"Missing data-map-url attribute on element (nor window[mapUrl] is set)\", element);\n }\n // Observe the data-map-url attribute and update it on the iframe\n let observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === \"data-map-url\") {\n let newValue = element.getAttribute(\"data-map-url\");\n main.select(\"iframe\").selected.setAttribute(\"src\", newValue);\n }\n });\n });\n observer.observe(element, { attributes: true });\n main.select(\"button\").selected.addEventListener(\"click\", () => {\n main.select(\"iframe\").selected.removeAttribute(\"hidden\");\n main.select(\"iframe\").selected.setAttribute(\"src\", mapUrl);\n main.select(\"overlay\").selected.setAttribute(\"hidden\", \"true\");\n });\n element.append(main.content);\n return main.content;\n }\n};\nMap = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"map\", MapLayout)\n], Map);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// language=HTML\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst html = `\n\n <nav class=\"isl-navbar-switch1 :: mobile :xl:\">\n\n <div class=\"isl-navbar-switch1__top-bar container-xxl\">\n <slot data-select=\"ul.navbar-top\"></slot>\n </div>\n <div class=\"isl-navbar-switch1__nav\">\n <div class=\"container-xl\">\n <div class=\"isl-navbar-switch1__nav--inner\">\n <div class=\"isl-navbar-switch1__nav--logo\">\n <slot data-select=\".brand\"></slot>\n </div>\n <div class=\"isl-navbar-switch1__nav--items\">\n <slot data-select=\"ul.navbar-main\" data-child-class=\"isl-navbar-switch1__nav--items-item\"></slot>\n </div>\n <div class=\"isl-navbar-switch1__nav--mobile-menu :: :xl: d-none\" >\n <div class=\"isl-navbar-switch1__nav--mobile-menu-selector\" onclick=\"this.closest('nav').classList.toggle('sidebar')\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n <aside>\n <div class=\"backdrop\" onclick=\"this.closest('nav').classList.remove('sidebar')\"></div>\n <div class=\"menu\">\n <div class=\"menu-header\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-lg\" viewBox=\"0 0 16 16\" onclick=\"this.closest('nav').classList.remove('sidebar')\">\n <path d=\"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z\"/>\n </svg>\n </div>\n <slot data-select=\"ul.navbar-main\" data-copy=\"1\" data-child-class=\"isl-navbar-switch1__nav--items-item\"></slot>\n </div>\n </aside>\n </nav>\n\n`;\njodastyle_1.Joda.registerTemplate(\"navbar-switch1\", html);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScreenLayout = void 0;\nconst jodastyle_1 = require(\"@leuffen/jodastyle\");\nconst jodastyle_2 = require(\"@leuffen/jodastyle\");\n// language=HTML\nconst tpl = `\n <div class=\"as__screen [[layout.type]]\">\n <div class=\"as__screen-shadow\" style=\"background-image: url([[layout.cdnBaseUrl]]/screens/[[layout.type]]-shadow.svg);\"></div>\n <div class=\"as__screen-image\" data-ref=\"image\"></div>\n <div class=\"as__screen-overlay\" style=\"background-image: url([[layout.cdnBaseUrl]]/screens/[[layout.type]].svg)\"></div>\n </div>\n`;\nclass ScreenLayout extends jodastyle_1.DefaultLayout {\n constructor() {\n super(...arguments);\n this.cdnBaseUrl = \"https://cdn.leuffen.de/hyperpage-components/v1.0\";\n this.type = \"mobile\";\n }\n}\nexports.ScreenLayout = ScreenLayout;\nlet Screen = class Screen {\n render(element, layout) {\n let q = new jodastyle_2.QTemplate(tpl);\n q.parse({ layout: layout });\n q.content.classList.add(...Array.from(element.classList));\n q.content.setAttribute(\"style\", element.getAttribute(\"style\"));\n element.setAttribute(\"style\", \"\");\n element.parentElement.replaceChild(q.content, element);\n q.select(\"image\").append(element);\n return q.content;\n }\n};\nScreen = __decorate([\n (0, jodastyle_1.jodaRenderer)(\"screen\", ScreenLayout)\n], Screen);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./elements/accordion/accordion\"), exports);\n__exportStar(require(\"./elements/hamburger/hamburger\"), exports);\n__exportStar(require(\"./elements/input/input\"), exports);\n__exportStar(require(\"./elements/map/map\"), exports);\n__exportStar(require(\"./elements/screen/screen\"), exports);\n__exportStar(require(\"./elements/navbar-switch1/navbar-switch1\"), exports);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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 __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _JodaContentElement_origContentTemplate, _JodaContentElement_outputDiv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JodaContentElement = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"../processor/jodastyle\");\nconst jodaresponsive_1 = require(\"../processor/jodaresponsive\");\nconst logger_1 = require(\"../helper/logger\");\nconst jodavisualize_1 = require(\"../processor/jodavisualize\");\nconst JodaSiteConfig_1 = require(\"../helper/JodaSiteConfig\");\nconst functions_1 = require(\"../helper/functions\");\nfunction getCSSRule(ruleName) {\n ruleName = ruleName.toLowerCase();\n var result = null;\n var find = Array.prototype.find;\n find.call(document.styleSheets, styleSheet => {\n result = find.call(styleSheet.cssRules, cssRule => {\n return cssRule instanceof CSSStyleRule\n && cssRule.selectorText.toLowerCase() == ruleName;\n });\n return result != null;\n });\n return result;\n}\nconsole.time(\"jodaTime\");\nlet JodaContentElement = class JodaContentElement extends HTMLElement {\n constructor() {\n super(...arguments);\n _JodaContentElement_origContentTemplate.set(this, void 0);\n _JodaContentElement_outputDiv.set(this, void 0);\n }\n awaitStyles() {\n return __awaiter(this, void 0, void 0, function* () {\n let index = 0;\n while (true) {\n index++;\n let initValue = getComputedStyle(this).getPropertyValue(\"--joda-init\");\n if (initValue.indexOf(\"true\") !== -1) {\n break;\n }\n if (index > 100) {\n index = 0;\n console.warn(\"Still waiting for --joda-init: true\", this, \"current value:\", initValue, \"on url\", window.location.href);\n }\n yield (0, embed_1.ka_sleep)(50 + index);\n }\n });\n }\n setLoaded() {\n return __awaiter(this, void 0, void 0, function* () {\n yield (0, embed_1.ka_sleep)(10);\n this.classList.add(\"loaded\");\n yield (0, embed_1.ka_sleep)(100);\n document.body.classList.add(\"loaded\");\n document.querySelector(\"html\").classList.remove(\"loader\");\n const scrollToHash = () => {\n let hash = window.location.hash.substring(1);\n // urldecode hash\n hash = decodeURIComponent(hash);\n const element = document.getElementById(hash);\n if (hash !== \"\" && !element) {\n console.warn(\"Element with id '\" + hash + \"' not found for scrollIntoView\", this);\n return;\n }\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n }\n // USE: html{ scroll-padding-top: calc(0.33 * 100vh); } to set the scroll position\n return;\n };\n if (window.location.hash) {\n scrollToHash();\n }\n window.addEventListener(\"load\", scrollToHash);\n window.addEventListener(\"hashchange\", scrollToHash);\n });\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let logger = new logger_1.Logger(\"joda-content\");\n yield (0, embed_1.ka_sleep)(1);\n yield this.awaitStyles();\n __classPrivateFieldSet(this, _JodaContentElement_origContentTemplate, (0, embed_1.ka_create_element)(\"template\"), \"f\");\n __classPrivateFieldSet(this, _JodaContentElement_outputDiv, (0, embed_1.ka_create_element)(\"div\"), \"f\");\n //this.#origContentTemplate.innerHTML = this.innerHTML;\n //this.innerHTML = \"\";\n //this.appendChild(this.#origContentTemplate);\n //this.appendChild(this.#outputDiv);\n if (JodaSiteConfig_1.jodaSiteConfig.disable_templates) {\n this.setLoaded();\n // For documentation: Add Class and Tag-Names\n if (JodaSiteConfig_1.jodaSiteConfig.debug_visualize && JodaSiteConfig_1.jodaSiteConfig.debug_visualize_attribute) {\n (new jodavisualize_1.Jodavisualize()).process(this);\n }\n return;\n }\n // Process the content\n let jodaStyle = new jodastyle_1.Jodastyle(logger);\n yield jodaStyle.process(this);\n let jodaresponsive = new jodaresponsive_1.Jodaresponsive(logger);\n let currentBreakpoint = (0, jodaresponsive_1.getCurrentBreakpoint)();\n jodaresponsive.process(this);\n // For documentation: Add Class and Tag-Names\n if (JodaSiteConfig_1.jodaSiteConfig.debug_visualize && JodaSiteConfig_1.jodaSiteConfig.debug_visualize_attribute) {\n (new jodavisualize_1.Jodavisualize()).process(this);\n }\n this.setLoaded();\n window.addEventListener(\"resize\", () => {\n if (currentBreakpoint === (0, jodaresponsive_1.getCurrentBreakpoint)()) {\n return;\n }\n currentBreakpoint = (0, jodaresponsive_1.getCurrentBreakpoint)();\n logger.log(\"Breakpoint changed to \" + currentBreakpoint);\n jodaresponsive.process(this);\n });\n // Run all allTemplateConnectedCallbacks registered\n for (let callback of functions_1.allTemplatesConnectedCallbacks) {\n yield callback();\n }\n window.dispatchEvent(new CustomEvent(\"JodaContentReady\", { detail: { element: this } }));\n });\n }\n setContent(content) {\n this.innerHTML = content;\n this.connectedCallback();\n }\n};\nexports.JodaContentElement = JodaContentElement;\n_JodaContentElement_origContentTemplate = new WeakMap();\n_JodaContentElement_outputDiv = new WeakMap();\nexports.JodaContentElement = JodaContentElement = __decorate([\n (0, embed_1.customElement)(\"joda-content\")\n], JodaContentElement);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodastyle_1 = require(\"../processor/jodastyle\");\nconst logger_1 = require(\"../helper/logger\");\nlet JodaFetch = class JodaFetch extends HTMLElement {\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let select = this.getAttribute(\"data-select\");\n let elem = document.querySelector(select);\n if (elem === null) {\n console.error(\"joda-fetch: Element not found\", select, \"in element\", this);\n return;\n }\n let jodaStyle = new jodastyle_1.Jodastyle(new logger_1.Logger(\"joda-fetch\"));\n this.innerHTML = elem.innerHTML;\n yield jodaStyle.process(this);\n });\n }\n};\nJodaFetch = __decorate([\n (0, embed_1.customElement)('joda-fetch')\n], JodaFetch);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _JodaSplit_ready;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst jodasplit_1 = require(\"../processor/jodasplit\");\nconst logger_1 = require(\"../helper/logger\");\nconst jodashorts_1 = require(\"../processor/jodashorts\");\nconst JodaSiteConfig_1 = require(\"../helper/JodaSiteConfig\");\nlet JodaSplit = class JodaSplit extends HTMLElement {\n constructor() {\n super(...arguments);\n _JodaSplit_ready.set(this, false);\n }\n get ready() {\n return __classPrivateFieldGet(this, _JodaSplit_ready, \"f\");\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n let logger = new logger_1.Logger(\"joda-split\");\n yield (0, embed_1.ka_sleep)(1);\n if (JodaSiteConfig_1.jodaSiteConfig.debug_visualize) {\n this.classList.add(\"joda-debug-visualize\");\n }\n if (JodaSiteConfig_1.jodaSiteConfig.disable_split) {\n __classPrivateFieldSet(this, _JodaSplit_ready, true, \"f\");\n return;\n }\n let jodaShorts = new jodashorts_1.Jodashorts(logger);\n this.innerHTML = yield jodaShorts.process(this.innerHTML);\n let jodaSplit = new jodasplit_1.Jodasplit(logger);\n let fragment = document.createDocumentFragment();\n fragment.append(yield jodaSplit.process(this));\n this.innerHTML = \"\";\n this.append(fragment);\n __classPrivateFieldSet(this, _JodaSplit_ready, true, \"f\");\n });\n }\n};\n_JodaSplit_ready = new WeakMap();\nJodaSplit = __decorate([\n (0, embed_1.customElement)('joda-split')\n], JodaSplit);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JodaDescriptionManager = exports.__JodaDescriptionManager = void 0;\nclass __JodaDescriptionManager {\n addClass(category, className, description, example, modifiers, config = {}) {\n let defaultConfig = {\n bodyClasses: [],\n parseMarkdown: true\n };\n config = Object.assign(Object.assign({}, defaultConfig), config);\n if (window[\"jodastyle\"] === undefined) {\n window[\"jodastyle\"] = {};\n }\n if (window[\"jodastyle\"][\"descriptions\"] === undefined) {\n window[\"jodastyle\"][\"descriptions\"] = [];\n }\n window[\"jodastyle\"][\"descriptions\"].push({ category, className, description, example, modifiers, config });\n }\n addMarkdownPage(uri, name) {\n if (window[\"jodastyle\"] === undefined) {\n window[\"jodastyle\"] = {};\n }\n if (window[\"jodastyle\"][\"descriptions\"] === undefined) {\n window[\"jodastyle\"][\"descriptions\"] = [];\n }\n window[\"jodastyle\"][\"descriptions\"].push({\n category: \"page\",\n className: name,\n description: \"A page with markdown content\",\n exampleUri: uri,\n modifiers: [],\n config: {\n parseMarkdown: true\n }\n });\n }\n get data() {\n var _a;\n if (window[\"jodastyle\"] === undefined) {\n console.warn(\"[jodastyle description manager] No jodastyle descriptions found (Make sure you imported a theme) => window.jodastyle is undefined\");\n return [];\n }\n return (_a = window[\"jodastyle\"][\"descriptions\"]) !== null && _a !== void 0 ? _a : [];\n }\n get classes() {\n return this.data.map(e => e.className);\n }\n getDescription(className) {\n return this.data.find(e => e.className === className);\n }\n}\nexports.__JodaDescriptionManager = __JodaDescriptionManager;\nexports.JodaDescriptionManager = new __JodaDescriptionManager();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JodaElementException = void 0;\nclass JodaElementException {\n constructor(message, element = null, triggerCommand = null) {\n this.message = message;\n this.element = element;\n this.triggerCommand = triggerCommand;\n }\n}\nexports.JodaElementException = JodaElementException;\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JodaErrorElement = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nlet tpl = `\n<style>\n.joda-error {\n display: block;\n background-color: rgba(241,179,179,0.17);\n margin: 1em;\n padding: 1em;\n color: red;\n font-weight: bold;\n border: 3px solid red;\n}\n</style>\n<div class=\"joda-error\">\n [[ message ]]\n</div>\n`;\nlet JodaErrorElement = class JodaErrorElement extends embed_1.KaCustomElement {\n constructor(message) {\n super();\n this.message = message;\n let scope = this.init({\n message: message\n });\n }\n connectedCallback() {\n const _super = Object.create(null, {\n connectedCallback: { get: () => super.connectedCallback }\n });\n return __awaiter(this, void 0, void 0, function* () {\n yield _super.connectedCallback.call(this);\n this.scope.message = this.message;\n });\n }\n};\nexports.JodaErrorElement = JodaErrorElement;\nexports.JodaErrorElement = JodaErrorElement = __decorate([\n (0, embed_1.customElement)('joda-error'),\n (0, embed_1.template)(tpl),\n __metadata(\"design:paramtypes\", [Object])\n], JodaErrorElement);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jodaSiteConfig = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nclass JodaSiteConfig {\n constructor() {\n this.disable_split = false;\n this.disable_templates = false;\n this.disable_responsive = false;\n this.debug_visualize = false;\n this.debug_visualize_attribute = false; // Add Attribution to visualized elements\n }\n}\nexports.jodaSiteConfig = (0, embed_1.ka_session_storage)(new JodaSiteConfig(), \"jodaSiteConfig\");\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QTemplate = void 0;\nexports.template_parse = template_parse;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst embed_2 = require(\"@kasimirjs/embed\");\n/**\n * Searches for occurence of ${javascript expression} and replaces them with the result of the expression\n */\nfunction template_parse(input, scope, element) {\n // Search for ${...} by preg and replace them with the result of the expression\n return input.replace(/\\[\\[(.*?)]]/gmi, (match, p1) => {\n let val = (0, embed_1.ka_eval)(p1, scope, element, {});\n return val;\n });\n}\nclass QTemplate {\n constructor(content) {\n if (typeof content === \"string\") {\n this.content = (0, embed_2.ka_create_element)(\"template\");\n this.content.innerHTML = content;\n }\n else {\n this.content = content;\n }\n if (this.content instanceof HTMLTemplateElement) {\n if (this.content.content.children.length > 1) {\n throw new Error(\"Template must have exactly one root element. Found: \" + this.content.innerHTML);\n }\n this.content = this.content.content.firstElementChild.cloneNode(true);\n }\n this.selected = null;\n }\n parse(scope) {\n let tpl = (0, embed_2.ka_create_element)(\"template\", {}, [], null);\n tpl.content.append(this.content);\n //console.log(\"Parse\", this.content, this.content.toString());\n tpl.innerHTML = template_parse(tpl.innerHTML, scope, tpl);\n this.content = tpl.content.firstElementChild;\n return this;\n }\n /**\n * Returns the element with the given data-ref attribute\n * @param data_ref\n */\n by(data_ref) {\n let selector = `[data-ref=\"${data_ref}\"]`;\n if (this.content.matches(selector)) {\n return this.content;\n }\n return this.content.querySelector(selector);\n }\n select(data_ref) {\n this.selected = this.by(data_ref);\n if (this.selected === null) {\n console.error(\"Element with data-ref '\" + data_ref + \"' not found.\", this.content);\n throw \"Element with data-ref '\" + data_ref + \"' not found.\";\n }\n return this;\n }\n /**\n * Pick elements by selector and append them to the selected element\n *\n * @param source\n * @param selector\n */\n pick(source, selector, modifier = null) {\n Array.from(source.querySelectorAll(selector)).forEach((e) => {\n if (modifier !== null) {\n e = modifier(e);\n }\n this.selected.append(e);\n });\n return this;\n }\n /**\n * Select and return own wrapper\n *\n * @param data_ref\n */\n with(data_ref) {\n let instance = new QTemplate(this.content);\n instance.select(data_ref);\n return instance;\n }\n append(element) {\n if (element instanceof QTemplate) {\n this.selected.append(element.content);\n return this;\n }\n if (element instanceof NodeList) {\n Array.from(element).forEach(e => this.selected.append(e));\n return this;\n }\n if (Array.isArray(element) || element instanceof NodeList) {\n element.forEach(e => this.selected.append(e));\n return this;\n }\n this.selected.append(element);\n return this;\n }\n clone() {\n return new QTemplate(this.content.cloneNode(true));\n }\n}\nexports.QTemplate = QTemplate;\n","\"use strict\";\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.allTemplatesConnectedCallbacks = void 0;\nexports.await_property = await_property;\nexports.wrapElement = wrapElement;\nexports.registerJodaRenderer = registerJodaRenderer;\nexports.jodaRenderer = jodaRenderer;\nexports.splitChildrenBySelector = splitChildrenBySelector;\nexports.getCleanVariableValue = getCleanVariableValue;\nexports.parseConfigString = parseConfigString;\nexports.getTemplateFilledWithContent = getTemplateFilledWithContent;\nexports.runCallbacksForTemplate = runCallbacksForTemplate;\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst JodaElementException_1 = require(\"./JodaElementException\");\nconst QTemplate_1 = require(\"./QTemplate\");\nconst joda_1 = require(\"../joda\");\nconst JodaErrorElement_1 = require(\"./JodaErrorElement\");\nexports.allTemplatesConnectedCallbacks = [];\nfunction await_property(object_1, property_1) {\n return __awaiter(this, arguments, void 0, function* (object, property, wait = 10) {\n if (typeof property === \"string\") {\n property = property.split(\".\");\n }\n let value = undefined;\n let index = 0;\n while (value === undefined) {\n index++;\n let curObject = object;\n for (let i = 0; i < property.length; i++) {\n if (curObject === undefined) {\n break;\n }\n curObject = curObject[property[i]];\n }\n value = curObject;\n if (value === undefined)\n yield (0, embed_1.ka_sleep)(wait);\n if (index > 1000) {\n index = 0;\n console.warn(\"Still waiting for property: \", property, \"in object\", object);\n }\n }\n return value;\n });\n}\nfunction wrapElement(element, wrapper) {\n var _a;\n (_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(wrapper, element);\n wrapper.appendChild(element);\n}\nfunction registerJodaRenderer(name, renderer, config) {\n if (window[\"jodastyle\"] === undefined) {\n window[\"jodastyle\"] = {};\n }\n if (window[\"jodastyle\"][\"renderer\"] === undefined) {\n window[\"jodastyle\"][\"renderer\"] = {};\n }\n window[\"jodastyle\"][\"renderer\"][name] = { renderer, config };\n}\nfunction jodaRenderer(name, config) {\n return function (classOrDescriptor) {\n registerJodaRenderer(name, classOrDescriptor, config);\n };\n}\nfunction splitChildrenBySelector(element, splitBySelctor) {\n let ret = [];\n Array.from(element.children).forEach(child => {\n if (child.matches(splitBySelctor)) {\n ret.push(document.createDocumentFragment());\n }\n if (ret.length > 0) {\n ret[ret.length - 1].append(child);\n }\n });\n return ret;\n}\nfunction getCleanVariableValue(styleValue) {\n return styleValue.trim().replace(/^[\"']/g, '').replace(/[\"']$/, '').trim();\n}\n/**\n * Parse config string formattes as key-value pairs like this: key1: value1; key2: value2; ... into an object.\n *\n * @param input String representing key-value pair separated by colon and each line separated by semicolon\n * @returns Object containing key-value pairs from string\n */\nfunction parseConfigString(input) {\n // Check if input is null or undefined\n if (input == null) {\n return {};\n }\n // Split input string and filter invalid lines\n const obj = {};\n const lines = input.trim().split(';');\n for (let line of lines) {\n const parts = line.trim().split(':');\n if (parts.length == 2) {\n obj[parts[0].trim()] = parts[1].trim();\n }\n }\n return obj;\n}\n/**\n * Copy all data-child-* attributes from source to target element\n *\n * e.g. <slot data-child-class=\"abc\"> Will result in <div class=\"abc\">\n * Also: <slot data-child-layout=\"use: #someElement\"> Will result in <div layout=\"use: #someElement\">\n * @param source\n * @param target\n */\nfunction copyDataChildAttributes(source, target) {\n Array.from(source.attributes).forEach((attr) => {\n if (attr.name.startsWith(\"data-child-\")) {\n // if attribute is class, append classed to existing class attribute\n if (attr.name === \"data-child-class\") {\n target.classList.add(...attr.value.split(\" \").filter((value) => value !== \"\"));\n return;\n }\n target.setAttribute(attr.name.substring(11), attr.value);\n }\n });\n}\n/**\n * Allow multiple Queries separated by || statement. Returns first element found\n *\n * @param selector\n * @param element\n * @param limit\n * @returns Element found\n */\nfunction queryMulti(selector, element, limit = null) {\n let selectors = selector.split(\"||\");\n for (let sel of selectors) {\n sel = sel.trim();\n if (sel === \"\")\n return [element];\n try {\n let found = element.querySelectorAll(sel);\n if (found.length === 0)\n continue;\n if (limit === null) {\n return Array.from(found);\n }\n return Array.from(found).slice(0, limit);\n }\n catch (e) {\n console.warn(\"Invalid selector: \", sel, \"on element\", element);\n return [new JodaErrorElement_1.JodaErrorElement(\"Invalid selector: \" + sel + \" on element \" + element)];\n continue;\n }\n }\n return [];\n}\nlet slotIndex = 0;\nfunction getTemplateFilledWithContent(templateSelector, content, origElement) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n let templateConfig = joda_1.Joda.getRegisteredTemplate(templateSelector);\n let templateHtml = (_a = templateConfig === null || templateConfig === void 0 ? void 0 : templateConfig.template) !== null && _a !== void 0 ? _a : null;\n if (templateHtml === null) {\n let template = document.querySelector(templateSelector);\n if (template === null) {\n throw new JodaElementException_1.JodaElementException(\"Template not found: \" + templateSelector);\n }\n templateHtml = template.innerHTML;\n }\n // Load --layout-* variables to template parser\n let props = getComputedStyle(origElement);\n // Attention: Chrome cannot list defined CSS Variables!\n templateHtml = (0, QTemplate_1.template_parse)(templateHtml, {\n layout: new Proxy({}, {\n get: function (target, name) {\n var _a;\n let val = props.getPropertyValue(\"--layout-\" + name.toString());\n if (val === \"\") {\n // Return default from template config\n return (_a = templateConfig === null || templateConfig === void 0 ? void 0 : templateConfig.layoutDefaults[name.toString()]) !== null && _a !== void 0 ? _a : \"\";\n }\n if (val === \"true\")\n return true;\n if (val === \"false\")\n return false;\n return val;\n }\n })\n }, content);\n let clone = document.createRange().createContextualFragment(templateHtml);\n //console.log(templateSelector, \"Content: \", content.innerHTML);\n let done = [];\n clone.querySelectorAll(\"slot[data-select][data-copy]\").forEach((slot) => {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n let select = slot.getAttribute(\"data-select\");\n let selected;\n if (slot.getAttribute(\"data-limit\") === \"1\") {\n selected = queryMulti(select, content, 1).map((element) => element.cloneNode(true));\n }\n else {\n selected = queryMulti(select, content).map((element) => element.cloneNode(true));\n }\n if (slot.hasAttribute(\"data-select-text\") && selected) {\n Array.from(selected).forEach((element) => {\n slot.textContent += element.textContent;\n element.remove();\n });\n }\n else if (selected) {\n selected.forEach((element) => {\n copyDataChildAttributes(slot, element);\n });\n }\n if (selected.length === 0) {\n slot.classList.add(\"emptyslot\");\n console.warn(\"No element found for selector: \" + select + \" in template: \" + templateSelector + \" for slot: \", slot);\n return;\n }\n if (slot.hasAttribute(\"data-replace\") && selected) {\n slot.replaceWith(...selected);\n }\n else if (selected) {\n slot.append(...selected);\n }\n });\n clone.querySelectorAll(\"slot[data-select]\").forEach((slot) => {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n let select = slot.getAttribute(\"data-select\");\n let selected;\n if (slot.getAttribute(\"data-limit\") === \"1\") {\n selected = queryMulti(select, content, 1);\n }\n else {\n selected = queryMulti(select, content);\n }\n if (selected.length === 0) {\n slot.classList.add(\"emptyslot\");\n console.warn(\"No element found for selector: \" + select + \" in template: \" + templateSelector + \" for slot: \", slot);\n return;\n }\n if (slot.hasAttribute(\"data-select-text\") && selected) {\n selected.forEach((element) => {\n slot.textContent += element.textContent;\n element.remove();\n });\n return;\n }\n else if (selected) {\n selected.forEach((element) => {\n copyDataChildAttributes(slot, element);\n });\n }\n if (slot.hasAttribute(\"data-replace\") && selected) {\n slot.replaceWith(...selected);\n }\n else if (selected) {\n slot.append(...selected);\n }\n });\n // Select <slot> element with no data-select attribute\n let slot = clone.querySelector(\"slot:not([data-select])\");\n if (slot !== null && slot.hasAttribute(\"data-class\")) {\n if (done.includes(slot)) {\n return;\n }\n done.push(slot);\n slot.setAttribute(\"_slotIndex\", (++slotIndex).toString());\n Array.from(content.children).forEach((element) => {\n // Add all classes from data-class attribute to selected element\n element.classList.add(...slot.getAttribute(\"data-class\").split(\" \").filter((value) => value !== \"\"));\n });\n }\n if (slot !== null && slot.hasAttribute(\"data-replace\")) {\n slot.replaceWith(...Array.from(content.children));\n }\n else if (slot !== null) {\n if (slot.hasAttribute(\"data-select-text\")) {\n slot.textContent += content.textContent;\n }\n else {\n let addChildren = Array.from(content.children);\n if (addChildren.length === 0) {\n slot.classList.add(\"emptyslot\");\n }\n slot.append(...addChildren);\n }\n }\n else {\n content.remove();\n }\n return clone;\n });\n}\nfunction runCallbacksForTemplate(templateSelector, element) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let templateConfig = joda_1.Joda.getRegisteredTemplate(templateSelector);\n if ((_a = templateConfig === null || templateConfig === void 0 ? void 0 : templateConfig.callbacks) === null || _a === void 0 ? void 0 : _a.onAfterConnectedCallback) {\n yield templateConfig.callbacks.onAfterConnectedCallback(element);\n }\n if ((_b = templateConfig === null || templateConfig === void 0 ? void 0 : templateConfig.callbacks) === null || _b === void 0 ? void 0 : _b.onAfterAllTemplatesConnectedCallback) {\n // Spool up callback (executed by jodastyle)\n exports.allTemplatesConnectedCallbacks.push(() => __awaiter(this, void 0, void 0, function* () { return templateConfig.callbacks.onAfterAllTemplatesConnectedCallback(element); }));\n }\n });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseVariableAndStyleStr = parseVariableAndStyleStr;\nexports.parseVariableStr = parseVariableStr;\nexports.parseAttributeStr = parseAttributeStr;\nexports.createElement = createElement;\nexports.createElementTree = createElementTree;\nconst embed_1 = require(\"@kasimirjs/embed\");\nfunction parseVariableAndStyleStr(varString) {\n let attrs = { \"$\": {}, \"@\": {} };\n let regex = new RegExp(`([@$])[^@^$]+`, \"gi\");\n varString.replace(regex, (match, type) => {\n match = match.substring(1);\n if (match.indexOf(\"=\") === -1 && type === \"@\") {\n if (typeof attrs[type].class === \"undefined\")\n attrs[type].class = \"\";\n attrs[type].class += \" \" + match;\n attrs[type].class = attrs[type].class.trim();\n }\n else {\n let res = match.split(\"=\");\n attrs[type][res.shift()] = res.join(\"=\").trim();\n }\n return \"\";\n });\n return attrs;\n}\nfunction parseVariableStr(varString, delimiter = \"@\") {\n let attrs = {};\n let regex = new RegExp(`\\\\${delimiter}[^${delimiter}]+`, \"gi\");\n varString.replace(regex, (match) => {\n match = match.substring(1);\n if (match.indexOf(\"=\") === -1) {\n if (typeof attrs.class === \"undefined\")\n attrs.class = \"\";\n attrs.class += \" \" + match;\n attrs.class = attrs.class.trim();\n }\n else {\n let res = match.split(\"=\");\n attrs[res.shift()] = res.join(\"=\").trim();\n }\n return \"\";\n });\n return attrs;\n}\nfunction parseAttributeStr(attrString) {\n return parseVariableStr(attrString, \"@\");\n}\nfunction createElement(definition) {\n let defRest = definition.trim();\n let tag = \"div\";\n defRest = defRest.replace(/^[a-z0-9_\\:\\-]+/ig, (match) => {\n tag = match;\n return \"\";\n });\n let attrs = parseAttributeStr(defRest);\n let element = (0, embed_1.ka_create_element)(tag, attrs);\n return element;\n}\nfunction createElementTree(def) {\n let start = null;\n let leaf = null;\n let splitted = def.split(\">\");\n while (splitted.length > 0) {\n let cur = splitted.shift();\n let refName = null;\n cur = cur.replace(/§([a-z0-9_\\-]+)/, (a, name) => {\n refName = name;\n return \"\";\n });\n if (cur.trim().startsWith(\"|\")) {\n // TextNode\n let el = document.createElement(\"div\");\n if (splitted.length > 0)\n cur += \">\" + splitted.join(\">\");\n el.innerHTML = cur.trim().substring(1);\n el.childNodes.forEach((e) => leaf.append(e.cloneNode(true)));\n el.remove();\n break;\n }\n let el = createElement(cur);\n /*if (refName !== null)\n this.#refs[refName] = el;\n*/\n if (start === null) {\n start = leaf = el;\n }\n else {\n if (leaf instanceof HTMLTemplateElement) {\n leaf.content.appendChild(el);\n }\n else {\n leaf.appendChild(el);\n }\n leaf = el;\n }\n }\n return { start, leaf };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Logger = void 0;\nclass Logger {\n constructor(name) {\n this.name = name;\n }\n log(...args) {\n console.log(\"[\" + this.name + \"]\", ...args);\n }\n warn(...args) {\n console.warn(\"[\" + this.name + \"]\", ...args);\n }\n}\nexports.Logger = Logger;\n","export * from \"./helper/JodaRenderer\";\nexport * from \"./component/joda-content-element\";\nexport * from \"./component/joda-fetch\";\nexport * from \"./component/joda-split\";\nexport * from \"./helper/functions\";\nexport * from \"./helper/JodaRenderer\";\nexport * from \"./helper/QTemplate\";\nexport * from \"./types/DefaultLayout\";\nexport * from \"./helper/JodaDescriptionManager\";\nexport * from \"./helper/logger\";\nexport * from \"./processor/jodasplit\";\nexport * from \"./helper/JodaSiteConfig\";\nexport * from \"./joda\";\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Joda = void 0;\nexports.Joda = new (class {\n /**\n * Register a template instead of adding <template id=\"...\">...</template> to the DOM\n *\n * @param id\n * @param data\n * @param layoutDefaults\n * @param callbacks\n */\n registerTemplate(id, data, layoutDefaults = {}, callbacks = {}) {\n if (!window[\"jodastyle\"])\n window[\"jodastyle\"] = {};\n if (!window[\"jodastyle\"][\"templates\"])\n window[\"jodastyle\"][\"templates\"] = {};\n window[\"jodastyle\"][\"templates\"][id] = {\n template: data,\n layoutDefaults: layoutDefaults,\n callbacks: callbacks\n };\n }\n getRegisteredTemplate(id) {\n var _a, _b, _c;\n if (id.startsWith(\"#\"))\n id = id.substring(1);\n return (_c = (_b = (_a = window[\"jodastyle\"]) === null || _a === void 0 ? void 0 : _a[\"templates\"]) === null || _b === void 0 ? void 0 : _b[id]) !== null && _c !== void 0 ? _c : null;\n }\n})();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LayoutProcessor = void 0;\nconst functions_1 = require(\"../helper/functions\");\nconst commands = [\"use\", \"wrap\"];\nclass LayoutProcessor {\n constructor(logger) {\n this.logger = logger;\n }\n processNode(node) {\n if (!node.hasAttribute(\"layout\"))\n return node;\n let layout = (0, functions_1.parseConfigString)(node.getAttribute(\"layout\"));\n for (let key in layout) {\n if (commands.includes(key)) {\n node.style.setProperty(\"--joda-\" + key, layout[key]);\n continue;\n }\n node.style.setProperty(\"--layout-\" + key, layout[key]);\n }\n return node;\n }\n}\nexports.LayoutProcessor = LayoutProcessor;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Jodaresponsive = exports.breakpoints = void 0;\nexports.getCurrentBreakpoint = getCurrentBreakpoint;\nexports.parseClassStr = parseClassStr;\nexports.breakpoints = {\n \"xsm\": 0,\n \"sm\": 576,\n \"md\": 768,\n \"lg\": 992,\n \"xl\": 1200,\n \"xxl\": 1400\n};\nfunction getCurrentBreakpoint() {\n let ret = \"\";\n Object.keys(exports.breakpoints).forEach((key) => {\n if (window.innerWidth >= exports.breakpoints[key]) {\n ret = key;\n }\n });\n return ret;\n}\nclass ResponsiveClass {\n constructor() {\n this.always = [];\n this.default = null;\n this.xsm = null;\n this.xs = null;\n this.sm = null;\n this.md = null;\n this.lg = null;\n this.xl = null;\n this.xxl = null;\n this.breakpoints = [\"xsm\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"];\n }\n getClassesForBreakpoint(breakpoint = null) {\n if (breakpoint === null) {\n breakpoint = getCurrentBreakpoint();\n }\n let ret = [];\n ret.push(...this.always);\n let isDefault = true;\n for (let bp of this.breakpoints) {\n //console.log(\"Breakpoint\", bp, this[bp], breakpoint);\n if (this[bp] !== null) {\n ret = this[bp];\n isDefault = false;\n }\n if (bp === breakpoint) {\n break;\n }\n }\n if (isDefault && this.default !== null) {\n ret.push(...this.default);\n }\n ret = ret.filter((item) => item !== \"\");\n return ret;\n }\n ;\n}\nfunction parseClassStr(input) {\n let ret = new ResponsiveClass();\n let pointer = \"always\";\n input.split(\" \").map((item) => {\n let matches = item.match(/\\:([a-zA-Z]*)\\:/);\n if (matches === null) {\n ret[pointer].push(item);\n return;\n }\n pointer = matches[1];\n if (pointer === \"\") {\n pointer = \"default\";\n }\n if (ret[pointer] === null) {\n ret[pointer] = [];\n }\n });\n return ret;\n}\nclass Jodaresponsive {\n constructor(logger) {\n this.logger = logger;\n }\n processNode(node) {\n var _a;\n const origAttr = \"data-class-orig\";\n if (!node.hasAttribute(origAttr)) {\n let classes = (_a = node.getAttribute(\"class\")) !== null && _a !== void 0 ? _a : \"\";\n if (classes.indexOf(\":\") === -1)\n return;\n node.setAttribute(origAttr, classes);\n }\n let classes = node.getAttribute(origAttr);\n let responsiveClasses = parseClassStr(classes);\n node.setAttribute(\"class\", \"\");\n node.classList.add(...responsiveClasses.always.filter((item) => item !== \"\"));\n node.classList.add(...responsiveClasses.getClassesForBreakpoint());\n }\n process(node) {\n Array.from([node, ...Array.from(node.querySelectorAll(\"*\"))]).forEach((child) => {\n this.processNode(child);\n });\n }\n}\nexports.Jodaresponsive = Jodaresponsive;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Jodashorts = void 0;\nclass Jodashorts {\n constructor(logger) {\n this.logger = logger;\n }\n process(source) {\n source = source.replace(/\\[([a-z0-9\\-)]+)(.*?)]/g, (match, name, attrStr) => {\n let attrs = {\n \"class\": []\n };\n // Search for name=\"value\" or name='value'. Make sure that starting ' matches ending ' using back reference\n attrStr = attrStr.replace(/”/g, '\"').replace(/“/g, '\"').replace(/‘/g, \"'\").replace(/’/g, \"'\");\n attrStr = attrStr.replace(/([a-z0-9\\-\\.]+)=([\"'])(.*?)\\2/mig, (match, name, quote, value) => {\n if (name === \"class\") {\n attrs[\"class\"].push(...value.split(\" \"));\n return \"\";\n }\n attrs[name] = value;\n return \"\";\n });\n attrStr.split(\" \").forEach((attr) => {\n attr = attr.trim();\n if (attr === \"\")\n return;\n if (attr.startsWith(\".\")) {\n attrs[\"class\"].push(attr.substr(1));\n return;\n }\n attrs[attr] = \"\";\n });\n let attrstr = \"\";\n for (let attr in attrs) {\n if (attr === \"class\") {\n attrstr += ` class=\"${attrs[attr].join(\" \")}\"`;\n }\n else {\n attrstr += ` ${attr}=\"${attrs[attr]}\"`;\n }\n }\n let ret = `<${name}${attrstr}></${name}>`;\n return ret;\n });\n return source;\n }\n}\nexports.Jodashorts = Jodashorts;\n","\"use strict\";\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _Jodasplit_target, _Jodasplit_parents, _Jodasplit_currentParent, _Jodasplit_currentContent, _Jodasplit_currentChildren;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Jodasplit = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\n/**\n * Copy attributes data-section-* from source to target\n *\n * So data-section-class becomes class on target\n *\n * On data-section-class it will add the classs to the existing classes\n * On data-section-style it will add the styles to existing styles\n *\n * @param source\n * @param target\n */\nfunction copySectionAttributes(source, target) {\n var _a;\n for (let className of ((_a = source.getAttribute(\"class\")) === null || _a === void 0 ? void 0 : _a.split(\" \")) || []) {\n // if className starts with sec- it is a section class. Copy the name after sec- and add it to the target\n // remove the sec- prefix\n if (className.startsWith(\"sec-\")) {\n target.classList.add(className.substr(4));\n source.classList.remove(className);\n }\n }\n source.getAttributeNames().forEach((name) => {\n if (!name.startsWith(\"data-section-\")) {\n return;\n }\n let value = source.getAttribute(name);\n name = name.substr(13);\n if (name === \"class\") {\n // Filter empty classes\n target.classList.add(...value.split(\" \").filter((c) => c.length > 0));\n return;\n }\n if (name === \"style\") {\n // Filter empty classes\n target.setAttribute(\"style\", (target.getAttribute(\"style\") || \"\") + value);\n return;\n }\n // default\n target.setAttribute(name, value);\n });\n}\nclass Jodasplit {\n constructor(logger) {\n this.logger = logger;\n _Jodasplit_target.set(this, document.createDocumentFragment());\n _Jodasplit_parents.set(this, [__classPrivateFieldGet(this, _Jodasplit_target, \"f\")]);\n _Jodasplit_currentParent.set(this, (0, embed_1.ka_create_element)(\"section\", { class: \"section-h1pre\" }));\n _Jodasplit_currentContent.set(this, (0, embed_1.ka_create_element)(\"div\", { class: \"content\" }, [], __classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\")));\n _Jodasplit_currentChildren.set(this, (0, embed_1.ka_create_element)(\"div\", { class: \"children\" }, [], __classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\")));\n }\n findParentElement(layer) {\n while (__classPrivateFieldGet(this, _Jodasplit_parents, \"f\").length > layer) {\n __classPrivateFieldGet(this, _Jodasplit_parents, \"f\").pop();\n }\n while (__classPrivateFieldGet(this, _Jodasplit_parents, \"f\")[__classPrivateFieldGet(this, _Jodasplit_parents, \"f\").length - 1] === undefined) {\n __classPrivateFieldGet(this, _Jodasplit_parents, \"f\").pop();\n }\n return __classPrivateFieldGet(this, _Jodasplit_parents, \"f\")[__classPrivateFieldGet(this, _Jodasplit_parents, \"f\").length - 1];\n }\n createNewElement(tagName, layer, tag) {\n tagName = tagName.toLowerCase();\n let curParent = this.findParentElement(layer);\n //console.log(\"createNewElement\", tagName, curParent, this.#parents);\n let curParentChildren = curParent.childNodes[1];\n __classPrivateFieldSet(this, _Jodasplit_currentParent, (0, embed_1.ka_create_element)(tag, { class: \"section-\" + tagName }), \"f\");\n while (__classPrivateFieldGet(this, _Jodasplit_parents, \"f\").length < layer) {\n __classPrivateFieldGet(this, _Jodasplit_parents, \"f\").push(undefined);\n }\n __classPrivateFieldGet(this, _Jodasplit_parents, \"f\").push(__classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\"));\n if (curParent === __classPrivateFieldGet(this, _Jodasplit_target, \"f\")) {\n curParent.appendChild(__classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\"));\n }\n else {\n curParentChildren.append(__classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\"));\n }\n __classPrivateFieldSet(this, _Jodasplit_currentContent, (0, embed_1.ka_create_element)(\"div\", { class: \"content\" }, [], __classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\")), \"f\");\n __classPrivateFieldSet(this, _Jodasplit_currentChildren, (0, embed_1.ka_create_element)(\"div\", { class: \"children\" }, [], __classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\")), \"f\");\n return __classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\");\n }\n process(source) {\n let lastLayer = 1;\n __classPrivateFieldGet(this, _Jodasplit_target, \"f\").append(__classPrivateFieldGet(this, _Jodasplit_currentParent, \"f\"));\n // Layout Processor now in JodaStyle\n //let layoutProcessor = new LayoutProcessor(this.logger);\n Array.from(source.children).forEach((child) => {\n if (child instanceof HTMLElement && child.matches(\"footer\")) {\n // Just copy node\n __classPrivateFieldGet(this, _Jodasplit_target, \"f\").appendChild(child);\n return;\n }\n if (child instanceof HTMLElement && child.matches(\"h1, h2, h3, h4, h5, h6, h7, h8, h9, hr:not(.hr), .section-h2, .section-h3, .section-h4\")) {\n let layer = 1;\n let tag = \"div\";\n if (child.matches(\"h1,h2,.section-h2\") && !child.matches(\".section-h3, .section-h4\")) {\n layer = lastLayer = 1;\n tag = \"section\";\n }\n else if (child.matches(\"h3, h4, h5, h6, h7, h8, h9, .section-h3, .section-h4\")) {\n if (child.matches(\".section-h3\")) {\n layer = lastLayer = 6;\n }\n else if (child.matches(\".section-h4\")) {\n layer = lastLayer = 8;\n }\n else {\n layer = lastLayer = parseInt(child.tagName.substr(1)) * 2; // Allow HR in between\n }\n tag = \"div\";\n }\n else if (child.matches(\"hr\")) {\n layer = lastLayer + 1; // hr crates subelement of the last element\n tag = \"div\";\n }\n //console.log(\"layer is\", layer, lastLayer, child.tagName, child);\n let e = this.createNewElement(child.tagName.toLowerCase(), layer, tag);\n e.setAttribute(\"layout\", child.getAttribute(\"layout\") || \"\");\n child.removeAttribute(\"layout\");\n // Copy data-section-* attributes to the new element\n copySectionAttributes(child, e);\n if (child.tagName === \"HR\" && !child.classList.contains(\"hr\")) {\n // Only copy styles from HR Elements not marked as .hr\n e.setAttribute(\"style\", child.getAttribute(\"style\") || \"\");\n child.removeAttribute(\"style\");\n e.classList.add(...child.classList);\n child.setAttribute(\"orig-class\", child.getAttribute(\"class\") || \"\");\n child.setAttribute(\"class\", \"\");\n }\n //layoutProcessor.processNode(e);\n }\n if (child.tagName === \"HR\" && !child.classList.contains(\"hr\")) {\n child.setAttribute(\"orig-pre-split-class\", child.getAttribute(\"class\"));\n child.setAttribute(\"class\", \"d-none\");\n }\n __classPrivateFieldGet(this, _Jodasplit_currentContent, \"f\").appendChild(child);\n });\n // Remove empty content elements\n Array.from(__classPrivateFieldGet(this, _Jodasplit_target, \"f\").querySelectorAll(\".children\")).forEach((child) => {\n if (child.children.length === 0) {\n child.remove();\n }\n });\n // Reove empty content elements\n Array.from(__classPrivateFieldGet(this, _Jodasplit_target, \"f\").querySelectorAll(\".content\")).forEach((child) => {\n if (child.children.length === 0) {\n child.remove();\n }\n });\n return __classPrivateFieldGet(this, _Jodasplit_target, \"f\");\n }\n}\nexports.Jodasplit = Jodasplit;\n_Jodasplit_target = new WeakMap(), _Jodasplit_parents = new WeakMap(), _Jodasplit_currentParent = new WeakMap(), _Jodasplit_currentContent = new WeakMap(), _Jodasplit_currentChildren = new WeakMap();\n","\"use strict\";\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jodaStyleCommands = void 0;\nconst ka_quick_template_1 = require(\"../helper/ka-quick-template\");\nconst functions_1 = require(\"../helper/functions\");\nconst embed_1 = require(\"@kasimirjs/embed\");\nexports.jodaStyleCommands = {};\n/**\n * Replace the element with the given @class > @id=elementId template\n *\n * @param value\n * @param target\n * @param element\n * @param logger\n */\nexports.jodaStyleCommands[\"--joda-replace-by\"] = (value, target, element, logger) => {\n let parent = element.parentElement;\n let ret = (0, ka_quick_template_1.createElementTree)(value);\n parent.replaceChild(ret.start, element);\n Array.from(element.children).forEach((child) => {\n ret.leaf.append(child);\n });\n element.remove();\n return ret.leaf;\n};\n/**\n * Wrap the selected element with the Template\n *\n * @param value\n * @param target\n * @param element\n * @param logger\n */\nexports.jodaStyleCommands[\"--joda-wrap\"] = (value, target, element, logger) => __awaiter(void 0, void 0, void 0, function* () {\n let parent = element.parentElement;\n if (value.startsWith(\"#\")) {\n console.log(\"Wrap element\", element, \"with template\", value);\n let placeholder = document.createElement(\"div\");\n parent.insertBefore(placeholder, element);\n // Move Element to placeholder (to be able to access it in <slot>)\n placeholder.append(element);\n let newElement = yield (0, functions_1.getTemplateFilledWithContent)(value, placeholder, element);\n placeholder.replaceWith(newElement);\n yield (0, functions_1.runCallbacksForTemplate)(value, element);\n return element;\n }\n else {\n let ret = (0, ka_quick_template_1.createElementTree)(value);\n parent.replaceChild(ret.start, element);\n ret.leaf.append(element);\n return element;\n }\n});\nexports.jodaStyleCommands[\"--joda-container\"] = (value, target, element, logger) => {\n let ret = (0, ka_quick_template_1.createElementTree)(value);\n Array.from(element.children).forEach((child) => {\n ret.leaf.append(child);\n });\n element.append(ret.start);\n return element;\n};\nexports.jodaStyleCommands[\"--joda-unwrap\"] = (value, target, element, logger) => {\n let parent = element.parentElement;\n let grandParent = parent.parentElement;\n grandParent.insertBefore(element, parent);\n if (parent.children.length === 0) {\n parent.remove();\n }\n return element;\n};\n/**\n * --joda-group: @row\n * @param value\n * @param target\n * @param element\n * @param logger\n */\nexports.jodaStyleCommands[\"--joda-group\"] = (value, target, element, logger) => {\n const groupByKey = \"jodaIsGroupedBy\";\n if (element[groupByKey] !== undefined) {\n return element;\n }\n let siblings = [];\n let curSibling = element.nextElementSibling;\n while (curSibling && (0, functions_1.getCleanVariableValue)(getComputedStyle(curSibling).getPropertyValue(\"--joda-group\")) === value) {\n siblings.push(curSibling);\n curSibling[groupByKey] = true;\n curSibling = curSibling.nextElementSibling;\n }\n let parent = element.parentElement;\n let ret = (0, ka_quick_template_1.createElementTree)(value);\n // Insert the Element\n element.parentElement.insertBefore(ret.start, element);\n ret.leaf.append(element);\n siblings.forEach((sibling) => {\n ret.leaf.append(sibling);\n });\n return element;\n};\nexports.jodaStyleCommands[\"--joda-class\"] = (value, target, element, logger) => {\n let ret = (0, ka_quick_template_1.createElementTree)(value);\n element.setAttribute(\"class\", element.getAttribute(\"class\") + \" \" + value);\n return element;\n};\nexports.jodaStyleCommands[\"--joda-use\"] = (value, target, element, logger) => __awaiter(void 0, void 0, void 0, function* () {\n if (value.startsWith(\"#\")) {\n let placeholder = document.createElement(\"div\");\n Array.from(element.children).forEach((child) => {\n placeholder.append(child);\n });\n let newElement = yield (0, functions_1.getTemplateFilledWithContent)(value, placeholder, element);\n let firstElement = newElement.firstElementChild;\n firstElement[\"joda-style-processed\"] = true; // Set style as processed (to prevent double processing)\n // Copy first line of the outerHTML string of the element\n let debugElement = element.outerHTML.split(\"\\n\")[0];\n firstElement.setAttribute(\"_orig_elem\", debugElement);\n element.getAttributeNames().forEach((attrName) => {\n // copy attributes but. Append class and styles\n if (attrName === \"class\") {\n firstElement.setAttribute(attrName, element.getAttribute(attrName) + \" \" + firstElement.getAttribute(attrName));\n return;\n }\n if (attrName === \"style\") {\n firstElement.setAttribute(attrName, element.getAttribute(attrName) + \" \" + firstElement.getAttribute(attrName));\n return;\n }\n if (attrName.startsWith(\"layout\")) {\n firstElement.setAttribute(\"layout-orig\", element.getAttribute(attrName));\n return;\n }\n firstElement.setAttribute(attrName, element.getAttribute(attrName));\n });\n element.parentElement.insertBefore(newElement, element);\n element.parentElement.removeChild(element);\n yield (0, functions_1.runCallbacksForTemplate)(value, firstElement);\n return firstElement;\n }\n let matches = value.match(/([a-z0-9\\_-]+)\\s*\\((.*?)\\)/);\n if (!matches) {\n console.error(\"Invalid --joda-use command: \", value, \"in element\", element, \" should be in format: commandName(arg1: value1, arg2: value2, ...)\");\n throw \"Invalid --joda-use command: \" + value + \" should be in format: commandName(arg1: value1, arg2: value2, ...)\";\n }\n logger.log(\"Using renderer: \", matches[1], \"with args: \", matches[2], \"on element\", element);\n let commandName = matches[1];\n //console.log(\"interpret\", \"{\" + matches[2] + \"}\")\n let args = (0, embed_1.ka_eval)(\"{\" + matches[2] + \"}\", {}, target, {});\n let command = yield (0, functions_1.await_property)(window, [\"jodastyle\", \"renderer\", commandName]);\n let config = new command.config();\n let style = getComputedStyle(element);\n Object.keys(config).forEach((key) => {\n let val = style.getPropertyValue(\"--layout-\" + key.replace(/\\_/g, \"-\"));\n if (val !== \"\") {\n config[key] = val.replace(/^[\"']/g, '').replace(/[\"']$/, '').trim();\n }\n });\n Object.assign(config, args);\n return yield (new command.renderer).render(element, config);\n});\nexports.jodaStyleCommands[\"--joda-on-empty-class\"] = (value, target, element, logger) => __awaiter(void 0, void 0, void 0, function* () {\n console.log(\"Check if element is empty\", element.textContent.trim(), \"and add class\", value);\n if (element.textContent.trim() === \"\") {\n element.classList.add(value);\n }\n return element;\n});\nexports.jodaStyleCommands[\"--joda-hide-empty\"] = (value, target, element, logger) => __awaiter(void 0, void 0, void 0, function* () {\n function hideEmptyElements(node) {\n if (node.querySelectorAll(\"img, iframe\").length > 0) {\n return;\n }\n if (node.textContent.trim() !== \"\") {\n return;\n }\n node.style.setProperty(\"display\", \"none\", \"important\");\n }\n if (value === \"true\" || value === \"1\" || value === \"yes\" || value === \"on\") {\n hideEmptyElements(element);\n }\n return element;\n});\n","\"use strict\";\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Jodastyle = void 0;\nconst jodastyle_commands_1 = require(\"./jodastyle-commands\");\nconst functions_1 = require(\"../helper/functions\");\nconst embed_1 = require(\"@kasimirjs/embed\");\nconst JodaElementException_1 = require(\"../helper/JodaElementException\");\nconst JodaErrorElement_1 = require(\"../helper/JodaErrorElement\");\nconst LayoutProcessor_1 = require(\"./LayoutProcessor\");\nclass Jodastyle {\n constructor(logger) {\n this.logger = logger;\n }\n process(node) {\n return __awaiter(this, void 0, void 0, function* () {\n // Wait for all joda-split to be ready\n for (let child of Array.from(node.getElementsByTagName(\"joda-split\"))) {\n while (child[\"ready\"] !== true) {\n yield (0, embed_1.ka_sleep)(10);\n }\n }\n // Run layout-attribute processor (for whole style - already running on joda-split)\n let layoutProcessor = new LayoutProcessor_1.LayoutProcessor(this.logger);\n node.querySelectorAll(\"[layout]\").forEach((node) => {\n layoutProcessor.processNode(node);\n });\n // Run jodastyle commands\n for (let child of [node, ...Array.from(node.children)]) {\n if (child[\"joda-style-processed\"] === true) {\n continue;\n }\n child[\"joda-style-processed\"] = true;\n let origChild = child;\n let style = getComputedStyle(child);\n let parentStyle = null;\n if (child.parentElement) {\n parentStyle = getComputedStyle(child.parentElement);\n }\n let keys = Object.keys(jodastyle_commands_1.jodaStyleCommands);\n for (let key of Array.from(keys)) {\n let styleValue = style.getPropertyValue(key);\n if (styleValue === \"\") {\n continue;\n }\n if (parentStyle !== null && styleValue === parentStyle.getPropertyValue(key)) {\n continue; // Inherited from parent\n }\n // Replace starting and ending with \" or ' with nothing\n styleValue = (0, functions_1.getCleanVariableValue)(styleValue);\n //await ka_sleep(10);\n let command = jodastyle_commands_1.jodaStyleCommands[key];\n try {\n child = (yield command(styleValue, node, child, this.logger));\n }\n catch (e) {\n if (e instanceof JodaElementException_1.JodaElementException) {\n e.triggerCommand = key + \": \" + styleValue;\n this.logger.warn(e.message, e.element);\n child.replaceWith(new JodaErrorElement_1.JodaErrorElement(e.message + \" (trigger by: \" + e.triggerCommand + \")\"));\n }\n else {\n this.logger.warn(\"Unhandled exception\", e, \"on element\", child, \"triggered by\", key + \": \" + styleValue);\n throw e;\n }\n }\n }\n yield this.process(child); // Recursive parse replaced elements\n }\n });\n }\n}\nexports.Jodastyle = Jodastyle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Jodavisualize = void 0;\nconst embed_1 = require(\"@kasimirjs/embed\");\nclass Jodavisualize {\n process(element) {\n [element, ...Array.from(element.querySelectorAll(\"*\"))].forEach((e) => {\n e.insertBefore((0, embed_1.ka_create_element)(\"div\", { class: \"joda-visualize\" }, `<${e.tagName.toLowerCase()} class=\"${Array.from(e.classList).join(\", \")}\">`), e.firstElementChild);\n });\n }\n}\nexports.Jodavisualize = Jodavisualize;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultLayout = void 0;\nclass DefaultLayout {\n constructor() {\n this.container = \"container\";\n this.break1 = \"xl\";\n }\n}\nexports.DefaultLayout = DefaultLayout;\n","import { ka_create_element } from \"@kasimirjs/embed\";\nimport { __liscom_config } from \"../index\";\nlet observedDataDetailTitle = [];\nsetInterval(() => {\n if ((__liscom_config === null || __liscom_config === void 0 ? void 0 : __liscom_config.detailsTitle) !== true) {\n return;\n }\n let elements = document.querySelectorAll(\"[data-details-title]\");\n for (let e of Array.from(elements)) {\n // if already in observedDataDetailTitle, continue\n if (observedDataDetailTitle.indexOf(e) !== -1)\n continue;\n observedDataDetailTitle.push(e);\n let title = e.getAttribute(\"data-details-title\");\n let details = ka_create_element(\"details\", { \"data-debug-liscom-element\": \"details-title\" });\n let summary = ka_create_element(\"summary\", {}, [], details);\n e.parentElement.insertBefore(details, e);\n summary.append(title);\n details.append(e);\n }\n}, 1000);\n","export var __liscom_config = null;\nexport class LiscomConfig {\n constructor() {\n this.slideshow = true;\n this.detailsTitle = true;\n }\n}\n/**\n * Activates the liscom components\n *\n * @param liscomConfig\n */\nexport function liscom_enable(liscomConfig = {}) {\n let config = new LiscomConfig();\n config = Object.assign(Object.assign({}, config), liscomConfig);\n console.log(\"[liscom] enabled features: \", config);\n __liscom_config = config;\n}\nimport \"./slideshow/slideshow\";\nimport \"./details-title/details-title\";\nimport \"./typewriter-element/typewriter-element\";\nimport \"./slider/liscom-slider\";\nimport \"./scrollspy/scrollspy\";\nimport \"./scroll-to-top/scroll-to-top\";\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from \"@kasimirjs/embed\";\nlet ScrollToTop = class ScrollToTop extends HTMLElement {\n connectedCallback() {\n console.log(\"scroll to top\");\n this.addEventListener(\"click\", () => {\n window.scrollTo({ top: 0, behavior: \"smooth\" });\n });\n let active = false;\n if (this.innerHTML.trim() === \"\")\n this.innerHTML = \"⬆️\";\n window.addEventListener(\"scroll\", () => {\n if (window.scrollY > 300 && active === false) {\n this.classList.add(\"show\");\n active = true;\n }\n if (window.scrollY < 300 && active === true) {\n this.classList.remove(\"show\");\n active = false;\n }\n }, { passive: true });\n }\n};\nScrollToTop = __decorate([\n customElement(\"liscom-scroll-to-top\")\n], ScrollToTop);\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nimport { ka_create_element } from \"@kasimirjs/embed\";\nimport { customElement } from \"@kasimirjs/embed\";\nimport { ka_dom_ready } from \"@kasimirjs/embed\";\nlet LiscomScrollspy = class LiscomScrollspy extends HTMLElement {\n constructor() {\n super(...arguments);\n this.elements = {};\n // language=html\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n yield ka_dom_ready();\n // Allow attaching to any element\n this.style.display = \"contents\";\n document.querySelectorAll(\"[data-scrollspy-name]\").forEach((el) => {\n let curName = el.getAttribute(\"data-scrollspy-name\");\n let navElem = ka_create_element(\"li\", { class: \"\" }, [\n ka_create_element(\"a\", { href: window.location.pathname + \"#\" + el.getAttribute(\"id\") }, curName)\n ], this);\n let curMo = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting) {\n navElem.classList.add(\"active\");\n }\n else {\n navElem.classList.remove(\"active\");\n }\n });\n curMo.observe(el);\n this.elements[curName] = ({ target: el, nav: navElem, observer: curMo });\n });\n });\n }\n disconnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n // disconnect all observers\n for (let key in this.elements) {\n this.elements[key].observer.disconnect();\n this.elements[key].nav.remove();\n }\n });\n }\n};\nLiscomScrollspy = __decorate([\n customElement(\"liscom-scrollspy\")\n], LiscomScrollspy);\nexport { LiscomScrollspy };\n","class MyComponent extends HTMLElement {\n constructor() {\n super();\n this.currentSection = 0;\n // Define your dragStart, dragEnd, and dragMove methods here to handle mouse drag\n this.isDragging = false;\n this.startY = 0;\n this.startX = 0;\n this.scrollStartY = 0;\n this.scrollStartX = 0;\n }\n connectedCallback() {\n /*\n this.container = this.shadowRoot!.querySelector('.container')!;\n this.prevBtn = this.shadowRoot!.getElementById('prevBtn')!;\n this.nextBtn = this.shadowRoot!.getElementById('nextBtn')!;\n this.sections = this.querySelectorAll('section');\n\n\n\n this.prevBtn.addEventListener('click', () => this.scroll(-1));\n this.nextBtn.addEventListener('click', () => this.scroll(1));\n */\n console.log(\"connected\");\n this.addEventListener('mousedown', this.dragStart);\n this.addEventListener('mouseup', this.dragEnd);\n this.addEventListener('mouseleave', this.dragEnd);\n this.addEventListener('mousemove', this.dragMove);\n }\n doScroll(direction) {\n this.currentSection = Math.max(0, Math.min(this.sections.length - 1, this.currentSection + direction));\n this.sections[this.currentSection].scrollIntoView({ behavior: 'smooth' });\n }\n // ... other methods\n dragStart(e) {\n console.log(\"mousedown\");\n e.preventDefault();\n this.isDragging = true;\n this.startY = e.clientY;\n this.startX = e.clientX;\n this.style.scrollSnapType = \"unset\";\n this.scrollStartY = this.scrollTop;\n this.scrollStartX = this.scrollLeft;\n this.style.cursor = 'grabbing';\n }\n dragEnd(e) {\n if (!this.isDragging)\n return;\n this.isDragging = false;\n this.style.cursor = '';\n this.style.scrollSnapType = null;\n setTimeout(() => {\n this.scrollBy(1, 0);\n this.scrollBy(0, 1);\n }, 0);\n }\n dragMove(e) {\n if (!this.isDragging)\n return;\n const y = e.clientY;\n const x = e.clientX;\n const deltaY = this.startY - y;\n this.scrollTop = this.scrollStartY + deltaY;\n const deltaX = this.startX - x;\n this.scrollLeft = this.scrollStartX + deltaX;\n }\n}\ncustomElements.define('liscom-slider', MyComponent);\n","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 __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _Slideshow_curElement;\nimport { __liscom_config } from \"../index\";\nimport { ka_dom_ready, ka_sleep } from \"@kasimirjs/embed\";\nclass Slideshow {\n constructor(element) {\n this.element = element;\n _Slideshow_curElement.set(this, null);\n let timeout = parseInt(element.getAttribute(\"data-delay\"));\n if (isNaN(timeout))\n timeout = 5000;\n element.setAttribute(\"data-debug-liscom-element\", \"slideshow\");\n setTimeout(() => this.switch(true), 100);\n setTimeout(() => this.switch(), 200);\n setInterval(() => this.switch(), timeout);\n }\n switch(first = false) {\n if (__classPrivateFieldGet(this, _Slideshow_curElement, \"f\") !== null) {\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.add(\"animateOut\");\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.remove(\"show\");\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.remove(\"animateIn\");\n }\n if (__classPrivateFieldGet(this, _Slideshow_curElement, \"f\") === null) {\n __classPrivateFieldSet(this, _Slideshow_curElement, this.element.firstElementChild, \"f\");\n return;\n }\n else {\n __classPrivateFieldSet(this, _Slideshow_curElement, __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").nextElementSibling, \"f\");\n if (__classPrivateFieldGet(this, _Slideshow_curElement, \"f\") === null)\n __classPrivateFieldSet(this, _Slideshow_curElement, this.element.firstElementChild, \"f\");\n }\n if (!first && __classPrivateFieldGet(this, _Slideshow_curElement, \"f\") !== null) {\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.add(\"animateIn\");\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.remove(\"animateOut\");\n }\n if (__classPrivateFieldGet(this, _Slideshow_curElement, \"f\") !== null)\n __classPrivateFieldGet(this, _Slideshow_curElement, \"f\").classList.add(\"show\");\n }\n}\n_Slideshow_curElement = new WeakMap();\n(() => __awaiter(void 0, void 0, void 0, function* () {\n yield ka_dom_ready();\n yield ka_sleep(1000);\n if ((__liscom_config === null || __liscom_config === void 0 ? void 0 : __liscom_config.slideshow) !== true) {\n return;\n }\n document.querySelectorAll(\".slideshow\").forEach((e) => new Slideshow(e));\n}))();\n","class TypewriterElement extends HTMLElement {\n constructor() {\n super();\n this.words = [];\n this.index = 0;\n this.charIndex = 0;\n this.isDeleting = false;\n // Werte für die Timeouts\n this.writeSpeed = 100;\n this.deleteSpeed = 50;\n this.pauseBeforeDelete = 1500;\n this.pauseBeforeWrite = 500;\n this.curTimeout = null;\n this.container = document.createElement('span');\n this.cursor = document.createElement('span'); // Erstelle den Cursor Container\n this.cursor.textContent = '|'; // Setze den Textinhalt des Cursors\n // Füge den Text- und den Cursorcontainer zum Shadow DOM hinzu\n this.append(this.container, this.cursor);\n }\n connectedCallback() {\n if (!this.hasAttribute(\"data-words\")) {\n this.setAttribute('data-words', this.textContent.trim().replace(\"|\", \"\"));\n this.textContent = \"\";\n }\n this.words = this.dataset.words.trim().split(',').filter((word) => word.trim() !== \"\");\n //this.words = (this.getAttribute('words') || '').split(',');\n // Setze die Klasse für den Cursor\n this.cursor.className = 'cursor';\n this.index = 0;\n this.charIndex = 0;\n this.isDeleting = false;\n // Werte aus den Data-Attributen lesen, wenn vorhanden\n this.writeSpeed = Number(this.dataset.writeSpeed) || this.writeSpeed;\n this.deleteSpeed = Number(this.dataset.deleteSpeed) || this.deleteSpeed;\n this.pauseBeforeDelete = Number(this.dataset.pauseBeforeDelete) || this.pauseBeforeDelete;\n this.pauseBeforeWrite = Number(this.dataset.pauseBeforeWrite) || this.pauseBeforeWrite;\n this.type();\n }\n type() {\n if (this.words.length === 0)\n return;\n const currentWord = this.words[this.index];\n const typeSpeed = this.isDeleting ? this.deleteSpeed : this.writeSpeed;\n if (this.curTimeout)\n clearTimeout(this.curTimeout);\n if (this.isDeleting) {\n this.charIndex--;\n }\n else {\n this.charIndex++;\n }\n this.container.textContent = currentWord.substring(0, this.charIndex);\n if (!this.isDeleting && this.charIndex === currentWord.length) {\n this.isDeleting = true;\n this.curTimeout = setTimeout(() => this.type(), this.pauseBeforeDelete);\n }\n else if (this.isDeleting && this.charIndex === 0) {\n this.isDeleting = false;\n this.index = (this.index + 1) % this.words.length;\n this.curTimeout = setTimeout(() => this.type(), this.pauseBeforeWrite);\n }\n else {\n this.curTimeout = setTimeout(() => this.type(), typeSpeed + (Math.random() * typeSpeed));\n }\n }\n}\ncustomElements.define('typewriter-element', TypewriterElement);\n","const DAY_OF_WEEK = [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'\n];\nexport class OfficeHours {\n constructor() {\n this.openHours = new Map();\n this.vacations = [];\n }\n static convertToDateTime(input) {\n if (input === null || input === undefined) {\n return null;\n }\n if (input instanceof Date) {\n return input;\n }\n else if (typeof input === 'string') {\n return new Date(input);\n }\n else {\n return new Date();\n }\n }\n addOpenHour(dayOfWeek, from, till) {\n const dayHours = this.openHours.get(dayOfWeek) || [];\n dayHours.push({ from, till });\n this.openHours.set(dayOfWeek, dayHours);\n }\n addVacation(fromDate, tillDate, title, text) {\n let tillDateEod = OfficeHours.convertToDateTime(tillDate);\n if (tillDateEod instanceof Date) {\n tillDateEod.setHours(23, 59, 59, 999); // Set to end of day\n }\n this.vacations.push({\n fromDate: OfficeHours.convertToDateTime(fromDate),\n tillDate: tillDateEod, // Set to end of day\n title,\n text\n });\n }\n isVacation(date = null) {\n const dateTime = OfficeHours.convertToDateTime(date !== null && date !== void 0 ? date : new Date());\n return this.vacations.some(vacation => vacation.fromDate !== null && dateTime >= vacation.fromDate && dateTime <= vacation.tillDate);\n }\n getVacation(date = null) {\n const dateTime = OfficeHours.convertToDateTime(date !== null && date !== void 0 ? date : new Date());\n const vacation = this.vacations.find(vac => dateTime >= vac.fromDate && dateTime <= vac.tillDate);\n return vacation ? { title: vacation.title, text: vacation.text } : null;\n }\n getUpcomingVacation(interval = null) {\n const currentDate = new Date();\n const endDate = new Date(currentDate);\n if (interval === null) {\n return this.vacations.filter(vacation => vacation.tillDate >= currentDate);\n }\n if (interval.days) {\n endDate.setDate(endDate.getDate() + interval.days);\n }\n if (interval.months) {\n endDate.setMonth(endDate.getMonth() + interval.months);\n }\n return this.vacations.filter(vacation => (vacation.fromDate >= currentDate && vacation.fromDate <= endDate) ||\n (vacation.tillDate >= currentDate && vacation.tillDate <= endDate) ||\n (vacation.fromDate <= currentDate && vacation.tillDate >= endDate));\n }\n isOpen(dateTime = null) {\n const dateObj = OfficeHours.convertToDateTime(dateTime);\n return !this.isVacation(dateObj) && this.getTodayOpenDates(dateObj).some(hour => {\n const currentTime = `${dateObj.getHours()}:${String(dateObj.getMinutes()).padStart(2, '0')}`;\n return currentTime >= hour.from && currentTime <= hour.till;\n });\n }\n getNextOpenDate(dateTime = null) {\n let nextDate = OfficeHours.convertToDateTime(dateTime);\n while (this.isVacation(nextDate) || !this.isOpen(nextDate)) {\n nextDate.setHours(0, 0, 0, 0); // Reset time to beginning of day\n nextDate.setDate(nextDate.getDate() + 1); // Go to the next day\n }\n return nextDate;\n }\n getTodayOpenDates(dateTime = null) {\n const dateObj = OfficeHours.convertToDateTime(dateTime);\n const dayOfWeek = DAY_OF_WEEK[dateObj.getDay()];\n return this.openHours.get(dayOfWeek) || [];\n }\n getHumanReadableOpenDates(dateTime = null) {\n const dateObj = OfficeHours.convertToDateTime(dateTime);\n if (this.isVacation(dateObj)) {\n const vacation = this.getVacation(dateObj);\n return `Closed due to vacation: ${vacation === null || vacation === void 0 ? void 0 : vacation.title}. Next open date: ${DAY_OF_WEEK[this.getNextOpenDate(dateObj).getDay()]} ${this.getNextOpenDate(dateObj).toLocaleDateString()} at 9:00.`;\n }\n else if (this.isOpen(dateObj)) {\n const openHours = this.getTodayOpenDates(dateObj);\n const currentOpenHour = openHours.find(hour => `${dateObj.getHours()}:${String(dateObj.getMinutes()).padStart(2, '0')}` <= hour.till);\n return `Currently open till ${currentOpenHour === null || currentOpenHour === void 0 ? void 0 : currentOpenHour.till}. Next open date: ${DAY_OF_WEEK[this.getNextOpenDate(dateObj).getDay()]} at 9:00.`;\n }\n else {\n const nextOpenDate = this.getNextOpenDate(dateObj);\n const nextOpenHours = this.getTodayOpenDates(nextOpenDate);\n const nextOpenDay = DAY_OF_WEEK[nextOpenDate.getDay()];\n const nextOpenDateStr = nextOpenHours.map(hour => `${hour.from} - ${hour.till}`).join(' and ');\n return `Closed now. Open next: ${nextOpenDay} ${nextOpenDateStr}.`;\n }\n }\n loadStruct(inputData) {\n // Clear existing data\n this.openHours.clear();\n this.vacations = [];\n // Load open hours\n inputData.json.forEach(hour => {\n if (hour.status === \"open\") { // Assuming you want to only add hours when the status is 'open'\n const day = typeof hour.dayOfWeek === 'number' ? DAY_OF_WEEK[hour.dayOfWeek] : hour.dayOfWeek;\n this.addOpenHour(day, hour.from, hour.to);\n }\n });\n // Load vacations\n if (!Array.isArray(inputData.vacation)) {\n return;\n }\n inputData.vacation.forEach(vac => {\n this.addVacation(vac.from, vac.till, vac.title, vac.text);\n });\n }\n}\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\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};\nimport { customElement, ka_sleep } from \"@kasimirjs/embed\";\nlet LiwecoCollapseOpenhourTable = class LiwecoCollapseOpenhourTable extends HTMLElement {\n constructor() {\n super(...arguments);\n this.origContent = null;\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n console.log(\"connected\");\n yield ka_sleep(1);\n if (this.origContent === null) {\n this.origContent = this.innerHTML;\n }\n this.innerHTML = this.origContent;\n let dayNames = [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"];\n let dayName = dayNames[(new Date()).getDay()];\n let table = this.querySelector(\"table\");\n if (!table.textContent.match(new RegExp(dayName, \"m\")))\n return;\n table.classList.add(\"mb-0\");\n for (let el of Array.from(table.querySelectorAll(\"tr\"))) {\n if (el.textContent.match(new RegExp(dayName, \"m\"))) {\n el.firstElementChild.textContent = dayName + \" (heute)\";\n //el.classList.add(\"text-primary\");\n }\n else {\n el.classList.add(\"collapse\");\n el.classList.add(\"text-muted\");\n }\n }\n let footer = document.createElement(\"tfoot\");\n table.appendChild(footer);\n footer.innerHTML = '<tr><td colspan=\"100\"><button class=\"btn btn-sm w-100\"><i class=\"bi bi-caret-down\"></i> ganze Woche anzeigen</button></td></tr>';\n footer.firstElementChild.addEventListener(\"click\", () => {\n footer.remove();\n table.querySelectorAll(\".collapse\").forEach((e) => e.classList.remove(\"collapse\"));\n });\n });\n }\n};\nLiwecoCollapseOpenhourTable = __decorate([\n customElement('liweco-collapse-openhour-table')\n], LiwecoCollapseOpenhourTable);\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nimport { customElement, ka_create_element, ka_dom_ready, ka_sleep } from \"@kasimirjs/embed\";\nimport { OfficeHours } from \"../business/office-hours\";\nimport { markdownToHtml } from \"../helper/functions\";\nlet LiwecoVacationModal = class LiwecoVacationModal extends HTMLElement {\n constructor() {\n super();\n this.default = null;\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n yield ka_dom_ready();\n yield ka_sleep(100);\n let dataClass = this.getAttribute(\"data-class\");\n if (typeof window[\"openhours\"] === \"undefined\") {\n console.error(\"[liweco-news] window.openhours not defined\");\n return;\n }\n let openhoursData = window[\"openhours\"];\n let openhours = new OfficeHours();\n openhours.loadStruct(openhoursData);\n if (this.default === null)\n this.default = this.innerHTML;\n this.innerHTML = \"\";\n let newsDiv = ka_create_element(\"div\", { \"data-owner\": \"liweco-news\", class: dataClass }, \"\", this);\n let msgCount = 0;\n for (let curVac of openhours.getUpcomingVacation(null)) {\n msgCount++;\n ka_create_element(\"p\", { \"data-owner\": \"liweco-vacaction\" }, null, newsDiv).innerHTML = markdownToHtml(curVac.title);\n }\n if (msgCount === 0) {\n this.classList.add(\"no-news\");\n this.innerHTML = this.default;\n }\n });\n }\n disconnectedCallback() {\n }\n};\nLiwecoVacationModal = __decorate([\n customElement(\"liweco-news\"),\n __metadata(\"design:paramtypes\", [])\n], LiwecoVacationModal);\nexport { LiwecoVacationModal };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\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};\nimport { customElement, ka_create_element, ka_dom_ready, ka_sleep } from \"@kasimirjs/embed\";\nimport { OfficeHours } from \"../business/office-hours\";\nimport { markdownToHtml } from \"../helper/functions\";\nconst defaultModalTemplate = `\n<div class=\"modal-backdrop fade\"></div>\n<div class=\"leu-vacation-modal modal fade d-block\" tabindex=\"-1\" data-leu-dismiss=\"modal\" >\n\n <div class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable %%classes%%\" role=\"dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header position-relative\">\n <h5 class=\"modal-title\">%%title%%</h5>\n <button type=\"button\" class=\"btn-close position-absolute top-0 end-0 p-4\" style=\"top: 0\" data-leu-dismiss=\"modal\" aria-label=\"Schließen\"></button>\n </div>\n <div class=\"modal-body\">\n %%body%%\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-leu-dismiss=\"modal\">Schließen</button>\n </div>\n </div>\n </div>\n</div>\n`;\nclass OpenHoursInterface {\n}\nlet LiwecoVacationModal = class LiwecoVacationModal extends HTMLElement {\n constructor() {\n super();\n this.origOverflow = \"\";\n }\n show(meta) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n this.origOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n let content = defaultModalTemplate;\n content = content.replace(\"%%title%%\", markdownToHtml(meta.title))\n .replace(\"%%body%%\", markdownToHtml(meta.text.replace(/\\n/g, \"<br>\")))\n .replace(\"%%classes%%\", (_a = meta.classes) !== null && _a !== void 0 ? _a : \"\");\n this.showElement.innerHTML = content;\n yield ka_sleep(10);\n this.showElement.querySelectorAll(\".fade\").forEach((e) => e.classList.add(\"show\"));\n });\n }\n hide() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.showElement.innerHTML === \"\")\n return;\n document.body.style.overflow = this.origOverflow;\n this.showElement.querySelectorAll(\".fade\").forEach((e) => e.classList.remove(\"show\"));\n yield ka_sleep(200);\n this.showElement.innerHTML = \"\";\n });\n }\n connectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n this.style.display = \"none\";\n yield ka_dom_ready();\n yield ka_sleep(100);\n if (typeof window[\"openhours\"] === \"undefined\") {\n console.error(\"[liweco-vacation-modal] window.openhours not defined\");\n return;\n }\n let openhoursData = window[\"openhours\"];\n if (!Array.isArray(openhoursData.vacation)) {\n console.error(\"[liweco-vacation-modal] window.openhours.vacation is not a array\");\n return;\n }\n let openhours = new OfficeHours();\n openhours.loadStruct(openhoursData);\n console.log(\"[liweco-vacation-modal] openhours loaded\", openhours);\n this.showElement = ka_create_element(\"div\", { \"owner\": \"leu-vacation-modal\" });\n document.body.append(this.showElement);\n this.showElement.addEventListener(\"click\", (e) => {\n let target = e.target;\n if (target.hasAttribute(\"data-leu-dismiss\")) {\n // Push History (don't use history.back() - it will fail if the page was opend with anchor)\n this.hide();\n }\n });\n if (openhours.isVacation(null)) {\n console.log(\"[liweco-vacation-modal] showing vacation modal\");\n this.show(openhours.getVacation(null));\n }\n });\n }\n disconnectedCallback() {\n return __awaiter(this, void 0, void 0, function* () {\n this.showElement.remove();\n });\n }\n};\nLiwecoVacationModal = __decorate([\n customElement(\"liweco-vacation-modal\"),\n __metadata(\"design:paramtypes\", [])\n], LiwecoVacationModal);\nexport { LiwecoVacationModal };\n","export function markdownToHtml(input) {\n // Kursiv & Fett: ***text***\n let html = input.replace(/\\*\\*\\*(.+?)\\*\\*\\*/g, '<strong><em>$1</em></strong>');\n // Fett: **text**\n html = html.replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>');\n // Kursiv: *text*\n html = html.replace(/\\*(.+?)\\*/g, '<em>$1</em>');\n // Horizontaler Trennstrich: ---\n html = html.replace(/---/g, '<hr>');\n return html;\n}\n","export * from \"./business/office-hours\";\nexport * from \"./types/leu-openhours\";\nexport * from \"./components/liweco-vacation-modal\";\nimport \"./components/liweco-vacation-modal\";\nimport \"./components/liweco-news\";\nimport \"./components/liweco-collapse-openhour-table\";\n","export class LeuOpenHours {\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst NODE_MODE = false;\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets = global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\nconst constructionToken = Symbol();\nconst cssTagCache = new WeakMap();\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n constructor(cssText, strings, safeToken) {\n // This property needs to remain unminified.\n this['_$cssResult$'] = true;\n if (safeToken !== constructionToken) {\n throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.');\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet() {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(this.cssText);\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n toString() {\n return this.cssText;\n }\n}\nconst textFromCSSResult = (value) => {\n // This property needs to remain unminified.\n if (value['_$cssResult$'] === true) {\n return value.cssText;\n }\n else if (typeof value === 'number') {\n return value;\n }\n else {\n throw new Error(`Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`);\n }\n};\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value) => new CSSResult(typeof value === 'string' ? value : String(value), undefined, constructionToken);\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (strings, ...values) => {\n const cssText = strings.length === 1\n ? strings[0]\n : values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]);\n return new CSSResult(cssText, strings, constructionToken);\n};\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic the native feature](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (renderRoot, styles) => {\n if (supportsAdoptingStyleSheets) {\n renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);\n }\n else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = global['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = s.cssText;\n renderRoot.appendChild(style);\n }\n }\n};\nconst cssResultFromStyleSheet = (sheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\nexport const getCompatibleStyle = supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s) => s\n : (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n//# sourceMappingURL=css-tag.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (obj, name, descriptor) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n Reflect.decorate &&\n typeof name !== 'object') {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n//# sourceMappingURL=base.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const customElement = (tagName) => (classOrTarget, context) => {\n if (context !== undefined) {\n context.addInitializer(() => {\n customElements.define(tagName, classOrTarget);\n });\n }\n else {\n customElements.define(tagName, classOrTarget);\n }\n};\n//# sourceMappingURL=custom-element.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ((protoOrValue, nameOrContext) => {\n const method = typeof protoOrValue === 'function'\n ? protoOrValue\n : protoOrValue[nameOrContext];\n Object.assign(method, options);\n });\n}\n//# sourceMappingURL=event-options.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport { defaultConverter, notEqual, } from '../reactive-element.js';\nconst DEV_MODE = true;\nlet issueWarning;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n globalThis.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!globalThis.litIssuedWarnings.has(warning) &&\n !globalThis.litIssuedWarnings.has(code)) {\n console.warn(warning);\n globalThis.litIssuedWarnings.add(warning);\n }\n };\n}\nconst legacyProperty = (options, proto, name) => {\n const hasOwnProperty = proto.hasOwnProperty(name);\n proto.constructor.createProperty(name, options);\n // For accessors (which have a descriptor on the prototype) we need to\n // return a descriptor, otherwise TypeScript overwrites the descriptor we\n // define in createProperty() with the original descriptor. We don't do this\n // for fields, which don't have a descriptor, because this could overwrite\n // descriptor defined by other decorators.\n return hasOwnProperty\n ? Object.getOwnPropertyDescriptor(proto, name)\n : undefined;\n};\n// This is duplicated from a similar variable in reactive-element.ts, but\n// actually makes sense to have this default defined with the decorator, so\n// that different decorators could have different defaults.\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n/**\n * Wraps a class accessor or setter so that `requestUpdate()` is called with the\n * property name and old value when the accessor is set.\n */\nexport const standardProperty = (options = defaultPropertyDeclaration, target, context) => {\n const { kind, metadata } = context;\n if (DEV_MODE && metadata == null) {\n issueWarning('missing-class-metadata', `The class ${target} is missing decorator metadata. This ` +\n `could mean that you're using a compiler that supports decorators ` +\n `but doesn't support decorator metadata, such as TypeScript 5.1. ` +\n `Please update your compiler.`);\n }\n // Store the property options\n let properties = globalThis.litPropertyMetadata.get(metadata);\n if (properties === undefined) {\n globalThis.litPropertyMetadata.set(metadata, (properties = new Map()));\n }\n if (kind === 'setter') {\n options = Object.create(options);\n options.wrapped = true;\n }\n properties.set(context.name, options);\n if (kind === 'accessor') {\n // Standard decorators cannot dynamically modify the class, so we can't\n // replace a field with accessors. The user must use the new `accessor`\n // keyword instead.\n const { name } = context;\n return {\n set(v) {\n const oldValue = target.get.call(this);\n target.set.call(this, v);\n this.requestUpdate(name, oldValue, options);\n },\n init(v) {\n if (v !== undefined) {\n this._$changeProperty(name, undefined, options, v);\n }\n return v;\n },\n };\n }\n else if (kind === 'setter') {\n const { name } = context;\n return function (value) {\n const oldValue = this[name];\n target.call(this, value);\n this.requestUpdate(name, oldValue, options);\n };\n }\n throw new Error(`Unsupported decorator location: ${kind}`);\n};\n/**\n * A class field or accessor decorator which creates a reactive property that\n * reflects a corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options) {\n return (protoOrTarget, nameOrContext\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) => {\n return (typeof nameOrContext === 'object'\n ? standardProperty(options, protoOrTarget, nameOrContext)\n : legacyProperty(options, protoOrTarget, nameOrContext));\n };\n}\n//# sourceMappingURL=property.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { desc } from './base.js';\n// Shared fragment used to generate empty NodeLists when a render root is\n// undefined\nlet fragment;\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs: NodeListOf<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector) {\n return ((obj, name) => {\n return desc(obj, name, {\n get() {\n const container = this.renderRoot ?? (fragment ??= document.createDocumentFragment());\n return container.querySelectorAll(selector);\n },\n });\n });\n}\n//# sourceMappingURL=query-all.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { desc } from './base.js';\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array<HTMLElement>;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array<HTMLElement>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * <slot></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(options) {\n return ((obj, name) => {\n const { slot, selector } = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get() {\n const slotEl = this.renderRoot?.querySelector(slotSelector);\n const elements = slotEl?.assignedElements(options) ?? [];\n return (selector === undefined\n ? elements\n : elements.filter((node) => node.matches(selector)));\n },\n });\n });\n}\n//# sourceMappingURL=query-assigned-elements.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { desc } from './base.js';\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given `slot`.\n *\n * Can be passed an optional {@linkcode QueryAssignedNodesOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedNodes({slot: 'list', flatten: true})\n * listItems!: Array<Node>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note the type of this property should be annotated as `Array<Node>`. Use the\n * queryAssignedElements decorator to list only elements, and optionally filter\n * the element list using a CSS selector.\n *\n * @category Decorator\n */\nexport function queryAssignedNodes(options) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ((obj, name) => {\n const { slot } = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get() {\n const slotEl = this.renderRoot?.querySelector(slotSelector);\n return (slotEl?.assignedNodes(options) ?? []);\n },\n });\n });\n}\n//# sourceMappingURL=query-assigned-nodes.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { desc } from './base.js';\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first: Promise<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector) {\n return ((obj, name) => {\n return desc(obj, name, {\n async get() {\n await this.updateComplete;\n return this.renderRoot?.querySelector(selector) ?? null;\n },\n });\n });\n}\n//# sourceMappingURL=query-async.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { desc } from './base.js';\nconst DEV_MODE = true;\nlet issueWarning;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n globalThis.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!globalThis.litIssuedWarnings.has(warning) &&\n !globalThis.litIssuedWarnings.has(code)) {\n console.warn(warning);\n globalThis.litIssuedWarnings.add(warning);\n }\n };\n}\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector, cache) {\n return ((protoOrTarget, nameOrContext, descriptor) => {\n const doQuery = (el) => {\n const result = (el.renderRoot?.querySelector(selector) ?? null);\n if (DEV_MODE && result === null && cache && !el.hasUpdated) {\n const name = typeof nameOrContext === 'object'\n ? nameOrContext.name\n : nameOrContext;\n issueWarning('', `@query'd field ${JSON.stringify(String(name))} with the 'cache' ` +\n `flag set for selector '${selector}' has been accessed before ` +\n `the first update and returned null. This is expected if the ` +\n `renderRoot tree has not been provided beforehand (e.g. via ` +\n `Declarative Shadow DOM). Therefore the value hasn't been cached.`);\n }\n // TODO: if we want to allow users to assert that the query will never\n // return null, we need a new option and to throw here if the result\n // is null.\n return result;\n };\n if (cache) {\n // Accessors to wrap from either:\n // 1. The decorator target, in the case of standard decorators\n // 2. The property descriptor, in the case of experimental decorators\n // on auto-accessors.\n // 3. Functions that access our own cache-key property on the instance,\n // in the case of experimental decorators on fields.\n const { get, set } = typeof nameOrContext === 'object'\n ? protoOrTarget\n : descriptor ??\n (() => {\n const key = DEV_MODE\n ? Symbol(`${String(nameOrContext)} (@query() cache)`)\n : Symbol();\n return {\n get() {\n return this[key];\n },\n set(v) {\n this[key] = v;\n },\n };\n })();\n return desc(protoOrTarget, nameOrContext, {\n get() {\n let result = get.call(this);\n if (result === undefined) {\n result = doQuery(this);\n if (result !== null || this.hasUpdated) {\n set.call(this, result);\n }\n }\n return result;\n },\n });\n }\n else {\n // This object works as the return type for both standard and\n // experimental decorators.\n return desc(protoOrTarget, nameOrContext, {\n get() {\n return doQuery(this);\n },\n });\n }\n });\n}\n//# sourceMappingURL=query.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport { property } from './property.js';\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options) {\n return property({\n ...options,\n // Add both `state` and `attribute` because we found a third party\n // controller that is keying off of PropertyOptions.state to determine\n // whether a field is a private internal property or not.\n state: true,\n attribute: false,\n });\n}\n//# sourceMappingURL=state.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\nimport { getCompatibleStyle, adoptStyles, } from './css-tag.js';\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\nexport * from './css-tag.js';\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst { is, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, } = Object;\nconst NODE_MODE = false;\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\nconst DEV_MODE = true;\nlet issueWarning;\nconst trustedTypes = global\n .trustedTypes;\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? trustedTypes.emptyScript\n : '';\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n global.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!global.litIssuedWarnings.has(warning) &&\n !global.litIssuedWarnings.has(code)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n queueMicrotask(() => {\n issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning('polyfill-support-missing', `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`);\n }\n });\n}\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event) => {\n const shouldEmit = global\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(new CustomEvent('lit-debug', {\n detail: event,\n }));\n }\n : undefined;\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = (prop, _obj) => prop;\nexport const defaultConverter = {\n toAttribute(value, type) {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n fromAttribute(value, type) {\n let fromValue = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value);\n }\n catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual = (value, old) => !is(value, old);\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n useDefault: false,\n hasChanged: notEqual,\n};\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\nSymbol.metadata ??= Symbol('metadata');\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap();\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport class ReactiveElement\n// In the Node build, this `extends` clause will be substituted with\n// `(globalThis.HTMLElement ?? HTMLElement)`.\n//\n// This way, we will first prefer any global `HTMLElement` polyfill that the\n// user has assigned, and then fall back to the `HTMLElement` shim which has\n// been imported (see note at the top of this file about how this import is\n// generated by Rollup). Note that the `HTMLElement` variable has been\n// shadowed by this import, so it no longer refers to the global.\n extends HTMLElement {\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]);\n }\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(name, options = defaultPropertyDeclaration) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n options.attribute = false;\n }\n this.__prepare();\n // Whether this property is wrapping accessors.\n // Helps control the initial value change and reflection logic.\n if (this.prototype.hasOwnProperty(name)) {\n options = Object.create(options);\n options.wrapped = true;\n }\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static getPropertyDescriptor(name, key, options) {\n const { get, set } = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get() {\n return this[key];\n },\n set(v) {\n this[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(`Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`);\n }\n issueWarning('reactive-property-without-getter', `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`);\n }\n return {\n get,\n set(value) {\n const oldValue = get?.call(this);\n set?.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n static __prepare() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this);\n superCtor.finalize();\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ];\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning('no-override-create-property', 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators');\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning('no-override-get-property-descriptor', 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators');\n }\n }\n }\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n static finalizeStyles(styles) {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array<unknown> works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set(styles.flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s));\n }\n }\n else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n static __attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n constructor() {\n super();\n this.__instanceProperties = undefined;\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n this.isUpdatePending = false;\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n this.hasUpdated = false;\n /**\n * Name of currently reflecting property\n */\n this.__reflectingProperty = null;\n this.__initialize();\n }\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n __initialize() {\n this.__updatePromise = new Promise((res) => (this.enableUpdating = res));\n this._$changedProperties = new Map();\n // This enqueues a microtask that must run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n this.constructor._initializers?.forEach((i) => i(this));\n }\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller) {\n this.__controllers?.delete(controller);\n }\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs.\n */\n __saveInstanceProperties() {\n const instanceProperties = new Map();\n const elementProperties = this.constructor\n .elementProperties;\n for (const p of elementProperties.keys()) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n createRenderRoot() {\n const renderRoot = this.shadowRoot ??\n this.attachShadow(this.constructor.shadowRootOptions);\n adoptStyles(renderRoot, this.constructor.elementStyles);\n return renderRoot;\n }\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n this.renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n enableUpdating(_requestedUpdate) { }\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [responding to attribute changes](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(name, _old, value) {\n this._$attributeToProperty(name, value);\n }\n __propertyToAttribute(name, value) {\n const elemProperties = this.constructor.elementProperties;\n const options = elemProperties.get(name);\n const attr = this.constructor.__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter = options.converter?.toAttribute !==\n undefined\n ? options.converter\n : defaultConverter;\n const attrValue = converter.toAttribute(value, options.type);\n if (DEV_MODE &&\n this.constructor.enabledWarnings.includes('migration') &&\n attrValue === undefined) {\n issueWarning('undefined-attribute-value', `The attribute value for the ${name} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`);\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n }\n else {\n this.setAttribute(attr, attrValue);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /** @internal */\n _$attributeToProperty(name, value) {\n const ctor = this.constructor;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = ctor.__attributeToPropertyMap.get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter = typeof options.converter === 'function'\n ? { fromAttribute: options.converter }\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n const convertedValue = converter.fromAttribute(value, options.type);\n this[propName] =\n convertedValue ??\n this.__defaultValues?.get(propName) ??\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n convertedValue;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(name, oldValue, options) {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && name instanceof Event) {\n issueWarning(``, `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`);\n }\n const ctor = this.constructor;\n const newValue = this[name];\n options ??= ctor.getPropertyOptions(name);\n const changed = (options.hasChanged ?? notEqual)(newValue, oldValue) ||\n // When there is no change, check a corner case that can occur when\n // 1. there's a initial value which was not reflected\n // 2. the property is subsequently set to this value.\n // For example, `prop: {useDefault: true, reflect: true}`\n // and el.prop = 'foo'. This should be considered a change if the\n // attribute is not set because we will now reflect the property to the attribute.\n (options.useDefault &&\n options.reflect &&\n newValue === this.__defaultValues?.get(name) &&\n !this.hasAttribute(ctor.__attributeNameForProperty(name, options)));\n if (changed) {\n this._$changeProperty(name, oldValue, options);\n }\n else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n /**\n * @internal\n */\n _$changeProperty(name, oldValue, { useDefault, reflect, wrapped }, initializeValue) {\n // Record default value when useDefault is used. This allows us to\n // restore this value when the attribute is removed.\n if (useDefault && !(this.__defaultValues ??= new Map()).has(name)) {\n this.__defaultValues.set(name, initializeValue ?? oldValue ?? this[name]);\n // if this is not wrapping an accessor, it must be an initial setting\n // and in this case we do not want to record the change or reflect.\n if (wrapped !== true || initializeValue !== undefined) {\n return;\n }\n }\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n // On the initial change, the old value should be `undefined`, except\n // with `useDefault`\n if (!this.hasUpdated && !useDefault) {\n oldValue = undefined;\n }\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set()).add(name);\n }\n }\n /**\n * Sets up the element to asynchronously update.\n */\n async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n }\n catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise<unknown> {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n scheduleUpdate() {\n const result = this.performUpdate();\n if (DEV_MODE &&\n this.constructor.enabledWarnings.includes('async-perform-update') &&\n typeof result?.then ===\n 'function') {\n issueWarning('async-perform-update', `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`);\n }\n return result;\n }\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n performUpdate() {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({ kind: 'update' });\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n this.renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter((p) => this.hasOwnProperty(p) && p in getPrototypeOf(this));\n if (shadowedProperties.length) {\n throw new Error(`The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`);\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p] = value;\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // `changedProperties` map, but only for the case of properties created\n // via `createProperty` on accessors, which will not have already\n // populated the `changedProperties` map since they are not set.\n // We can't know if these accessors had initializers, so we just set\n // them anyway - a difference from experimental decorators on fields and\n // standard decorators on auto-accessors.\n // For context see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = this.constructor\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n const { wrapped } = options;\n const value = this[p];\n if (wrapped === true &&\n !this._$changedProperties.has(p) &&\n value !== undefined) {\n this._$changeProperty(p, undefined, options, value);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n }\n else {\n this.__markUpdated();\n }\n }\n catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n willUpdate(_changedProperties) { }\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (DEV_MODE &&\n this.isUpdatePending &&\n this.constructor.enabledWarnings.includes('change-in-update')) {\n issueWarning('change-in-update', `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`);\n }\n }\n __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete() {\n return this.getUpdateComplete();\n }\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n getUpdateComplete() {\n return this.__updatePromise;\n }\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n shouldUpdate(_changedProperties) {\n return true;\n }\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n update(_changedProperties) {\n // The forEach() expression will only run when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) => this.__propertyToAttribute(p, this[p]));\n this.__markUpdated();\n }\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n updated(_changedProperties) { }\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n firstUpdated(_changedProperties) { }\n}\n/**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\nReactiveElement.elementStyles = [];\n/**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\nReactiveElement.shadowRootOptions = { mode: 'open' };\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\nReactiveElement[JSCompiler_renameProperty('elementProperties', ReactiveElement)] = new Map();\nReactiveElement[JSCompiler_renameProperty('finalized', ReactiveElement)] = new Map();\n// Apply polyfills if available\npolyfillSupport?.({ ReactiveElement });\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor) {\n if (!ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))) {\n ctor.enabledWarnings = ctor.enabledWarnings.slice();\n }\n };\n ReactiveElement.enableWarning = function (warning) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings.includes(warning)) {\n this.enabledWarnings.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (warning) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings.splice(i, 1);\n }\n };\n}\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.1.1');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n queueMicrotask(() => {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n });\n}\n//# sourceMappingURL=reactive-element.js.map","var _ = Object.defineProperty;\nvar E = (o, t, e) => t in o ? _(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;\nvar l = (o, t, e) => E(o, typeof t != \"symbol\" ? t + \"\" : t, e);\nimport { waitForLoad as y, Debouncer as x, LoggingMixin as T } from \"@trunkjs/browser-utils\";\nclass F {\n constructor(t, e) {\n this.subscription_id = t, this.endpoint_url = e, console.log(\"MicxFormmailer constructor\");\n }\n async sendData(t, e = \"default\") {\n console.log(\"MicxFormmailer send data\", t), t.__sending_hostname = window.location.href, t.__micxlib_rev = D, t.__debug_info = JSON.stringify({\n userAgent: navigator.userAgent,\n webdriver: navigator.webdriver,\n window_chrome: !!window.chrome\n });\n let s = {};\n for (let i in t) {\n let a = i.toLowerCase().replace(/[\\s]/g, \"_\").replace(/-/g, \"\");\n s[a] = t[i];\n }\n t = s;\n let r = await fetch(this.endpoint_url + `?&subscription_id=${this.subscription_id}&preset=${e}`, {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify(t),\n cache: \"no-cache\"\n });\n if (!r.ok) {\n let i = await r.text();\n throw console.error(\"Formmail Server Error\", i), \"Cannot send mail: \" + i;\n }\n await r.json();\n }\n}\nconst h = class h {\n static get formMailerApi() {\n return new F(h.subscription_id, h.endpoint_root_url + \"/v1/formmailer/send\");\n }\n};\nl(h, \"endpoint_root_url\", \"https://ws.micx.io\"), l(h, \"subscription_id\", window.micx_subscription_id ?? null);\nlet v = h;\nclass I {\n static collectFormData(t) {\n let e = [], s = {}, r = 0;\n for (let i of t.querySelectorAll(\"input,select,textarea\")) {\n let a = i.validity.valid;\n if (i.type.toLowerCase() === \"email\" && i.value.trim() !== \"\" && (i.value = i.value.trim(), a = i.validity.valid, i.value.match(/^[\\p{L}\\d._%+-]+@[\\p{L}\\d.-]+.[\\p{L}]{2,}$/u) === null && (a = !1)), a === !1 && e.push(i), i.name === \"\" && i.id === \"\") {\n i.type !== \"submit\" && console.warn(\"[Warning] Skipping Form-Element without id or name attribute\", i);\n continue;\n }\n let n = i.name;\n n === \"\" && (n = i.id), n === \"\" && (n = i.getAttribute(\"label\") ?? \"unnamed_\" + r++), n = n.trim();\n let d = i.value;\n i.type === \"checkbox\" && i.checked === !1 || (i.type === \"date\" && d !== \"\" && (d = new Date(d).toLocaleDateString(\"de-DE\")), n.endsWith(\"[]\") ? (n = n.slice(0, -2), Array.isArray(s[n]) || (s[n] = []), s[n].push(d)) : s[n] = d);\n }\n return { formdata: s, invalidForms: e };\n }\n}\nconst g = \"__micxformmail_invalid_feedback\";\nclass L {\n constructor() {\n l(this, \"bntOrigText\", \"\");\n }\n markInvalid(t) {\n if (t.classList.add(\"is-invalid\"), t.dataset.invalidMsg) {\n let e = document.createElement(\"div\");\n e.classList.add(\"invalid-feedback\"), e.innerHTML = t.dataset.invalidMsg, t.insertAdjacentElement(\"afterend\", e), t[g] = e;\n }\n }\n markValid(t) {\n t.classList.add(\"is-valid\");\n }\n setFormInvalid(t) {\n }\n setFormSending(t) {\n let e = t.querySelector(\"input[type='submit'],button[type='submit']\");\n e instanceof HTMLInputElement ? (this.bntOrigText = e.value, e.value = \"Sending...\") : (this.bntOrigText = e.innerHTML, e.innerHTML = \"Sending...\");\n }\n setFormSentError(t) {\n if (this.bntOrigText !== \"\") {\n let e = t.querySelector(\"input[type='submit'],button[type='submit']\");\n e instanceof HTMLInputElement ? e.value = this.bntOrigText : e.innerHTML = this.bntOrigText;\n }\n alert(\"[Error] Sending email failed! See browser console for details.\");\n }\n setFormSentOk(t) {\n t.querySelectorAll(\"input,textarea\").forEach((r) => r.setAttribute(\"readonly\", \"readonly\"));\n let e = document.createElement(\"div\"), s = t.getAttribute(\"data-micx-formmail-sent-message\") ?? \"E-Mail sent successfully!\";\n e.innerHTML = `<div class='alert alert-success'>${s}</div>`, t.querySelector(\"input[type='submit'],button[type='submit']\").replaceWith(e);\n }\n setFormValid(t) {\n }\n unmarkInvalid(t) {\n t.classList.remove(\"is-invalid\");\n }\n unmarkValid(t) {\n t.classList.remove(\"is-valid\");\n }\n resetValidation(t) {\n t.querySelectorAll(\".is-invalid\").forEach((e) => {\n e[g] !== void 0 && (e[g].remove(), delete e[g]), e.classList.remove(\"is-invalid\");\n }), t.querySelectorAll(\".is-valid\").forEach((e) => e.classList.remove(\"is-valid\"));\n }\n}\nasync function M() {\n return new Promise((o) => {\n if (document.readyState === \"complete\" || document.readyState === \"interactive\")\n return o(\"loaded\");\n document.addEventListener(\"DOMContentLoaded\", () => {\n o(\"DOMContentLoaded\");\n });\n });\n}\nasync function O(o) {\n return new Promise((t) => {\n window.setTimeout(() => t(), o);\n });\n}\nclass R {\n constructor() {\n /**\n * Prevent observed Forms from submitting by pressing Enter\n */\n l(this, \"preventEnterSubmitForm\", !0);\n }\n}\nclass W {\n constructor(t = v.formMailerApi, e = new R(), s = new L()) {\n this.formMailer = t, this.config = e, this.formatter = s;\n }\n isMicxFormElement(t) {\n return t.tagName !== \"FORM\" && (t = t.closest(\"form\")), !(t === null || !t.hasAttribute(\"data-micx-formmail-preset\"));\n }\n /**\n * Observe for submit events from <form data-micx-formmail-preset=\"default\"> forms\n *\n * @param htmlElement\n */\n async observe(t = null) {\n await M(), t = t || document.body, this.config.preventEnterSubmitForm && (t.addEventListener(\"submit\", async (e) => {\n console.log(\"submit\", e), this.isMicxFormElement(e.target) && (e.preventDefault(), e.stopPropagation());\n }), t.addEventListener(\"keydown\", async (e) => {\n this.isMicxFormElement(e.target) && e.key === \"Enter\" && e.target.type !== \"submit\" && e.target.type !== \"textarea\" && e.target.type !== \"button\" && e.target.tagName !== \"NXA-FORM-TEXTAREA\" && e.preventDefault();\n })), t.addEventListener(\"click\", (e) => {\n let s = e.target;\n if (!this.isMicxFormElement(s) || s.closest(\"button[type='submit'],input[type='submit']\") === null)\n return;\n let i = s.closest(\"form\");\n e.preventDefault(), e.stopPropagation(), this.processForm(i);\n });\n }\n async processForm(t) {\n let e = I.collectFormData(t);\n if (this.formatter.resetValidation(t), e.invalidForms.length > 0) {\n for (let r of e.invalidForms)\n this.formatter.markInvalid(r);\n this.formatter.setFormInvalid(t), t.dispatchEvent(new Event(\"invalid\", {}));\n return;\n }\n let s = t.querySelector(\"[type='submit']\");\n s.setAttribute(\"disabled\", \"disabled\"), this.formatter.setFormSending(t);\n try {\n let r = await this.formMailer.sendData(\n e.formdata,\n t.getAttribute(\"data-micx-formmail-preset\") ?? \"default\"\n );\n s.removeAttribute(\"disabled\"), this.formatter.setFormSentOk(t);\n } catch {\n s.removeAttribute(\"disabled\"), this.formatter.setFormSentError(t);\n }\n }\n}\nconst u = class u {\n /**\n * Prüft, ob die übergebene URL/Pfad eine encodete CDN v2 Image-URL ist.\n * Unterstützt relative Pfade (z. B. \"v2/...\") und absolute URLs.\n *\n * Gültiges Format:\n * \".../v2/<id>/<aspect>_<widths>/<filename>.<ext[_ext2[_...]]>\"\n */\n static isCdnImage(t) {\n return typeof t != \"string\" || t.length === 0 ? !1 : u.CDN_V2_REGEX.test(t);\n }\n static decode(t) {\n const e = t.split(\"/\");\n if (e.length < 4) throw new Error(\"Invalid url format\");\n const s = e[1];\n let [r, i] = e[2].split(\"_\");\n const [a, n] = e[3].split(\".\");\n i = i.replaceAll(/([a-zA-Z])/g, (c) => \"-\" + (u.WIDTH_SHORTCUTS[c] ?? c) + \"-\"), r = r.replaceAll(/([a-zA-Z])/g, (c) => u.RATIO_SHORTCUTS[c] ?? c);\n const d = r.split(\"-\").join(\"/\"), p = i.split(\"-\").filter((c) => c.trim() !== \"\");\n return {\n id: s,\n aspectRatio: d,\n widths: p,\n filename: a,\n extensions: n.split(\"_\")\n };\n }\n};\nl(u, \"RATIO_SHORTCUTS\", {\n a: \"1-1\",\n b: \"4-3\",\n c: \"3-2\",\n d: \"16-9\",\n e: \"21-9\",\n B: \"3-4\",\n C: \"2-3\",\n D: \"9-16\",\n E: \"9-21\"\n}), l(u, \"WIDTH_SHORTCUTS\", {\n a: \"260\",\n b: \"414\",\n c: \"896\",\n d: \"1280\",\n e: \"1440\",\n f: \"1920\",\n g: \"2560\"\n}), // Robust pattern to detect encoded CDN v2 image URLs (relative or absolute)\nl(u, \"CDN_V2_REGEX\", /(?:^|\\/)v2\\/[^\\/]+\\/[^\\/]+_[^\\/]+\\/[^\\/]+\\.[a-z0-9_]+(?:$|[?#])/i);\nlet f = u;\nconst m = class m {\n constructor(t, e) {\n l(this, \"widths\");\n l(this, \"ratio\");\n l(this, \"extensions\");\n this.id = t, this.filename = e, this.widths = [], this.extensions = [], this.ratio = \"\";\n }\n setAspectRatio(t, e) {\n this.ratio = `${t}-${e}`;\n }\n setReatio(t) {\n t = t.replaceAll(\"/\", \"-\"), this.ratio = t;\n }\n setWidths(t) {\n return console.log(\"set widths\", t), this.widths = t.map((e) => e.toString()), this;\n }\n addWidth(t) {\n this.widths.push(t.toString());\n }\n setExtensions(t) {\n return this.extensions = t, this;\n }\n toString() {\n let t = this.widths.join(\"-\"), e = this.extensions.join(\"_\"), s = this.ratio;\n return s = s.replace(/([0-9\\-]+)/, (r) => m.RATIO_SHORTCUTS[r] ?? r), t = t.replace(/([0-9]+)/g, (r) => m.WIDTH_SHORTCUTS[r] ?? r), `v2/${this.id}/${s}_${t}/${this.filename}.${e}`;\n }\n};\nl(m, \"RATIO_SHORTCUTS\", {\n \"1-1\": \"a\",\n \"4-3\": \"b\",\n \"3-2\": \"c\",\n \"16-9\": \"d\",\n \"21-9\": \"e\",\n \"3-4\": \"B\",\n \"2-3\": \"C\",\n \"9-16\": \"D\",\n \"9-21\": \"E\"\n}), l(m, \"WIDTH_SHORTCUTS\", {\n 260: \"a\",\n 414: \"b\",\n 896: \"c\",\n 1280: \"d\",\n 1440: \"e\",\n 1920: \"f\",\n 2560: \"g\"\n});\nlet w = m;\nclass A {\n constructor(t) {\n l(this, \"rules\");\n const e = (t ?? \"\").trim();\n if (!e) {\n this.rules = [];\n return;\n }\n if (/^[0-9]+(?:\\.[0-9]+)?$/.test(e)) {\n const i = parseFloat(e);\n if (!(i > 0)) throw new Error(\"Scale must be a positive number\");\n this.rules = [{ minScreen: 0, scale: i }];\n return;\n }\n const s = e.split(\";\").map((i) => i.trim()).filter(Boolean);\n if (s.length === 0) throw new Error(\"Invalid adjust-sizes input\");\n const r = /* @__PURE__ */ new Map();\n for (const i of s) {\n let a;\n if (a = i.match(/^:([0-9]+(?:\\.[0-9]+)?)$/), a) {\n const n = parseFloat(a[1]);\n if (!(n > 0)) throw new Error(`Invalid scale in entry \"${i}\"`);\n r.set(0, n);\n continue;\n }\n if (a = i.match(/^([0-9]+):([0-9]+(?:\\.[0-9]+)?)$/), a) {\n const n = parseInt(a[1], 10), d = parseFloat(a[2]);\n if (!(d > 0)) throw new Error(`Invalid scale in entry \"${i}\"`);\n r.set(n, d);\n continue;\n }\n throw new Error(`Invalid adjust-sizes entry: \"${i}\"`);\n }\n this.rules = Array.from(r.entries()).sort((i, a) => i[0] - a[0]).map(([i, a]) => ({ minScreen: i, scale: a }));\n }\n /**\n * Returns the scale for the given width.\n * - Picks the rule with the largest minScreen <= width.\n * - If no rules, returns defaultScale (default 1).\n * - If width is omitted or invalid, behaves like \"use the last applicable rule\".\n */\n getSizeAdjustment(t = void 0) {\n t === void 0 && (t = window.innerWidth || document.documentElement.clientWidth || 0);\n let e = this.rules.length > 0 ? this.rules[this.rules.length - 1].scale : 1;\n for (const s of this.rules)\n if (t >= s.minScreen) e = s.scale;\n else break;\n return e;\n }\n}\nconst b = /* @__PURE__ */ new WeakMap();\nfunction k(o, t) {\n if (b.has(o))\n return b.get(o) ?? null;\n if (o.src.indexOf(\"/v2/\") === -1)\n return null;\n let e = new S(o, parseInt(o.getAttribute(\"micx_cdn_idx\")), t);\n return b.set(o, e), e;\n}\nclass S {\n constructor(t, e, s) {\n l(this, \"base\");\n l(this, \"path\");\n l(this, \"origUri\");\n l(this, \"sizeAdjustment\", 1);\n l(this, \"debug\", !1);\n this.image = t, this.logger = s;\n let r = t.src;\n this.origUri = r, r.replace(/^(.*?\\/)(v2\\/.*)$/, (d, p, c) => (this.base = p, this.path = c, \"\"));\n const i = t.getAttribute(\"data-size-adjust\");\n if (i)\n try {\n e = new A(i).getSizeAdjustment();\n } catch (d) {\n s.error(`Failed to parse attribute 'data-size-adjust=\"${i}\"' for image`, t, d);\n }\n this.sizeAdjustment = e;\n let a = f.decode(this.path);\n if (this.setOptimalImageDimensions(a), r.endsWith(\".svg\"))\n return;\n if (this.image.getAttribute(\"loading\") === \"eager\") {\n this.loadHiRes(a);\n return;\n }\n (async () => {\n await this.image.decode().catch(() => {\n }), this.loadHiRes(a);\n })();\n }\n reload() {\n let t = f.decode(this.path);\n this.loadHiRes(t);\n }\n async loadHiRes(t) {\n if (await y(), await y(this.image), await O(40), !this.image.isConnected)\n return;\n let e = this.image.getBoundingClientRect().width;\n (e === 0 || e === null) && (e = window.innerWidth || document.documentElement.clientWidth), e = Math.round(e * this.sizeAdjustment);\n let s = parseInt(t.widths[0]);\n for (let a of t.widths) {\n let n = parseInt(a);\n if (n < e)\n break;\n s = n;\n }\n this.logger.log(\"MicxCdnImgElement: Best fitting width for \" + t.filename + \" is \" + s + \"px (innerWidth=\" + innerWidth + \" px, sizeAdjustment=\" + this.sizeAdjustment + \")\");\n let r = new w(t.id, t.filename);\n r.setReatio(t.aspectRatio), r.addWidth(s), r.setExtensions(t.extensions);\n let i = this.base + \"/\" + r.toString();\n this.image.style.backgroundSize = \"cover\", this.image.style.backgroundImage = \"url(\" + this.origUri + \")\", this.image.setAttribute(\"src\", i), this.image.addEventListener(\"load\", () => {\n this.image.style.backgroundImage = \"none\", this.image.classList.add(\"loaded\");\n });\n }\n /**\n * Set the Image Dimensions to the optimal (best width) for the current screen size\n *\n * @private\n */\n setOptimalImageDimensions(t) {\n let e = t.aspectRatio.split(\"/\").map((i) => parseInt(i)), s = e[0] / e[1], r = parseInt(t.widths[0]);\n for (let i of t.widths) {\n let a = parseInt(i);\n if (a < innerWidth)\n break;\n r = a;\n }\n this.image.setAttribute(\"width\", r.toString()), this.image.setAttribute(\"height\", (r / s).toString()), this.image.classList.add(\"micx-image-loader\"), this.image.hasAttribute(\"alt\") === !1 && this.image.setAttribute(\"alt\", t.filename);\n }\n}\nconst z = new x(500, 1e3);\nclass C extends T(HTMLElement) {\n constructor() {\n super(...arguments);\n l(this, \"_observer\");\n l(this, \"_seen\", /* @__PURE__ */ new WeakSet());\n l(this, \"_imageDefaultSizeAdjustment\", 1);\n l(this, \"onResize\", async () => {\n await z.wait(), this.log(\"Resize event detected, reprocessing images\"), this.querySelectorAll(\"img\").forEach((e) => {\n var s;\n (s = k(e, this.getLogger())) == null || s.reload();\n });\n });\n }\n static get observedAttributes() {\n return [\"default-size-adjust\"];\n }\n async connectedCallback() {\n this.log(\"MicxCdnImageLoader connected to DOM\"), this.startObserving(), window.addEventListener(\"resize\", this.onResize);\n }\n disconnectedCallback() {\n this.stopObserving(), window.removeEventListener(\"resize\", this.onResize);\n }\n /**\n * Starts the MutationObserver and processes already existing images.\n * Optimized for performance: single observer, only childList + subtree,\n * and batched microtask processing.\n */\n startObserving() {\n this._observer || (this.querySelectorAll(\"img\").forEach((e) => this._enqueue(e)), this._observer = new MutationObserver((e) => {\n for (const s of e)\n if (!(s.type !== \"childList\" || s.addedNodes.length === 0))\n for (let r = 0; r < s.addedNodes.length; r++) {\n const i = s.addedNodes[r];\n if (i.nodeType !== Node.ELEMENT_NODE) continue;\n const a = i, n = Array.from(a.getElementsByTagName(\"img\"));\n n.length > 0 && n.forEach((d) => this._enqueue(d)), a.tagName === \"IMG\" && this._enqueue(a);\n }\n }), this._observer.observe(this, {\n childList: !0,\n subtree: !0\n }));\n }\n /**\n * Stops the MutationObserver and clears pending state.\n */\n stopObserving() {\n this._observer && (this._observer.disconnect(), this._observer = void 0);\n }\n /**\n * Enqueue an <img> for batched processing.\n */\n _enqueue(e) {\n this._seen.has(e) || (this._seen.add(e), queueMicrotask(() => this.onImageAdded(e)));\n }\n attributeChangedCallback(e, s, r) {\n if (this.log(\"Properties changed:\", e), e === \"default-size-adjust\") {\n new A();\n try {\n this._imageDefaultSizeAdjustment = new A(r).getSizeAdjustment();\n } catch (i) {\n this.error(\"Failed to parse default-size-adjust=\", r, i), this._imageDefaultSizeAdjustment = 1;\n }\n this.log(\"Default size adjustment updated to:\", this._imageDefaultSizeAdjustment);\n }\n }\n /**\n * Called whenever an <img> element is discovered within this component.\n * Not implemented yet.\n */\n onImageAdded(e) {\n if (this.log(\"onImageAdded image:\", e), !f.isCdnImage(e.src || e.getAttribute(\"data-src\"))) {\n this.log(\"Image is not a CDN image, skipping:\", e);\n return;\n }\n if (e.hasAttribute(\"loading\") || e.setAttribute(\"loading\", \"lazy\"), !e.hasAttribute(\"src\")) {\n if (!e.hasAttribute(\"data-src\")) {\n this.warn(\"Image without src or data-src found, skipping:\", e);\n return;\n }\n e.src = e.getAttribute(\"data-src\");\n }\n e.hasAttribute(\"data-src\") || e.setAttribute(\"data-src\", e.src), new S(e, this._imageDefaultSizeAdjustment, this.getLogger());\n }\n}\ncustomElements.define(\"micx-cdn-image-loader\", C);\nconst D = \"2.0.0\";\nexport {\n v as Micx,\n C as MicxCdnImageLoader,\n R as MicxFormmailConfig,\n L as MicxFormmailDefaultBootstrapStyle,\n W as MicxFormmailFacade,\n F as MicxFormmailerApi,\n D as MicxlibRev\n};\n","class Et {\n /**\n *\n * @param delay Debounce delay in milliseconds\n * @param max_delay Maximum delay in milliseconds, if false then no maximum delay is applied\n */\n constructor(t, e = !1) {\n this.delay = t, this.max_delay = e, this.timeout = null, this.startTimeWithMs = 0;\n }\n async wait() {\n return this.startTimeWithMs === 0 && (this.startTimeWithMs = Date.now()), this.timeout && (this.max_delay === !1 || this.startTimeWithMs + this.max_delay > Date.now()) && clearTimeout(this.timeout), new Promise((t) => {\n this.timeout = setTimeout(() => {\n this.startTimeWithMs = 0, t(!0);\n }, this.delay);\n });\n }\n debounce(t) {\n this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {\n t();\n }, this.delay);\n }\n}\nconst w = {\n xs: { name: \"xs\", minWidth: 0 },\n sm: { name: \"sm\", minWidth: 576 },\n md: { name: \"md\", minWidth: 768 },\n lg: { name: \"lg\", minWidth: 992 },\n xl: { name: \"xl\", minWidth: 1200 },\n xxl: { name: \"xxl\", minWidth: 1400 }\n};\nlet P = w.xs;\nfunction j() {\n const n = window.innerWidth;\n let t = w.xs;\n for (const e in w) {\n const s = w[e];\n n >= s.minWidth && (t = s);\n }\n return t;\n}\nfunction Dt(n) {\n if (typeof n == \"string\" && n.endsWith(\"px\") && (n = parseInt(n.replace(\"px\", \"\"))), typeof n == \"string\") {\n if (n = w[n], !n)\n throw new Error(\n `Breakpoint ${n} not found. Defined breakpoints are: ${Object.keys(w).join(\", \")}`\n );\n } else typeof n == \"number\" && (n = { name: \"c\", minWidth: n });\n return window.innerWidth >= n.minWidth;\n}\nif (!window.__nextrap_current_breakpoint) {\n window.__nextrap_current_breakpoint = j();\n const n = new Et(200, 500);\n window.addEventListener(\"resize\", async () => {\n if (await n.wait(), P !== j()) {\n P = j(), window.__nextrap_current_breakpoint = P;\n const t = new CustomEvent(\"breakpoint-changed\", {\n detail: { breakpoint: P }\n });\n console.log(\"Breakpoint changed\", P), window.dispatchEvent(t);\n }\n });\n}\nclass jt {\n /**\n * Checks recursively if the element is visible.\n *\n * @param el\n */\n static isVisible(t) {\n if (getComputedStyle(t).display === \"none\")\n return !1;\n if (t instanceof HTMLElement && (t.offsetWidth > 0 || t.offsetHeight > 0 || t.tagName === \"IMG\" || t.textContent !== \"\"))\n return !0;\n if (!t.children) return !1;\n for (const s of t.children)\n if (this.isVisible(s)) return !0;\n return !1;\n }\n /**\n * Usage:\n *\n * in firstupdated or connectedCallback of your element:\n * ```ts\n * override firstUpdated(_changedProperties: PropertyValues) {\n * SlotTool.observeEmptySlots(this)\n * }\n * ```\n *\n * @param slot\n */\n static isEmptySlot(t) {\n const e = t.assignedElements({ flatten: !0 });\n return e.length === 0 ? !0 : e.every((s) => !this.isVisible(s));\n }\n static observeEmptySlots(t) {\n const e = t.shadowRoot;\n if (!e) {\n console.warn(\"Element has no shadow root\", t);\n return;\n }\n e.querySelectorAll(\"slot\").forEach((i) => {\n this.isEmptySlot(i) ? i.setAttribute(\"empty\", \"\") : i.removeAttribute(\"empty\"), i.onslotchange = () => {\n this.isEmptySlot(i) ? i.setAttribute(\"empty\", \"\") : i.removeAttribute(\"empty\");\n };\n });\n }\n}\nfunction Bt(n, t, e) {\n return new Promise((s, i) => {\n const o = (r) => {\n n.removeEventListener(t, o, e), s(r);\n };\n n.addEventListener(t, o, e);\n });\n}\nfunction It() {\n return document.readyState === \"loading\" ? new Promise((n) => {\n document.addEventListener(\"DOMContentLoaded\", () => n());\n }) : Promise.resolve();\n}\nfunction qt() {\n return document.readyState === \"complete\" ? Promise.resolve() : new Promise((n) => {\n window.addEventListener(\"load\", () => n());\n });\n}\nfunction zt(n) {\n return new Promise((t) => setTimeout(t, n));\n}\nfunction Vt(n) {\n return new Promise((t) => {\n const e = (s) => {\n n.removeEventListener(\"animationend\", e), t(s);\n };\n n.addEventListener(\"animationend\", e);\n });\n}\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst N = globalThis, V = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && \"adoptedStyleSheets\" in Document.prototype && \"replace\" in CSSStyleSheet.prototype, F = Symbol(), tt = /* @__PURE__ */ new WeakMap();\nlet K = class {\n constructor(t, e, s) {\n if (this._$cssResult$ = !0, s !== F) throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");\n this.cssText = t, this.t = e;\n }\n get styleSheet() {\n let t = this.o;\n const e = this.t;\n if (V && t === void 0) {\n const s = e !== void 0 && e.length === 1;\n s && (t = tt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && tt.set(e, t));\n }\n return t;\n }\n toString() {\n return this.cssText;\n }\n};\nconst ut = (n) => new K(typeof n == \"string\" ? n : n + \"\", void 0, F), Kt = (n, ...t) => {\n const e = n.length === 1 ? n[0] : t.reduce((s, i, o) => s + ((r) => {\n if (r._$cssResult$ === !0) return r.cssText;\n if (typeof r == \"number\") return r;\n throw Error(\"Value passed to 'css' function must be a 'css' function result: \" + r + \". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\");\n })(i) + n[o + 1], n[0]);\n return new K(e, n, F);\n}, wt = (n, t) => {\n if (V) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);\n else for (const e of t) {\n const s = document.createElement(\"style\"), i = N.litNonce;\n i !== void 0 && s.setAttribute(\"nonce\", i), s.textContent = e.cssText, n.appendChild(s);\n }\n}, et = V ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {\n let e = \"\";\n for (const s of t.cssRules) e += s.cssText;\n return ut(e);\n})(n) : n;\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst { is: St, defineProperty: bt, getOwnPropertyDescriptor: Ct, getOwnPropertyNames: Pt, getOwnPropertySymbols: xt, getPrototypeOf: Tt } = Object, m = globalThis, st = m.trustedTypes, Ot = st ? st.emptyScript : \"\", B = m.reactiveElementPolyfillSupport, T = (n, t) => n, W = { toAttribute(n, t) {\n switch (t) {\n case Boolean:\n n = n ? Ot : null;\n break;\n case Object:\n case Array:\n n = n == null ? n : JSON.stringify(n);\n }\n return n;\n}, fromAttribute(n, t) {\n let e = n;\n switch (t) {\n case Boolean:\n e = n !== null;\n break;\n case Number:\n e = n === null ? null : Number(n);\n break;\n case Object:\n case Array:\n try {\n e = JSON.parse(n);\n } catch {\n e = null;\n }\n }\n return e;\n} }, G = (n, t) => !St(n, t), it = { attribute: !0, type: String, converter: W, reflect: !1, useDefault: !1, hasChanged: G };\nSymbol.metadata ?? (Symbol.metadata = Symbol(\"metadata\")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap());\nlet y = class extends HTMLElement {\n static addInitializer(t) {\n this._$Ei(), (this.l ?? (this.l = [])).push(t);\n }\n static get observedAttributes() {\n return this.finalize(), this._$Eh && [...this._$Eh.keys()];\n }\n static createProperty(t, e = it) {\n if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {\n const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);\n i !== void 0 && bt(this.prototype, t, i);\n }\n }\n static getPropertyDescriptor(t, e, s) {\n const { get: i, set: o } = Ct(this.prototype, t) ?? { get() {\n return this[e];\n }, set(r) {\n this[e] = r;\n } };\n return { get: i, set(r) {\n const h = i == null ? void 0 : i.call(this);\n o == null || o.call(this, r), this.requestUpdate(t, h, s);\n }, configurable: !0, enumerable: !0 };\n }\n static getPropertyOptions(t) {\n return this.elementProperties.get(t) ?? it;\n }\n static _$Ei() {\n if (this.hasOwnProperty(T(\"elementProperties\"))) return;\n const t = Tt(this);\n t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);\n }\n static finalize() {\n if (this.hasOwnProperty(T(\"finalized\"))) return;\n if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T(\"properties\"))) {\n const e = this.properties, s = [...Pt(e), ...xt(e)];\n for (const i of s) this.createProperty(i, e[i]);\n }\n const t = this[Symbol.metadata];\n if (t !== null) {\n const e = litPropertyMetadata.get(t);\n if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);\n }\n this._$Eh = /* @__PURE__ */ new Map();\n for (const [e, s] of this.elementProperties) {\n const i = this._$Eu(e, s);\n i !== void 0 && this._$Eh.set(i, e);\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n }\n static finalizeStyles(t) {\n const e = [];\n if (Array.isArray(t)) {\n const s = new Set(t.flat(1 / 0).reverse());\n for (const i of s) e.unshift(et(i));\n } else t !== void 0 && e.push(et(t));\n return e;\n }\n static _$Eu(t, e) {\n const s = e.attribute;\n return s === !1 ? void 0 : typeof s == \"string\" ? s : typeof t == \"string\" ? t.toLowerCase() : void 0;\n }\n constructor() {\n super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();\n }\n _$Ev() {\n var t;\n this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));\n }\n addController(t) {\n var e;\n (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));\n }\n removeController(t) {\n var e;\n (e = this._$EO) == null || e.delete(t);\n }\n _$E_() {\n const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;\n for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);\n t.size > 0 && (this._$Ep = t);\n }\n createRenderRoot() {\n const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);\n return wt(t, this.constructor.elementStyles), t;\n }\n connectedCallback() {\n var t;\n this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {\n var s;\n return (s = e.hostConnected) == null ? void 0 : s.call(e);\n });\n }\n enableUpdating(t) {\n }\n disconnectedCallback() {\n var t;\n (t = this._$EO) == null || t.forEach((e) => {\n var s;\n return (s = e.hostDisconnected) == null ? void 0 : s.call(e);\n });\n }\n attributeChangedCallback(t, e, s) {\n this._$AK(t, s);\n }\n _$ET(t, e) {\n var o;\n const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);\n if (i !== void 0 && s.reflect === !0) {\n const r = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : W).toAttribute(e, s.type);\n this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;\n }\n }\n _$AK(t, e) {\n var o, r;\n const s = this.constructor, i = s._$Eh.get(t);\n if (i !== void 0 && this._$Em !== i) {\n const h = s.getPropertyOptions(i), a = typeof h.converter == \"function\" ? { fromAttribute: h.converter } : ((o = h.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? h.converter : W;\n this._$Em = i;\n const c = a.fromAttribute(e, h.type);\n this[i] = c ?? ((r = this._$Ej) == null ? void 0 : r.get(i)) ?? c, this._$Em = null;\n }\n }\n requestUpdate(t, e, s) {\n var i;\n if (t !== void 0) {\n const o = this.constructor, r = this[t];\n if (s ?? (s = o.getPropertyOptions(t)), !((s.hasChanged ?? G)(r, e) || s.useDefault && s.reflect && r === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(o._$Eu(t, s)))) return;\n this.C(t, e, s);\n }\n this.isUpdatePending === !1 && (this._$ES = this._$EP());\n }\n C(t, e, { useDefault: s, reflect: i, wrapped: o }, r) {\n s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), o !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));\n }\n async _$EP() {\n this.isUpdatePending = !0;\n try {\n await this._$ES;\n } catch (e) {\n Promise.reject(e);\n }\n const t = this.scheduleUpdate();\n return t != null && await t, !this.isUpdatePending;\n }\n scheduleUpdate() {\n return this.performUpdate();\n }\n performUpdate() {\n var s;\n if (!this.isUpdatePending) return;\n if (!this.hasUpdated) {\n if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {\n for (const [o, r] of this._$Ep) this[o] = r;\n this._$Ep = void 0;\n }\n const i = this.constructor.elementProperties;\n if (i.size > 0) for (const [o, r] of i) {\n const { wrapped: h } = r, a = this[o];\n h !== !0 || this._$AL.has(o) || a === void 0 || this.C(o, void 0, r, a);\n }\n }\n let t = !1;\n const e = this._$AL;\n try {\n t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {\n var o;\n return (o = i.hostUpdate) == null ? void 0 : o.call(i);\n }), this.update(e)) : this._$EM();\n } catch (i) {\n throw t = !1, this._$EM(), i;\n }\n t && this._$AE(e);\n }\n willUpdate(t) {\n }\n _$AE(t) {\n var e;\n (e = this._$EO) == null || e.forEach((s) => {\n var i;\n return (i = s.hostUpdated) == null ? void 0 : i.call(s);\n }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);\n }\n _$EM() {\n this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;\n }\n get updateComplete() {\n return this.getUpdateComplete();\n }\n getUpdateComplete() {\n return this._$ES;\n }\n shouldUpdate(t) {\n return !0;\n }\n update(t) {\n this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();\n }\n updated(t) {\n }\n firstUpdated(t) {\n }\n};\ny.elementStyles = [], y.shadowRootOptions = { mode: \"open\" }, y[T(\"elementProperties\")] = /* @__PURE__ */ new Map(), y[T(\"finalized\")] = /* @__PURE__ */ new Map(), B == null || B({ ReactiveElement: y }), (m.reactiveElementVersions ?? (m.reactiveElementVersions = [])).push(\"2.1.1\");\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst O = globalThis, D = O.trustedTypes, nt = D ? D.createPolicy(\"lit-html\", { createHTML: (n) => n }) : void 0, Z = \"$lit$\", f = `lit$${Math.random().toFixed(9).slice(2)}$`, J = \"?\" + f, Ut = `<${J}>`, v = document, U = () => v.createComment(\"\"), M = (n) => n === null || typeof n != \"object\" && typeof n != \"function\", Q = Array.isArray, pt = (n) => Q(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == \"function\", I = `[ \t\n\\f\\r]`, x = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g, rt = /-->/g, ot = />/g, _ = RegExp(`>|${I}(?:([^\\\\s\"'>=/]+)(${I}*=${I}*(?:[^ \t\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`, \"g\"), at = /'/g, ht = /\"/g, ft = /^(?:script|style|textarea|title)$/i, X = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), Zt = X(1), Jt = X(2), Qt = X(3), S = Symbol.for(\"lit-noChange\"), u = Symbol.for(\"lit-nothing\"), ct = /* @__PURE__ */ new WeakMap(), g = v.createTreeWalker(v, 129);\nfunction $t(n, t) {\n if (!Q(n) || !n.hasOwnProperty(\"raw\")) throw Error(\"invalid template strings array\");\n return nt !== void 0 ? nt.createHTML(t) : t;\n}\nconst mt = (n, t) => {\n const e = n.length - 1, s = [];\n let i, o = t === 2 ? \"<svg>\" : t === 3 ? \"<math>\" : \"\", r = x;\n for (let h = 0; h < e; h++) {\n const a = n[h];\n let c, d, l = -1, p = 0;\n for (; p < a.length && (r.lastIndex = p, d = r.exec(a), d !== null); ) p = r.lastIndex, r === x ? d[1] === \"!--\" ? r = rt : d[1] !== void 0 ? r = ot : d[2] !== void 0 ? (ft.test(d[2]) && (i = RegExp(\"</\" + d[2], \"g\")), r = _) : d[3] !== void 0 && (r = _) : r === _ ? d[0] === \">\" ? (r = i ?? x, l = -1) : d[1] === void 0 ? l = -2 : (l = r.lastIndex - d[2].length, c = d[1], r = d[3] === void 0 ? _ : d[3] === '\"' ? ht : at) : r === ht || r === at ? r = _ : r === rt || r === ot ? r = x : (r = _, i = void 0);\n const $ = r === _ && n[h + 1].startsWith(\"/>\") ? \" \" : \"\";\n o += r === x ? a + Ut : l >= 0 ? (s.push(c), a.slice(0, l) + Z + a.slice(l) + f + $) : a + f + (l === -2 ? h : $);\n }\n return [$t(n, o + (n[e] || \"<?>\") + (t === 2 ? \"</svg>\" : t === 3 ? \"</math>\" : \"\")), s];\n};\nclass R {\n constructor({ strings: t, _$litType$: e }, s) {\n let i;\n this.parts = [];\n let o = 0, r = 0;\n const h = t.length - 1, a = this.parts, [c, d] = mt(t, e);\n if (this.el = R.createElement(c, s), g.currentNode = this.el.content, e === 2 || e === 3) {\n const l = this.el.content.firstChild;\n l.replaceWith(...l.childNodes);\n }\n for (; (i = g.nextNode()) !== null && a.length < h; ) {\n if (i.nodeType === 1) {\n if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(Z)) {\n const p = d[r++], $ = i.getAttribute(l).split(f), H = /([.?@])?(.*)/.exec(p);\n a.push({ type: 1, index: o, name: H[2], strings: $, ctor: H[1] === \".\" ? yt : H[1] === \"?\" ? gt : H[1] === \"@\" ? At : L }), i.removeAttribute(l);\n } else l.startsWith(f) && (a.push({ type: 6, index: o }), i.removeAttribute(l));\n if (ft.test(i.tagName)) {\n const l = i.textContent.split(f), p = l.length - 1;\n if (p > 0) {\n i.textContent = D ? D.emptyScript : \"\";\n for (let $ = 0; $ < p; $++) i.append(l[$], U()), g.nextNode(), a.push({ type: 2, index: ++o });\n i.append(l[p], U());\n }\n }\n } else if (i.nodeType === 8) if (i.data === J) a.push({ type: 2, index: o });\n else {\n let l = -1;\n for (; (l = i.data.indexOf(f, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += f.length - 1;\n }\n o++;\n }\n }\n static createElement(t, e) {\n const s = v.createElement(\"template\");\n return s.innerHTML = t, s;\n }\n}\nfunction E(n, t, e = n, s) {\n var r, h;\n if (t === S) return t;\n let i = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;\n const o = M(t) ? void 0 : t._$litDirective$;\n return (i == null ? void 0 : i.constructor) !== o && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), o === void 0 ? i = void 0 : (i = new o(n), i._$AT(n, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = E(n, i._$AS(n, t.values), i, s)), t;\n}\nclass _t {\n constructor(t, e) {\n this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;\n }\n get parentNode() {\n return this._$AM.parentNode;\n }\n get _$AU() {\n return this._$AM._$AU;\n }\n u(t) {\n const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? v).importNode(e, !0);\n g.currentNode = i;\n let o = g.nextNode(), r = 0, h = 0, a = s[0];\n for (; a !== void 0; ) {\n if (r === a.index) {\n let c;\n a.type === 2 ? c = new C(o, o.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (c = new vt(o, this, t)), this._$AV.push(c), a = s[++h];\n }\n r !== (a == null ? void 0 : a.index) && (o = g.nextNode(), r++);\n }\n return g.currentNode = v, i;\n }\n p(t) {\n let e = 0;\n for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;\n }\n}\nclass C {\n get _$AU() {\n var t;\n return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;\n }\n constructor(t, e, s, i) {\n this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;\n }\n get parentNode() {\n let t = this._$AA.parentNode;\n const e = this._$AM;\n return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;\n }\n get startNode() {\n return this._$AA;\n }\n get endNode() {\n return this._$AB;\n }\n _$AI(t, e = this) {\n t = E(this, t, e), M(t) ? t === u || t == null || t === \"\" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : pt(t) ? this.k(t) : this._(t);\n }\n O(t) {\n return this._$AA.parentNode.insertBefore(t, this._$AB);\n }\n T(t) {\n this._$AH !== t && (this._$AR(), this._$AH = this.O(t));\n }\n _(t) {\n this._$AH !== u && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;\n }\n $(t) {\n var o;\n const { values: e, _$litType$: s } = t, i = typeof s == \"number\" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement($t(s.h, s.h[0]), this.options)), s);\n if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e);\n else {\n const r = new _t(i, this), h = r.u(this.options);\n r.p(e), this.T(h), this._$AH = r;\n }\n }\n _$AC(t) {\n let e = ct.get(t.strings);\n return e === void 0 && ct.set(t.strings, e = new R(t)), e;\n }\n k(t) {\n Q(this._$AH) || (this._$AH = [], this._$AR());\n const e = this._$AH;\n let s, i = 0;\n for (const o of t) i === e.length ? e.push(s = new C(this.O(U()), this.O(U()), this, this.options)) : s = e[i], s._$AI(o), i++;\n i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);\n }\n _$AR(t = this._$AA.nextSibling, e) {\n var s;\n for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t !== this._$AB; ) {\n const i = t.nextSibling;\n t.remove(), t = i;\n }\n }\n setConnected(t) {\n var e;\n this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));\n }\n}\nclass L {\n get tagName() {\n return this.element.tagName;\n }\n get _$AU() {\n return this._$AM._$AU;\n }\n constructor(t, e, s, i, o) {\n this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== \"\" || s[1] !== \"\" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = u;\n }\n _$AI(t, e = this, s, i) {\n const o = this.strings;\n let r = !1;\n if (o === void 0) t = E(this, t, e, 0), r = !M(t) || t !== this._$AH && t !== S, r && (this._$AH = t);\n else {\n const h = t;\n let a, c;\n for (t = o[0], a = 0; a < o.length - 1; a++) c = E(this, h[s + a], e, a), c === S && (c = this._$AH[a]), r || (r = !M(c) || c !== this._$AH[a]), c === u ? t = u : t !== u && (t += (c ?? \"\") + o[a + 1]), this._$AH[a] = c;\n }\n r && !i && this.j(t);\n }\n j(t) {\n t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? \"\");\n }\n}\nclass yt extends L {\n constructor() {\n super(...arguments), this.type = 3;\n }\n j(t) {\n this.element[this.name] = t === u ? void 0 : t;\n }\n}\nclass gt extends L {\n constructor() {\n super(...arguments), this.type = 4;\n }\n j(t) {\n this.element.toggleAttribute(this.name, !!t && t !== u);\n }\n}\nclass At extends L {\n constructor(t, e, s, i, o) {\n super(t, e, s, i, o), this.type = 5;\n }\n _$AI(t, e = this) {\n if ((t = E(this, t, e, 0) ?? u) === S) return;\n const s = this._$AH, i = t === u && s !== u || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== u && (s === u || i);\n i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;\n }\n handleEvent(t) {\n var e;\n typeof this._$AH == \"function\" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);\n }\n}\nclass vt {\n constructor(t, e, s) {\n this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;\n }\n get _$AU() {\n return this._$AM._$AU;\n }\n _$AI(t) {\n E(this, t);\n }\n}\nconst Xt = { M: Z, P: f, A: J, C: 1, L: mt, R: _t, D: pt, V: E, I: C, H: L, N: gt, U: At, B: yt, F: vt }, q = O.litHtmlPolyfillSupport;\nq == null || q(R, C), (O.litHtmlVersions ?? (O.litHtmlVersions = [])).push(\"3.3.1\");\nconst Mt = (n, t, e) => {\n const s = (e == null ? void 0 : e.renderBefore) ?? t;\n let i = s._$litPart$;\n if (i === void 0) {\n const o = (e == null ? void 0 : e.renderBefore) ?? null;\n s._$litPart$ = i = new C(t.insertBefore(U(), o), o, void 0, e ?? {});\n }\n return i._$AI(n), i;\n};\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst A = globalThis;\nclass k extends y {\n constructor() {\n super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;\n }\n createRenderRoot() {\n var e;\n const t = super.createRenderRoot();\n return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;\n }\n update(t) {\n const e = this.render();\n this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Mt(e, this.renderRoot, this.renderOptions);\n }\n connectedCallback() {\n var t;\n super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);\n }\n disconnectedCallback() {\n var t;\n super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);\n }\n render() {\n return S;\n }\n}\nvar dt;\nk._$litElement$ = !0, k.finalized = !0, (dt = A.litElementHydrateSupport) == null || dt.call(A, { LitElement: k });\nconst z = A.litElementPolyfillSupport;\nz == null || z({ LitElement: k });\nconst Yt = { _$AK: (n, t, e) => {\n n._$AK(t, e);\n}, _$AL: (n) => n._$AL };\n(A.litElementVersions ?? (A.litElementVersions = [])).push(\"4.2.1\");\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst te = !1;\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst ee = (n) => (t, e) => {\n e !== void 0 ? e.addInitializer(() => {\n customElements.define(n, t);\n }) : customElements.define(n, t);\n};\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst Rt = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: G }, Lt = (n = Rt, t, e) => {\n const { kind: s, metadata: i } = e;\n let o = globalThis.litPropertyMetadata.get(i);\n if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === \"setter\" && ((n = Object.create(n)).wrapped = !0), o.set(e.name, n), s === \"accessor\") {\n const { name: r } = e;\n return { set(h) {\n const a = t.get.call(this);\n t.set.call(this, h), this.requestUpdate(r, a, n);\n }, init(h) {\n return h !== void 0 && this.C(r, void 0, n, h), h;\n } };\n }\n if (s === \"setter\") {\n const { name: r } = e;\n return function(h) {\n const a = this[r];\n t.call(this, h), this.requestUpdate(r, a, n);\n };\n }\n throw Error(\"Unsupported decorator location: \" + s);\n};\nfunction Ht(n) {\n return (t, e) => typeof e == \"object\" ? Lt(n, t, e) : ((s, i, o) => {\n const r = i.hasOwnProperty(o);\n return i.constructor.createProperty(o, s), r ? Object.getOwnPropertyDescriptor(i, o) : void 0;\n })(n, t, e);\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction se(n) {\n return Ht({ ...n, state: !0, attribute: !1 });\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction ie(n) {\n return (t, e) => {\n const s = typeof t == \"function\" ? t : t[e];\n Object.assign(s, n);\n };\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst b = (n, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != \"object\" && Object.defineProperty(n, t, e), e);\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction ne(n, t) {\n return (e, s, i) => {\n const o = (r) => {\n var h;\n return ((h = r.renderRoot) == null ? void 0 : h.querySelector(n)) ?? null;\n };\n if (t) {\n const { get: r, set: h } = typeof s == \"object\" ? e : i ?? (() => {\n const a = Symbol();\n return { get() {\n return this[a];\n }, set(c) {\n this[a] = c;\n } };\n })();\n return b(e, s, { get() {\n let a = r.call(this);\n return a === void 0 && (a = o(this), (a !== null || this.hasUpdated) && h.call(this, a)), a;\n } });\n }\n return b(e, s, { get() {\n return o(this);\n } });\n };\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nlet Nt;\nfunction re(n) {\n return (t, e) => b(t, e, { get() {\n return (this.renderRoot ?? Nt ?? (Nt = document.createDocumentFragment())).querySelectorAll(n);\n } });\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction oe(n) {\n return (t, e) => b(t, e, { async get() {\n var s;\n return await this.updateComplete, ((s = this.renderRoot) == null ? void 0 : s.querySelector(n)) ?? null;\n } });\n}\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction ae(n) {\n return (t, e) => {\n const { slot: s, selector: i } = n ?? {}, o = \"slot\" + (s ? `[name=${s}]` : \":not([name])\");\n return b(t, e, { get() {\n var a;\n const r = (a = this.renderRoot) == null ? void 0 : a.querySelector(o), h = (r == null ? void 0 : r.assignedElements(n)) ?? [];\n return i === void 0 ? h : h.filter((c) => c.matches(i));\n } });\n };\n}\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction he(n) {\n return (t, e) => {\n const { slot: s } = n ?? {}, i = \"slot\" + (s ? `[name=${s}]` : \":not([name])\");\n return b(t, e, { get() {\n var r;\n const o = (r = this.renderRoot) == null ? void 0 : r.querySelector(i);\n return (o == null ? void 0 : o.assignedNodes(n)) ?? [];\n } });\n };\n}\nfunction ce(n, t = \"this\", e) {\n return function(s, i, o) {\n const r = s.connectedCallback, h = s.disconnectedCallback;\n s.connectedCallback = function() {\n const a = t === \"this\" ? this : t, c = Array.isArray(n) ? n : [n];\n this.__eventListenerRemovers ?? (this.__eventListenerRemovers = []);\n for (const d of c) {\n const l = this[i].bind(this);\n a.addEventListener(d, l), this.__eventListenerRemovers.push(() => a.removeEventListener(d, l));\n }\n r == null || r.call(this);\n }, s.disconnectedCallback = function() {\n var a;\n (a = this.__eventListenerRemovers) == null || a.forEach((c) => c()), this.__eventListenerRemovers = [], h == null || h.call(this);\n };\n };\n}\nconst kt = \"nte-group-open-close\";\nfunction le(n, t) {\n document.dispatchEvent(\n new CustomEvent(kt, {\n bubbles: !1,\n composed: !0,\n detail: { open: n, groupName: t }\n })\n );\n}\nfunction Wt(n, t) {\n const e = document.createElement(\"template\");\n return e.innerHTML = n.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {\n get(s, i) {\n if (i === \"fragment\")\n return t;\n if (typeof i == \"string\") {\n const o = t.getElementById(i);\n if (!o)\n throw new Error(`❌ Unknown id '${i}'.`);\n return o;\n }\n }\n });\n}\nconst Y = class Y extends y {\n constructor(t) {\n super();\n const e = this.createRenderRoot();\n this.$ = Wt(t, e);\n }\n connectedCallback() {\n super.connectedCallback();\n let t = this.css;\n Array.isArray(t) || (t = [t]);\n const e = t.map((s) => s instanceof K ? s.styleSheet : ut(s).styleSheet);\n this.shadowRoot.adoptedStyleSheets = e;\n }\n};\nY.DEFINITION = {\n classes: [],\n attributes: {}\n};\nlet lt = Y;\nexport {\n K as CSSResult,\n Et as Debouncer,\n kt as EVENT_NAME_GROUP_OPEN_CLOSE,\n k as LitElement,\n lt as NtSimpleElement,\n y as ReactiveElement,\n jt as SlotTool,\n Yt as _$LE,\n Xt as _$LH,\n wt as adoptStyles,\n w as breakpoints,\n Kt as css,\n P as currentBreakpoint,\n ee as customElement,\n W as defaultConverter,\n ce as eventListener,\n ie as eventOptions,\n et as getCompatibleStyle,\n Zt as html,\n Dt as isBiggerThanBreakpoint,\n te as isServer,\n Qt as mathml,\n S as noChange,\n G as notEqual,\n u as nothing,\n Ht as property,\n ne as query,\n re as queryAll,\n ae as queryAssignedElements,\n he as queryAssignedNodes,\n oe as queryAsync,\n Mt as render,\n zt as sleep,\n Lt as standardProperty,\n se as state,\n V as supportsAdoptingStyleSheets,\n Jt as svg,\n le as triggerGroupOpenCloseEvent,\n ut as unsafeCSS,\n Bt as waitFor,\n Vt as waitForAnimationEnd,\n It as waitForDomContentLoaded,\n qt as waitForLoad,\n Wt as wrap\n};\n","import { eventListener as l, EVENT_NAME_GROUP_OPEN_CLOSE as c, triggerGroupOpenCloseEvent as m } from \"@nextrap/nt-framework\";\nimport { unsafeCSS as u, LitElement as b } from \"lit\";\nimport { property as h, customElement as d } from \"lit/decorators.js\";\nimport { html as v } from \"lit/static-html.js\";\nconst f = \":host{--size: 40px;--color: var(--nt-text, black);--color-hover: var(--color);--width: 4px;height:var(--size);width:var(--size);display:block}#button{padding:0;width:100%;height:100%;cursor:pointer}.hamburger{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0 none;background:none;position:relative;transition:transform .4s}.hamburger:hover{--color: var(--color-hover)}:host([open]) .hamburger .bar:nth-of-type(1){transform-origin:center center;transform:translateY(calc(.5em - var(--width) / 2)) rotate(45deg)}:host([open]) .hamburger .bar:nth-of-type(2){opacity:0}:host([open]) .hamburger .bar:nth-of-type(3){transform:translateY(calc(.5em - var(--width) / 2)) rotate(-45deg)}:host(:not([open])) #button:hover .bar:nth-of-type(1){transform:translateY(calc(.2em - var(--width) / 2))}:host(:not([open])) #button:hover .bar:nth-of-type(2){transform:translateY(calc(.5em - var(--width) / 2))}:host(:not([open])) #button:hover .bar:nth-of-type(3){transform:translateY(calc(.8em - var(--width) / 2))}.bar{font-size:var(--size);height:var(--width);width:var(--size);display:block;position:absolute;top:0;background-color:var(--color);transition:.4s}.bar:nth-of-type(1){transform:translateY(calc(.25em - var(--width) / 2))}.bar:nth-of-type(2){transform:translateY(calc(.5em - var(--width) / 2))}.bar:nth-of-type(3){transform:translateY(calc(.75em - var(--width) / 2))}\";\nvar y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (t, a, s, n) => {\n for (var e = n > 1 ? void 0 : n ? g(a, s) : a, p = t.length - 1, i; p >= 0; p--)\n (i = t[p]) && (e = (n ? i(a, s, e) : i(e)) || e);\n return n && e && y(a, s, e), e;\n};\nlet r = class extends b {\n constructor() {\n super(), this.open = !1, this.text = \"Menu\", this.dataGroupName = \"\";\n }\n render() {\n return v` <button id=\"button\" class=\"hamburger\">\n <div class=\"bar\"></div>\n <div class=\"bar\"></div>\n <div class=\"bar\"></div>\n </button>`;\n }\n listenEvents(t) {\n t.detail.groupName === this.dataGroupName && (this.open = t.detail.open);\n }\n update(t) {\n super.update(t), t.has(\"open\") && this.dataGroupName !== \"\" && m(this.open, this.dataGroupName);\n }\n};\nr.styles = [u(f)];\no([\n h({ type: Boolean, attribute: \"open\", reflect: !0 })\n], r.prototype, \"open\", 2);\no([\n h({ type: String, reflect: !0 })\n], r.prototype, \"text\", 2);\no([\n h({ type: String, reflect: !1, attribute: \"data-group-name\" })\n], r.prototype, \"dataGroupName\", 2);\no([\n l(c, document)\n], r.prototype, \"listenEvents\", 1);\nr = o([\n d(\"nte-burger\")\n], r);\nexport {\n r as NteBurger\n};\n","import { waitForDomContentLoaded as H, isBiggerThanBreakpoint as ne, Debouncer as oe, SlotTool as Tt } from \"@nextrap/nt-framework\";\nimport \"@nextrap/nte-offcanvas\";\nimport { sleep as q, EventBindingsMixin as se, LoggingMixin as le, Listen as de, waitForLoad as ce, create_element as he } from \"@trunkjs/browser-utils\";\nimport { html as Y, unsafeCSS as j, LitElement as J } from \"lit\";\nimport { customElement as K, property as z, state as Q } from \"lit/decorators.js\";\nimport { createRef as St, ref as $t } from \"lit/directives/ref.js\";\nimport { styleMap as pe } from \"lit/directives/style-map.js\";\nimport \"@nextrap/nte-burger\";\nconst ve = \":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--submenu-hover-text-color: var(--nt-primary);--justify-content: center;--sidemenu-bg: var(--nt-primary-subtle);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}\";\nvar ue = Object.create, it = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, Pt = (t, e) => (e = Symbol[t]) ? e : Symbol.for(\"Symbol.\" + t), M = (t) => {\n throw TypeError(t);\n}, _e = (t, e, i) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, xt = (t, e) => it(t, \"name\", { value: e, configurable: !0 }), ge = (t) => [, , , ue((t == null ? void 0 : t[Pt(\"metadata\")]) ?? null)], Mt = [\"class\", \"method\", \"getter\", \"setter\", \"accessor\", \"field\", \"value\", \"get\", \"set\"], A = (t) => t !== void 0 && typeof t != \"function\" ? M(\"Function expected\") : t, be = (t, e, i, o, a) => ({ kind: Mt[t], name: e, metadata: o, addInitializer: (n) => i._ ? M(\"Already initialized\") : a.push(A(n || null)) }), me = (t, e) => _e(e, Pt(\"metadata\"), t[3]), S = (t, e, i, o) => {\n for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) e & 1 ? n[a].call(i) : o = n[a].call(i, o);\n return o;\n}, W = (t, e, i, o, a, n) => {\n var h, s, m, p, _, r = e & 7, g = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? g ? 1 : 2 : 0, k = Mt[r + 5], E = r > 3 && (t[f - 1] = []), I = t[f] || (t[f] = []), c = r && (!d && !g && (a = a.prototype), r < 5 && (r > 3 || !d) && fe(r < 4 ? a : { get [i]() {\n return kt(this, n);\n }, set [i](l) {\n return Et(this, n, l);\n } }, i));\n r ? d && r < 4 && xt(n, (r > 2 ? \"set \" : r > 1 ? \"get \" : \"\") + i) : xt(a, i);\n for (var w = o.length - 1; w >= 0; w--)\n p = be(r, i, m = {}, t[3], I), r && (p.static = g, p.private = d, _ = p.access = { has: d ? (l) => we(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? kt : ye)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, y) => Et(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[k] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? A(s) && (r > 4 ? E.unshift(s) : r ? d ? n = s : c[k] = s : a = s) : typeof s != \"object\" || s === null ? M(\"Object expected\") : (A(h = s.get) && (c.get = h), A(h = s.set) && (c.set = h), A(h = s.init) && E.unshift(h));\n return r || me(t, a), c && it(a, i, c), d ? r ^ 4 ? n : c : a;\n}, rt = (t, e, i) => e.has(t) || M(\"Cannot \" + i), we = (t, e) => Object(e) !== e ? M('Cannot use the \"in\" operator on this value') : t.has(e), kt = (t, e, i) => (rt(t, e, \"read from private field\"), i ? i.call(t) : e.get(t)), R = (t, e, i) => e.has(t) ? M(\"Cannot add the same private member more than once\") : e instanceof WeakSet ? e.add(t) : e.set(t, i), Et = (t, e, i, o) => (rt(t, e, \"write to private field\"), o ? o.call(t, i) : e.set(t, i), i), ye = (t, e, i) => (rt(t, e, \"access private method\"), i), Wt, Lt, Bt, It, Rt, V, At, u, at, nt, ot, st, lt;\nAt = [K(\"nte-nav\")];\nclass x extends (V = J, Rt = [z({ type: String, reflect: !0 })], It = [z({ type: String, reflect: !0 })], Bt = [z({ type: String, reflect: !0, attribute: \"transfer-to\" })], Lt = [z({ type: String, reflect: !1, attribute: \"data-group-name\" })], Wt = [Q()], V) {\n constructor() {\n super(), R(this, at, S(u, 8, this, \"slave\")), S(u, 11, this), R(this, nt, S(u, 12, this, \"99999px\")), S(u, 15, this), R(this, ot, S(u, 16, this, \"\")), S(u, 19, this), R(this, st, S(u, 20, this, \"\")), S(u, 23, this), R(this, lt, S(u, 24, this, !1)), S(u, 27, this);\n }\n getOffcanvas() {\n return this.transferTo ? document.querySelector(this.transferTo) : null;\n }\n getOffcanvasNav() {\n const e = this.getOffcanvas();\n return e ? e.querySelector(\"nte-nav\") : null;\n }\n render() {\n return Y` <nav>\n <div id=\"burger-wrapper\" ?hidden=${!this._isTransferred}>\n <slot\n name=\"burger\"\n open\n aria-haspopup=\"true\"\n id=\"burger\"\n class=\"burger\"\n @click=${() => {\n var e;\n return (e = this.getOffcanvas()) == null ? void 0 : e.open();\n }}\n >\n <!-- fallback icon -->\n ${this._isTransferred ? Y`<div id=\"burger-default\" style=\"display:flex; align-items: center; justify-content: center;\">\n <div id=\"text\"><slot name=\"menu-text\"></slot></div>\n <nte-burger\n data-group-name=\"${this.dataGroupName}\"\n id=\"open-burger\"\n onclick=\"this.open = true\"\n ></nte-burger>\n </div>` : \"\"}\n </slot>\n </div>\n\n <div class=\"nt-nav-links\" id=\"main\" part=\"main\">\n <slot id=\"main-slot\"></slot>\n </div>\n </nav>`;\n }\n transferToElement(e) {\n var a;\n const i = (a = this.shadowRoot) == null ? void 0 : a.querySelector(\"#main-slot\");\n if (i === null)\n return;\n Array.from(i.assignedElements({ flatten: !0 })).forEach((n) => {\n n instanceof HTMLElement && e.appendChild(n);\n });\n }\n updated(e) {\n var i, o;\n super.updated(e), this._isTransferred ? this.transferToElement(\n this.getOffcanvasNav() ?? (() => {\n throw new Error(\"No offcanvas nav found\");\n })()\n ) : ((i = this.getOffcanvasNav()) == null || i.transferToElement(this), (o = this.getOffcanvas()) == null || o.close());\n }\n firstUpdated(e) {\n super.firstUpdated(e);\n const i = this.classList;\n !i.contains(\"nav-vertical\") && !i.contains(\"nav-horizontal\") && i.add(this.closest(\"nte-offcanvas\") === null ? \"nav-horizontal\" : \"nav-vertical\");\n }\n async connectedCallback() {\n await H(), super.connectedCallback();\n const e = () => {\n if (this.transferTo === \"\") {\n this._isTransferred = !1;\n return;\n }\n this.breakpoint !== \"\" && (ne(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0);\n };\n this.mode !== \"slave\" && this.breakpoint !== \"\" && (e(), window.addEventListener(\"breakpoint-changed\", e), (async () => (await q(1e3), e()))());\n }\n}\nu = ge(V);\nat = /* @__PURE__ */ new WeakMap();\nnt = /* @__PURE__ */ new WeakMap();\not = /* @__PURE__ */ new WeakMap();\nst = /* @__PURE__ */ new WeakMap();\nlt = /* @__PURE__ */ new WeakMap();\nW(u, 4, \"mode\", Rt, x, at);\nW(u, 4, \"breakpoint\", It, x, nt);\nW(u, 4, \"transferTo\", Bt, x, ot);\nW(u, 4, \"dataGroupName\", Lt, x, st);\nW(u, 4, \"_isTransferred\", Wt, x, lt);\nx = W(u, 0, \"NteNav\", At, x);\nx.styles = [j(ve)];\nS(u, 1, x);\nconst Se = \"*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;--spacer-height: 80px;width:100vw;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;transition:height .3s ease-in-out;height:var(--spacer-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}\";\nvar $e = Object.create, dt = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Dt = (t, e) => (e = Symbol[t]) ? e : Symbol.for(\"Symbol.\" + t), L = (t) => {\n throw TypeError(t);\n}, ke = (t, e, i) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, zt = (t, e) => dt(t, \"name\", { value: e, configurable: !0 }), Ee = (t) => [, , , $e((t == null ? void 0 : t[Dt(\"metadata\")]) ?? null)], Ft = [\"class\", \"method\", \"getter\", \"setter\", \"accessor\", \"field\", \"value\", \"get\", \"set\"], D = (t) => t !== void 0 && typeof t != \"function\" ? L(\"Function expected\") : t, ze = (t, e, i, o, a) => ({ kind: Ft[t], name: e, metadata: o, addInitializer: (n) => i._ ? L(\"Already initialized\") : a.push(D(n || null)) }), Ce = (t, e) => ke(e, Dt(\"metadata\"), t[3]), X = (t, e, i, o) => {\n for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) e & 1 ? n[a].call(i) : o = n[a].call(i, o);\n return o;\n}, Yt = (t, e, i, o, a, n) => {\n var h, s, m, p, _, r = e & 7, g = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? g ? 1 : 2 : 0, k = Ft[r + 5], E = r > 3 && (t[f - 1] = []), I = t[f] || (t[f] = []), c = r && (!d && !g && (a = a.prototype), r < 5 && (r > 3 || !d) && xe(r < 4 ? a : { get [i]() {\n return Ct(this, n);\n }, set [i](l) {\n return Ot(this, n, l);\n } }, i));\n r ? d && r < 4 && zt(n, (r > 2 ? \"set \" : r > 1 ? \"get \" : \"\") + i) : zt(a, i);\n for (var w = o.length - 1; w >= 0; w--)\n p = ze(r, i, m = {}, t[3], I), r && (p.static = g, p.private = d, _ = p.access = { has: d ? (l) => Oe(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? Ct : Te)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, y) => Ot(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[k] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? D(s) && (r > 4 ? E.unshift(s) : r ? d ? n = s : c[k] = s : a = s) : typeof s != \"object\" || s === null ? L(\"Object expected\") : (D(h = s.get) && (c.get = h), D(h = s.set) && (c.set = h), D(h = s.init) && E.unshift(h));\n return r || Ce(t, a), c && dt(a, i, c), d ? r ^ 4 ? n : c : a;\n}, ct = (t, e, i) => e.has(t) || L(\"Cannot \" + i), Oe = (t, e) => Object(e) !== e ? L('Cannot use the \"in\" operator on this value') : t.has(e), Ct = (t, e, i) => (ct(t, e, \"read from private field\"), i ? i.call(t) : e.get(t)), Ne = (t, e, i) => e.has(t) ? L(\"Cannot add the same private member more than once\") : e instanceof WeakSet ? e.add(t) : e.set(t, i), Ot = (t, e, i, o) => (ct(t, e, \"write to private field\"), o ? o.call(t, i) : e.set(t, i), i), Te = (t, e, i) => (ct(t, e, \"access private method\"), i), Gt, Z, Ut, P, ht;\nUt = [K(\"nte-navbar\")];\nclass G extends (Z = J, Gt = [z({ type: Number, attribute: \"scroll-threshold\", reflect: !0 })], Z) {\n constructor() {\n super(), this.navbarRef = St(), this.spacerRef = St(), Ne(this, ht, X(P, 8, this, 0)), X(P, 11, this), this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = void 0, this._debouncer = new oe(100, 300), document.addEventListener(\n \"scroll\",\n async () => {\n this.updateScrollState();\n },\n { passive: !0 }\n );\n }\n static get is() {\n return \"nte-navbar\";\n }\n updateScrollState() {\n const e = window.scrollY;\n e > 1 ? this.classList.add(\"is-scrolled\") : this.classList.remove(\"is-scrolled\"), e < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - e, this._scrollUpPixels > 10 && e < this.scrollThreshold && this.classList.add(\"is-scrolling-up\")) : (this._scrollUpPixels = 0, this.classList.remove(\"is-scrolling-up\")), e > this.scrollThreshold ? this.classList.add(\"is-below-threshold\") : this.classList.remove(\"is-below-threshold\"), this._lastScrollY = e;\n }\n async connectedCallback() {\n this.updateScrollState(), await H(), super.connectedCallback();\n }\n // Adjust the spacer height on every render\n async updated(e) {\n await H(), super.updated(e);\n }\n firstUpdated(e) {\n Tt.observeEmptySlots(this);\n }\n render() {\n return Y`\n <div id=\"wrapper\" part=\"wrapper\">\n <div id=\"spacer\" part=\"spacer\" ${$t(this.spacerRef)}></div>\n <div id=\"navbar\" part=\"navbar\" ${$t(this.navbarRef)}>\n <div id=\"brand\" part=\"brand\">\n <slot name=\"brand\"></slot>\n </div>\n <div id=\"main\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\nP = Ee(Z);\nht = /* @__PURE__ */ new WeakMap();\nYt(P, 4, \"scrollThreshold\", Gt, G, ht);\nG = Yt(P, 0, \"NteNavbar\", Ut, G);\nG.styles = [j(Se)];\nX(P, 1, G);\nconst Pe = \"*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%;width:100vw}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand:has(slot[empty]){display:none}#container #brand{min-width:0;flex-shrink:1;width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}\";\nvar Me = Object.create, pt = Object.defineProperty, We = Object.getOwnPropertyDescriptor, qt = (t, e) => (e = Symbol[t]) ? e : Symbol.for(\"Symbol.\" + t), Ht = (t) => {\n throw TypeError(t);\n}, Le = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Be = (t, e) => pt(t, \"name\", { value: e, configurable: !0 }), Ie = (t) => [, , , Me((t == null ? void 0 : t[qt(\"metadata\")]) ?? null)], Re = [\"class\", \"method\", \"getter\", \"setter\", \"accessor\", \"field\", \"value\", \"get\", \"set\"], jt = (t) => t !== void 0 && typeof t != \"function\" ? Ht(\"Function expected\") : t, Ae = (t, e, i, o, a) => ({ kind: Re[t], name: e, metadata: o, addInitializer: (n) => i._ ? Ht(\"Already initialized\") : a.push(jt(n || null)) }), De = (t, e) => Le(e, qt(\"metadata\"), t[3]), Fe = (t, e, i, o) => {\n for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) n[a].call(i);\n return o;\n}, Ye = (t, e, i, o, a, n) => {\n var h, s, m, p = e & 7, _ = !1, r = 0, g = t[r] || (t[r] = []), d = p && (a = a.prototype, p < 5 && (p > 3 || !_) && We(a, i));\n Be(a, i);\n for (var f = o.length - 1; f >= 0; f--)\n m = Ae(p, i, s = {}, t[3], g), h = (0, o[f])(a, m), s._ = 1, jt(h) && (a = h);\n return De(t, a), d && pt(a, i, d), _ ? p ^ 4 ? n : d : a;\n}, Jt, vt, Kt;\nJt = [K(\"nte-navbar-line\")];\nconst yt = class yt extends (Kt = J) {\n constructor() {\n super(...arguments), this._isScrolled = !1;\n }\n static get is() {\n return \"nte-navbar-line\";\n }\n updateScrollState() {\n const e = window.scrollY;\n e > 1 && !this._isScrolled ? (this.classList.add(\"is-scrolled\"), this._isScrolled = !0) : e <= 1 && this._isScrolled && (this.classList.remove(\"is-scrolled\"), this._isScrolled = !1);\n }\n connectedCallback() {\n super.connectedCallback(), window.addEventListener(\"scroll\", () => this.updateScrollState(), { passive: !0 });\n }\n async firstUpdated(e) {\n Tt.observeEmptySlots(this), this.updateScrollState();\n }\n render() {\n return Y`\n <div id=\"main\" part=\"main\">\n <div id=\"container\" part=\"container\">\n <div id=\"brand\" part=\"brand\">\n <slot name=\"brand\"></slot>\n </div>\n <div id=\"nav\" part=\"nav\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n};\nyt.styles = [j(Pe)];\nlet U = yt;\nvt = Ie(Kt);\nU = Ye(vt, 0, \"NteNavbarLine\", Jt, U);\nFe(vt, 1, U);\nconst Ge = \":host{display:block;--animation-duration: .3s;--auto-aspect-ratio: unset;aspect-ratio:var(--auto-aspect-ratio);height:auto;width:auto}.wrapper{--orig-top: 0;--orig-left: 0;--orig-width: 0;--orig-height: 0;--self-top: 0;--self-left: 0;--self-width: 100%;--self-height: 100%;display:inline-block;width:var(--self-width);height:var(--self-height);object-fit:contain;overflow:visible;position:fixed;opacity:0}.wrapper.initialized{opacity:1}.wrapper{top:var(--self-top);left:var(--self-left);transition:all var(--animation-duration) ease-in-out}.wrapper.inactive{z-index:99999;top:calc(var(--orig-top));left:calc(var(--orig-left));width:var(--orig-width);height:var(--orig-height)}.wrapper.inactive.done{z-index:inherit;visibility:hidden}.wrapper>slot{display:contents}.wrapper ::slotted(*){width:100%;height:100%;object-fit:contain;transition:all .3s ease-in-out}\";\nvar Ue = Object.create, ut = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Qt = (t, e) => (e = Symbol[t]) ? e : Symbol.for(\"Symbol.\" + t), B = (t) => {\n throw TypeError(t);\n}, He = (t, e, i) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Nt = (t, e) => ut(t, \"name\", { value: e, configurable: !0 }), je = (t) => [, , , Ue((t == null ? void 0 : t[Qt(\"metadata\")]) ?? null)], Vt = [\"class\", \"method\", \"getter\", \"setter\", \"accessor\", \"field\", \"value\", \"get\", \"set\"], F = (t) => t !== void 0 && typeof t != \"function\" ? B(\"Function expected\") : t, Je = (t, e, i, o, a) => ({ kind: Vt[t], name: e, metadata: o, addInitializer: (n) => i._ ? B(\"Already initialized\") : a.push(F(n || null)) }), Ke = (t, e) => He(e, Qt(\"metadata\"), t[3]), b = (t, e, i, o) => {\n for (var a = 0, n = t[e >> 1], h = n && n.length; a < h; a++) e & 1 ? n[a].call(i) : o = n[a].call(i, o);\n return o;\n}, O = (t, e, i, o, a, n) => {\n var h, s, m, p, _, r = e & 7, g = !!(e & 8), d = !!(e & 16), f = r > 3 ? t.length + 1 : r ? g ? 1 : 2 : 0, k = Vt[r + 5], E = r > 3 && (t[f - 1] = []), I = t[f] || (t[f] = []), c = r && (!d && !g && (a = a.prototype), r < 5 && (r > 3 || !d) && qe(r < 4 ? a : { get [i]() {\n return T(this, n);\n }, set [i](l) {\n return tt(this, n, l);\n } }, i));\n r ? d && r < 4 && Nt(n, (r > 2 ? \"set \" : r > 1 ? \"get \" : \"\") + i) : Nt(a, i);\n for (var w = o.length - 1; w >= 0; w--)\n p = Je(r, i, m = {}, t[3], I), r && (p.static = g, p.private = d, _ = p.access = { has: d ? (l) => Qe(a, l) : (l) => i in l }, r ^ 3 && (_.get = d ? (l) => (r ^ 1 ? T : Ve)(l, a, r ^ 4 ? n : c.get) : (l) => l[i]), r > 2 && (_.set = d ? (l, y) => tt(l, a, y, r ^ 4 ? n : c.set) : (l, y) => l[i] = y)), s = (0, o[w])(r ? r < 4 ? d ? n : c[k] : r > 4 ? void 0 : { get: c.get, set: c.set } : a, p), m._ = 1, r ^ 4 || s === void 0 ? F(s) && (r > 4 ? E.unshift(s) : r ? d ? n = s : c[k] = s : a = s) : typeof s != \"object\" || s === null ? B(\"Object expected\") : (F(h = s.get) && (c.get = h), F(h = s.set) && (c.set = h), F(h = s.init) && E.unshift(h));\n return r || Ke(t, a), c && ut(a, i, c), d ? r ^ 4 ? n : c : a;\n}, ft = (t, e, i) => e.has(t) || B(\"Cannot \" + i), Qe = (t, e) => Object(e) !== e ? B('Cannot use the \"in\" operator on this value') : t.has(e), T = (t, e, i) => (ft(t, e, \"read from private field\"), i ? i.call(t) : e.get(t)), N = (t, e, i) => e.has(t) ? B(\"Cannot add the same private member more than once\") : e instanceof WeakSet ? e.add(t) : e.set(t, i), tt = (t, e, i, o) => (ft(t, e, \"write to private field\"), o ? o.call(t, i) : e.set(t, i), i), Ve = (t, e, i) => (ft(t, e, \"access private method\"), i), Xt, Zt, te, ee, ie, re, et, ae, v, _t, gt, bt, mt, wt, C;\nae = [K(\"nte-nav-brand-relocator\")];\nclass $ extends (et = se(le(J)), re = [z({ type: String, reflect: !0 })], ie = [z({ type: Boolean, reflect: !0 })], ee = [z({ type: String, reflect: !0 })], te = [Q()], Zt = [Q()], Xt = [de(\"scroll\", { target: \"window\", options: { passive: !0 } })], et) {\n constructor() {\n super(...arguments), b(v, 5, this), N(this, _t, b(v, 8, this, \".brand-image\")), b(v, 11, this), N(this, gt, b(v, 12, this, null)), b(v, 15, this), N(this, bt, b(v, 16, this, \"auto\")), b(v, 19, this), N(this, mt, b(v, 20, this, !1)), b(v, 23, this), N(this, wt, b(v, 24, this, !1)), b(v, 27, this), N(this, C, null);\n }\n onScroll() {\n if (this.mode !== \"auto\") {\n this.log(\"Mode is not auto, skipping scroll handling\");\n return;\n }\n const e = window.scrollY <= 2;\n e !== this.active && (this.active = e);\n }\n onanimationEnd() {\n this.log(\"Animation ended - finalizing state\"), this.active || (this.brandElement.style.visibility = \"visible\", this.done = !0);\n }\n get brandElement() {\n return T(this, C) || (tt(this, C, document.querySelector(this.brandSelector)), T(this, C) || this.warn(`Brand element not found using selector: ${this.brandSelector}`)), T(this, C);\n }\n render() {\n var a;\n const e = (a = this.brandElement) == null ? void 0 : a.getBoundingClientRect();\n if (!e)\n return null;\n const i = this.getBoundingClientRect(), o = {\n \"--orig-top\": e.top + \"px\",\n \"--orig-left\": e.left + \"px\",\n \"--orig-width\": e.width + \"px\",\n \"--orig-height\": e.height + \"px\",\n \"--self-top\": i.top + \"px\",\n \"--self-left\": i.left + \"px\",\n \"--self-width\": i.width + \"px\",\n \"--self-height\": i.height + \"px\"\n };\n return Y`<div\n class=\"wrapper ${this.active ? \"\" : \"inactive\"} ${this.done ? \"done\" : \"\"} ${this.initialized ? \"initialized\" : \"\"}\"\n style=${pe(o)}\n @transitionend=${() => this.onanimationEnd()}\n >\n <slot></slot>\n </div>`;\n }\n update(e) {\n var i;\n e.has(\"active\") && this.active === !0 && ((i = T(this, C)) == null || i.style.setProperty(\"visibility\", \"hidden\"), this.done = !1), super.update(e);\n }\n get ghostElement() {\n return this.querySelector(\"img\");\n }\n async firstUpdated() {\n var i, o, a;\n if (this.brandElement === null) {\n this.warn(`Brand element not found using selector: ${this.brandSelector}`);\n return;\n }\n for (this.log(\"Waiting for Ghost element loading...\", this.ghostElement), await ce(this.ghostElement), await q(10); !((i = this.ghostElement) != null && i.naturalWidth); )\n this.log(\"Waiting for Ghost element to have naturalWidth...\", this.ghostElement), await q(100);\n for (; this.brandElement && !this.brandElement.getBoundingClientRect().width; )\n this.log(\"Waiting for Brand element to have width...\", this.brandElement), await q(100);\n const e = ((o = this.ghostElement) == null ? void 0 : o.naturalWidth) / ((a = this.ghostElement) == null ? void 0 : a.naturalHeight);\n this.log(\"Setting Aspect ratio:\", e), this.style.setProperty(\"--auto-aspect-ratio\", e.toString()), this.log(\"Brand element is now loaded:\", this.brandElement), this.initialized = !0, this.onScroll();\n }\n async connectedCallback() {\n if (await H(), this.ghostElement === null) {\n const e = this.brandElement;\n if (this.log(\"first connectedCallback() on Brand element:\", e), !e) {\n this.warn(`Brand element not found using selector: ${this.brandSelector}`);\n return;\n }\n if (!this.hasChildNodes()) {\n const i = he(\"img\", { src: e.getAttribute(\"src\") });\n this.appendChild(i), this.onScroll();\n }\n }\n super.connectedCallback();\n }\n}\nv = je(et);\n_t = /* @__PURE__ */ new WeakMap();\ngt = /* @__PURE__ */ new WeakMap();\nbt = /* @__PURE__ */ new WeakMap();\nmt = /* @__PURE__ */ new WeakMap();\nwt = /* @__PURE__ */ new WeakMap();\nC = /* @__PURE__ */ new WeakMap();\nO(v, 4, \"brandSelector\", re, $, _t);\nO(v, 4, \"active\", ie, $, gt);\nO(v, 4, \"mode\", ee, $, bt);\nO(v, 4, \"done\", te, $, mt);\nO(v, 4, \"initialized\", Zt, $, wt);\nO(v, 1, \"onScroll\", Xt, $);\n$ = O(v, 0, \"NteNavBrandRelocator\", ae, $);\n$.styles = [j(Ge)];\nb(v, 1, $);\nconsole.log(\"Loading nte-nav...\");\nexport {\n x as NteNav,\n $ as NteNavBrandRelocator,\n G as NteNavbar\n};\n","import { triggerGroupOpenCloseEvent as h, sleep as p, SlotTool as f } from \"@nextrap/nt-framework\";\nimport { unsafeCSS as g, LitElement as b, html as m } from \"lit\";\nimport { property as l, state as u, customElement as v } from \"lit/decorators.js\";\nimport { classMap as c } from \"lit/directives/class-map.js\";\nconst y = \"*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--backdrop: rgb(from var(--nt-dark) r g b / .5);--header-background: transparent;--background-color: var(--nt-primary-subtle);--shadow-color: rgb(from var(--nt-dark) r g b / .5);--main-padding: 0;--header-padding: var(--nt-space);position:fixed;top:0;right:0;height:100vh;width:33%;min-width:250px;max-width:400px;z-index:2000;padding:0;isolation:isolate;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--background-color);box-shadow:0 0 10px var(--shadow-color);transition:transform .2s ease-in-out;transform:translate(0)}#offcanvas.closed{transform:translate(100%)}#header{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--header-background);flex-grow:0;padding:var(--header-padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--main-padding);min-height:200px;overflow:auto;scroll-behavior:auto;scrollbar-gutter:auto;height:100%}#footer{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-top:auto;flex-grow:0;padding:var(--padding)}#footer:has(>slot[empty]){display:none}#backdrop{opacity:1;transition:opacity .2s ease-in-out;position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--backdrop);z-index:-1;display:block}#backdrop.closed{opacity:0}\";\nvar x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, a = (e, r, s, i) => {\n for (var o = i > 1 ? void 0 : i ? w(r, s) : r, n = e.length - 1, d; n >= 0; n--)\n (d = e[n]) && (o = (i ? d(r, s, o) : d(o)) || o);\n return i && o && x(r, s, o), o;\n};\nlet t = class extends b {\n constructor() {\n super(), this.backdrop = !0, this.opened = !1, this.dataGroupName = \"\", this.closedClass = !0, this.addEventListener(\"click\", (e) => {\n e === void 0 || !e.target || !(e.target instanceof HTMLElement) || e.target.closest(\"[data-nt-dismiss='offcanvas']\") !== null && this.close();\n });\n }\n static get is() {\n return \"nte-offcanvas\";\n }\n connectedCallback() {\n super.connectedCallback();\n }\n open() {\n this.opened = !0;\n }\n close() {\n this.opened = !1;\n }\n toggle() {\n this.opened = !this.opened;\n }\n async updated(e) {\n e.has(\"opened\") && (this.dataGroupName !== \"\" && h(this.opened, this.dataGroupName), this.opened ? (this.style.display = \"block\", await p(1), f.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await p(400), this.style.display = \"none\"));\n }\n render() {\n return m`\n <div\n id=\"backdrop\"\n part=\"backdrop\"\n @click=${() => this.opened = !1}\n class=${c({ closed: this.closedClass })}\n ></div>\n <div\n id=\"offcanvas\"\n part=\"offcanvas\"\n role=\"dialog\"\n aria-modal=\"true\"\n class=${c({ closed: this.closedClass })}\n ?backdrop=\"${this.backdrop}\"\n >\n <div id=\"header\">\n <slot name=\"header\"></slot>\n </div>\n\n <div id=\"main\" part=\"main\">\n <slot></slot>\n </div>\n\n <div id=\"footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n};\nt.styles = [g(y)];\na([\n l({ type: Boolean, reflect: !0 })\n], t.prototype, \"backdrop\", 2);\na([\n l({ type: Boolean, reflect: !0 })\n], t.prototype, \"opened\", 2);\na([\n l({ type: String, attribute: \"data-group-name\" })\n], t.prototype, \"dataGroupName\", 2);\na([\n u()\n], t.prototype, \"closedClass\", 2);\nt = a([\n v(t.is)\n], t);\nexport {\n t as NteOffcanvas\n};\n","var x = Object.defineProperty;\nvar L = (e) => {\n throw TypeError(e);\n};\nvar A = (e, t, n) => t in e ? x(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;\nvar u = (e, t, n) => A(e, typeof t != \"symbol\" ? t + \"\" : t, n), w = (e, t, n) => t.has(e) || L(\"Cannot \" + n);\nvar a = (e, t, n) => (w(e, t, \"read from private field\"), n ? n.call(e) : t.get(e)), c = (e, t, n) => t.has(e) ? L(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, n), m = (e, t, n, i) => (w(e, t, \"write to private field\"), i ? i.call(e, n) : t.set(e, n), n), p = (e, t, n) => (w(e, t, \"access private method\"), n);\nconst f = [\n { name: \"xs\", minWidth: 0 },\n { name: \"sm\", minWidth: 576 },\n { name: \"md\", minWidth: 768 },\n { name: \"lg\", minWidth: 992 },\n { name: \"xl\", minWidth: 1200 },\n { name: \"xxl\", minWidth: 1400 }\n], v = f.reduce(\n (e, t) => (e[t.name] = t.minWidth, e),\n {}\n);\nfunction y(e) {\n if (!(e in v))\n throw new Error(`Unknown breakpoint: ${e}`);\n return v[e];\n}\nfunction C(e) {\n e === void 0 && (e = window.innerWidth);\n for (let t = f.length - 1; t >= 0; t--)\n if (e >= f[t].minWidth)\n return f[t].name;\n return \"xs\";\n}\nfunction S(e, t = {}, n = []) {\n Array.isArray(n) || (n = [n]);\n const i = document.createElement(e);\n for (const r in t)\n t[r] !== null && t[r] !== void 0 && i.setAttribute(r, t[r] !== !0 ? t[r] : \"\");\n for (const r of n)\n i.append(typeof r == \"string\" ? document.createTextNode(r) : r);\n return i;\n}\nclass $ {\n /**\n *\n * @param delay Debounce delay in milliseconds\n * @param max_delay Maximum delay in milliseconds, if false then no maximum delay is applied\n */\n constructor(t, n = !1) {\n u(this, \"timeout\", null);\n u(this, \"startTimeWithMs\", 0);\n this.delay = t, this.max_delay = n;\n }\n async wait() {\n return this.startTimeWithMs === 0 && (this.startTimeWithMs = Date.now()), this.timeout && (this.max_delay === !1 || this.startTimeWithMs + this.max_delay > Date.now()) && clearTimeout(this.timeout), new Promise((t) => {\n this.timeout = setTimeout(() => {\n this.startTimeWithMs = 0, t(!0);\n }, this.delay);\n });\n }\n debounce(t) {\n this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {\n t();\n }, this.delay);\n }\n}\nfunction U(e) {\n if (typeof e.lineNumber == \"number\")\n return {\n file: e.fileName || e.sourceURL,\n line: e.lineNumber,\n column: e.columnNumber ?? void 0\n };\n if (typeof e.line == \"number\")\n return {\n file: e.sourceURL,\n line: e.line,\n column: e.column\n };\n const n = String(e.stack || e.message || \"\").split(`\n`), i = /(.*?)(?:\\(|@)?(.*?):(\\d+):(\\d+)\\)?$/;\n for (const r of n) {\n const s = r.match(i);\n if (s)\n return { file: s[2], line: +s[3], column: +s[4] };\n }\n return { file: e.fileName || e.sourceURL };\n}\nclass D {\n constructor(t, n, i = \"main\") {\n this._debug = t, this.myElementId = n, this.instanceId = i;\n }\n log(...t) {\n this._debug && console.log(`[LOG][ID:${this.myElementId}:${this.instanceId}]`, ...t);\n }\n warn(...t) {\n console.warn(`[WARN][ID:${this.myElementId}:${this.instanceId}]`, ...t);\n }\n error(...t) {\n console.error(`[ERROR][ID:${this.myElementId}:${this.instanceId}]`, ...t);\n }\n throwError(...t) {\n const n = `[ERROR][ID:${this.myElementId}:${this.instanceId}] ${t.join(\" \")}`;\n throw this.error(...t), new Error(n);\n }\n}\nclass F {\n constructor(t, n = !0) {\n u(this, \"label\");\n u(this, \"last\");\n u(this, \"startTime\");\n u(this, \"running\", !1);\n u(this, \"enabled\");\n this.label = t, this.enabled = n, this.startTime = this.last = performance.now(), this.running = !0;\n }\n lap(t = \"\") {\n if (!this.enabled) return;\n const n = performance.now(), i = (n - this.last) / 1e3;\n this.last = n, console.debug(`[${this.label}] ${t} +${i.toFixed(3)}s`);\n }\n elapsed() {\n return performance.now() - this.startTime;\n }\n reset() {\n this.startTime = this.last = performance.now();\n }\n stop() {\n return this.running = !1, this.elapsed();\n }\n start() {\n this.running = !0, this.reset();\n }\n isRunning() {\n return this.running;\n }\n}\nfunction H(e, t, n) {\n return new Promise((i, r) => {\n const s = (l) => {\n e.removeEventListener(t, s, n), i(l);\n };\n e.addEventListener(t, s, n);\n });\n}\nfunction B() {\n return document.readyState === \"loading\" ? new Promise((e) => {\n document.addEventListener(\"DOMContentLoaded\", () => e());\n }) : Promise.resolve();\n}\nfunction O(e = window) {\n return e || (e = window), e === window ? document.readyState === \"complete\" ? Promise.resolve() : new Promise((t) => window.addEventListener(\"load\", () => t(), { once: !0 })) : e instanceof HTMLImageElement ? e.complete && e.naturalWidth !== 0 ? Promise.resolve() : new Promise((t, n) => {\n e.addEventListener(\"load\", () => t(), { once: !0 }), e.addEventListener(\"error\", () => n(new Error(\"image error\")), { once: !0 });\n }) : e instanceof HTMLMediaElement ? e.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA ? Promise.resolve() : new Promise((t) => e.addEventListener(\"loadeddata\", () => t(), { once: !0 })) : new Promise((t) => e.addEventListener(\"load\", () => t(), { once: !0 }));\n}\nfunction V(e) {\n return new Promise((t) => setTimeout(t, e));\n}\nfunction z(e) {\n return new Promise((t) => {\n const n = (i) => {\n e.removeEventListener(\"animationend\", n), t(i);\n };\n e.addEventListener(\"animationend\", n);\n });\n}\nfunction G(e) {\n var i;\n const t = new $(200, 5e3);\n class n extends e {\n constructor() {\n super(...arguments);\n u(this, \"currentBreakPoint\", null);\n c(this, i, async () => {\n await t.wait(), await B();\n const l = window.innerWidth;\n let o = getComputedStyle(this).getPropertyValue(\"--breakpoint\");\n o || (this.style.setProperty(\"--breakpoint\", \"md\"), o = getComputedStyle(this).getPropertyValue(\"--breakpoint\"));\n const d = C(l);\n this.currentBreakPoint !== d && (y(o) < y(d) ? this.setAttribute(\"mode\", \"desktop\") : this.setAttribute(\"mode\", \"mobile\"));\n });\n }\n connectedCallback() {\n super.connectedCallback(), a(this, i).call(this), window.addEventListener(\"resize\", a(this, i)), a(this, i).call(this);\n }\n disconnectedCallback() {\n super.disconnectedCallback(), window.removeEventListener(\"resize\", a(this, i));\n }\n }\n return i = new WeakMap(), n;\n}\nconst g = Symbol(\"listenerDefs\"), k = Symbol(\"withEventBindings\");\nfunction j(e, t) {\n const n = Array.isArray(e) ? e : [e];\n return function(i, r) {\n if (r.kind !== \"method\") throw new Error(\"@Listen nur für Methoden\");\n return r.addInitializer(function() {\n const s = this.constructor;\n (s[g] || (s[g] = [])).push({\n method: r.name,\n events: n,\n opts: t\n });\n }), function(...s) {\n if (!this[k])\n throw new Error(\"[EventBindings] @Listen - decorator requires EventBindingMixin.\");\n return i.apply(this, s);\n };\n };\n}\nfunction R(e, t) {\n var n;\n return !t || t === \"host\" ? e : t === \"document\" ? e.ownerDocument ?? document : t === \"window\" ? ((n = e.ownerDocument) == null ? void 0 : n.defaultView) ?? window : t === \"shadowRoot\" ? e.shadowRoot ?? e : typeof t == \"function\" ? t(e) : t;\n}\nfunction q(e) {\n var n, i, P;\n class t extends e {\n constructor(...o) {\n super(...o);\n c(this, i);\n c(this, n);\n this[k] = !0;\n }\n connectedCallback() {\n var o;\n (o = super.connectedCallback) == null || o.call(this), p(this, i, P).call(this);\n }\n disconnectedCallback() {\n var o, d;\n (o = a(this, n)) == null || o.abort(), (d = super.disconnectedCallback) == null || d.call(this);\n }\n }\n return n = new WeakMap(), i = new WeakSet(), P = function() {\n var d, b, E;\n (d = a(this, n)) == null || d.abort(), m(this, n, new AbortController());\n const o = this.constructor[g] || [];\n for (const h of o) {\n const I = R(this, (b = h.opts) == null ? void 0 : b.target), M = ((E = h.opts) == null ? void 0 : E.options) ?? {}, T = this[h.method].bind(this);\n for (const W of h.events)\n I.addEventListener(W, T, { ...M, signal: a(this, n).signal });\n }\n }, t;\n}\nlet _ = 1;\nfunction X(e) {\n var n, i, r;\n class t extends e {\n constructor() {\n super(...arguments);\n c(this, n, null);\n c(this, i, _++);\n c(this, r, null);\n }\n /**\n * Clears the cached debug flag so the attribute will be checked again\n * on the next log/warn/error call.\n */\n invalidateDebugCache() {\n m(this, n, null);\n }\n get _debug() {\n return a(this, n) !== null ? a(this, n) : (this instanceof HTMLElement && m(this, n, this.hasAttribute(\"debug\") && ![\"false\", \"0\", \"off\", \"no\"].includes(this.getAttribute(\"debug\") || \"\")), a(this, n) === !0 && console.log(`[DEBUG][ID:${a(this, i)}] LoggingMixin: Debug mode is enabled for <${this.tagName}>`, this), a(this, n) ?? !1);\n }\n getLogger(o = \"main\") {\n return a(this, r) || m(this, r, new D(this._debug, `${a(this, i)}`, o)), a(this, r);\n }\n log(...o) {\n this.getLogger().log(...o);\n }\n warn(...o) {\n this.getLogger().warn(...o);\n }\n error(...o) {\n this.getLogger().error(...o);\n }\n throwError(...o) {\n return this.getLogger().throwError(...o);\n }\n }\n return n = new WeakMap(), i = new WeakMap(), r = new WeakMap(), t;\n}\nexport {\n G as BreakPointMixin,\n $ as Debouncer,\n q as EventBindingsMixin,\n j as Listen,\n D as Logger,\n X as LoggingMixin,\n F as Stopwatch,\n v as breakpointMap,\n f as breakpoints,\n S as create_element,\n y as getBreakpointMinWidth,\n C as getCurrentBreakpoint,\n U as getErrorLocation,\n V as sleep,\n H as waitFor,\n z as waitForAnimationEnd,\n B as waitForDomContentLoaded,\n O as waitForLoad\n};\n","import { getBreakpointMinWidth as b, breakpoints as $, Debouncer as j, getCurrentBreakpoint as E, breakpointMap as V, EventBindingsMixin as U, LoggingMixin as H, Listen as F } from \"@trunkjs/browser-utils\";\nconst P = /* @__PURE__ */ new WeakMap();\nfunction G(e) {\n const t = e.trim();\n if (!t) return { from: 0, till: 1 / 0 };\n if (t.startsWith(\"-\")) {\n const r = t.slice(1).trim();\n return { from: 0, till: b(r) };\n }\n if (t.endsWith(\"-\")) {\n const r = t.slice(0, -1).trim();\n return { from: b(r), till: 1 / 0 };\n }\n const s = t.indexOf(\"-\");\n if (s >= 0) {\n const r = t.slice(0, s).trim(), i = t.slice(s + 1).trim(), l = b(r), o = i ? b(i) : 1 / 0;\n return { from: l, till: o };\n }\n return { from: b(t), till: 1 / 0 };\n}\nfunction J(e) {\n const t = e.split(\" \"), s = [];\n for (const r of t) {\n if (!r.includes(\":\"))\n continue;\n let [i, l] = r.split(\":\");\n if (!i || !l)\n continue;\n const o = G(i), n = { from: o.from, till: o.till, className: l };\n s.push(n);\n }\n return s;\n}\nfunction K(e, t, s) {\n if (!e.includes(\":\")) return e;\n const r = b(t);\n let i = e.split(\" \");\n const l = J(e);\n for (const o of s)\n i = i.filter((n) => n !== o);\n for (const o of l)\n i = i.filter((n) => n !== o.className);\n for (const o of l)\n r >= o.from && r < o.till && (i.push(o.className), s.add(o.className));\n return i.join(\" \");\n}\nfunction Q(e, t) {\n const s = e.getAttribute(\"class\") || \"\";\n let r = P.get(e);\n r || (r = /* @__PURE__ */ new Set(), P.set(e, r));\n const i = K(s, t, r);\n i !== s && e.setAttribute(\"class\", i);\n}\nclass w extends Error {\n constructor(t, s) {\n super(t), this.context = s, this.name = \"StyleParseError\";\n }\n}\nclass W extends w {\n constructor(t, s) {\n super(t, s), this.name = \"StyleDeclarationError\";\n }\n}\nfunction D(e) {\n if (e.length === 0) return \"\";\n if (Array.isArray(e[0]))\n return e.map((t) => D(t)).filter((t) => t).join(\"; \");\n {\n const [t, s, r] = e;\n return `${t}: ${s}${r ? \" !\" + r : \"\"}`;\n }\n}\nfunction X(e) {\n return e[1] + (e[2] ? \" !\" + e[2] : \"\");\n}\nfunction Y(e, t) {\n const s = (a, f) => a, r = [];\n let i = \"\";\n const l = [];\n let o = null, n = 0, c = 0;\n for (const a of e)\n o ? (a === o && (o = null), i += a) : a === \"'\" || a === '\"' ? (o = a, i += a) : a === \"(\" ? (n++, i += a) : a === \")\" ? (s(n === 0, new w(\"Unmatched closing parenthesis )\", M(c, e))), n = Math.max(0, n - 1), i += a) : a === \";\" && n === 0 ? (l.push(i), i = \"\") : i += a, c++;\n s(o !== null, new w(\"Unclosed quote\", M(c - 1, e))), s(n > 0, new w(\"Unbalanced parentheses: missing )\", M(c - 1, e))), i.trim() && l.push(i);\n for (const a of l) {\n const f = a.trim();\n if (!f) continue;\n let p = -1;\n o = null, n = 0;\n for (let v = 0; v < f.length; v++) {\n const u = f[v];\n if (o)\n u === o && (o = null);\n else if (u === \"'\" || u === '\"') o = u;\n else if (u === \"(\") n++;\n else if (u === \")\")\n s(\n n === 0,\n new W(\"Unmatched closing parenthesis ) in declaration\", { declaration: f })\n ), n = Math.max(0, n - 1);\n else if (u === \":\" && n === 0) {\n p = v;\n break;\n }\n }\n if (s(p < 1, new W(\"Missing colon (:) in declaration\", { declaration: f })) && p < 1 || p < 1) continue;\n const _ = f.slice(0, p).trim();\n let m = f.slice(p + 1).trim(), y;\n /\\s*!important\\s*$/i.test(m) && (m = m.replace(/\\s*!important\\s*$/i, \"\").trim(), y = \"important\"), _ && r.push([_, m, y]);\n }\n return r;\n}\nfunction M(e, t) {\n const s = Math.max(0, e - 15), r = Math.min(t.length, e + 15);\n return {\n index: e,\n input: t,\n near: t.slice(s, r)\n };\n}\nfunction Z(e, t) {\n const s = Array.from(e.attributes).filter((n) => n.name.startsWith(\"style-\")), r = {};\n let i = !1;\n const l = /* @__PURE__ */ new Set();\n for (const n of s) {\n const c = n.name.substring(6), a = r[c] = Y(n.value || \"\");\n i = !0;\n for (const f of a)\n l.add(f[0]), e.style[f[0]] || e.style.setProperty(f[0], \"unset\");\n }\n if (!i) return;\n if (!r.xs) {\n const n = [];\n for (const c of l) {\n const a = e.style.getPropertyValue(c) || \"\", f = e.style.getPropertyPriority(c) === \"important\" ? \"important\" : void 0;\n n.push([c, a, f]);\n }\n r.xs = n, e.setAttribute(\"style-xs\", D(n));\n }\n const o = /* @__PURE__ */ new Map();\n for (const n of $)\n if (t >= n.minWidth && r[n.name]) {\n const c = r[n.name];\n for (const a of c)\n o.set(a[0], X(a));\n }\n for (const [n, c] of o)\n e.style.setProperty(n, c);\n}\nclass tt {\n constructor(t) {\n this.logger = t, this.observer = null, this.changedElements = /* @__PURE__ */ new Set(), this.debouncer = new j(10, 100), this.breakpoint = E();\n }\n async processChanges() {\n for (const t of this.changedElements)\n this.logger.log(\"Processing element\", t), Q(t, this.breakpoint), Z(t, V[this.breakpoint] || 0), this.changedElements.delete(t);\n }\n async spoolElement(t) {\n this.changedElements.has(t) || (this.changedElements.add(t), await this.debouncer.wait(), this.processChanges());\n }\n onChange(t) {\n var s;\n for (const r of t)\n if (r.type === \"childList\") {\n if (!(r.target instanceof HTMLElement))\n continue;\n this.spoolElement(r.target);\n } else if (r.type === \"attributes\") {\n if (!(r.target instanceof HTMLElement) || !(r.attributeName === \"class\" || (s = r.attributeName) != null && s.startsWith(\"style\")))\n continue;\n this.spoolElement(r.target);\n }\n }\n /**\n * Queue all all elements (or those under root) that have class or style-* attributes\n *\n * @param root\n */\n queueAll(t = null) {\n t === null && (t = document.body), t.querySelectorAll(\"[class]\").forEach((s) => this.spoolElement(s)), Array.from(t.getElementsByTagName(\"*\")).filter((s) => [...s.getAttributeNames()].some((r) => r.startsWith(\"style-\"))).forEach((s) => this.spoolElement(s));\n }\n startObserving(t) {\n this.observer = new MutationObserver(this.onChange.bind(this)), this.observer.observe(t, { attributes: !0, childList: !0, subtree: !0 });\n }\n stopObserving() {\n var t;\n (t = this.observer) == null || t.disconnect();\n }\n}\nvar et = Object.create, I = Object.defineProperty, st = Object.getOwnPropertyDescriptor, R = (e, t) => (t = Symbol[e]) ? t : Symbol.for(\"Symbol.\" + e), k = (e) => {\n throw TypeError(e);\n}, rt = (e, t, s) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, it = (e) => [, , , et((e == null ? void 0 : e[R(\"metadata\")]) ?? null)], B = [\"class\", \"method\", \"getter\", \"setter\", \"accessor\", \"field\", \"value\", \"get\", \"set\"], L = (e) => e !== void 0 && typeof e != \"function\" ? k(\"Function expected\") : e, nt = (e, t, s, r, i) => ({ kind: B[e], name: t, metadata: r, addInitializer: (l) => s._ ? k(\"Already initialized\") : i.push(L(l || null)) }), ot = (e, t) => rt(t, R(\"metadata\"), e[3]), at = (e, t, s, r) => {\n for (var i = 0, l = e[t >> 1], o = l && l.length; i < o; i++) l[i].call(s);\n return r;\n}, lt = (e, t, s, r, i, l) => {\n for (var o, n, c, a, f = t & 7, p = !1, _ = !1, m = 2, y = B[f + 5], v = e[m] || (e[m] = []), u = (i = i.prototype, st(i, s)), C = r.length - 1; C >= 0; C--)\n c = nt(f, s, n = {}, e[3], v), c.static = p, c.private = _, a = c.access = { has: (A) => s in A }, a.get = (A) => A[s], o = (0, r[C])(u[y], c), n._ = 1, L(o) && (u[y] = o);\n return u && I(i, s, u), i;\n}, q = (e, t, s) => t.has(e) || k(\"Cannot \" + s), h = (e, t, s) => (q(e, t, \"read from private field\"), t.get(e)), z = (e, t, s) => t.has(e) ? k(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, s), N = (e, t, s, r) => (q(e, t, \"write to private field\"), t.set(e, s), s), T, x, d, g, S;\nclass O extends (x = U(H(HTMLElement)), T = [F(\"resize\", { target: \"window\" })], x) {\n constructor() {\n super(), at(S, 5, this), this.resizeDebouncer = new j(50, 500), z(this, d, E()), z(this, g, new tt(this.getLogger(\"observer\")));\n }\n static get observedAttributes() {\n return [\"width\", \"height\", \"orientation\"];\n }\n async onResize(t) {\n await this.resizeDebouncer.wait();\n const s = E();\n s !== h(this, d) && (N(this, d, s), this.log(`Breakpoint changed to ${h(this, d)}, adjusting layout.`), h(this, g).breakpoint = h(this, d), h(this, g).queueAll());\n }\n attributeChangedCallback(t, s, r) {\n }\n connectedCallback() {\n super.connectedCallback(), this.log(\"TjResponsiveElement connected to the DOM.\"), N(this, d, E()), h(this, g).breakpoint = h(this, d), h(this, g).queueAll(), h(this, g).startObserving(this);\n }\n disconnectedCallback() {\n super.disconnectedCallback(), this.log(\"TjResponsiveElement disconnected from the DOM.\"), h(this, g).stopObserving();\n }\n}\nS = it(x);\nd = /* @__PURE__ */ new WeakMap();\ng = /* @__PURE__ */ new WeakMap();\nlt(S, 1, \"onResize\", T, O);\not(S, O);\ncustomElements.get(\"tj-responsive\") || customElements.define(\"tj-responsive\", O);\nexport {\n O as TjResponsiveElement\n};\n","'use strict';\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Helpers\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\nfunction isString(obj) { return _class(obj) === '[object String]'; }\nfunction isObject(obj) { return _class(obj) === '[object Object]'; }\nfunction isRegExp(obj) { return _class(obj) === '[object RegExp]'; }\nfunction isFunction(obj) { return _class(obj) === '[object Function]'; }\n\n\nfunction escapeRE(str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&'); }\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\n\nvar defaultSchemas = {\n 'http:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp(\n '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n );\n }\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp(\n '^' +\n self.re.src_auth +\n // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n self.re.src_port +\n self.re.src_host_terminator +\n self.re.src_path,\n\n 'i'\n );\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') { return 0; }\n if (pos >= 3 && text[pos - 3] === '/') { return 0; }\n return tail.match(self.re.no_http)[0].length;\n }\n return 0;\n }\n },\n 'mailto:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp(\n '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n );\n }\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n return 0;\n }\n }\n};\n\n/*eslint-disable max-len*/\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n\n/*eslint-enable max-len*/\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = require('./lib/re')(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options);\n\n // Cache last tested result. Used to skip repeating steps on next `match` call.\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n this.__schema__ = '';\n this.__text_cache__ = '';\n\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n\n this.re = {};\n\n compile(this);\n}\n\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) { return false; }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos;\n\n // try to scan for link with schema - that's the most simple rule\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ ||\n (shift === this.__index__ && next > this.__last_index__)) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0, result = [];\n\n // Try to take previous element from cache, if .test() called before\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n }\n\n // Cut head if cache was used\n var tail = shift ? text.slice(shift) : text;\n\n // Scan string until end reached\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n\n\n/**\n * LinkifyIt#matchAtStart(text) -> Match|null\n *\n * Returns fully-formed (not fuzzy) link if it starts at the beginning\n * of the string, and null otherwise.\n **/\nLinkifyIt.prototype.matchAtStart = function matchAtStart(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) return null;\n\n var m = this.re.schema_at_start.exec(text);\n if (!m) return null;\n\n var len = this.testSchemaAt(text, m[2], m[0].length);\n if (!len) return null;\n\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n\n return createMatch(this, 0);\n};\n\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [ list ];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list)\n .sort()\n .filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n })\n .reverse();\n\n compile(this);\n return this;\n};\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize(match) {\n\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n if (!match.schema) { match.url = 'http://' + match.url; }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile() {\n};\n\n\nmodule.exports = LinkifyIt;\n","'use strict';\n\n\nmodule.exports = function (opts) {\n var re = {};\n opts = opts || {};\n\n // Use direct extract instead of `regenerate` to reduse browserified size\n re.src_Any = require('uc.micro/properties/Any/regex').source;\n re.src_Cc = require('uc.micro/categories/Cc/regex').source;\n re.src_Z = require('uc.micro/categories/Z/regex').source;\n re.src_P = require('uc.micro/categories/P/regex').source;\n\n // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');\n\n // \\p{\\Z\\Cc} (white spaces + control)\n re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');\n\n // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n var text_separators = '[><\\uff5c]';\n\n // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';\n // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 =\n\n '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';\n\n // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n\n re.src_port =\n\n '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n\n re.src_host_terminator =\n\n '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +\n '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n\n re.src_path =\n\n '(?:' +\n '[/?#]' +\n '(?:' +\n '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-;]).|' +\n '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n \"\\\\'(?=\" + re.src_pseudo_letter + '|[-])|' + // allow `I'm_king` if no pair found\n '\\\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in \"google search\" links (#66, #81).\n // github has ... in commit range links,\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // - params separator\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]|$)|' +\n (opts['---'] ?\n '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n :\n '\\\\-+|'\n ) +\n ',(?!' + re.src_ZCc + '|$)|' + // allow `,,,` in paths\n ';(?!' + re.src_ZCc + '|$)|' + // allow `;` if not followed by space-like char\n '\\\\!+(?!' + re.src_ZCc + '|[!]|$)|' + // allow `!!!` in paths, but not at the end\n '\\\\?(?!' + re.src_ZCc + '|[?]|$)' +\n ')+' +\n '|\\\\/' +\n ')?';\n\n // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n re.src_email_name =\n\n '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n\n re.src_xn =\n\n 'xn--[a-z0-9\\\\-]{1,59}';\n\n // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root =\n\n // Allow letters & digits (http://test1)\n '(?:' +\n re.src_xn +\n '|' +\n re.src_pseudo_letter + '{1,63}' +\n ')';\n\n re.src_domain =\n\n '(?:' +\n re.src_xn +\n '|' +\n '(?:' + re.src_pseudo_letter + ')' +\n '|' +\n '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n ')';\n\n re.src_host =\n\n '(?:' +\n // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/*_root*/ + ')' +\n ')';\n\n re.tpl_host_fuzzy =\n\n '(?:' +\n re.src_ip4 +\n '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n ')';\n\n re.tpl_host_no_ip_fuzzy =\n\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n\n re.src_host_strict =\n\n re.src_host + re.src_host_terminator;\n\n re.tpl_host_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_host_terminator;\n\n re.src_host_port_strict =\n\n re.src_host + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_no_ip_fuzzy_strict =\n\n re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;\n\n\n ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n\n // Rude test fuzzy links by host, for quick deny\n re.tpl_host_fuzzy_test =\n\n 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n\n re.tpl_email_fuzzy =\n\n '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n\n re.tpl_link_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n\n re.tpl_link_no_ip_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n\n return re;\n};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport { ReactiveElement } from '@lit/reactive-element';\nimport { render, noChange } from 'lit-html';\nexport * from '@lit/reactive-element';\nexport * from 'lit-html';\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = (prop, _obj) => prop;\nconst DEV_MODE = true;\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\nlet issueWarning;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n global.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!global.litIssuedWarnings.has(warning) &&\n !global.litIssuedWarnings.has(code)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n}\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nexport class LitElement extends ReactiveElement {\n constructor() {\n super(...arguments);\n /**\n * @category rendering\n */\n this.renderOptions = { host: this };\n this.__childPart = undefined;\n }\n /**\n * @category rendering\n */\n createRenderRoot() {\n const renderRoot = super.createRenderRoot();\n // When adoptedStyleSheets are shimmed, they are inserted into the\n // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n // any styles in Lit content render before adoptedStyleSheets. This is\n // important so that adoptedStyleSheets have precedence over styles in\n // the shadowRoot.\n this.renderOptions.renderBefore ??= renderRoot.firstChild;\n return renderRoot;\n }\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param changedProperties Map of changed properties with old values\n * @category updates\n */\n update(changedProperties) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const value = this.render();\n if (!this.hasUpdated) {\n this.renderOptions.isConnected = this.isConnected;\n }\n super.update(changedProperties);\n this.__childPart = render(value, this.renderRoot, this.renderOptions);\n }\n /**\n * Invoked when the component is added to the document's DOM.\n *\n * In `connectedCallback()` you should setup tasks that should only occur when\n * the element is connected to the document. The most common of these is\n * adding event listeners to nodes external to the element, like a keydown\n * event handler added to the window.\n *\n * ```ts\n * connectedCallback() {\n * super.connectedCallback();\n * addEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * Typically, anything done in `connectedCallback()` should be undone when the\n * element is disconnected, in `disconnectedCallback()`.\n *\n * @category lifecycle\n */\n connectedCallback() {\n super.connectedCallback();\n this.__childPart?.setConnected(true);\n }\n /**\n * Invoked when the component is removed from the document's DOM.\n *\n * This callback is the main signal to the element that it may no longer be\n * used. `disconnectedCallback()` should ensure that nothing is holding a\n * reference to the element (such as event listeners added to nodes external\n * to the element), so that it is free to be garbage collected.\n *\n * ```ts\n * disconnectedCallback() {\n * super.disconnectedCallback();\n * window.removeEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * An element may be re-connected after being disconnected.\n *\n * @category lifecycle\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__childPart?.setConnected(false);\n }\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `ChildPart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n * @category rendering\n */\n render() {\n return noChange;\n }\n}\n// This property needs to remain unminified.\nLitElement['_$litElement$'] = true;\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\nLitElement[JSCompiler_renameProperty('finalized', LitElement)] = true;\n// Install hydration if available\nglobal.litElementHydrateSupport?.({ LitElement });\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? global.litElementPolyfillSupportDevMode\n : global.litElementPolyfillSupport;\npolyfillSupport?.({ LitElement });\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LE = {\n _$attributeToProperty: (el, name, value) => {\n // eslint-disable-next-line\n el._$attributeToProperty(name, value);\n },\n // eslint-disable-next-line\n _$changedProperties: (el) => el._$changedProperties,\n};\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n(global.litElementVersions ??= []).push('4.2.1');\nif (DEV_MODE && global.litElementVersions.length > 1) {\n queueMicrotask(() => {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n });\n}\n//# sourceMappingURL=lit-element.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { isSingleExpression } from './directive-helpers.js';\nimport { Directive, PartType } from './directive.js';\nexport * from './directive.js';\nconst DEV_MODE = true;\n/**\n * Recursively walks down the tree of Parts/TemplateInstances/Directives to set\n * the connected state of directives and run `disconnected`/ `reconnected`\n * callbacks.\n *\n * @return True if there were children to disconnect; false otherwise\n */\nconst notifyChildrenConnectedChanged = (parent, isConnected) => {\n const children = parent._$disconnectableChildren;\n if (children === undefined) {\n return false;\n }\n for (const obj of children) {\n // The existence of `_$notifyDirectiveConnectionChanged` is used as a \"brand\" to\n // disambiguate AsyncDirectives from other DisconnectableChildren\n // (as opposed to using an instanceof check to know when to call it); the\n // redundancy of \"Directive\" in the API name is to avoid conflicting with\n // `_$notifyConnectionChanged`, which exists `ChildParts` which are also in\n // this list\n // Disconnect Directive (and any nested directives contained within)\n // This property needs to remain unminified.\n obj['_$notifyDirectiveConnectionChanged']?.(isConnected, false);\n // Disconnect Part/TemplateInstance\n notifyChildrenConnectedChanged(obj, isConnected);\n }\n return true;\n};\n/**\n * Removes the given child from its parent list of disconnectable children, and\n * if the parent list becomes empty as a result, removes the parent from its\n * parent, and so forth up the tree when that causes subsequent parent lists to\n * become empty.\n */\nconst removeDisconnectableFromParent = (obj) => {\n let parent, children;\n do {\n if ((parent = obj._$parent) === undefined) {\n break;\n }\n children = parent._$disconnectableChildren;\n children.delete(obj);\n obj = parent;\n } while (children?.size === 0);\n};\nconst addDisconnectableToParent = (obj) => {\n // Climb the parent tree, creating a sparse tree of children needing\n // disconnection\n for (let parent; (parent = obj._$parent); obj = parent) {\n let children = parent._$disconnectableChildren;\n if (children === undefined) {\n parent._$disconnectableChildren = children = new Set();\n }\n else if (children.has(obj)) {\n // Once we've reached a parent that already contains this child, we\n // can short-circuit\n break;\n }\n children.add(obj);\n installDisconnectAPI(parent);\n }\n};\n/**\n * Changes the parent reference of the ChildPart, and updates the sparse tree of\n * Disconnectable children accordingly.\n *\n * Note, this method will be patched onto ChildPart instances and called from\n * the core code when parts are moved between different parents.\n */\nfunction reparentDisconnectables(newParent) {\n if (this._$disconnectableChildren !== undefined) {\n removeDisconnectableFromParent(this);\n this._$parent = newParent;\n addDisconnectableToParent(this);\n }\n else {\n this._$parent = newParent;\n }\n}\n/**\n * Sets the connected state on any directives contained within the committed\n * value of this part (i.e. within a TemplateInstance or iterable of\n * ChildParts) and runs their `disconnected`/`reconnected`s, as well as within\n * any directives stored on the ChildPart (when `valueOnly` is false).\n *\n * `isClearingValue` should be passed as `true` on a top-level part that is\n * clearing itself, and not as a result of recursively disconnecting directives\n * as part of a `clear` operation higher up the tree. This both ensures that any\n * directive on this ChildPart that produced a value that caused the clear\n * operation is not disconnected, and also serves as a performance optimization\n * to avoid needless bookkeeping when a subtree is going away; when clearing a\n * subtree, only the top-most part need to remove itself from the parent.\n *\n * `fromPartIndex` is passed only in the case of a partial `_clear` running as a\n * result of truncating an iterable.\n *\n * Note, this method will be patched onto ChildPart instances and called from the\n * core code when parts are cleared or the connection state is changed by the\n * user.\n */\nfunction notifyChildPartConnectedChanged(isConnected, isClearingValue = false, fromPartIndex = 0) {\n const value = this._$committedValue;\n const children = this._$disconnectableChildren;\n if (children === undefined || children.size === 0) {\n return;\n }\n if (isClearingValue) {\n if (Array.isArray(value)) {\n // Iterable case: Any ChildParts created by the iterable should be\n // disconnected and removed from this ChildPart's disconnectable\n // children (starting at `fromPartIndex` in the case of truncation)\n for (let i = fromPartIndex; i < value.length; i++) {\n notifyChildrenConnectedChanged(value[i], false);\n removeDisconnectableFromParent(value[i]);\n }\n }\n else if (value != null) {\n // TemplateInstance case: If the value has disconnectable children (will\n // only be in the case that it is a TemplateInstance), we disconnect it\n // and remove it from this ChildPart's disconnectable children\n notifyChildrenConnectedChanged(value, false);\n removeDisconnectableFromParent(value);\n }\n }\n else {\n notifyChildrenConnectedChanged(this, isConnected);\n }\n}\n/**\n * Patches disconnection API onto ChildParts.\n */\nconst installDisconnectAPI = (obj) => {\n if (obj.type == PartType.CHILD) {\n obj._$notifyConnectionChanged ??=\n notifyChildPartConnectedChanged;\n obj._$reparentDisconnectables ??= reparentDisconnectables;\n }\n};\n/**\n * An abstract `Directive` base class whose `disconnected` method will be\n * called when the part containing the directive is cleared as a result of\n * re-rendering, or when the user calls `part.setConnected(false)` on\n * a part that was previously rendered containing the directive (as happens\n * when e.g. a LitElement disconnects from the DOM).\n *\n * If `part.setConnected(true)` is subsequently called on a\n * containing part, the directive's `reconnected` method will be called prior\n * to its next `update`/`render` callbacks. When implementing `disconnected`,\n * `reconnected` should also be implemented to be compatible with reconnection.\n *\n * Note that updates may occur while the directive is disconnected. As such,\n * directives should generally check the `this.isConnected` flag during\n * render/update to determine whether it is safe to subscribe to resources\n * that may prevent garbage collection.\n */\nexport class AsyncDirective extends Directive {\n constructor() {\n super(...arguments);\n // @internal\n this._$disconnectableChildren = undefined;\n }\n /**\n * Initialize the part with internal fields\n * @param part\n * @param parent\n * @param attributeIndex\n */\n _$initialize(part, parent, attributeIndex) {\n super._$initialize(part, parent, attributeIndex);\n addDisconnectableToParent(this);\n this.isConnected = part._$isConnected;\n }\n // This property needs to remain unminified.\n /**\n * Called from the core code when a directive is going away from a part (in\n * which case `shouldRemoveFromParent` should be true), and from the\n * `setChildrenConnected` helper function when recursively changing the\n * connection state of a tree (in which case `shouldRemoveFromParent` should\n * be false).\n *\n * @param isConnected\n * @param isClearingDirective - True when the directive itself is being\n * removed; false when the tree is being disconnected\n * @internal\n */\n ['_$notifyDirectiveConnectionChanged'](isConnected, isClearingDirective = true) {\n if (isConnected !== this.isConnected) {\n this.isConnected = isConnected;\n if (isConnected) {\n this.reconnected?.();\n }\n else {\n this.disconnected?.();\n }\n }\n if (isClearingDirective) {\n notifyChildrenConnectedChanged(this, isConnected);\n removeDisconnectableFromParent(this);\n }\n }\n /**\n * Sets the value of the directive's Part outside the normal `update`/`render`\n * lifecycle of a directive.\n *\n * This method should not be called synchronously from a directive's `update`\n * or `render`.\n *\n * @param directive The directive to update\n * @param value The value to set\n */\n setValue(value) {\n if (isSingleExpression(this.__part)) {\n this.__part._$setValue(value, this);\n }\n else {\n // this.__attributeIndex will be defined in this case, but\n // assert it in dev mode\n if (DEV_MODE && this.__attributeIndex === undefined) {\n throw new Error(`Expected this.__attributeIndex to be a number`);\n }\n const newValues = [...this.__part._$committedValue];\n newValues[this.__attributeIndex] = value;\n this.__part._$setValue(newValues, this, 0);\n }\n }\n /**\n * User callbacks for implementing logic to release any resources/subscriptions\n * that may have been retained by this directive. Since directives may also be\n * re-connected, `reconnected` should also be implemented to restore the\n * working state of the directive prior to the next render.\n */\n disconnected() { }\n reconnected() { }\n}\n//# sourceMappingURL=async-directive.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { _$LH, } from './lit-html.js';\nconst { _ChildPart: ChildPart } = _$LH;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst wrap = ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM.wrap\n : (node) => node;\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value) => value === null || (typeof value != 'object' && typeof value != 'function');\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n MATHML: 3,\n};\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult = (value, type) => type === undefined\n ? // This property needs to remain unminified.\n value?.['_$litType$'] !== undefined\n : value?.['_$litType$'] === type;\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (value) => {\n return value?.['_$litType$']?.h != null;\n};\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value) => \n// This property needs to remain unminified.\nvalue?.['_$litDirective$'] !== undefined;\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value) => \n// This property needs to remain unminified.\nvalue?.['_$litDirective$'];\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part) => part.strings === undefined;\nconst createMarker = () => document.createComment('');\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (containerPart, refPart, part) => {\n const container = wrap(containerPart._$startNode).parentNode;\n const refNode = refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(startNode, endNode, containerPart, containerPart.options);\n }\n else {\n const endNode = wrap(part._$endNode).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent._$isConnected) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start = part._$startNode;\n while (start !== endNode) {\n const n = wrap(start).nextSibling;\n wrap(container).insertBefore(start, refNode);\n start = n;\n }\n }\n }\n return part;\n};\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = (part, value, directiveParent = part) => {\n part._$setValue(value, directiveParent);\n return part;\n};\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part, value = RESET_VALUE) => (part._$committedValue = value);\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part) => part._$committedValue;\n/**\n * Removes a ChildPart from the DOM, including any of its content and markers.\n *\n * Note: The only difference between this and clearPart() is that this also\n * removes the part's start node. This means that the ChildPart must own its\n * start node, ie it must be a marker node specifically for this part and not an\n * anchor from surrounding content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part) => {\n part._$clear();\n part._$startNode.remove();\n};\nexport const clearPart = (part) => {\n part._$clear();\n};\n//# sourceMappingURL=directive-helpers.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n};\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive = (c) => (...values) => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n});\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport class Directive {\n constructor(_partInfo) { }\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n /** @internal */\n _$initialize(part, parent, attributeIndex) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part, props) {\n return this.update(part, props);\n }\n update(_part, props) {\n return this.render(...props);\n }\n}\n//# sourceMappingURL=directive.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { directive, Directive, PartType, } from '../directive.js';\nclass ClassMapDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n partInfo.strings?.length > 2) {\n throw new Error('`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.');\n }\n }\n render(classInfo) {\n // Add spaces to ensure separation from static classes\n return (' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' ');\n }\n update(part, [classInfo]) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== ''));\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n const classList = part.element.classList;\n // Remove old classes that no longer apply\n for (const name of this._previousClasses) {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n }\n else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsy, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n//# sourceMappingURL=class-map.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { nothing } from '../lit-html.js';\nimport { directive, AsyncDirective } from '../async-directive.js';\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = () => new Ref();\n/**\n * An object that holds a ref value.\n */\nclass Ref {\n}\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot. It is double-keyed on both the\n// context (`options.host`) and the callback, since we auto-bind class methods\n// to `options.host`.\nconst lastElementForContextAndCallback = new WeakMap();\nclass RefDirective extends AsyncDirective {\n render(_ref) {\n return nothing;\n }\n update(part, [ref]) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n _updateRefValue(element) {\n if (!this.isConnected) {\n element = undefined;\n }\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set). Note that element lookup is keyed by\n // both the context and the callback, since we allow passing unbound\n // functions that are called on options.host, and we want to treat\n // these as unique \"instances\" of a function.\n const context = this._context ?? globalThis;\n let lastElementForCallback = lastElementForContextAndCallback.get(context);\n if (lastElementForCallback === undefined) {\n lastElementForCallback = new WeakMap();\n lastElementForContextAndCallback.set(context, lastElementForCallback);\n }\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n }\n else {\n this._ref.value = element;\n }\n }\n get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForContextAndCallback\n .get(this._context ?? globalThis)\n ?.get(this._ref)\n : this._ref?.value;\n }\n disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n//# sourceMappingURL=ref.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { noChange } from '../lit-html.js';\nimport { directive, Directive, PartType, } from '../directive.js';\nconst important = 'important';\n// The leading space is important\nconst importantFlag = ' !' + important;\n// How many characters to remove from a value, as a negative number\nconst flagTrim = 0 - importantFlag.length;\nclass StyleMapDirective extends Directive {\n constructor(partInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'style' ||\n partInfo.strings?.length > 2) {\n throw new Error('The `styleMap` directive must be used in the `style` attribute ' +\n 'and must be the only part in the attribute.');\n }\n }\n render(styleInfo) {\n return Object.keys(styleInfo).reduce((style, prop) => {\n const value = styleInfo[prop];\n if (value == null) {\n return style;\n }\n // Convert property names from camel-case to dash-case, i.e.:\n // `backgroundColor` -> `background-color`\n // Vendor-prefixed names need an extra `-` appended to front:\n // `webkitAppearance` -> `-webkit-appearance`\n // Exception is any property name containing a dash, including\n // custom properties; we assume these are already dash-cased i.e.:\n // `--my-button-color` --> `--my-button-color`\n prop = prop.includes('-')\n ? prop\n : prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n update(part, [styleInfo]) {\n const { style } = part.element;\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set(Object.keys(styleInfo));\n return this.render(styleInfo);\n }\n // Remove old properties that no longer exist in styleInfo\n for (const name of this._previousStyleProperties) {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n style[name] = null;\n }\n }\n }\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n const isImportant = typeof value === 'string' && value.endsWith(importantFlag);\n if (name.includes('-') || isImportant) {\n style.setProperty(name, isImportant\n ? value.slice(0, flagTrim)\n : value, isImportant ? important : '');\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n style[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the properties to the inline\n * style of the element.\n *\n * Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n//# sourceMappingURL=style-map.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * @fileoverview\n *\n * This file exports a boolean const whose value will depend on what environment\n * the module is being imported from.\n */\nconst NODE_MODE = false;\n/**\n * A boolean that will be `true` in server environments like Node, and `false`\n * in browser environments. Note that your server environment or toolchain must\n * support the `\"node\"` export condition for this to be `true`.\n *\n * This can be used when authoring components to change behavior based on\n * whether or not the component is executing in an SSR context.\n */\nexport const isServer = NODE_MODE;\n//# sourceMappingURL=is-server.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event) => {\n const shouldEmit = global\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(new CustomEvent('lit-debug', {\n detail: event,\n }));\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\nlet issueWarning;\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n /**\n * Issue a warning if we haven't already, based either on `code` or `warning`.\n * Warnings are disabled automatically only by `warning`; disabling via `code`\n * can be done by users.\n */\n issueWarning = (code, warning) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings.has(warning) &&\n !global.litIssuedWarnings.has(code)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n queueMicrotask(() => {\n issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);\n });\n}\nconst wrap = ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? global.ShadyDOM.wrap\n : (node) => node;\nconst trustedTypes = global.trustedTypes;\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\nconst identityFunction = (value) => value;\nconst noopSanitizer = (_node, _name, _type) => identityFunction;\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(`Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`);\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\nconst createSanitizer = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\nconst d = NODE_MODE && global.document === undefined\n ? {\n createTreeWalker() {\n return {};\n },\n }\n : document;\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\nconst isPrimitive = (value) => value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value) => isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof value?.[Symbol.iterator] === 'function';\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with <!--, like </{, can be ended by a single `>`\n */\nconst comment2EndRegex = />/g;\n/**\n * The tagEnd regex matches the end of the \"inside an opening\" tag syntax\n * position. It either matches a `>`, an attribute-like sequence, or the end\n * of the string after a space (attribute-name position ending).\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\t\\n\\f\\r\" are HTML space characters:\n * https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * So an attribute is:\n * * The name: any character except a whitespace character, (\"), ('), \">\",\n * \"=\", or \"/\". Note: this is different from the HTML spec which also excludes control characters.\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nconst tagEndRegex = new RegExp(`>|${SPACE_CHAR}(?:(${NAME_CHAR}+)(${SPACE_CHAR}*=${SPACE_CHAR}*(?:${ATTR_VALUE_CHAR}|(\"|')|))|$)`, 'g');\nconst ENTIRE_MATCH = 0;\nconst ATTRIBUTE_NAME = 1;\nconst SPACES_AND_EQUALS = 2;\nconst QUOTE_CHAR = 3;\nconst singleQuoteAttrEndRegex = /'/g;\nconst doubleQuoteAttrEndRegex = /\"/g;\n/**\n * Matches the raw text elements.\n *\n * Comments are not parsed within raw text elements, so we need to search their\n * text content for marker strings.\n */\nconst rawTextElement = /^(?:script|style|textarea|title)$/i;\n/** TemplateResult types */\nconst HTML_RESULT = 1;\nconst SVG_RESULT = 2;\nconst MATHML_RESULT = 3;\n// TemplatePart types\n// IMPORTANT: these must match the values in PartType\nconst ATTRIBUTE_PART = 1;\nconst CHILD_PART = 2;\nconst PROPERTY_PART = 3;\nconst BOOLEAN_ATTRIBUTE_PART = 4;\nconst EVENT_PART = 5;\nconst ELEMENT_PART = 6;\nconst COMMENT_PART = 7;\n/**\n * Generates a template literal tag function that returns a TemplateResult with\n * the given result type.\n */\nconst tag = (type) => (strings, ...values) => {\n // Warn against templates octal escape sequences\n // We do this here rather than in render so that the warning is closer to the\n // template definition.\n if (DEV_MODE && strings.some((s) => s === undefined)) {\n console.warn('Some template strings are undefined.\\n' +\n 'This is probably caused by illegal octal escape sequences.');\n }\n if (DEV_MODE) {\n // Import static-html.js results in a circular dependency which g3 doesn't\n // handle. Instead we know that static values must have the field\n // `_$litStatic$`.\n if (values.some((val) => val?.['_$litStatic$'])) {\n issueWarning('', `Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\\n` +\n `Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);\n }\n }\n return {\n // This property needs to remain unminified.\n ['_$litType$']: type,\n strings,\n values,\n };\n};\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n *\n * ```ts\n * const header = (title: string) => html`<h1>${title}</h1>`;\n * ```\n *\n * The `html` tag returns a description of the DOM to render as a value. It is\n * lazy, meaning no work is done until the template is rendered. When rendering,\n * if a template comes from the same expression as a previously rendered result,\n * it's efficiently updated instead of replaced.\n */\nexport const html = tag(HTML_RESULT);\n/**\n * Interprets a template literal as an SVG fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const rect = svg`<rect width=\"10\" height=\"10\"></rect>`;\n *\n * const myImage = html`\n * <svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n * ${rect}\n * </svg>`;\n * ```\n *\n * The `svg` *tag function* should only be used for SVG fragments, or elements\n * that would be contained **inside** an `<svg>` HTML element. A common error is\n * placing an `<svg>` *element* in a template tagged with the `svg` tag\n * function. The `<svg>` element is an HTML element and should be used within a\n * template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an SVG fragment from the\n * `render()` method, as the SVG fragment will be contained within the element's\n * shadow root and thus not be properly contained within an `<svg>` HTML\n * element.\n */\nexport const svg = tag(SVG_RESULT);\n/**\n * Interprets a template literal as MathML fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const num = mathml`<mn>1</mn>`;\n *\n * const eq = html`\n * <math>\n * ${num}\n * </math>`;\n * ```\n *\n * The `mathml` *tag function* should only be used for MathML fragments, or\n * elements that would be contained **inside** a `<math>` HTML element. A common\n * error is placing a `<math>` *element* in a template tagged with the `mathml`\n * tag function. The `<math>` element is an HTML element and should be used\n * within a template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an MathML fragment from the\n * `render()` method, as the MathML fragment will be contained within the\n * element's shadow root and thus not be properly contained within a `<math>`\n * HTML element.\n */\nexport const mathml = tag(MATHML_RESULT);\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = Symbol.for('lit-noChange');\n/**\n * A sentinel value that signals a ChildPart to fully clear its content.\n *\n * ```ts\n * const button = html`${\n * user.isAdmin\n * ? html`<button>DELETE</button>`\n * : nothing\n * }`;\n * ```\n *\n * Prefer using `nothing` over other falsy values as it provides a consistent\n * behavior between various expression binding contexts.\n *\n * In child expressions, `undefined`, `null`, `''`, and `nothing` all behave the\n * same and render no nodes. In attribute expressions, `nothing` _removes_ the\n * attribute, while `undefined` and `null` will render an empty string. In\n * property expressions `nothing` becomes `undefined`.\n */\nexport const nothing = Symbol.for('lit-nothing');\n/**\n * The cache of prepared templates, keyed by the tagged TemplateStringsArray\n * and _not_ accounting for the specific template tag used. This means that\n * template tags cannot be dynamic - they must statically be one of html, svg,\n * or attr. This restriction simplifies the cache lookup, which is on the hot\n * path for rendering.\n */\nconst templateCache = new WeakMap();\nconst walker = d.createTreeWalker(d, 129 /* NodeFilter.SHOW_{ELEMENT|COMMENT} */);\nlet sanitizerFactoryInternal = noopSanitizer;\nfunction trustFromTemplateString(tsa, stringFromTSA) {\n // A security check to prevent spoofing of Lit template results.\n // In the future, we may be able to replace this with Array.isTemplateObject,\n // though we might need to make that check inside of the html and svg\n // functions, because precompiled templates don't come in as\n // TemplateStringArray objects.\n if (!isArray(tsa) || !tsa.hasOwnProperty('raw')) {\n let message = 'invalid template strings array';\n if (DEV_MODE) {\n message = `\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n `\n .trim()\n .replace(/\\n */g, '\\n');\n }\n throw new Error(message);\n }\n return policy !== undefined\n ? policy.createHTML(stringFromTSA)\n : stringFromTSA;\n}\n/**\n * Returns an HTML string for the given TemplateStringsArray and result type\n * (HTML or SVG), along with the case-sensitive bound attribute names in\n * template order. The HTML contains comment markers denoting the `ChildPart`s\n * and suffixes on bound attributes denoting the `AttributeParts`.\n *\n * @param strings template strings array\n * @param type HTML or SVG\n * @return Array containing `[html, attrNames]` (array returned for terseness,\n * to avoid object fields since this code is shared with non-minified SSR\n * code)\n */\nconst getTemplateHtml = (strings, type) => {\n // Insert makers into the template HTML to represent the position of\n // bindings. The following code scans the template strings to determine the\n // syntactic position of the bindings. They can be in text position, where\n // we insert an HTML comment, attribute value position, where we insert a\n // sentinel string and re-write the attribute name, or inside a tag where\n // we insert the sentinel string.\n const l = strings.length - 1;\n // Stores the case-sensitive bound attribute names in the order of their\n // parts. ElementParts are also reflected in this array as undefined\n // rather than a string, to disambiguate from attribute bindings.\n const attrNames = [];\n let html = type === SVG_RESULT ? '<svg>' : type === MATHML_RESULT ? '<math>' : '';\n // When we're inside a raw text tag (not it's text content), the regex\n // will still be tagRegex so we can find attributes, but will switch to\n // this regex when the tag ends.\n let rawTextEndRegex;\n // The current parsing state, represented as a reference to one of the\n // regexes\n let regex = textEndRegex;\n for (let i = 0; i < l; i++) {\n const s = strings[i];\n // The index of the end of the last attribute name. When this is\n // positive at end of a string, it means we're in an attribute value\n // position and need to rewrite the attribute name.\n // We also use a special value of -2 to indicate that we encountered\n // the end of a string in attribute name position.\n let attrNameEndIndex = -1;\n let attrName;\n let lastIndex = 0;\n let match;\n // The conditions in this loop handle the current parse state, and the\n // assignments to the `regex` variable are the state transitions.\n while (lastIndex < s.length) {\n // Make sure we start searching from where we previously left off\n regex.lastIndex = lastIndex;\n match = regex.exec(s);\n if (match === null) {\n break;\n }\n lastIndex = regex.lastIndex;\n if (regex === textEndRegex) {\n if (match[COMMENT_START] === '!--') {\n regex = commentEndRegex;\n }\n else if (match[COMMENT_START] !== undefined) {\n // We started a weird comment, like </{\n regex = comment2EndRegex;\n }\n else if (match[TAG_NAME] !== undefined) {\n if (rawTextElement.test(match[TAG_NAME])) {\n // Record if we encounter a raw-text element. We'll switch to\n // this regex at the end of the tag.\n rawTextEndRegex = new RegExp(`</${match[TAG_NAME]}`, 'g');\n }\n regex = tagEndRegex;\n }\n else if (match[DYNAMIC_TAG_NAME] !== undefined) {\n if (DEV_MODE) {\n throw new Error('Bindings in tag names are not supported. Please use static templates instead. ' +\n 'See https://lit.dev/docs/templates/expressions/#static-expressions');\n }\n regex = tagEndRegex;\n }\n }\n else if (regex === tagEndRegex) {\n if (match[ENTIRE_MATCH] === '>') {\n // End of a tag. If we had started a raw-text element, use that\n // regex\n regex = rawTextEndRegex ?? textEndRegex;\n // We may be ending an unquoted attribute value, so make sure we\n // clear any pending attrNameEndIndex\n attrNameEndIndex = -1;\n }\n else if (match[ATTRIBUTE_NAME] === undefined) {\n // Attribute name position\n attrNameEndIndex = -2;\n }\n else {\n attrNameEndIndex = regex.lastIndex - match[SPACES_AND_EQUALS].length;\n attrName = match[ATTRIBUTE_NAME];\n regex =\n match[QUOTE_CHAR] === undefined\n ? tagEndRegex\n : match[QUOTE_CHAR] === '\"'\n ? doubleQuoteAttrEndRegex\n : singleQuoteAttrEndRegex;\n }\n }\n else if (regex === doubleQuoteAttrEndRegex ||\n regex === singleQuoteAttrEndRegex) {\n regex = tagEndRegex;\n }\n else if (regex === commentEndRegex || regex === comment2EndRegex) {\n regex = textEndRegex;\n }\n else {\n // Not one of the five state regexes, so it must be the dynamically\n // created raw text regex and we're at the close of that element.\n regex = tagEndRegex;\n rawTextEndRegex = undefined;\n }\n }\n if (DEV_MODE) {\n // If we have a attrNameEndIndex, which indicates that we should\n // rewrite the attribute name, assert that we're in a valid attribute\n // position - either in a tag, or a quoted attribute value.\n console.assert(attrNameEndIndex === -1 ||\n regex === tagEndRegex ||\n regex === singleQuoteAttrEndRegex ||\n regex === doubleQuoteAttrEndRegex, 'unexpected parse state B');\n }\n // We have four cases:\n // 1. We're in text position, and not in a raw text element\n // (regex === textEndRegex): insert a comment marker.\n // 2. We have a non-negative attrNameEndIndex which means we need to\n // rewrite the attribute name to add a bound attribute suffix.\n // 3. We're at the non-first binding in a multi-binding attribute, use a\n // plain marker.\n // 4. We're somewhere else inside the tag. If we're in attribute name\n // position (attrNameEndIndex === -2), add a sequential suffix to\n // generate a unique attribute name.\n // Detect a binding next to self-closing tag end and insert a space to\n // separate the marker from the tag end:\n const end = regex === tagEndRegex && strings[i + 1].startsWith('/>') ? ' ' : '';\n html +=\n regex === textEndRegex\n ? s + nodeMarker\n : attrNameEndIndex >= 0\n ? (attrNames.push(attrName),\n s.slice(0, attrNameEndIndex) +\n boundAttributeSuffix +\n s.slice(attrNameEndIndex)) +\n marker +\n end\n : s + marker + (attrNameEndIndex === -2 ? i : end);\n }\n const htmlResult = html +\n (strings[l] || '<?>') +\n (type === SVG_RESULT ? '</svg>' : type === MATHML_RESULT ? '</math>' : '');\n // Returned as an array for terseness\n return [trustFromTemplateString(strings, htmlResult), attrNames];\n};\nclass Template {\n constructor(\n // This property needs to remain unminified.\n { strings, ['_$litType$']: type }, options) {\n this.parts = [];\n let node;\n let nodeIndex = 0;\n let attrNameIndex = 0;\n const partCount = strings.length - 1;\n const parts = this.parts;\n // Create template element\n const [html, attrNames] = getTemplateHtml(strings, type);\n this.el = Template.createElement(html, options);\n walker.currentNode = this.el.content;\n // Re-parent SVG or MathML nodes into template root\n if (type === SVG_RESULT || type === MATHML_RESULT) {\n const wrapper = this.el.content.firstChild;\n wrapper.replaceWith(...wrapper.childNodes);\n }\n // Walk the template to find binding markers and create TemplateParts\n while ((node = walker.nextNode()) !== null && parts.length < partCount) {\n if (node.nodeType === 1) {\n if (DEV_MODE) {\n const tag = node.localName;\n // Warn if `textarea` includes an expression and throw if `template`\n // does since these are not supported. We do this by checking\n // innerHTML for anything that looks like a marker. This catches\n // cases like bindings in textarea there markers turn into text nodes.\n if (/^(?:textarea|template)$/i.test(tag) &&\n node.innerHTML.includes(marker)) {\n const m = `Expressions are not supported inside \\`${tag}\\` ` +\n `elements. See https://lit.dev/msg/expression-in-${tag} for more ` +\n `information.`;\n if (tag === 'template') {\n throw new Error(m);\n }\n else\n issueWarning('', m);\n }\n }\n // TODO (justinfagnani): for attempted dynamic tag names, we don't\n // increment the bindingIndex, and it'll be off by 1 in the element\n // and off by two after it.\n if (node.hasAttributes()) {\n for (const name of node.getAttributeNames()) {\n if (name.endsWith(boundAttributeSuffix)) {\n const realName = attrNames[attrNameIndex++];\n const value = node.getAttribute(name);\n const statics = value.split(marker);\n const m = /([.?@])?(.*)/.exec(realName);\n parts.push({\n type: ATTRIBUTE_PART,\n index: nodeIndex,\n name: m[2],\n strings: statics,\n ctor: m[1] === '.'\n ? PropertyPart\n : m[1] === '?'\n ? BooleanAttributePart\n : m[1] === '@'\n ? EventPart\n : AttributePart,\n });\n node.removeAttribute(name);\n }\n else if (name.startsWith(marker)) {\n parts.push({\n type: ELEMENT_PART,\n index: nodeIndex,\n });\n node.removeAttribute(name);\n }\n }\n }\n // TODO (justinfagnani): benchmark the regex against testing for each\n // of the 3 raw text element names.\n if (rawTextElement.test(node.tagName)) {\n // For raw text elements we need to split the text content on\n // markers, create a Text node for each segment, and create\n // a TemplatePart for each marker.\n const strings = node.textContent.split(marker);\n const lastIndex = strings.length - 1;\n if (lastIndex > 0) {\n node.textContent = trustedTypes\n ? trustedTypes.emptyScript\n : '';\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for child parts\n for (let i = 0; i < lastIndex; i++) {\n node.append(strings[i], createMarker());\n // Walk past the marker node we just added\n walker.nextNode();\n parts.push({ type: CHILD_PART, index: ++nodeIndex });\n }\n // Note because this marker is added after the walker's current\n // node, it will be walked to in the outer loop (and ignored), so\n // we don't need to adjust nodeIndex here\n node.append(strings[lastIndex], createMarker());\n }\n }\n }\n else if (node.nodeType === 8) {\n const data = node.data;\n if (data === markerMatch) {\n parts.push({ type: CHILD_PART, index: nodeIndex });\n }\n else {\n let i = -1;\n while ((i = node.data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n parts.push({ type: COMMENT_PART, index: nodeIndex });\n // Move to the end of the match\n i += marker.length - 1;\n }\n }\n }\n nodeIndex++;\n }\n if (DEV_MODE) {\n // If there was a duplicate attribute on a tag, then when the tag is\n // parsed into an element the attribute gets de-duplicated. We can detect\n // this mismatch if we haven't precisely consumed every attribute name\n // when preparing the template. This works because `attrNames` is built\n // from the template string and `attrNameIndex` comes from processing the\n // resulting DOM.\n if (attrNames.length !== attrNameIndex) {\n throw new Error(`Detected duplicate attribute bindings. This occurs if your template ` +\n `has duplicate attributes on an element tag. For example ` +\n `\"<input ?disabled=\\${true} ?disabled=\\${false}>\" contains a ` +\n `duplicate \"disabled\" attribute. The error was detected in ` +\n `the following template: \\n` +\n '`' +\n strings.join('${...}') +\n '`');\n }\n }\n // We could set walker.currentNode to another node here to prevent a memory\n // leak, but every time we prepare a template, we immediately render it\n // and re-use the walker in new TemplateInstance._clone().\n debugLogEvent &&\n debugLogEvent({\n kind: 'template prep',\n template: this,\n clonableTemplate: this.el,\n parts: this.parts,\n strings,\n });\n }\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @nocollapse */\n static createElement(html, _options) {\n const el = d.createElement('template');\n el.innerHTML = html;\n return el;\n }\n}\nfunction resolveDirective(part, value, parent = part, attributeIndex) {\n // Bail early if the value is explicitly noChange. Note, this means any\n // nested directive is still attached and is not run.\n if (value === noChange) {\n return value;\n }\n let currentDirective = attributeIndex !== undefined\n ? parent.__directives?.[attributeIndex]\n : parent.__directive;\n const nextDirectiveConstructor = isPrimitive(value)\n ? undefined\n : // This property needs to remain unminified.\n value['_$litDirective$'];\n if (currentDirective?.constructor !== nextDirectiveConstructor) {\n // This property needs to remain unminified.\n currentDirective?.['_$notifyDirectiveConnectionChanged']?.(false);\n if (nextDirectiveConstructor === undefined) {\n currentDirective = undefined;\n }\n else {\n currentDirective = new nextDirectiveConstructor(part);\n currentDirective._$initialize(part, parent, attributeIndex);\n }\n if (attributeIndex !== undefined) {\n (parent.__directives ??= [])[attributeIndex] =\n currentDirective;\n }\n else {\n parent.__directive = currentDirective;\n }\n }\n if (currentDirective !== undefined) {\n value = resolveDirective(part, currentDirective._$resolve(part, value.values), currentDirective, attributeIndex);\n }\n return value;\n}\n/**\n * An updateable instance of a Template. Holds references to the Parts used to\n * update the template instance.\n */\nclass TemplateInstance {\n constructor(template, parent) {\n this._$parts = [];\n /** @internal */\n this._$disconnectableChildren = undefined;\n this._$template = template;\n this._$parent = parent;\n }\n // Called by ChildPart parentNode getter\n get parentNode() {\n return this._$parent.parentNode;\n }\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n // This method is separate from the constructor because we need to return a\n // DocumentFragment and we don't want to hold onto it with an instance field.\n _clone(options) {\n const { el: { content }, parts: parts, } = this._$template;\n const fragment = (options?.creationScope ?? d).importNode(content, true);\n walker.currentNode = fragment;\n let node = walker.nextNode();\n let nodeIndex = 0;\n let partIndex = 0;\n let templatePart = parts[0];\n while (templatePart !== undefined) {\n if (nodeIndex === templatePart.index) {\n let part;\n if (templatePart.type === CHILD_PART) {\n part = new ChildPart(node, node.nextSibling, this, options);\n }\n else if (templatePart.type === ATTRIBUTE_PART) {\n part = new templatePart.ctor(node, templatePart.name, templatePart.strings, this, options);\n }\n else if (templatePart.type === ELEMENT_PART) {\n part = new ElementPart(node, this, options);\n }\n this._$parts.push(part);\n templatePart = parts[++partIndex];\n }\n if (nodeIndex !== templatePart?.index) {\n node = walker.nextNode();\n nodeIndex++;\n }\n }\n // We need to set the currentNode away from the cloned tree so that we\n // don't hold onto the tree even if the tree is detached and should be\n // freed.\n walker.currentNode = d;\n return fragment;\n }\n _update(values) {\n let i = 0;\n for (const part of this._$parts) {\n if (part !== undefined) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'set part',\n part,\n value: values[i],\n valueIndex: i,\n values,\n templateInstance: this,\n });\n if (part.strings !== undefined) {\n part._$setValue(values, part, i);\n // The number of values the part consumes is part.strings.length - 1\n // since values are in between template spans. We increment i by 1\n // later in the loop, so increment it by part.strings.length - 2 here\n i += part.strings.length - 2;\n }\n else {\n part._$setValue(values[i]);\n }\n }\n i++;\n }\n }\n}\nclass ChildPart {\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n // ChildParts that are not at the root should always be created with a\n // parent; only RootChildNode's won't, so they return the local isConnected\n // state\n return this._$parent?._$isConnected ?? this.__isConnected;\n }\n constructor(startNode, endNode, parent, options) {\n this.type = CHILD_PART;\n this._$committedValue = nothing;\n // The following fields will be patched onto ChildParts when required by\n // AsyncDirective\n /** @internal */\n this._$disconnectableChildren = undefined;\n this._$startNode = startNode;\n this._$endNode = endNode;\n this._$parent = parent;\n this.options = options;\n // Note __isConnected is only ever accessed on RootParts (i.e. when there is\n // no _$parent); the value on a non-root-part is \"don't care\", but checking\n // for parent would be more code\n this.__isConnected = options?.isConnected ?? true;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n // Explicitly initialize for consistent class shape.\n this._textSanitizer = undefined;\n }\n }\n /**\n * The parent node into which the part renders its content.\n *\n * A ChildPart's content consists of a range of adjacent child nodes of\n * `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and\n * `.endNode`).\n *\n * - If both `.startNode` and `.endNode` are non-null, then the part's content\n * consists of all siblings between `.startNode` and `.endNode`, exclusively.\n *\n * - If `.startNode` is non-null but `.endNode` is null, then the part's\n * content consists of all siblings following `.startNode`, up to and\n * including the last child of `.parentNode`. If `.endNode` is non-null, then\n * `.startNode` will always be non-null.\n *\n * - If both `.endNode` and `.startNode` are null, then the part's content\n * consists of all child nodes of `.parentNode`.\n */\n get parentNode() {\n let parentNode = wrap(this._$startNode).parentNode;\n const parent = this._$parent;\n if (parent !== undefined &&\n parentNode?.nodeType === 11 /* Node.DOCUMENT_FRAGMENT */) {\n // If the parentNode is a DocumentFragment, it may be because the DOM is\n // still in the cloned fragment during initial render; if so, get the real\n // parentNode the part will be committed into by asking the parent.\n parentNode = parent.parentNode;\n }\n return parentNode;\n }\n /**\n * The part's leading marker node, if any. See `.parentNode` for more\n * information.\n */\n get startNode() {\n return this._$startNode;\n }\n /**\n * The part's trailing marker node, if any. See `.parentNode` for more\n * information.\n */\n get endNode() {\n return this._$endNode;\n }\n _$setValue(value, directiveParent = this) {\n if (DEV_MODE && this.parentNode === null) {\n throw new Error(`This \\`ChildPart\\` has no \\`parentNode\\` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's \\`innerHTML\\` or \\`textContent\\` can do this.`);\n }\n value = resolveDirective(this, value, directiveParent);\n if (isPrimitive(value)) {\n // Non-rendering child values. It's important that these do not render\n // empty text nodes to avoid issues with preventing default <slot>\n // fallback content.\n if (value === nothing || value == null || value === '') {\n if (this._$committedValue !== nothing) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit nothing to child',\n start: this._$startNode,\n end: this._$endNode,\n parent: this._$parent,\n options: this.options,\n });\n this._$clear();\n }\n this._$committedValue = nothing;\n }\n else if (value !== this._$committedValue && value !== noChange) {\n this._commitText(value);\n }\n // This property needs to remain unminified.\n }\n else if (value['_$litType$'] !== undefined) {\n this._commitTemplateResult(value);\n }\n else if (value.nodeType !== undefined) {\n if (DEV_MODE && this.options?.host === value) {\n this._commitText(`[probable mistake: rendered a template's host in itself ` +\n `(commonly caused by writing \\${this} in a template]`);\n console.warn(`Attempted to render the template host`, value, `inside itself. This is almost always a mistake, and in dev mode `, `we render some warning text. In production however, we'll `, `render it, which will usually result in an error, and sometimes `, `in the element disappearing from the DOM.`);\n return;\n }\n this._commitNode(value);\n }\n else if (isIterable(value)) {\n this._commitIterable(value);\n }\n else {\n // Fallback, will render the string representation\n this._commitText(value);\n }\n }\n _insert(node) {\n return wrap(wrap(this._$startNode).parentNode).insertBefore(node, this._$endNode);\n }\n _commitNode(value) {\n if (this._$committedValue !== value) {\n this._$clear();\n if (ENABLE_EXTRA_SECURITY_HOOKS &&\n sanitizerFactoryInternal !== noopSanitizer) {\n const parentNodeName = this._$startNode.parentNode?.nodeName;\n if (parentNodeName === 'STYLE' || parentNodeName === 'SCRIPT') {\n let message = 'Forbidden';\n if (DEV_MODE) {\n if (parentNodeName === 'STYLE') {\n message =\n `Lit does not support binding inside style nodes. ` +\n `This is a security risk, as style injection attacks can ` +\n `exfiltrate data and spoof UIs. ` +\n `Consider instead using css\\`...\\` literals ` +\n `to compose styles, and do dynamic styling with ` +\n `css custom properties, ::parts, <slot>s, ` +\n `and by mutating the DOM rather than stylesheets.`;\n }\n else {\n message =\n `Lit does not support binding inside script nodes. ` +\n `This is a security risk, as it could allow arbitrary ` +\n `code execution.`;\n }\n }\n throw new Error(message);\n }\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit node',\n start: this._$startNode,\n parent: this._$parent,\n value: value,\n options: this.options,\n });\n this._$committedValue = this._insert(value);\n }\n }\n _commitText(value) {\n // If the committed value is a primitive it means we called _commitText on\n // the previous render, and we know that this._$startNode.nextSibling is a\n // Text node. We can now just replace the text content (.data) of the node.\n if (this._$committedValue !== nothing &&\n isPrimitive(this._$committedValue)) {\n const node = wrap(this._$startNode).nextSibling;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(node, 'data', 'property');\n }\n value = this._textSanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node,\n value,\n options: this.options,\n });\n node.data = value;\n }\n else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n const textNode = d.createTextNode('');\n this._commitNode(textNode);\n // When setting text content, for security purposes it matters a lot\n // what the parent is. For example, <style> and <script> need to be\n // handled with care, while <span> does not. So first we need to put a\n // text node into the document, then we can sanitize its content.\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(textNode, 'data', 'property');\n }\n value = this._textSanitizer(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: textNode,\n value,\n options: this.options,\n });\n textNode.data = value;\n }\n else {\n this._commitNode(d.createTextNode(value));\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: wrap(this._$startNode).nextSibling,\n value,\n options: this.options,\n });\n }\n }\n this._$committedValue = value;\n }\n _commitTemplateResult(result) {\n // This property needs to remain unminified.\n const { values, ['_$litType$']: type } = result;\n // If $litType$ is a number, result is a plain TemplateResult and we get\n // the template from the template cache. If not, result is a\n // CompiledTemplateResult and _$litType$ is a CompiledTemplate and we need\n // to create the <template> element the first time we see it.\n const template = typeof type === 'number'\n ? this._$getTemplate(result)\n : (type.el === undefined &&\n (type.el = Template.createElement(trustFromTemplateString(type.h, type.h[0]), this.options)),\n type);\n if (this._$committedValue?._$template === template) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'template updating',\n template,\n instance: this._$committedValue,\n parts: this._$committedValue._$parts,\n options: this.options,\n values,\n });\n this._$committedValue._update(values);\n }\n else {\n const instance = new TemplateInstance(template, this);\n const fragment = instance._clone(this.options);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n instance._update(values);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated and updated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n this._commitNode(fragment);\n this._$committedValue = instance;\n }\n }\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @internal */\n _$getTemplate(result) {\n let template = templateCache.get(result.strings);\n if (template === undefined) {\n templateCache.set(result.strings, (template = new Template(result)));\n }\n return template;\n }\n _commitIterable(value) {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n // If value is an array, then the previous render was of an\n // iterable and value will contain the ChildParts from the previous\n // render. If value is not an array, clear this part and make a new\n // array for ChildParts.\n if (!isArray(this._$committedValue)) {\n this._$committedValue = [];\n this._$clear();\n }\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this._$committedValue;\n let partIndex = 0;\n let itemPart;\n for (const item of value) {\n if (partIndex === itemParts.length) {\n // If no existing part, create a new one\n // TODO (justinfagnani): test perf impact of always creating two parts\n // instead of sharing parts between nodes\n // https://github.com/lit/lit/issues/1266\n itemParts.push((itemPart = new ChildPart(this._insert(createMarker()), this._insert(createMarker()), this, this.options)));\n }\n else {\n // Reuse an existing part\n itemPart = itemParts[partIndex];\n }\n itemPart._$setValue(item);\n partIndex++;\n }\n if (partIndex < itemParts.length) {\n // itemParts always have end nodes\n this._$clear(itemPart && wrap(itemPart._$endNode).nextSibling, partIndex);\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n }\n }\n /**\n * Removes the nodes contained within this Part from the DOM.\n *\n * @param start Start node to clear from, for clearing a subset of the part's\n * DOM (used when truncating iterables)\n * @param from When `start` is specified, the index within the iterable from\n * which ChildParts are being removed, used for disconnecting directives\n * in those Parts.\n *\n * @internal\n */\n _$clear(start = wrap(this._$startNode).nextSibling, from) {\n this._$notifyConnectionChanged?.(false, true, from);\n while (start !== this._$endNode) {\n // The non-null assertion is safe because if _$startNode.nextSibling is\n // null, then _$endNode is also null, and we would not have entered this\n // loop.\n const n = wrap(start).nextSibling;\n wrap(start).remove();\n start = n;\n }\n }\n /**\n * Implementation of RootPart's `isConnected`. Note that this method\n * should only be called on `RootPart`s (the `ChildPart` returned from a\n * top-level `render()` call). It has no effect on non-root ChildParts.\n * @param isConnected Whether to set\n * @internal\n */\n setConnected(isConnected) {\n if (this._$parent === undefined) {\n this.__isConnected = isConnected;\n this._$notifyConnectionChanged?.(isConnected);\n }\n else if (DEV_MODE) {\n throw new Error('part.setConnected() may only be called on a ' +\n 'RootPart returned from render().');\n }\n }\n}\nclass AttributePart {\n get tagName() {\n return this.element.tagName;\n }\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n constructor(element, name, strings, parent, options) {\n this.type = ATTRIBUTE_PART;\n /** @internal */\n this._$committedValue = nothing;\n /** @internal */\n this._$disconnectableChildren = undefined;\n this.element = element;\n this.name = name;\n this._$parent = parent;\n this.options = options;\n if (strings.length > 2 || strings[0] !== '' || strings[1] !== '') {\n this._$committedValue = new Array(strings.length - 1).fill(new String());\n this.strings = strings;\n }\n else {\n this._$committedValue = nothing;\n }\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n this._sanitizer = undefined;\n }\n }\n /**\n * Sets the value of this part by resolving the value from possibly multiple\n * values and static strings and committing it to the DOM.\n * If this part is single-valued, `this._strings` will be undefined, and the\n * method will be called with a single value argument. If this part is\n * multi-value, `this._strings` will be defined, and the method is called\n * with the value array of the part's owning TemplateInstance, and an offset\n * into the value array from which the values should be read.\n * This method is overloaded this way to eliminate short-lived array slices\n * of the template instance values, and allow a fast-path for single-valued\n * parts.\n *\n * @param value The part value, or an array of values for multi-valued parts\n * @param valueIndex the index to start reading values from. `undefined` for\n * single-valued parts\n * @param noCommit causes the part to not commit its value to the DOM. Used\n * in hydration to prime attribute parts with their first-rendered value,\n * but not set the attribute, and in SSR to no-op the DOM operation and\n * capture the value for serialization.\n *\n * @internal\n */\n _$setValue(value, directiveParent = this, valueIndex, noCommit) {\n const strings = this.strings;\n // Whether any of the values has changed, for dirty-checking\n let change = false;\n if (strings === undefined) {\n // Single-value binding case\n value = resolveDirective(this, value, directiveParent, 0);\n change =\n !isPrimitive(value) ||\n (value !== this._$committedValue && value !== noChange);\n if (change) {\n this._$committedValue = value;\n }\n }\n else {\n // Interpolation case\n const values = value;\n value = strings[0];\n let i, v;\n for (i = 0; i < strings.length - 1; i++) {\n v = resolveDirective(this, values[valueIndex + i], directiveParent, i);\n if (v === noChange) {\n // If the user-provided value is `noChange`, use the previous value\n v = this._$committedValue[i];\n }\n change ||=\n !isPrimitive(v) || v !== this._$committedValue[i];\n if (v === nothing) {\n value = nothing;\n }\n else if (value !== nothing) {\n value += (v ?? '') + strings[i + 1];\n }\n // We always record each value, even if one is `nothing`, for future\n // change detection.\n this._$committedValue[i] = v;\n }\n }\n if (change && !noCommit) {\n this._commitValue(value);\n }\n }\n /** @internal */\n _commitValue(value) {\n if (value === nothing) {\n wrap(this.element).removeAttribute(this.name);\n }\n else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(this.element, this.name, 'attribute');\n }\n value = this._sanitizer(value ?? '');\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit attribute',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n wrap(this.element).setAttribute(this.name, (value ?? ''));\n }\n }\n}\nclass PropertyPart extends AttributePart {\n constructor() {\n super(...arguments);\n this.type = PROPERTY_PART;\n }\n /** @internal */\n _commitValue(value) {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(this.element, this.name, 'property');\n }\n value = this._sanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit property',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.element[this.name] = value === nothing ? undefined : value;\n }\n}\nclass BooleanAttributePart extends AttributePart {\n constructor() {\n super(...arguments);\n this.type = BOOLEAN_ATTRIBUTE_PART;\n }\n /** @internal */\n _commitValue(value) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit boolean attribute',\n element: this.element,\n name: this.name,\n value: !!(value && value !== nothing),\n options: this.options,\n });\n wrap(this.element).toggleAttribute(this.name, !!value && value !== nothing);\n }\n}\nclass EventPart extends AttributePart {\n constructor(element, name, strings, parent, options) {\n super(element, name, strings, parent, options);\n this.type = EVENT_PART;\n if (DEV_MODE && this.strings !== undefined) {\n throw new Error(`A \\`<${element.localName}>\\` has a \\`@${name}=...\\` listener with ` +\n 'invalid content. Event listeners in templates must have exactly ' +\n 'one expression and no surrounding text.');\n }\n }\n // EventPart does not use the base _$setValue/_resolveValue implementation\n // since the dirty checking is more complex\n /** @internal */\n _$setValue(newListener, directiveParent = this) {\n newListener =\n resolveDirective(this, newListener, directiveParent, 0) ?? nothing;\n if (newListener === noChange) {\n return;\n }\n const oldListener = this._$committedValue;\n // If the new value is nothing or any options change we have to remove the\n // part as a listener.\n const shouldRemoveListener = (newListener === nothing && oldListener !== nothing) ||\n newListener.capture !==\n oldListener.capture ||\n newListener.once !==\n oldListener.once ||\n newListener.passive !==\n oldListener.passive;\n // If the new value is not nothing and we removed the listener, we have\n // to add the part as a listener.\n const shouldAddListener = newListener !== nothing &&\n (oldListener === nothing || shouldRemoveListener);\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit event listener',\n element: this.element,\n name: this.name,\n value: newListener,\n options: this.options,\n removeListener: shouldRemoveListener,\n addListener: shouldAddListener,\n oldListener,\n });\n if (shouldRemoveListener) {\n this.element.removeEventListener(this.name, this, oldListener);\n }\n if (shouldAddListener) {\n this.element.addEventListener(this.name, this, newListener);\n }\n this._$committedValue = newListener;\n }\n handleEvent(event) {\n if (typeof this._$committedValue === 'function') {\n this._$committedValue.call(this.options?.host ?? this.element, event);\n }\n else {\n this._$committedValue.handleEvent(event);\n }\n }\n}\nclass ElementPart {\n constructor(element, parent, options) {\n this.element = element;\n this.type = ELEMENT_PART;\n /** @internal */\n this._$disconnectableChildren = undefined;\n this._$parent = parent;\n this.options = options;\n }\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n _$setValue(value) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit to element binding',\n element: this.element,\n value,\n options: this.options,\n });\n resolveDirective(this, value);\n }\n}\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LH object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-element, which re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LH = {\n // Used in lit-ssr\n _boundAttributeSuffix: boundAttributeSuffix,\n _marker: marker,\n _markerMatch: markerMatch,\n _HTML_RESULT: HTML_RESULT,\n _getTemplateHtml: getTemplateHtml,\n // Used in tests and private-ssr-support\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _AttributePart: AttributePart,\n _BooleanAttributePart: BooleanAttributePart,\n _EventPart: EventPart,\n _PropertyPart: PropertyPart,\n _ElementPart: ElementPart,\n};\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? global.litHtmlPolyfillSupportDevMode\n : global.litHtmlPolyfillSupport;\npolyfillSupport?.(Template, ChildPart);\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n(global.litHtmlVersions ??= []).push('3.3.1');\nif (DEV_MODE && global.litHtmlVersions.length > 1) {\n queueMicrotask(() => {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. ` +\n `Loading multiple versions is not recommended.`);\n });\n}\n/**\n * Renders a value, usually a lit-html TemplateResult, to the container.\n *\n * This example renders the text \"Hello, Zoe!\" inside a paragraph tag, appending\n * it to the container `document.body`.\n *\n * ```js\n * import {html, render} from 'lit';\n *\n * const name = \"Zoe\";\n * render(html`<p>Hello, ${name}!</p>`, document.body);\n * ```\n *\n * @param value Any [renderable\n * value](https://lit.dev/docs/templates/expressions/#child-expressions),\n * typically a {@linkcode TemplateResult} created by evaluating a template tag\n * like {@linkcode html} or {@linkcode svg}.\n * @param container A DOM container to render to. The first render will append\n * the rendered value to the container, and subsequent renders will\n * efficiently update the rendered value if the same result type was\n * previously rendered there.\n * @param options See {@linkcode RenderOptions} for options documentation.\n * @see\n * {@link https://lit.dev/docs/libraries/standalone-templates/#rendering-lit-html-templates| Rendering Lit HTML Templates}\n */\nexport const render = (value, container, options) => {\n if (DEV_MODE && container == null) {\n // Give a clearer error message than\n // Uncaught TypeError: Cannot read properties of null (reading\n // '_$litPart$')\n // which reads like an internal Lit error.\n throw new TypeError(`The container to render into may not be ${container}`);\n }\n const renderId = DEV_MODE ? debugLogRenderId++ : 0;\n const partOwnerNode = options?.renderBefore ?? container;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let part = partOwnerNode['_$litPart$'];\n debugLogEvent &&\n debugLogEvent({\n kind: 'begin render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n if (part === undefined) {\n const endNode = options?.renderBefore ?? null;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n partOwnerNode['_$litPart$'] = part = new ChildPart(container.insertBefore(createMarker(), endNode), endNode, undefined, options ?? {});\n }\n part._$setValue(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'end render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n return part;\n};\nif (ENABLE_EXTRA_SECURITY_HOOKS) {\n render.setSanitizer = setSanitizer;\n render.createSanitizer = createSanitizer;\n if (DEV_MODE) {\n render._testOnlyClearSanitizerFactoryDoNotCallOrElse =\n _testOnlyClearSanitizerFactoryDoNotCallOrElse;\n }\n}\n//# sourceMappingURL=lit-html.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n// Any new exports need to be added to the export statement in\n// `packages/lit/src/index.all.ts`.\nimport { html as coreHtml, svg as coreSvg, mathml as coreMathml, } from './lit-html.js';\n/**\n * Prevents JSON injection attacks.\n *\n * The goals of this brand:\n * 1) fast to check\n * 2) code is small on the wire\n * 3) multiple versions of Lit in a single page will all produce mutually\n * interoperable StaticValues\n * 4) normal JSON.parse (without an unusual reviver) can not produce a\n * StaticValue\n *\n * Symbols satisfy (1), (2), and (4). We use Symbol.for to satisfy (3), but\n * we don't care about the key, so we break ties via (2) and use the empty\n * string.\n */\nconst brand = Symbol.for('');\n/** Safely extracts the string part of a StaticValue. */\nconst unwrapStaticValue = (value) => {\n if (value?.r !== brand) {\n return undefined;\n }\n return value?.['_$litStatic$'];\n};\n/**\n * Wraps a string so that it behaves like part of the static template\n * strings instead of a dynamic value.\n *\n * Users must take care to ensure that adding the static string to the template\n * results in well-formed HTML, or else templates may break unexpectedly.\n *\n * Note that this function is unsafe to use on untrusted content, as it will be\n * directly parsed into HTML. Do not pass user input to this function\n * without sanitizing it.\n *\n * Static values can be changed, but they will cause a complete re-render\n * since they effectively create a new template.\n */\nexport const unsafeStatic = (value) => ({\n ['_$litStatic$']: value,\n r: brand,\n});\nconst textFromStatic = (value) => {\n if (value['_$litStatic$'] !== undefined) {\n return value['_$litStatic$'];\n }\n else {\n throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${value}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`);\n }\n};\n/**\n * Tags a string literal so that it behaves like part of the static template\n * strings instead of a dynamic value.\n *\n * The only values that may be used in template expressions are other tagged\n * `literal` results or `unsafeStatic` values (note that untrusted content\n * should never be passed to `unsafeStatic`).\n *\n * Users must take care to ensure that adding the static string to the template\n * results in well-formed HTML, or else templates may break unexpectedly.\n *\n * Static values can be changed, but they will cause a complete re-render since\n * they effectively create a new template.\n */\nexport const literal = (strings, ...values) => ({\n ['_$litStatic$']: values.reduce((acc, v, idx) => acc + textFromStatic(v) + strings[idx + 1], strings[0]),\n r: brand,\n});\nconst stringsCache = new Map();\n/**\n * Wraps a lit-html template tag (`html` or `svg`) to add static value support.\n */\nexport const withStatic = (coreTag) => (strings, ...values) => {\n const l = values.length;\n let staticValue;\n let dynamicValue;\n const staticStrings = [];\n const dynamicValues = [];\n let i = 0;\n let hasStatics = false;\n let s;\n while (i < l) {\n s = strings[i];\n // Collect any unsafeStatic values, and their following template strings\n // so that we treat a run of template strings and unsafe static values as\n // a single template string.\n while (i < l &&\n ((dynamicValue = values[i]),\n (staticValue = unwrapStaticValue(dynamicValue))) !== undefined) {\n s += staticValue + strings[++i];\n hasStatics = true;\n }\n // If the last value is static, we don't need to push it.\n if (i !== l) {\n dynamicValues.push(dynamicValue);\n }\n staticStrings.push(s);\n i++;\n }\n // If the last value isn't static (which would have consumed the last\n // string), then we need to add the last string.\n if (i === l) {\n staticStrings.push(strings[l]);\n }\n if (hasStatics) {\n const key = staticStrings.join('$$lit$$');\n strings = stringsCache.get(key);\n if (strings === undefined) {\n // Beware: in general this pattern is unsafe, and doing so may bypass\n // lit's security checks and allow an attacker to execute arbitrary\n // code and inject arbitrary content.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n staticStrings.raw = staticStrings;\n stringsCache.set(key, (strings = staticStrings));\n }\n values = dynamicValues;\n }\n return coreTag(strings, ...values);\n};\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n *\n * Includes static value support from `lit-html/static.js`.\n */\nexport const html = withStatic(coreHtml);\n/**\n * Interprets a template literal as an SVG template that can efficiently\n * render to and update a container.\n *\n * Includes static value support from `lit-html/static.js`.\n */\nexport const svg = withStatic(coreSvg);\n/**\n * Interprets a template literal as MathML fragment that can efficiently render\n * to and update a container.\n *\n * Includes static value support from `lit-html/static.js`.\n */\nexport const mathml = withStatic(coreMathml);\n//# sourceMappingURL=static.js.map","export*from\"@lit/reactive-element/decorators/custom-element.js\";export*from\"@lit/reactive-element/decorators/property.js\";export*from\"@lit/reactive-element/decorators/state.js\";export*from\"@lit/reactive-element/decorators/event-options.js\";export*from\"@lit/reactive-element/decorators/query.js\";export*from\"@lit/reactive-element/decorators/query-all.js\";export*from\"@lit/reactive-element/decorators/query-async.js\";export*from\"@lit/reactive-element/decorators/query-assigned-elements.js\";export*from\"@lit/reactive-element/decorators/query-assigned-nodes.js\";\n//# sourceMappingURL=decorators.js.map\n","export*from\"lit-html/directives/class-map.js\";\n//# sourceMappingURL=class-map.js.map\n","export*from\"lit-html/directives/ref.js\";\n//# sourceMappingURL=ref.js.map\n","export*from\"lit-html/directives/style-map.js\";\n//# sourceMappingURL=style-map.js.map\n","import\"@lit/reactive-element\";import\"lit-html\";export*from\"lit-element/lit-element.js\";export*from\"lit-html/is-server.js\";\n//# sourceMappingURL=index.js.map\n","export*from\"lit-html/static.js\";\n//# sourceMappingURL=static-html.js.map\n","'use strict';\n\nconst patternsConfig = require('./patterns.js');\n\n/**\n * @typedef {import('markdown-it')} MarkdownIt\n *\n * @typedef {import('markdown-it/lib/rules_core/state_core.mjs').default} StateCore\n *\n * @typedef {import('markdown-it/lib/token.mjs').default} Token\n *\n * @typedef {import('markdown-it/lib/token.mjs').Nesting} Nesting\n *\n * @typedef {Object} Options\n * @property {!string} leftDelimiter left delimiter, default is `{`(left curly bracket)\n * @property {!string} rightDelimiter right delimiter, default is `}`(right curly bracket)\n * @property {AllowedAttribute[]} allowedAttributes empty means no limit\n *\n * @typedef {string|RegExp} AllowedAttribute rule of allowed attribute\n *\n * @typedef {[string, string]} AttributePair\n *\n * @typedef {[number, number]} SourceLineInfo\n *\n * @typedef {Object} CurlyAttrsPattern\n * @property {string} name\n * @property {DetectingRule[]} tests\n * @property {(tokens: Token[], i: number, j?: number) => void} transform\n *\n * @typedef {Object} MatchedResult\n * @property {boolean} match true means matched\n * @property {number?} j postion index number of Array<{@link Token}>\n *\n * @typedef {(str: string) => boolean} DetectingStrRule\n *\n * @typedef {Object} DetectingRule rule for testing {@link Token}'s properties\n * @property {number=} shift offset index number of Array<{@link Token}>\n * @property {number=} position fixed index number of Array<{@link Token}>\n * @property {(string | DetectingStrRule)=} type\n * @property {(string | DetectingStrRule)=} tag\n * @property {DetectingRule[]=} children\n * @property {(string | DetectingStrRule)=} content\n * @property {(string | DetectingStrRule)=} markup\n * @property {(string | DetectingStrRule)=} info\n * @property {Nesting=} nesting\n * @property {number=} level\n * @property {boolean=} block\n * @property {boolean=} hidden\n * @property {AttributePair[]=} attrs\n * @property {SourceLineInfo[]=} map\n * @property {any=} meta\n */\n\n/** @type {Options} */\nconst defaultOptions = {\n leftDelimiter: '{',\n rightDelimiter: '}',\n allowedAttributes: []\n};\n\n/**\n * @param {MarkdownIt} md\n * @param {Options=} options_\n */\nmodule.exports = function attributes(md, options_) {\n let options = Object.assign({}, defaultOptions);\n options = Object.assign(options, options_);\n\n const patterns = patternsConfig(options);\n\n /**\n * @param {StateCore} state\n */\n function curlyAttrs(state) {\n const tokens = state.tokens;\n\n for (let i = 0; i < tokens.length; i++) {\n for (let p = 0; p < patterns.length; p++) {\n const pattern = patterns[p];\n let j = null; // position of child with offset 0\n const match = pattern.tests.every(t => {\n const res = test(tokens, i, t);\n if (res.j !== null) { j = res.j; }\n return res.match;\n });\n if (match) {\n try {\n pattern.transform(tokens, i, j);\n if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {\n // retry, may be several inline attributes\n p--;\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`markdown-it-attrs: Error in pattern '${pattern.name}': ${error.message}`);\n console.error(error.stack);\n }\n }\n }\n }\n }\n\n md.core.ruler.before('linkify', 'curly_attributes', curlyAttrs);\n};\n\n/**\n * Test if t matches token stream.\n *\n * @param {Token[]} tokens\n * @param {number} i\n * @param {DetectingRule} t\n * @returns {MatchedResult}\n */\nfunction test(tokens, i, t) {\n /** @type {MatchedResult} */\n const res = {\n match: false,\n j: null // position of child\n };\n\n const ii = t.shift !== undefined\n ? i + t.shift\n : t.position;\n\n if (t.shift !== undefined && ii < 0) {\n // we should never shift to negative indexes (rolling around to back of array)\n return res;\n }\n\n const token = get(tokens, ii); // supports negative ii\n\n\n if (token === undefined) { return res; }\n\n for (const key of Object.keys(t)) {\n if (key === 'shift' || key === 'position') { continue; }\n\n if (token[key] === undefined) { return res; }\n\n if (key === 'children' && isArrayOfObjects(t.children)) {\n if (token.children.length === 0) {\n return res;\n }\n let match;\n /** @type {DetectingRule[]} */\n const childTests = t.children;\n /** @type {Token[]} */\n const children = token.children;\n if (childTests.every(tt => tt.position !== undefined)) {\n // positions instead of shifts, do not loop all children\n match = childTests.every(tt => test(children, tt.position, tt).match);\n if (match) {\n // we may need position of child in transform\n const j = last(childTests).position;\n res.j = j >= 0 ? j : children.length + j;\n }\n } else {\n for (let j = 0; j < children.length; j++) {\n match = childTests.every(tt => test(children, j, tt).match);\n if (match) {\n res.j = j;\n // all tests true, continue with next key of pattern t\n break;\n }\n }\n }\n\n if (match === false) { return res; }\n\n continue;\n }\n\n switch (typeof t[key]) {\n case 'boolean':\n case 'number':\n case 'string':\n if (token[key] !== t[key]) { return res; }\n break;\n case 'function':\n if (!t[key](token[key])) { return res; }\n break;\n case 'object':\n if (isArrayOfFunctions(t[key])) {\n const r = t[key].every(tt => tt(token[key]));\n if (r === false) { return res; }\n break;\n }\n // fall through for objects !== arrays of functions\n default:\n throw new Error(`Unknown type of pattern test (key: ${key}). Test should be of type boolean, number, string, function or array of functions.`);\n }\n }\n\n // no tests returned false -> all tests returns true\n res.match = true;\n return res;\n}\n\nfunction isArrayOfObjects(arr) {\n return Array.isArray(arr) && arr.length && arr.every(i => typeof i === 'object');\n}\n\nfunction isArrayOfFunctions(arr) {\n return Array.isArray(arr) && arr.length && arr.every(i => typeof i === 'function');\n}\n\n/**\n * Get n item of array. Supports negative n, where -1 is last\n * element in array.\n * @param {Token[]} arr\n * @param {number} n\n * @returns {Token=}\n */\nfunction get(arr, n) {\n return n >= 0 ? arr[n] : arr[arr.length + n];\n}\n\n/**\n * get last element of array, safe - returns {} if not found\n * @param {DetectingRule[]} arr\n * @returns {DetectingRule}\n */\nfunction last(arr) {\n return arr.slice(-1)[0] || {};\n}\n","'use strict';\n/**\n * If a pattern matches the token stream,\n * then run transform.\n */\n\nconst utils = require('./utils.js');\n\n/**\n * @param {import('.').Options} options\n * @returns {import('.').CurlyAttrsPattern[]}\n */\nmodule.exports = options => {\n const __hr = new RegExp('^ {0,3}[-*_]{3,} ?'\n + utils.escapeRegExp(options.leftDelimiter)\n + '[^' + utils.escapeRegExp(options.rightDelimiter) + ']');\n\n return ([\n {\n /**\n * ```python {.cls}\n * for i in range(10):\n * print(i)\n * ```\n */\n name: 'fenced code blocks',\n tests: [\n {\n shift: 0,\n block: true,\n info: utils.hasDelimiters('end', options)\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i];\n const start = token.info.lastIndexOf(options.leftDelimiter);\n const attrs = utils.getAttrs(token.info, start, options);\n utils.addAttrs(attrs, token);\n token.info = utils.removeDelimiter(token.info, options);\n }\n }, {\n /**\n * bla `click()`{.c} {.d}\n *\n * differs from 'inline attributes' as it does\n * not have a closing tag (nesting: -1)\n */\n name: 'inline nesting 0',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n shift: -1,\n type: (str) => str === 'image' || str === 'code_inline'\n }, {\n shift: 0,\n type: 'text',\n content: utils.hasDelimiters('start', options)\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const endChar = token.content.indexOf(options.rightDelimiter);\n const attrToken = tokens[i].children[j - 1];\n const attrs = utils.getAttrs(token.content, 0, options);\n utils.addAttrs(attrs, attrToken);\n if (token.content.length === (endChar + options.rightDelimiter.length)) {\n tokens[i].children.splice(j, 1);\n } else {\n token.content = token.content.slice(endChar + options.rightDelimiter.length);\n }\n }\n }, {\n /**\n * | h1 |\n * | -- |\n * | c1 |\n *\n * {.c}\n */\n name: 'tables',\n tests: [\n {\n // let this token be i, such that for-loop continues at\n // next token after tokens.splice\n shift: 0,\n type: 'table_close'\n }, {\n shift: 1,\n type: 'paragraph_open'\n }, {\n shift: 2,\n type: 'inline',\n content: utils.hasDelimiters('only', options)\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i + 2];\n const tableOpen = utils.getMatchingOpeningToken(tokens, i);\n const attrs = utils.getAttrs(token.content, 0, options);\n // add attributes\n utils.addAttrs(attrs, tableOpen);\n // remove <p>{.c}</p>\n tokens.splice(i + 1, 3);\n }\n }, {\n /**\n * | A | B |\n * | -- | -- |\n * | 1 | 2 |\n *\n * | C | D |\n * | -- | -- |\n *\n * only `| A | B |` sets the colsnum metadata\n */\n name: 'tables thead metadata',\n tests: [\n {\n shift: 0,\n type: 'tr_close',\n }, {\n shift: 1,\n type: 'thead_close'\n }, {\n shift: 2,\n type: 'tbody_open'\n }\n ],\n transform: (tokens, i) => {\n const tr = utils.getMatchingOpeningToken(tokens, i);\n const th = tokens[i - 1];\n let colsnum = 0;\n let n = i;\n while (--n) {\n if (tokens[n] === tr) {\n tokens[n - 1].meta = Object.assign({}, tokens[n + 2].meta, { colsnum });\n break;\n }\n colsnum += (tokens[n].level === th.level && tokens[n].type === th.type) >> 0;\n }\n tokens[i + 2].meta = Object.assign({}, tokens[i + 2].meta, { colsnum });\n }\n }, {\n /**\n * | A | B | C | D |\n * | -- | -- | -- | -- |\n * | 1 | 11 | 111 | 1111 {rowspan=3} |\n * | 2 {colspan=2 rowspan=2} | 22 | 222 | 2222 |\n * | 3 | 33 | 333 | 3333 |\n */\n name: 'tables tbody calculate',\n tests: [\n {\n shift: 0,\n type: 'tbody_close',\n hidden: false\n }\n ],\n /**\n * @param {number} i index of the tbody ending\n */\n transform: (tokens, i) => {\n /** index of the tbody beginning */\n let idx = i - 2;\n while (idx > 0 && 'tbody_open' !== tokens[--idx].type);\n\n const calc = tokens[idx].meta.colsnum >> 0;\n if (calc < 2) { return; }\n\n const level = tokens[i].level + 2;\n for (let n = idx; n < i; n++) {\n if (tokens[n].level > level) { continue; }\n\n const token = tokens[n];\n const rows = token.hidden ? 0 : token.attrGet('rowspan') >> 0;\n const cols = token.hidden ? 0 : token.attrGet('colspan') >> 0;\n\n if (rows > 1) {\n let colsnum = calc - (cols > 0 ? cols : 1);\n for (let k = n, num = rows; k < i, num > 1; k++) {\n if ('tr_open' == tokens[k].type) {\n tokens[k].meta = Object.assign({}, tokens[k].meta);\n if (tokens[k].meta && tokens[k].meta.colsnum) {\n colsnum -= 1;\n }\n tokens[k].meta.colsnum = colsnum;\n num--;\n }\n }\n }\n\n if ('tr_open' == token.type && token.meta && token.meta.colsnum) {\n const max = token.meta.colsnum;\n for (let k = n, num = 0; k < i; k++) {\n if ('td_open' == tokens[k].type) {\n num += 1;\n } else if ('tr_close' == tokens[k].type) {\n break;\n }\n num > max && (tokens[k].hidden || hidden(tokens[k]));\n }\n }\n\n if (cols > 1) {\n /** @type {number[]} index of one row's children */\n const one = [];\n /** last index of the row's children */\n let end = n + 3;\n /** number of the row's children */\n let num = calc;\n\n for (let k = n; k > idx; k--) {\n if ('tr_open' == tokens[k].type) {\n num = tokens[k].meta && tokens[k].meta.colsnum || num;\n break;\n } else if ('td_open' === tokens[k].type) {\n one.unshift(k);\n }\n }\n\n for (let k = n + 2; k < i; k++) {\n if ('tr_close' == tokens[k].type) {\n end = k;\n break;\n } else if ('td_open' == tokens[k].type) {\n one.push(k);\n }\n }\n\n const off = one.indexOf(n);\n let real = num - off;\n real = real > cols ? cols : real;\n cols > real && token.attrSet('colspan', real + '');\n\n for (let k = one.slice(num + 1 - calc - real)[0]; k < end; k++) {\n tokens[k].hidden || hidden(tokens[k]);\n }\n }\n }\n }\n }, {\n /**\n * *emphasis*{.with attrs=1}\n */\n name: 'inline attributes',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n shift: -1,\n nesting: -1 // closing inline tag, </em>{.a}\n }, {\n shift: 0,\n type: 'text',\n content: utils.hasDelimiters('start', options)\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n const openingToken = utils.getMatchingOpeningToken(tokens[i].children, j - 1);\n utils.addAttrs(attrs, openingToken);\n token.content = content.slice(content.indexOf(options.rightDelimiter) + options.rightDelimiter.length);\n }\n }, {\n /**\n * - item\n * {.a}\n */\n name: 'list softbreak',\n tests: [\n {\n shift: -2,\n type: 'list_item_open'\n }, {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -2,\n type: 'softbreak'\n }, {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('only', options)\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n let ii = i - 2;\n while (tokens[ii - 1] &&\n tokens[ii - 1].type !== 'ordered_list_open' &&\n tokens[ii - 1].type !== 'bullet_list_open') { ii--; }\n utils.addAttrs(attrs, tokens[ii - 1]);\n tokens[i].children = tokens[i].children.slice(0, -2);\n }\n }, {\n /**\n * - nested list\n * - with double \\n\n * {.a} <-- apply to nested ul\n *\n * {.b} <-- apply to root <ul>\n */\n name: 'list double softbreak',\n tests: [\n {\n // let this token be i = 0 so that we can erase\n // the <p>{.a}</p> tokens below\n shift: 0,\n type: (str) =>\n str === 'bullet_list_close' ||\n str === 'ordered_list_close'\n }, {\n shift: 1,\n type: 'paragraph_open'\n }, {\n shift: 2,\n type: 'inline',\n content: utils.hasDelimiters('only', options),\n children: (arr) => arr.length === 1\n }, {\n shift: 3,\n type: 'paragraph_close'\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i + 2];\n const content = token.content;\n const attrs = utils.getAttrs(content, 0, options);\n const openingToken = utils.getMatchingOpeningToken(tokens, i);\n utils.addAttrs(attrs, openingToken);\n tokens.splice(i + 1, 3);\n }\n }, {\n /**\n * - end of {.list-item}\n */\n name: 'list item end',\n tests: [\n {\n shift: -2,\n type: 'list_item_open'\n }, {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('end', options)\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);\n utils.addAttrs(attrs, tokens[i - 2]);\n const trimmed = content.slice(0, content.lastIndexOf(options.leftDelimiter));\n token.content = last(trimmed) !== ' ' ?\n trimmed : trimmed.slice(0, -1);\n }\n }, {\n /**\n * something with softbreak\n * {.cls}\n */\n name: '\\n{.a} softbreak then curly in start',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -2,\n type: 'softbreak'\n }, {\n position: -1,\n type: 'text',\n content: utils.hasDelimiters('only', options)\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const attrs = utils.getAttrs(token.content, 0, options);\n // find last closing tag\n let ii = i + 1;\n while (tokens[ii + 1] && tokens[ii + 1].nesting === -1) { ii++; }\n const openingToken = utils.getMatchingOpeningToken(tokens, ii);\n utils.addAttrs(attrs, openingToken);\n tokens[i].children = tokens[i].children.slice(0, -2);\n }\n }, {\n /**\n * horizontal rule --- {#id}\n */\n name: 'horizontal rule',\n tests: [\n {\n shift: 0,\n type: 'paragraph_open'\n },\n {\n shift: 1,\n type: 'inline',\n children: (arr) => arr.length === 1,\n content: (str) => str.match(__hr) !== null,\n },\n {\n shift: 2,\n type: 'paragraph_close'\n }\n ],\n transform: (tokens, i) => {\n const token = tokens[i];\n token.type = 'hr';\n token.tag = 'hr';\n token.nesting = 0;\n const content = tokens[i + 1].content;\n const start = content.lastIndexOf(options.leftDelimiter);\n const attrs = utils.getAttrs(content, start, options);\n utils.addAttrs(attrs, token);\n token.markup = content;\n tokens.splice(i + 1, 2);\n }\n }, {\n /**\n * end of {.block}\n */\n name: 'end of block',\n tests: [\n {\n shift: 0,\n type: 'inline',\n children: [\n {\n position: -1,\n content: utils.hasDelimiters('end', options),\n type: (t) => t !== 'code_inline' && t !== 'math_inline'\n }\n ]\n }\n ],\n /**\n * @param {!number} j\n */\n transform: (tokens, i, j) => {\n const token = tokens[i].children[j];\n const content = token.content;\n const attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);\n let ii = i + 1;\n do if (tokens[ii] && tokens[ii].nesting === -1) { break; } while (ii++ < tokens.length);\n const openingToken = utils.getMatchingOpeningToken(tokens, ii);\n utils.addAttrs(attrs, openingToken);\n const trimmed = content.slice(0, content.lastIndexOf(options.leftDelimiter));\n token.content = last(trimmed) !== ' ' ?\n trimmed : trimmed.slice(0, -1);\n }\n }\n ]);\n};\n\n// get last element of array or string\nfunction last(arr) {\n return arr.slice(-1)[0];\n}\n\n/**\n * Hidden table's cells and them inline children,\n * specially cast inline's content as empty\n * to prevent that escapes the table's box model\n * @see https://github.com/markdown-it/markdown-it/issues/639\n * @param {import('.').Token} token\n */\nfunction hidden(token) {\n token.hidden = true;\n token.children && token.children.forEach(t => (\n t.content = '',\n hidden(t),\n undefined\n ));\n}\n","/**\n * @typedef {import('.').Token} Token\n * @typedef {import('.').Options} Options\n * @typedef {import('.').AttributePair} AttributePair\n * @typedef {import('.').AllowedAttribute} AllowedAttribute\n * @typedef {import('.').DetectingStrRule} DetectingStrRule\n */\n/**\n * parse {.class #id key=val} strings\n * @param {string} str: string to parse\n * @param {number} start: where to start parsing (including {)\n * @param {Options} options\n * @returns {AttributePair[]}: [['key', 'val'], ['class', 'red']]\n */\nexports.getAttrs = function (str, start, options) {\n // not tab, line feed, form feed, space, solidus, greater than sign, quotation mark, apostrophe and equals sign\n const allowedKeyChars = /[^\\t\\n\\f />\"'=]/;\n const pairSeparator = ' ';\n const keySeparator = '=';\n const classChar = '.';\n const idChar = '#';\n\n const attrs = [];\n let key = '';\n let value = '';\n let parsingKey = true;\n let valueInsideQuotes = false;\n\n // read inside {}\n // start + left delimiter length to avoid beginning {\n // breaks when } is found or end of string\n for (let i = start + options.leftDelimiter.length; i < str.length; i++) {\n if (str.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {\n if (key !== '') { attrs.push([key, value]); }\n break;\n }\n const char_ = str.charAt(i);\n\n // switch to reading value if equal sign\n if (char_ === keySeparator && parsingKey) {\n parsingKey = false;\n continue;\n }\n\n // {.class} {..css-module}\n if (char_ === classChar && key === '') {\n if (str.charAt(i + 1) === classChar) {\n key = 'css-module';\n i += 1;\n } else {\n key = 'class';\n }\n parsingKey = false;\n continue;\n }\n\n // {#id}\n if (char_ === idChar && key === '') {\n key = 'id';\n parsingKey = false;\n continue;\n }\n\n // {value=\"inside quotes\"}\n if (char_ === '\"' && value === '' && !valueInsideQuotes) {\n valueInsideQuotes = true;\n continue;\n }\n if (char_ === '\"' && valueInsideQuotes) {\n valueInsideQuotes = false;\n continue;\n }\n\n // read next key/value pair\n if ((char_ === pairSeparator && !valueInsideQuotes)) {\n if (key === '') {\n // beginning or ending space: { .red } vs {.red}\n continue;\n }\n attrs.push([key, value]);\n key = '';\n value = '';\n parsingKey = true;\n continue;\n }\n\n // continue if character not allowed\n if (parsingKey && char_.search(allowedKeyChars) === -1) {\n continue;\n }\n\n // no other conditions met; append to key/value\n if (parsingKey) {\n key += char_;\n continue;\n }\n value += char_;\n }\n\n if (options.allowedAttributes && options.allowedAttributes.length) {\n const allowedAttributes = options.allowedAttributes;\n\n return attrs.filter(function (attrPair) {\n const attr = attrPair[0];\n\n /**\n * @param {AllowedAttribute} allowedAttribute\n */\n function isAllowedAttribute (allowedAttribute) {\n return (attr === allowedAttribute\n || (allowedAttribute instanceof RegExp && allowedAttribute.test(attr))\n );\n }\n\n return allowedAttributes.some(isAllowedAttribute);\n });\n\n }\n return attrs;\n\n};\n\n/**\n * add attributes from [['key', 'val']] list\n * @param {AttributePair[]} attrs: [['key', 'val']]\n * @param {Token} token: which token to add attributes\n * @returns token\n */\nexports.addAttrs = function (attrs, token) {\n for (let j = 0, l = attrs.length; j < l; ++j) {\n const key = attrs[j][0];\n if (key === 'class') {\n token.attrJoin('class', attrs[j][1]);\n } else if (key === 'css-module') {\n token.attrJoin('css-module', attrs[j][1]);\n } else {\n token.attrPush(attrs[j]);\n }\n }\n return token;\n};\n\n/**\n * Does string have properly formatted curly?\n *\n * start: '{.a} asdf'\n * end: 'asdf {.a}'\n * only: '{.a}'\n *\n * @param {'start'|'end'|'only'} where to expect {} curly. start, end or only.\n * @param {Options} options\n * @return {DetectingStrRule} Function which testes if string has curly.\n */\nexports.hasDelimiters = function (where, options) {\n\n if (!where) {\n throw new Error('Parameter `where` not passed. Should be \"start\", \"end\" or \"only\".');\n }\n\n /**\n * @param {string} str\n * @return {boolean}\n */\n return function (str) {\n // we need minimum three chars, for example {b}\n const minCurlyLength = options.leftDelimiter.length + 1 + options.rightDelimiter.length;\n if (!str || typeof str !== 'string' || str.length < minCurlyLength) {\n return false;\n }\n\n /**\n * @param {string} curly\n */\n function validCurlyLength (curly) {\n const isClass = curly.charAt(options.leftDelimiter.length) === '.';\n const isId = curly.charAt(options.leftDelimiter.length) === '#';\n return (isClass || isId)\n ? curly.length >= (minCurlyLength + 1)\n : curly.length >= minCurlyLength;\n }\n\n let start, end, slice, nextChar;\n const rightDelimiterMinimumShift = minCurlyLength - options.rightDelimiter.length;\n switch (where) {\n case 'start':\n // first char should be {, } found in char 2 or more\n slice = str.slice(0, options.leftDelimiter.length);\n start = slice === options.leftDelimiter ? 0 : -1;\n end = start === -1 ? -1 : str.indexOf(options.rightDelimiter, rightDelimiterMinimumShift);\n // check if next character is not one of the delimiters\n nextChar = str.charAt(end + options.rightDelimiter.length);\n if (nextChar && options.rightDelimiter.indexOf(nextChar) !== -1) {\n end = -1;\n }\n break;\n\n case 'end':\n // last char should be }\n start = str.lastIndexOf(options.leftDelimiter);\n end = start === -1 ? -1 : str.indexOf(options.rightDelimiter, start + rightDelimiterMinimumShift);\n end = end === str.length - options.rightDelimiter.length ? end : -1;\n break;\n\n case 'only':\n // '{.a}'\n slice = str.slice(0, options.leftDelimiter.length);\n start = slice === options.leftDelimiter ? 0 : -1;\n slice = str.slice(str.length - options.rightDelimiter.length);\n end = slice === options.rightDelimiter ? str.length - options.rightDelimiter.length : -1;\n break;\n\n default:\n throw new Error(`Unexpected case ${where}, expected 'start', 'end' or 'only'`);\n }\n\n return start !== -1 && end !== -1 && validCurlyLength(str.substring(start, end + options.rightDelimiter.length));\n };\n};\n\n/**\n * Removes last curly from string.\n * @param {string} str\n * @param {Options} options\n */\nexports.removeDelimiter = function (str, options) {\n const start = escapeRegExp(options.leftDelimiter);\n const end = escapeRegExp(options.rightDelimiter);\n\n const curly = new RegExp(\n '[ \\\\n]?' + start + '[^' + start + end + ']+' + end + '$'\n );\n const pos = str.search(curly);\n\n return pos !== -1 ? str.slice(0, pos) : str;\n};\n\n/**\n * Escapes special characters in string s such that the string\n * can be used in `new RegExp`. For example \"[\" becomes \"\\\\[\".\n *\n * @param {string} s Regex string.\n * @return {string} Escaped string.\n */\nfunction escapeRegExp (s) {\n return s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\nexports.escapeRegExp = escapeRegExp;\n\n/**\n * find corresponding opening block\n * @param {Token[]} tokens\n * @param {number} i\n */\nexports.getMatchingOpeningToken = function (tokens, i) {\n if (tokens[i].type === 'softbreak') {\n return false;\n }\n // non closing blocks, example img\n if (tokens[i].nesting === 0) {\n return tokens[i];\n }\n\n const level = tokens[i].level;\n const type = tokens[i].type.replace('_close', '_open');\n\n for (; i >= 0; --i) {\n if (tokens[i].type === type && tokens[i].level === level) {\n return tokens[i];\n }\n }\n\n return false;\n};\n\n\n/**\n * from https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js\n */\nconst HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nconst HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nconst HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\n/**\n * @param {string} ch\n * @returns {string}\n */\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\n/**\n * @param {string} str\n * @returns {string}\n */\nexports.escapeHtml = function (str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n};\n","'use strict';\n\n\nmodule.exports = require('./lib/');\n","// HTML5 entities map: { name -> utf16string }\n//\n'use strict';\n\n/*eslint quotes:0*/\nmodule.exports = require('entities/lib/maps/entities.json');\n","// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\n'use strict';\n\n\nmodule.exports = [\n 'address',\n 'article',\n 'aside',\n 'base',\n 'basefont',\n 'blockquote',\n 'body',\n 'caption',\n 'center',\n 'col',\n 'colgroup',\n 'dd',\n 'details',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'section',\n 'source',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n];\n","// Regexps to match html elements\n\n'use strict';\n\nvar attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\n\nvar unquoted = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar single_quoted = \"'[^']*'\";\nvar double_quoted = '\"[^\"]*\"';\n\nvar attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';\n\nvar attribute = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)';\n\nvar open_tag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>';\n\nvar close_tag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>';\nvar comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';\nvar processing = '<[?][\\\\s\\\\S]*?[?]>';\nvar declaration = '<![A-Z]+\\\\s+[^>]*>';\nvar cdata = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>';\n\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\n\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n","// Utilities\n//\n'use strict';\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction isString(obj) { return _class(obj) === '[object String]'; }\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n}\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\n\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;\n\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str; }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) { return escaped; }\n return replaceEntityPattern(match, entity);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n return false;\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) { return true; }\n switch (code) {\n case 0x09: // \\t\n case 0x0A: // \\n\n case 0x0B: // \\v\n case 0x0C: // \\f\n case 0x0D: // \\r\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n return false;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\nvar UNICODE_PUNCT_RE = require('uc.micro/categories/P/regex');\n\n// Currently without astral characters support.\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n}\n\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21/* ! */:\n case 0x22/* \" */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x27/* ' */:\n case 0x28/* ( */:\n case 0x29/* ) */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2C/* , */:\n case 0x2D/* - */:\n case 0x2E/* . */:\n case 0x2F/* / */:\n case 0x3A/* : */:\n case 0x3B/* ; */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x3F/* ? */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7C/* | */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' ');\n\n // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n }\n\n // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n return str.toLowerCase().toUpperCase();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nexports.lib = {};\nexports.lib.mdurl = require('mdurl');\nexports.lib.ucmicro = require('uc.micro');\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\n// exports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n","// Just a shortcut for bulk export\n'use strict';\n\n\nexports.parseLinkLabel = require('./parse_link_label');\nexports.parseLinkDestination = require('./parse_link_destination');\nexports.parseLinkTitle = require('./parse_link_title');\n","// Parse link destination\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkDestination(str, start, max) {\n var code, level,\n pos = start,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === 0x0A /* \\n */) { return result; }\n if (code === 0x3C /* < */) { return result; }\n if (code === 0x3E /* > */) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n // no closing '>'\n return result;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) { break; }\n\n // ascii control characters\n if (code < 0x20 || code === 0x7F) { break; }\n\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n if (str.charCodeAt(pos + 1) === 0x20) { break; }\n pos += 2;\n continue;\n }\n\n if (code === 0x28 /* ( */) {\n level++;\n if (level > 32) { return result; }\n }\n\n if (code === 0x29 /* ) */) {\n if (level === 0) { break; }\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) { return result; }\n if (level !== 0) { return result; }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.pos = pos;\n result.ok = true;\n return result;\n};\n","// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n'use strict';\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level, found, marker, prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n if (marker === 0x5B /* [ */) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n }\n\n // restore old state\n state.pos = oldPos;\n\n return labelEnd;\n};\n","// Parse link title\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkTitle(str, start, max) {\n var code,\n marker,\n lines = 0,\n pos = start,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) { return result; }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }\n\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) { marker = 0x29; }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x28 /* ( */ && marker === 0x29 /* ) */) {\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos++;\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n","// Main parser class\n\n'use strict';\n\n\nvar utils = require('./common/utils');\nvar helpers = require('./helpers');\nvar Renderer = require('./renderer');\nvar ParserCore = require('./parser_core');\nvar ParserBlock = require('./parser_block');\nvar ParserInline = require('./parser_inline');\nvar LinkifyIt = require('linkify-it');\nvar mdurl = require('mdurl');\nvar punycode = require('punycode');\n\n\nvar config = {\n default: require('./presets/default'),\n zero: require('./presets/zero'),\n commonmark: require('./presets/commonmark')\n};\n\n////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n\n return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%');\n}\n\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`<br />`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `<br>`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with <pre... internal wrapper is skipped.\n *\n * ##### Example\n *\n * ```javascript\n * // commonmark mode\n * var md = require('markdown-it')('commonmark');\n *\n * // default mode\n * var md = require('markdown-it')();\n *\n * // enable everything\n * var md = require('markdown-it')({\n * html: true,\n * linkify: true,\n * typographer: true\n * });\n * ```\n *\n * ##### Syntax highlighting\n *\n * ```js\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;\n * } catch (__) {}\n * }\n *\n * return ''; // use external default escaping\n * }\n * });\n * ```\n *\n * Or with full wrapper override (if you need assign class to `<pre>`):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '<pre class=\"hljs\"><code>' +\n * hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +\n * '</code></pre>';\n * } catch (__) {}\n * }\n *\n * return '<pre class=\"hljs\"><code>' + md.utils.escapeHtml(str) + '</code></pre>';\n * }\n * });\n * ```\n *\n **/\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.inline = new ParserInline();\n\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.block = new ParserBlock();\n\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.core = new ParserCore();\n\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n this.renderer = new Renderer();\n\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n this.linkify = new LinkifyIt();\n\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n this.validateLink = validateLink;\n\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n this.normalizeLink = normalizeLink;\n\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n this.normalizeLinkText = normalizeLinkText;\n\n\n // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n this.utils = utils;\n\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n this.helpers = utils.assign({}, helpers);\n\n\n this.options = {};\n this.configure(presetName);\n\n if (options) { this.set(options); }\n}\n\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n var self = this, presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name'); }\n }\n\n if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty'); }\n\n if (presets.options) { self.set(presets.options); }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.enable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.disable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n\n state.inlineMode = true;\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `<p>` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\n\nmodule.exports = MarkdownIt;\n","/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n // First 2 params - rule name & source. Secondary array - list of rules,\n // which can be terminated by this one.\n [ 'table', require('./rules_block/table'), [ 'paragraph', 'reference' ] ],\n [ 'code', require('./rules_block/code') ],\n [ 'fence', require('./rules_block/fence'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'blockquote', require('./rules_block/blockquote'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'hr', require('./rules_block/hr'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'list', require('./rules_block/list'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'reference', require('./rules_block/reference') ],\n [ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'heading', require('./rules_block/heading'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'lheading', require('./rules_block/lheading') ],\n [ 'paragraph', require('./rules_block/paragraph') ]\n];\n\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });\n }\n}\n\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok, i, prevLine,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) { break; }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.sCount[line] < state.blkIndent) { break; }\n\n // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n prevLine = state.line;\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) {\n if (prevLine >= state.line) {\n throw new Error(\"block rule didn't increment state.line\");\n }\n break;\n }\n }\n\n // this can only happen if user disables paragraph rule\n if (!ok) throw new Error('none of the block rules matched');\n\n // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) { return; }\n\n state = new this.State(src, md, env, outTokens);\n\n this.tokenize(state, state.line, state.lineMax);\n};\n\n\nParserBlock.prototype.State = require('./rules_block/state_block');\n\n\nmodule.exports = ParserBlock;\n","/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n [ 'normalize', require('./rules_core/normalize') ],\n [ 'block', require('./rules_core/block') ],\n [ 'inline', require('./rules_core/inline') ],\n [ 'linkify', require('./rules_core/linkify') ],\n [ 'replacements', require('./rules_core/replacements') ],\n [ 'smartquotes', require('./rules_core/smartquotes') ],\n // `text_join` finds `text_special` tokens (for escape sequences)\n // and joins them with the rest of the text\n [ 'text_join', require('./rules_core/text_join') ]\n];\n\n\n/**\n * new Core()\n **/\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n var i, l, rules;\n\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = require('./rules_core/state_core');\n\n\nmodule.exports = Core;\n","/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\nvar _rules = [\n [ 'text', require('./rules_inline/text') ],\n [ 'linkify', require('./rules_inline/linkify') ],\n [ 'newline', require('./rules_inline/newline') ],\n [ 'escape', require('./rules_inline/escape') ],\n [ 'backticks', require('./rules_inline/backticks') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').tokenize ],\n [ 'emphasis', require('./rules_inline/emphasis').tokenize ],\n [ 'link', require('./rules_inline/link') ],\n [ 'image', require('./rules_inline/image') ],\n [ 'autolink', require('./rules_inline/autolink') ],\n [ 'html_inline', require('./rules_inline/html_inline') ],\n [ 'entity', require('./rules_inline/entity') ]\n];\n\n// `rule2` ruleset was created specifically for emphasis/strikethrough\n// post-processing and may be changed in the future.\n//\n// Don't use this for anything except pairs (plugins working with `balance_pairs`).\n//\nvar _rules2 = [\n [ 'balance_pairs', require('./rules_inline/balance_pairs') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').postProcess ],\n [ 'emphasis', require('./rules_inline/emphasis').postProcess ],\n // rules for pairs separate '**' into its own text tokens, which may be left unused,\n // rule below merges unused segments back with the rest of the text\n [ 'fragments_join', require('./rules_inline/fragments_join') ]\n];\n\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline() {\n var i;\n\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n}\n\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n var ok, i, pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) {\n if (pos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\"); }\n break;\n }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) { state.pos++; }\n cache[pos] = state.pos;\n};\n\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n var ok, i, prevPos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n prevPos = state.pos;\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n if (ok) {\n if (prevPos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\"); }\n break;\n }\n }\n }\n\n if (ok) {\n if (state.pos >= end) { break; }\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n\n this.tokenize(state);\n\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\n\nParserInline.prototype.State = require('./rules_inline/state_inline');\n\n\nmodule.exports = ParserInline;\n","// Commonmark default options\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: true, // Enable HTML tags in source\n xhtmlOut: true, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'normalize',\n 'block',\n 'inline',\n 'text_join'\n ]\n },\n\n block: {\n rules: [\n 'blockquote',\n 'code',\n 'fence',\n 'heading',\n 'hr',\n 'html_block',\n 'lheading',\n 'list',\n 'reference',\n 'paragraph'\n ]\n },\n\n inline: {\n rules: [\n 'autolink',\n 'backticks',\n 'emphasis',\n 'entity',\n 'escape',\n 'html_inline',\n 'image',\n 'link',\n 'newline',\n 'text'\n ],\n rules2: [\n 'balance_pairs',\n 'emphasis',\n 'fragments_join'\n ]\n }\n }\n};\n","// markdown-it default options\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 100 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {},\n block: {},\n inline: {}\n }\n};\n","// \"Zero\" preset, with nothing enabled. Useful for manual configuring of simple\n// modes. For example, to parse bold/italic only.\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (<br />)\n breaks: false, // Convert '\\n' in paragraphs into <br>\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with <pre... internal wrapper is skipped.\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'normalize',\n 'block',\n 'inline',\n 'text_join'\n ]\n },\n\n block: {\n rules: [\n 'paragraph'\n ]\n },\n\n inline: {\n rules: [\n 'text'\n ],\n rules2: [\n 'balance_pairs',\n 'fragments_join'\n ]\n }\n }\n};\n","/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n'use strict';\n\n\nvar assign = require('./common/utils').assign;\nvar unescapeAll = require('./common/utils').unescapeAll;\nvar escapeHtml = require('./common/utils').escapeHtml;\n\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar default_rules = {};\n\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '<code' + slf.renderAttrs(token) + '>' +\n escapeHtml(token.content) +\n '</code>';\n};\n\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '<pre' + slf.renderAttrs(token) + '><code>' +\n escapeHtml(tokens[idx].content) +\n '</code></pre>\\n';\n};\n\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n langAttrs = '',\n highlighted, i, arr, tmpAttrs, tmpToken;\n\n if (info) {\n arr = info.split(/(\\s+)/g);\n langName = arr[0];\n langAttrs = arr.slice(2).join('');\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf('<pre') === 0) {\n return highlighted + '\\n';\n }\n\n // If language exists, inject class gently, without modifying original token.\n // May be, one day we will add .deepClone() for token and simplify this part, but\n // now we prefer to keep things local.\n if (info) {\n i = token.attrIndex('class');\n tmpAttrs = token.attrs ? token.attrs.slice() : [];\n\n if (i < 0) {\n tmpAttrs.push([ 'class', options.langPrefix + langName ]);\n } else {\n tmpAttrs[i] = tmpAttrs[i].slice();\n tmpAttrs[i][1] += ' ' + options.langPrefix + langName;\n }\n\n // Fake token just to render attributes\n tmpToken = {\n attrs: tmpAttrs\n };\n\n return '<pre><code' + slf.renderAttrs(tmpToken) + '>'\n + highlighted\n + '</code></pre>\\n';\n }\n\n\n return '<pre><code' + slf.renderAttrs(token) + '>'\n + highlighted\n + '</code></pre>\\n';\n};\n\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] =\n slf.renderInlineAsText(token.children, options, env);\n\n return slf.renderToken(tokens, idx, options);\n};\n\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '<br />\\n' : '<br>\\n';\n};\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n';\n};\n\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer() {\n\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return '<b>'; };\n * md.renderer.rules.strong_close = function () { return '</b>'; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) { return ''; }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx];\n\n // Tight list paragraphs\n if (token.hidden) {\n return '';\n }\n\n // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n }\n\n // Add token name, e.g. `<img`\n result += (token.nesting === -1 ? '</' : '<') + token.tag;\n\n // Encode attributes, e.g. `<img src=\"foo\"`\n result += this.renderAttrs(token);\n\n // Add a slash for self-closing tags, e.g. `<img src=\"foo\" /`\n if (token.nesting === 0 && options.xhtmlOut) {\n result += ' /';\n }\n\n // Check if we need to add a newline after this tag\n if (token.block) {\n needLf = true;\n\n if (token.nesting === 1) {\n if (idx + 1 < tokens.length) {\n nextToken = tokens[idx + 1];\n\n if (nextToken.type === 'inline' || nextToken.hidden) {\n // Block-level tag containing an inline tag.\n //\n needLf = false;\n\n } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n // Opening tag + closing tag of the same type. E.g. `<li></li>`.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n\n return result;\n};\n\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n } else if (tokens[i].type === 'softbreak') {\n result += '\\n';\n }\n }\n\n return result;\n};\n\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n var i, len, type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n","/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n'use strict';\n\n\n/**\n * new Ruler()\n **/\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n if (chain && rule.alt.indexOf(chain) < 0) { return; }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + name); }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n this.__rules__.forEach(function (rule) { rule.enabled = false; });\n\n this.enable(list, ignoreInvalid);\n};\n\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n\n // Chain can be empty, if rules disabled. But we still have to return Array.\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n","// Block quotes\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n isOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos) !== 0x3E/* > */) { return false; }\n\n // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n if (silent) { return true; }\n\n oldBMarks = [];\n oldBSCount = [];\n oldSCount = [];\n oldTShift = [];\n\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n\n // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n for (nextLine = startLine; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n isOutdented = state.sCount[nextLine] < state.blkIndent;\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {\n // This line is inside the blockquote.\n\n // set offset past spaces and \">\"\n initial = state.sCount[nextLine] + 1;\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + initial) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n offset = initial;\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) { break; }\n\n // Case 3: another tag found.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n\n // A negative indentation means that this is a paragraph continuation\n //\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [ startLine, 0 ];\n\n state.md.block.tokenize(state, startLine, nextLine);\n\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n state.blkIndent = oldIndent;\n\n return true;\n};\n","// Code block (4 spaces padded)\n\n'use strict';\n\n\nmodule.exports = function code(state, startLine, endLine/*, silent*/) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) { return false; }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n\n state.line = last;\n\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\\n';\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// fences (``` lang, ~~~ lang)\n\n'use strict';\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker, len, params, nextLine, mem, token, markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (pos + 3 > max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n\n len = pos - mem;\n\n if (len < 3) { return false; }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60 /* ` */) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n }\n\n // Since start is found, we can report success here in validation mode\n if (silent) { return true; }\n\n // search end of block\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) { continue; }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) { continue; }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n\n if (pos < max) { continue; }\n\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.sCount[startLine];\n\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// heading (#, ##, ...)\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch, level, tmp, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23/* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || (pos < max && !isSpace(ch))) { return false; }\n\n if (silent) { return true; }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n\n return true;\n};\n","// Horizontal rule\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker, cnt, ch, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x5F/* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 of them\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && !isSpace(ch)) { return false; }\n if (ch === marker) { cnt++; }\n }\n\n if (cnt < 3) { return false; }\n\n if (silent) { return true; }\n\n state.line = startLine + 1;\n\n token = state.push('hr', 'hr', 0);\n token.map = [ startLine, state.line ];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n\n return true;\n};\n","// HTML block\n\n'use strict';\n\n\nvar block_names = require('../common/html_blocks');\nvar HTML_OPEN_CLOSE_TAG_RE = require('../common/html_re').HTML_OPEN_CLOSE_TAG_RE;\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nvar HTML_SEQUENCES = [\n [ /^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i, true ],\n [ /^<!--/, /-->/, true ],\n [ /^<\\?/, /\\?>/, true ],\n [ /^<![A-Z]/, />/, true ],\n [ /^<!\\[CDATA\\[/, /\\]\\]>/, true ],\n [ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\\\s|/?>|$))', 'i'), /^$/, true ],\n [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false ]\n];\n\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i, nextLine, token, lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (!state.md.options.html) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) { break; }\n }\n\n if (i === HTML_SEQUENCES.length) { return false; }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1;\n\n // If we are here - we detected HTML block.\n // Let's roll down till block end.\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) { nextLine++; }\n break;\n }\n }\n }\n\n state.line = nextLine;\n\n token = state.push('html_block', '', 0);\n token.map = [ startLine, nextLine ];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n\n return true;\n};\n","// lheading (---, ===)\n\n'use strict';\n\n\nmodule.exports = function lheading(state, startLine, endLine/*, silent*/) {\n var content, terminate, i, l, token, pos, max, level, marker,\n nextLine = startLine + 1, oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph');\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n //\n // Check for underline in setext header\n //\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = (marker === 0x3D/* = */ ? 1 : 2);\n break;\n }\n }\n }\n }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line - 1 ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","// Lists\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x2B/* + */) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine];\n\n // List marker should have at least 2 chars (digit + dot)\n if (pos + 1 >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) { return -1; }\n\n continue;\n }\n\n // found valid marker\n if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n break;\n }\n\n return -1;\n }\n\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i, l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n nextLine = startLine,\n isTerminatingParagraph = false,\n tight = true;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }\n\n // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n if (state.listIndent >= 0 &&\n state.sCount[nextLine] - state.listIndent >= 4 &&\n state.sCount[nextLine] < state.blkIndent) {\n return false;\n }\n\n // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.sCount[nextLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n }\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[nextLine] + state.tShift[nextLine];\n markerValue = Number(state.src.slice(start, posAfterMarker - 1));\n\n // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n if (isTerminatingParagraph && markerValue !== 1) return false;\n\n } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {\n isOrdered = false;\n\n } else {\n return false;\n }\n\n // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;\n }\n\n // For validation mode we can terminate immediately\n if (silent) { return true; }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // Start list\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n if (markerValue !== 1) {\n token.attrs = [ [ 'start', markerValue ] ];\n }\n\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [ nextLine, 0 ];\n token.markup = String.fromCharCode(markerCharCode);\n\n //\n // Iterate list items\n //\n\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = initial + indentAfterMarker;\n\n // Run subparser & write tokens\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [ nextLine, 0 ];\n if (isOrdered) {\n token.info = state.src.slice(start, posAfterMarker - 1);\n }\n\n // change current state, then restore it after parser subcall\n oldTight = state.tight;\n oldTShift = state.tShift[nextLine];\n oldSCount = state.sCount[nextLine];\n\n // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n\n state.tight = true;\n state.tShift[nextLine] = contentStart - state.bMarks[nextLine];\n state.sCount[nextLine] = offset;\n\n if (contentStart >= max && state.isEmpty(nextLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, nextLine, endLine, true);\n }\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - nextLine) > 1 && state.isEmpty(state.line - 1);\n\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[nextLine] = oldTShift;\n state.sCount[nextLine] = oldSCount;\n state.tight = oldTight;\n\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n\n nextLine = state.line;\n itemLines[1] = nextLine;\n\n if (nextLine >= endLine) { break; }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }\n\n // fail if terminating block found\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n start = state.bMarks[nextLine] + state.tShift[nextLine];\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n }\n\n // Finalize list\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n token.markup = String.fromCharCode(markerCharCode);\n\n listLines[1] = nextLine;\n state.line = nextLine;\n\n state.parentType = oldParentType;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n","// Paragraph\n\n'use strict';\n\n\nmodule.exports = function paragraph(state, startLine, endLine) {\n var content, terminate, i, l, token, oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph');\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph';\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine;\n\n token = state.push('paragraph_open', 'p', 1);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('paragraph_close', 'p', -1);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","'use strict';\n\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }\n\n // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&\n state.src.charCodeAt(pos - 1) !== 0x5C/* \\ */) {\n if (pos + 1 === max) { return false; }\n if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }\n break;\n }\n }\n\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n terminatorRules = state.md.block.ruler.getRules('reference');\n\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x5B /* [ */) {\n return false;\n } else if (ch === 0x5D /* ] */) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A /* \\n */) {\n lines++;\n } else if (ch === 0x5C /* \\ */) {\n pos++;\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n if (!res.ok) { return false; }\n\n href = state.md.normalizeLink(res.str);\n if (!state.md.validateLink(href)) { return false; }\n\n pos = res.pos;\n lines += res.lines;\n\n // save cursor state, we could require to rollback later\n destEndPos = pos;\n destEndLineNo = lines;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n }\n\n // skip trailing spaces until the rest of the line\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n }\n\n // Reference can not terminate anything. This check is for safety only.\n /*istanbul ignore if*/\n if (silent) { return true; }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = { title: title, href: href };\n }\n\n state.parentType = oldParentType;\n\n state.line = startLine + lines + 1;\n return true;\n};\n","// Parser state class\n\n'use strict';\n\nvar Token = require('../token');\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n\n this.src = src;\n\n // link to parser instance\n this.md = md;\n\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n this.sCount = []; // indents for each line (tabs expanded)\n\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n this.bsCount = [];\n\n // block parser variables\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n this.parentType = 'root';\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++; }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n\n if (nesting < 0) this.level--; // closing tag\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n }\n return pos;\n};\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break; }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i, lineIndent, ch, first, last, queue, lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n};\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token;\n\n\nmodule.exports = StateBlock;\n","// GFM table, https://github.github.com/gfm/#tables-extension-\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n return state.src.slice(pos, max);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n isEscaped = false,\n lastPos = 0,\n current = '';\n\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x7c/* | */) {\n if (!isEscaped) {\n // pipe separating cells, '|'\n result.push(current + str.substring(lastPos, pos));\n current = '';\n lastPos = pos + 1;\n } else {\n // escaped pipe, '\\|'\n current += str.substring(lastPos, pos - 1);\n lastPos = pos;\n }\n }\n\n isEscaped = (ch === 0x5c/* \\ */);\n pos++;\n\n ch = str.charCodeAt(pos);\n }\n\n result.push(current + str.substring(lastPos));\n\n return result;\n}\n\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, l, nextLine, columns, columnCount, token,\n aligns, t, tableLines, tbodyLines, oldParentType, terminate,\n terminatorRules, firstCh, secondCh;\n\n // should have at least two lines\n if (startLine + 2 > endLine) { return false; }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) { return false; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }\n\n // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n firstCh = state.src.charCodeAt(pos++);\n if (firstCh !== 0x7C/* | */ && firstCh !== 0x2D/* - */ && firstCh !== 0x3A/* : */) { return false; }\n\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n secondCh = state.src.charCodeAt(pos++);\n if (secondCh !== 0x7C/* | */ && secondCh !== 0x2D/* - */ && secondCh !== 0x3A/* : */ && !isSpace(secondCh)) {\n return false;\n }\n\n // if first character is '-', then second character must not be a space\n // (due to parsing ambiguity with list)\n if (firstCh === 0x2D/* - */ && isSpace(secondCh)) { return false; }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n\n columns = lineText.split('|');\n aligns = [];\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) { return false; }\n if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A/* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) { return false; }\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n // header row will define an amount of columns in the entire table,\n // and align row should be exactly the same (the rest of the rows can differ)\n columnCount = columns.length;\n if (columnCount === 0 || columnCount !== aligns.length) { return false; }\n\n if (silent) { return true; }\n\n oldParentType = state.parentType;\n state.parentType = 'table';\n\n // use 'blockquote' lists for termination because it's\n // the most similar to tables\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [ startLine, 0 ];\n\n token = state.push('thead_open', 'thead', 1);\n token.map = [ startLine, startLine + 1 ];\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ startLine, startLine + 1 ];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.children = [];\n\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) { break; }\n lineText = getLine(state, nextLine).trim();\n if (!lineText) { break; }\n if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n if (nextLine === startLine + 2) {\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [ startLine + 2, 0 ];\n }\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ nextLine, nextLine + 1 ];\n\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n\n token = state.push('td_close', 'td', -1);\n }\n token = state.push('tr_close', 'tr', -1);\n }\n\n if (tbodyLines) {\n token = state.push('tbody_close', 'tbody', -1);\n tbodyLines[1] = nextLine;\n }\n\n token = state.push('table_close', 'table', -1);\n tableLines[1] = nextLine;\n\n state.parentType = oldParentType;\n state.line = nextLine;\n return true;\n};\n","'use strict';\n\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [ 0, 1 ];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n","'use strict';\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n","// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n'use strict';\n\n\nvar arrayReplaceAt = require('../common/utils').arrayReplaceAt;\n\n\nfunction isLinkOpen(str) {\n return /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nmodule.exports = function linkify(state) {\n var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,\n level, htmlLinkLevel, url, fullUrl, urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) { return; }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' ||\n !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n\n htmlLinkLevel = 0;\n\n // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i];\n\n // Skip content of markdown links\n if (currentToken.type === 'link_close') {\n i--;\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n continue;\n }\n\n // Skip content of html tag links\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n if (htmlLinkLevel > 0) { continue; }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n\n text = currentToken.content;\n links = state.md.linkify.match(text);\n\n // Now split string to nodes\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n // forbid escape sequence at the start of the string,\n // this avoids http\\://example.com/ from being linkified as\n // http:<a href=\"//example.com/\">//example.com/</a>\n if (links.length > 0 &&\n links[0].index === 0 &&\n i > 0 &&\n tokens[i - 1].type === 'text_special') {\n links = links.slice(1);\n }\n\n for (ln = 0; ln < links.length; ln++) {\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { continue; }\n\n urlText = links[ln].text;\n\n // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n lastPos = links[ln].lastIndex;\n }\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n }\n\n // replace current node\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n","// Normalize input string\n\n'use strict';\n\n\n// https://spec.commonmark.org/0.29/#line-ending\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\n\nmodule.exports = function normalize(state) {\n var str;\n\n // Normalize newlines\n str = state.src.replace(NEWLINES_RE, '\\n');\n\n // Replace NULL characters\n str = str.replace(NULL_RE, '\\uFFFD');\n\n state.src = str;\n};\n","// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n'use strict';\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - multiplications 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content\n .replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\\u2014')\n // en-dash\n .replace(/(^|\\s)--(?=\\s|$)/mg, '$1\\u2013')\n .replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, '$1\\u2013');\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n\n }\n};\n","// Convert straight quotation marks to typographic ones\n//\n'use strict';\n\n\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = '\\u2019'; /* ’ */\n\n\nfunction replaceAt(str, index, ch) {\n return str.slice(0, index) + ch + str.slice(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,\n isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,\n canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) { break; }\n }\n stack.length = j + 1;\n\n if (token.type !== 'text') { continue; }\n\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) { break; }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = (t[0] === \"'\");\n\n // Find previous character,\n // default to space if it's the beginning of the line\n //\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n }\n\n // Find next character,\n // default to space if it's the end of the line\n //\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // Replace quotes in the middle of punctuation sequence, but not\n // in the middle of the words, i.e.:\n //\n // 1. foo \" bar \" baz - not replaced\n // 2. foo-\"-bar-\"-baz - replaced\n // 3. foo\"bar\"baz - not replaced\n //\n canOpen = isLastPunctChar;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n if (stack[j].level < thisLevel) { break; }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n }\n\n // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(\n tokens[item.token].content, item.pos, openQuote);\n\n pos += closeQuote.length - 1;\n if (item.token === i) { pos += openQuote.length - 1; }\n\n text = token.content;\n max = text.length;\n\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline' ||\n !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n","// Core state object\n//\n'use strict';\n\nvar Token = require('../token');\n\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token;\n\n\nmodule.exports = StateCore;\n","// Join raw text tokens with the rest of the text\n//\n// This is set as a separate rule to provide an opportunity for plugins\n// to run text replacements after text join, but before escape join.\n//\n// For example, `\\:)` shouldn't be replaced with an emoji.\n//\n'use strict';\n\n\nmodule.exports = function text_join(state) {\n var j, l, tokens, curr, max, last,\n blockTokens = state.tokens;\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline') continue;\n\n tokens = blockTokens[j].children;\n max = tokens.length;\n\n for (curr = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text_special') {\n tokens[curr].type = 'text';\n }\n }\n\n for (curr = last = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n }\n};\n","// Process autolinks '<protocol:...>'\n\n'use strict';\n\n\n/*eslint max-len:0*/\nvar EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;\nvar AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)$/;\n\n\nmodule.exports = function autolink(state, silent) {\n var url, fullUrl, token, ch, start, max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n start = state.pos;\n max = state.posMax;\n\n for (;;) {\n if (++pos >= max) return false;\n\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x3C /* < */) return false;\n if (ch === 0x3E /* > */) break;\n }\n\n url = state.src.slice(start + 1, pos);\n\n if (AUTOLINK_RE.test(url)) {\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n if (EMAIL_RE.test(url)) {\n fullUrl = state.md.normalizeLink('mailto:' + url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n return false;\n};\n","// Parse backticks\n\n'use strict';\n\n\nmodule.exports = function backtick(state, silent) {\n var start, max, marker, token, matchStart, matchEnd, openerLength, closerLength,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60/* ` */) { return false; }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n // scan marker length\n while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n marker = state.src.slice(start, pos);\n openerLength = marker.length;\n\n if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n }\n\n matchEnd = pos;\n\n // Nothing found in the cache, scan until the end of the line (or until marker is found)\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n\n // scan marker length\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }\n\n closerLength = matchEnd - matchStart;\n\n if (closerLength === openerLength) {\n // Found matching closer length.\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart)\n .replace(/\\n/g, ' ')\n .replace(/^ (.+) $/, '$1');\n }\n state.pos = matchEnd;\n return true;\n }\n\n // Some different length found, put it in cache as upper limit of where closer can be found\n state.backticks[closerLength] = matchStart;\n }\n\n // Scanned through the end, didn't find anything\n state.backticksScanned = true;\n\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n};\n","// For each opening emphasis-like marker find a matching closing one\n//\n'use strict';\n\n\nfunction processDelimiters(delimiters) {\n var closerIdx, openerIdx, closer, opener, minOpenerIdx, newMinOpenerIdx,\n isOddMatch, lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n if (!max) return;\n\n // headerIdx is the first delimiter of the current (where closer is) delimiter run\n var headerIdx = 0;\n var lastTokenIdx = -2; // needs any value lower than -1\n var jumps = [];\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx];\n\n jumps.push(0);\n\n // markers belong to same delimiter run if:\n // - they have adjacent tokens\n // - AND markers are the same\n //\n if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {\n headerIdx = closerIdx;\n }\n\n lastTokenIdx = closer.token;\n\n // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n closer.length = closer.length || 0;\n\n if (!closer.close) continue;\n\n // Previously calculated lower bounds (previous fails)\n // for each marker, each delimiter length modulo 3,\n // and for whether this closer can be an opener;\n // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [ -1, -1, -1, -1, -1, -1 ];\n }\n\n minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)];\n\n openerIdx = headerIdx - jumps[headerIdx] - 1;\n\n newMinOpenerIdx = openerIdx;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n opener = delimiters[openerIdx];\n\n if (opener.marker !== closer.marker) continue;\n\n if (opener.open && opener.end < 0) {\n\n isOddMatch = false;\n\n // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ?\n jumps[openerIdx - 1] + 1 :\n 0;\n\n jumps[closerIdx] = closerIdx - openerIdx + lastJump;\n jumps[openerIdx] = lastJump;\n\n closer.open = false;\n opener.end = closerIdx;\n opener.close = false;\n newMinOpenerIdx = -1;\n // treat next token as start of run,\n // it optimizes skips in **<...>**a**<...>** pathological case\n lastTokenIdx = -2;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx;\n }\n }\n}\n\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n processDelimiters(state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process *this* and _that_\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i, scanned, token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n continue;\n }\n\n // Process only opening markers\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`\n //\n isStrong = i > 0 &&\n delimiters[i - 1].end === startDelim.end + 1 &&\n // check that first two markers match and adjacent\n delimiters[i - 1].marker === startDelim.marker &&\n delimiters[i - 1].token === startDelim.token - 1 &&\n // check that last two markers are adjacent (we can safely assume they match)\n delimiters[startDelim.end + 1].token === endDelim.token + 1;\n\n ch = String.fromCharCode(startDelim.marker);\n\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process html entity - {, ¯, ", ...\n\n'use strict';\n\nvar entities = require('../common/entities');\nvar has = require('../common/utils').has;\nvar isValidEntityCode = require('../common/utils').isValidEntityCode;\nvar fromCodePoint = require('../common/utils').fromCodePoint;\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nmodule.exports = function entity(state, silent) {\n var ch, code, match, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26/* & */) return false;\n\n if (pos + 1 >= max) return false;\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n\n token = state.push('text_special', '', 0);\n token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) {\n token = state.push('text_special', '', 0);\n token.content = entities[match[1]];\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n\n return false;\n};\n","// Process escaped chars and hardbreaks\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nmodule.exports = function escape(state, silent) {\n var ch1, ch2, origStr, escapedStr, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) return false;\n pos++;\n\n // '\\' at the end of the inline block\n if (pos >= max) return false;\n\n ch1 = state.src.charCodeAt(pos);\n\n if (ch1 === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++;\n // skip leading whitespaces from next line\n while (pos < max) {\n ch1 = state.src.charCodeAt(pos);\n if (!isSpace(ch1)) break;\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n\n escapedStr = state.src[pos];\n\n if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {\n ch2 = state.src.charCodeAt(pos + 1);\n\n if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {\n escapedStr += state.src[pos + 1];\n pos++;\n }\n }\n\n origStr = '\\\\' + escapedStr;\n\n if (!silent) {\n token = state.push('text_special', '', 0);\n\n if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n token.content = escapedStr;\n } else {\n token.content = origStr;\n }\n\n token.markup = origStr;\n token.info = 'escape';\n }\n\n state.pos = pos + 1;\n return true;\n};\n","// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n'use strict';\n\n\nmodule.exports = function fragments_join(state) {\n var curr, last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n","// Process html tags\n\n'use strict';\n\n\nvar HTML_TAG_RE = require('../common/html_re').HTML_TAG_RE;\n\n\nfunction isLinkOpen(str) {\n return /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nmodule.exports = function html_inline(state, silent) {\n var ch, match, max, token,\n pos = state.pos;\n\n if (!state.md.options.html) { return false; }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21/* ! */ &&\n ch !== 0x3F/* ? */ &&\n ch !== 0x2F/* / */ &&\n !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) { return false; }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = match[0];\n\n if (isLinkOpen(token.content)) state.linkLevel++;\n if (isLinkClose(token.content)) state.linkLevel--;\n }\n state.pos += match[0].length;\n return true;\n};\n","// Process \n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( <href> \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( <href> \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n\n state.md.inline.parse(\n content,\n state.md,\n state.env,\n tokens = []\n );\n\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push([ 'title', title ]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process [link](<to> \"stuff\")\n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n token,\n href = '',\n title = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( <href> \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( <href> \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( <href> \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n }\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [ [ 'href', href ] ];\n if (title) {\n attrs.push([ 'title', title ]);\n }\n\n state.linkLevel++;\n state.md.inline.tokenize(state);\n state.linkLevel--;\n\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process links like https://example.org/\n\n'use strict';\n\n\n// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\nvar SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;\n\n\nmodule.exports = function linkify(state, silent) {\n var pos, max, match, proto, link, url, fullUrl, token;\n\n if (!state.md.options.linkify) return false;\n if (state.linkLevel > 0) return false;\n\n pos = state.pos;\n max = state.posMax;\n\n if (pos + 3 > max) return false;\n if (state.src.charCodeAt(pos) !== 0x3A/* : */) return false;\n if (state.src.charCodeAt(pos + 1) !== 0x2F/* / */) return false;\n if (state.src.charCodeAt(pos + 2) !== 0x2F/* / */) return false;\n\n match = state.pending.match(SCHEME_RE);\n if (!match) return false;\n\n proto = match[1];\n\n link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));\n if (!link) return false;\n\n url = link.url;\n\n // invalid link, but still detected by linkify somehow;\n // need to check to prevent infinite loop below\n if (url.length <= proto.length) return false;\n\n // disallow '*' at the end of the link (conflicts with emphasis)\n url = url.replace(/\\*+$/, '');\n\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) return false;\n\n if (!silent) {\n state.pending = state.pending.slice(0, -proto.length);\n\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'linkify';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'linkify';\n token.info = 'auto';\n }\n\n state.pos += url.length - proto.length;\n return true;\n};\n","// Proceess '\\n'\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function newline(state, silent) {\n var pmax, max, ws, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n // Find whitespaces tail of pending chars.\n ws = pmax - 1;\n while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;\n\n state.pending = state.pending.slice(0, ws);\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }\n\n state.pos = pos;\n return true;\n};\n","// Inline parser state\n\n'use strict';\n\n\nvar Token = require('../token');\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n\n // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n this.cache = {};\n\n // List of emphasis-like delimiters for current tag\n this.delimiters = [];\n\n // Stack of delimiter lists for upper level tags\n this._prev_delimiters = [];\n\n // backtick length => last seen position\n this.backticks = {};\n this.backticksScanned = false;\n\n // Counter used to disable inline linkify-it execution\n // inside <a> and markdown links\n this.linkLevel = 0;\n}\n\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n};\n\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n this._prev_delimiters.push(this.delimiters);\n this.delimiters = [];\n token_meta = { delimiters: this.delimiters };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n};\n\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start, lastChar, nextChar, count, can_open, can_close,\n isLastWhiteSpace, isLastPunctChar,\n isNextWhiteSpace, isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start);\n\n // treat beginning of the line as a whitespace\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }\n\n count = pos - start;\n\n // treat end of the line as a whitespace\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n};\n\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token;\n\n\nmodule.exports = StateInline;\n","// ~~strike through~~\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i, scanned, token, len, ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x7E/* ~ */) { return false; }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) { return false; }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n\n state.delimiters.push({\n marker: marker,\n length: 0, // disable \"rule of 3\" length checks meant for emphasis\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i, j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E/* ~ */) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' &&\n state.tokens[endDelim.token - 1].content === '~') {\n\n loneMarkers.push(endDelim.token - 1);\n }\n }\n\n // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n'use strict';\n\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A/* \\n */:\n case 0x21/* ! */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2D/* - */:\n case 0x3A/* : */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) { return false; }\n\n if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n state.pos = pos;\n\n return true;\n};\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n","// Token class\n\n'use strict';\n\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n this.tag = tag;\n\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n this.attrs = null;\n\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n this.map = null;\n\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n this.nesting = nesting;\n\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n this.level = 0;\n\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n this.children = null;\n\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n this.content = '';\n\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n this.markup = '';\n\n /**\n * Token#info -> String\n *\n * Additional information:\n *\n * - Info string for \"fence\" tokens\n * - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n * - The string value of the item marker for ordered-list \"list_item_open\" tokens\n **/\n this.info = '';\n\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n this.meta = null;\n\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n this.block = false;\n\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n this.hidden = false;\n}\n\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) { return -1; }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) { return i; }\n }\n return -1;\n};\n\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [ attrData ];\n }\n};\n\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [ name, value ];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name), value = null;\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n return value;\n};\n\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([ name, value ]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\n\nmodule.exports = Token;\n","\n'use strict';\n\n\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i, ch, cache = decodeCache[exclude];\n if (cache) { return cache; }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n}\n\n\n// Decode percent-encoded string.\n//\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n\n return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {\n var i, l, b1, b2, b3, b4, chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);\n\n if (chr < 0x80) {\n result += '\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);\n\n if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n result += '\\ufffd\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += '\\ufffd\\ufffd\\ufffd\\ufffd';\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += '\\ufffd';\n }\n\n return result;\n });\n}\n\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\n\n\nmodule.exports = decode;\n","\n'use strict';\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n","\n'use strict';\n\n\nmodule.exports = function format(url) {\n var result = '';\n\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n\n return result;\n};\n","'use strict';\n\n\nmodule.exports.encode = require('./encode');\nmodule.exports.decode = require('./decode');\nmodule.exports.format = require('./format');\nmodule.exports.parse = require('./parse');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = [ '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t' ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [ '{', '}', '|', '\\\\', '^', '`' ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = [ '\\'' ].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),\n hostEndingChars = [ '/', '?', '#' ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n /* eslint-disable no-script-url */\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n };\n /* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, slashesDenoteHost) {\n var i, l, lowerProto, hec, slashes,\n rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') { hostEnd--; }\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost(host);\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n }\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function(host) {\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nmodule.exports = urlParse;\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","module.exports=/[\\0-\\x1F\\x7F-\\x9F]/","module.exports=/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/","module.exports=/[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","module.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","'use strict';\n\nexports.Any = require('./properties/Any/regex');\nexports.Cc = require('./categories/Cc/regex');\nexports.Cf = require('./categories/Cf/regex');\nexports.P = require('./categories/P/regex');\nexports.Z = require('./categories/Z/regex');\n","module.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"cta-base\",\n // language=HTML\n `\n\n <section class=\"tjs__cta-base\">\n <div class=\"[[layout.container]]\">\n <slot class=\"heading-style-default\"></slot>\n </div>\n </section>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"cta-form\",\n // language=HTML\n `\n <section class=\"tjs__cta-form\">\n <form data-micx-formmail-preset=\"default\" data-micx-formmail-sent-message=\"Übertragung erfolgreich!\">\n <div class=\"container\">\n <slot class=\"heading-style-default\" data-select=\":scope h2, :scope blockquote\"></slot>\n </div>\n <div class=\"wrapper\">\n <div class=\"container\">\n <div class=\"row g-3\">\n <slot data-select=\".section-hr\" data-replace=\"\"></slot>\n\n </div>\n </div>\n </div>\n\n </form>\n </section>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"footer-base\",\n // language=HTML\n `\n\n <footer class=\"tjs__footer-base [[layout.class]]\">\n <div class=\"[[layout.container]] h-100\">\n <div class=\"row\">\n <slot data-select=\".section-h3 > .content\" data-child-class=\":: col-12 :xl: col\"></slot>\n </div>\n </div>\n <div class=\"subfooter\">\n <slot data-select=\"#minifooter\"></slot>\n </div>\n </footer>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"hero-ribbon\",\n // language=HTML\n `\n\n <div class=\"tjs__hero-ribbon\">\n <slot data-select=\"h2\" class=\"d-none\"></slot>\n <div class=\"tjs__hero-ribbon--wrapper\">\n <div class=\"tjs__hero-ribbon--container [[layout.container]]\">\n <div class=\"row \">\n\n <slot data-select=\".section-h3 > .content\"></slot>\n\n </div>\n </div>\n </div>\n\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"hero-title-small\",\n // language=HTML\n `\n\n <section class=\"tjs-hero-title-small\">\n <div class=\"imagewrapper\">\n <slot class=\"image-slot\" data-select=\"img, .top\"></slot>\n </div>\n\n <slot></slot>\n </section>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"image-gallery1__images-image\",\n // language=HTML\n `\n\n <slot class=\"tjs-image-gallery1__images-image\" data-select=\"img\"></slot>\n\n `);\n\n\nJoda.registerTemplate(\"image-gallery1\",\n // language=HTML\n `\n\n <section class=\"tjs-image-gallery1 container :: mobile :lg: desktop\">\n <slot class=\"tjs-image-gallery1__header\"></slot>\n <slot class=\"tjs-image-gallery1__images\" data-select=\"ul > li\" data-child-layout=\"use: #image-gallery1__images-image\"></slot>\n </section>\n\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"infobox\",\n // language=HTML\n `\n\n <div class=\"tjs-infobox alert bg-soft-[[layout.type]] d-flex mb-3\" tabindex=\"0\">\n <i style=\"width: 48px; height: 48px\" class=\"text-[[layout.type]] me-3 bi [[layout.icon]] h1\"></i>\n <div>\n <slot></slot>\n\n\n </div>\n </div>\n `, {\n type: \"success\", icon: \"bi-info-circle-fill\"\n });\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"navbar-blox\",\n // language=HTML\n `\n\n <div class=\"tjs__navbar-blox\">\n <div class=\"wrapper\">\n <div class=\"firstline\">\n <div class=\"tjs__content [[ layout.container ]]\">\n <slot data-select=\".brand\" data-copy data-replace></slot>\n </div>\n </div>\n\n <div class=\"secondline\" style=\"box-shadow: 0px 1px 2px #00000029;background: white\">\n <div class=\"tjs__main-container [[ layout.container ]]\">\n <div class=\"tjs__row1\">\n\n\n <div class=\"tjs__logo :: mobile :md: \" href=\"/\" aria-label=\"Home\">\n <slot data-select=\".brand\" data-replace></slot>\n </div>\n\n\n\n <div class=\"tjs__row2\">\n <div class=\"tjs__nav-main\" >\n\n <slot data-select=\".nav-bar-main\" data-replace></slot>\n\n </div>\n\n\n <div class=\"tjs__hamburger\">\n <div class=\"use-hamburger :: justify-content-center :lg: text-start\"\n style=\"display: flex; padding-right:20px; align-items: center; justify-content: right; height:100%;width:100%\"></div>\n </div>\n </div>\n\n\n </div>\n <div class=\"sidenav-positioner\">\n <div class=\"sidenav\">\n <slot data-select=\".nav-menu\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </div>\n `);\n","\n// language=HTML\nimport {Joda, JodaDescriptionManager} from \"@leuffen/jodastyle\";\n\nconst html = `\n\n <nav class=\"isl-navbar-switch2 :: mobile :xl:\">\n\n <div class=\"isl-navbar-switch2__top-bar container-xxl\">\n <slot data-select=\"ul.navbar-top\"></slot>\n </div>\n <div class=\"isl-navbar-switch2__nav\">\n <div class=\"container-xl\">\n <div class=\"isl-navbar-switch2__nav--inner\">\n <div class=\"isl-navbar-switch2__nav--logo\">\n <slot data-select=\".brand\"></slot>\n </div>\n <div class=\"isl-navbar-switch2__nav--items :: d-none :xl: d-block\">\n <slot data-select=\"ul.navbar-main\" data-child-class=\"isl-navbar-switch2__nav--items-item\"></slot>\n </div>\n <div class=\"isl-navbar-switch2__nav--mobile-menu :: :xl: d-none\" >\n <div class=\"isl-navbar-switch2__nav--mobile-menu-selector\" onclick=\"this.closest('nav').classList.toggle('sidebar')\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n <aside>\n <div class=\"backdrop\" onclick=\"this.closest('nav').classList.remove('sidebar')\"></div>\n <div class=\"menu\">\n <div class=\"menu-header\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-lg\" viewBox=\"0 0 16 16\" onclick=\"this.closest('nav').classList.remove('sidebar')\">\n <path d=\"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z\"/>\n </svg>\n </div>\n <slot data-select=\"ul.navbar-main\" data-copy=\"1\" data-child-class=\"isl-navbar-switch2__nav--items-item\"></slot>\n </div>\n </aside>\n </nav>\n\n`;\n\nJoda.registerTemplate(\"navbar-switch2\", html);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\n\n\nJoda.registerTemplate(\n \"sec-card-2col\",\n // language=HTML\n `\n\n <section class=\"tjs__sec-card-2col [[layout.class]] :: mobile :lg: desktop\">\n <div class=\"tjs__sec-card-2col--container [[layout.container]]\">\n <slot class=\"title\" data-select=\"img.title || .title > img\"></slot>\n <div class=\"row [[layout.order === 'reverse' ? ':: flex-column-reverse :lg: flex-row-reverse': '']] [[layout.mobile_reverse === 'yes' ? ':: flex-column-reverse :lg:': '']]\">\n <div class=\"tjs__sec-card-2col--col-start heading-style-flex :: col-12 :lg: col-[[layout.cols]]\">\n <slot></slot>\n </div>\n <div class=\"tjs__sec-card-2col--col-end image-side :: col-12 :lg: col-[[12 - layout.cols]] \">\n\n <slot class=\"[[layout.slideshow === true ? 'slideshow' : '']]\" data-select=\".aside || .aside-content || img:not(.keep) || .children > .section-hr.aside\" [[layout.slideshow !== true ? 'data-limit=\"1\"' : '' ]]></slot>\n </div>\n </div>\n </div>\n </section>\n `,\n {\n cols: 6,\n }\n\n);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-card-feature\",\n // language=HTML\n `\n <div class=\"tjs__sec-card-feature [[layout.class]]\">\n <div class=\"container\">\n <div class=\"header_image\">\n <slot data-select=\":scope > .content img, map\" data-replace data-limit=\"1\"></slot>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-lg-6 heading-style-flex text-format p-4 p-lg-5 tjs__section-text\">\n <slot></slot>\n </div>\n <div class=\"col-12 col-lg-6 text-format p-4 p-lg-5\">\n <slot data-select=\".aside || :scope > .children\"></slot>\n </div>\n </div>\n </div>\n </div>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-legal-content\",\n // language=HTML\n `\n\n <section class=\"tjs-legal-content :: mobile :lg:\">\n <div class=\"out-wrapper\">\n <div class=\"container p-0\">\n <div class=\"inner-wrapper :: p-4 :lg: p-5\">\n <div class=\"tjs__section-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </section>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\nJoda.registerTemplate(\"sec-multi-card__item\",\n // language=HTML\n `\n <div class=\"col tjs__sec-multi-card__item\">\n <div class=\"wrapper\">\n\n <slot class=\"tjs__sec-multi-card__item-img [[layout.img_class]]\" data-select=\"img\"></slot>\n\n\n <div class=\"tjs__sec-multi-card__item__body text-format \">\n <slot></slot>\n </div>\n </div>\n\n </div>\n `\n);\nJoda.registerTemplate(\"sec-multi-card\",\n // language=HTML\n `\n\n <section class=\"tjs__sec-multi-card\">\n <div class=\"container header heading-style-default\" style=\"--joda-on-empty-class: d-none;\">\n <slot class=\"tjs__section-text\" data-select=\":scope > .content\"></slot>\n </div>\n <div class=\"container\">\n <slot class=\"row g-3 row-cols-1 row-cols-lg-[[ layout.cols ?? 3 ]]\" data-select=\":scope > .children > *\" data-child-layout=\"use: #sec-multi-card__item\"></slot>\n </div>\n </section>\n `);\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"sec-testimonial-ribbon\",\n // language=HTML\n `\n\n <div class=\"tjs-testimonial-ribbon :: mobile :lg:\">\n <div class=\"x--wrapper\">\n <div class=\"x--container [[layout.container]] :: :xl:\">\n\n <div class=\"x--row\">\n <div class=\"x--image\">\n <slot class=\"\" data-select=\"img\"></slot>\n </div>\n\n <slot class=\"x--text\"></slot>\n\n </div>\n </div>\n </div>\n `);\n","\nimport \"./navbar-blox/navbar-blox\";\nimport \"./navbar-centerlogo/navbar-centerlogo\";\nimport \"./navbar-switch2/navbar-switch2\";\nimport \"./sec-legal-content/sec-legal-content\";\nimport \"./sec-testimonial-ribbon/sec-testimonial-ribbon\";\nimport \"./sec-card-2col/sec-card-2col\";\nimport \"./hero-max/hero-max\";\nimport \"./hero-ribbon/hero-ribbon\";\nimport \"./footer-base/footer-base\";\nimport \"./cta-base/cta-base\";\nimport \"./sec-multi-card/sec-multi-card\";\nimport \"./sec-card-feature/sec-card-feature\";\nimport \"./hero-title-small/hero-title-small\";\nimport \"./cta-form/cta-form\";\nimport \"./image-gallery1/image-gallery1\";\nimport \"./infobox/infobox\";\nimport \"./subheader/subheader\";\n","import {Joda} from \"@leuffen/jodastyle\";\n\n\nJoda.registerTemplate(\"subheader\",\n // language=HTML\n `\n\n <div class=\"tjs-subheader\">\n <div class=\"x-wrapper [[layout.container]]\">\n <div class=\"x-inner\">\n <slot></slot>\n </div>\n </div>\n </div>\n `, {\n container: \"container\"\n });\n","import {JodaDescriptionManager} from \"@leuffen/jodastyle\";\nimport {customElement, ka_sleep, KaCustomElement, template} from \"@kasimirjs/embed\";\n\n// language=HTML\nconst tpl = `\n<div class=\"row\">\n <div class=\"col col-auto\" ka.for=\"let i of desc \">\n <div class=\"card\">\n <div class=\"card-body p-1 m-1\">\n <div class=\"preview\">\n <iframe ka.prop.src=\"'/html?className=' + i.className\"></iframe>\n <div class=\"overlay\"><a ka.prop.href=\"'/html?className=' + i.className\">Show</a></div>\n </div>\n </div>\n </div>\n </div>\n</div>\n`;\n\n\n\n@template(tpl)@customElement(\"showcase-element\")\nclass ShowcaseElement extends KaCustomElement {\n\n constructor() {\n super();\n\n let scope = this.init({\n desc: JodaDescriptionManager.data,\n $on: {\n\n }\n });\n }\n\n async connectedCallback(): Promise<void> {\n await ka_sleep(1);\n\n this.scope.desc = JodaDescriptionManager.data.filter(e => e.category === this.getAttribute(\"data-category\"));\n console.log(\"connectedCallback\", this.scope.desc);\n super.connectedCallback();\n }\n\n async disconnectedCallback(): Promise<void> {\n console.log(\"disconnect\", this);\n this.scope.desc = [];\n super.disconnectedCallback();\n\n }\n}\n","import {customElement, ka_create_element, KaCustomElement, KaCustomWrapper, template} from \"@kasimirjs/embed\";\nimport {ka_session_storage} from \"@kasimirjs/embed\";\nimport {JodaDescriptionManager, Jodasplit, Logger} from \"@leuffen/jodastyle\";\nimport {SidebarWrapper} from \"@kasimirjs/kit-bootstrap\";\n\n\n\n// language=HTML\nconst tpl2 = `\n<div>\n <select ka.options=\"$scope.desc\" ka.bind=\"$scope.className\" style=\"width:100%\"></select>\n <input ka.bind=\"$scope.text\">\n</div>\n`;\n\n\n@customElement(\"switcher-element\")\n@template(tpl2)\nclass SubElement extends KaCustomElement {\n static html;\n constructor() {\n super();\n this.wrap(new SidebarWrapper());\n\n console.log(JodaDescriptionManager.classes);\n let scope = this.init({\n desc: JodaDescriptionManager.classes,\n text: \"test\",\n className: \"test\",\n $on: {\n change: (e) => {\n window.history.pushState({}, \"\", \"?className=\" + scope.className);\n }\n }\n });\n\n let last = \"\";\n setInterval(async () => {\n if (last === window.location.href) {\n return;\n }\n console.log(window.location.href, last)\n last = window.location.href;\n let url = new URL(window.location.href);\n let className = url.searchParams.get(\"className\");\n scope.className = className;\n let daba = document.getElementsByTagName(\"joda-content\")[0];\n\n\n var MarkdownIt = require('markdown-it');\n var markdownItAttrs = require('markdown-it-attrs');\n\n var md = new MarkdownIt({\n html: true // Erlaubt HTML-Input.\n });\n\n md.use(markdownItAttrs);\n\n let desc = JodaDescriptionManager.getDescription(className);\n if (desc === null) {\n newElement.innerHTML = \"No description found\";\n daba.replaceWith(newElement);\n return;\n }\n\n document.body.classList.add(...desc.config.bodyClasses);\n\n\n let content = desc.example ?? \"No example found\"\n if (desc.config.parseMarkdown) {\n content = content.replace(/\\n{:/gm, \"{:\");\n content = md.render(content);\n content = \"<joda-split>\" + content + \"</joda-split>\";\n }\n\n let newElement = document.createElement(\"joda-content\");\n newElement.innerHTML = content;\n\n daba.replaceWith(newElement);\n }, 100);\n\n }\n}\n\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import {JodaDescriptionManager} from \"@leuffen/jodastyle\";\n\nlet html =`\n\n<nav layout=\"use: #navbar-blox\">\n <div class=\"brand\">Logo</div>\n <ul class=\"nav-bar-main\">\n <li><a href=\"#home\">Hello World</a></li>\n </ul>\n <ul class=\"nav-menu\">\n <li><a href=\"#home\">Home</a></li>\n </ul>\n</ul>\n</nav>\n\n# Willkommen bei <br>Dr. med. XXX XXX\n{: layout=\"use: #hero-max\"}\n\n\n\n\nFacharzt für Neurologie <br> Facharzt für Psychiatrie\n\n\n## Hero Section\n{: layout=\"use: #hero-ribbon\"}\n\n\n\n\n### Notfall?\n\nSie erreichen den ärztlichen Notdienst unter der Telefon-Nr: [116 117](tel:+49116117)\n\n### Termine & Rezeptabholung\n\nWir sind eine **Terminpraxis**. Für Terminvergaben, Anfragen und Rezeptabholungen beachten Sie bitte\ndie Öffnungszeiten des Empfangs.\n\n### Öffnungszeiten Empfang\n\n{% include el/openhours.html %}\n\n\n## Über mich\n{: layout=\"use: #sec-card-2col\"}\n\n> Dr. med. X. Kelloggs\n\n{: style=\"padding: 4rem\"}\n\n### Werdegang\n\nBerufstätigkeit in der Neurologie, Psychiatrie, Inneren Medizin und Orthopädie.\n\nZuletzt klinisch tätig als Oberarzt einer neurologischen Rehaklinik. Seit 2001 tätig als niedergelassener Neurologe\nund Psychiater.\n\nFocus Empfehlung: 2017, 2018, 2019\n\n\n\n## Medizinischer Schwerpunkt\n{: layout=\"use: #sec-multi-card; cols:2\"}\n\n### Neurologie\n\nInteressengebiete:\n\n- Schlaganfall und Arteriosklerose\n- Parkinsonerkrankung\n- Gedächtnisstörung\n- Prävention und Ernährungsmedizin bei neurologischen Erkrankungen\n\n*Bitte beachten: Bei speziellen Medikamenten für Multiple Sklerose und Myasthenie wenden Sie sich bitte an ein\nspezialisiertes neurologisches Zentrum.*\n\nApparative Untersuchungen:\n\n- Farbduplexsonographie der hirnversorgenden Halsgefäße\n- Messung der Nervenleitgeschwindigkeit bei Verdacht auf Karpaltunnelsyndrom, Polyneuropathie und Ulnaris-Neuropathie\n\nBeispiele für häufigere Beschwerden: Schwäche und Lähmung. Taubheit und Missempfindungen. Schwindel,\nGleichgewichtsstörungen und Gangstörungen. Bewusstseinsstörung. Zittern. Kopfschmerzen und sonstige Schmerzen. Änderung des\nDenkvermögens und der Sprache.\n\n\n### Psychiatrie\n\n- Psychiatrische Diagnostik und Behandlung\n- Interessengebiet: Prävention und Ernährungsmedizin bei psychischen Erkrankungen\n\nBeispiele für häufigere Beschwerden: Anspannung, Unruhe, Reizbarkeit, aufdrängende Gedanken, Grübeln,\nVermeidung, Ängste, Panikanfälle. Vegetative Beschwerden wie Herzklopfen, Atembeschwerden, Schwitzen, Schwindel, usw. Schlafstörungen.\nÄnderung der Stimmung, des Antriebs, des Denkvermögens, der Wahrnehmung und des Verhaltens.\n\n---\n{: .hr}\n\nBei Vorliegen einer Notlage und akuter Beschwerden: wenden Sie sich bitte direkt an die Aufnahme einer\nKlinik. Empfehlung für weitere Informationen: [www.neurologen-und-psychiater-im-netz.org](https://www.neurologen-und-psychiater-im-netz.org)\n\n\n\n\n\n\n\n\n## Kontakt aufnehmen\n{: layout=\"use: #cta-base\"}\n\n[Kontakt](/kontakt)\n\n\n`;\n\nJodaDescriptionManager.addClass(\"page\",\n \"theme1\",\n \"theme1\",\n html,\n []\n ,\n {\n bodyClasses: [\"theme1\"]\n }\n);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nimport \"../index\";\nimport \"../index.dev\";\nimport \"./SwitcherElement\";\n\nimport \"./ShowcaseElement\";\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|