@emailmaker/emailmaker 1.0.111 → 1.0.113

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.
Files changed (226) hide show
  1. package/CHANGELOG.en.md +11 -0
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +133 -100
  4. package/asset-manifest.json +202 -195
  5. package/emailmaker-esm.js +1 -1
  6. package/emailmaker.d.ts +7 -0
  7. package/emailmaker.js +1 -1
  8. package/iframe/429.js +1 -1
  9. package/iframe/766.js +1 -1
  10. package/iframe/css/sandbox-darktheme.css +23 -7
  11. package/iframe/css/sandbox.css +24 -12
  12. package/iframe/iframe-eblock.0cb76e5c188260f00df6.html +1 -0
  13. package/iframe/iframe.0cb76e5c188260f00df6.html +1 -0
  14. package/iframe/index.html +1 -1
  15. package/iframe/js/525.b23a9b7e.js +1 -0
  16. package/iframe/js/667.43e50d38.js +1 -0
  17. package/iframe/js/882.d1c8c97b.js +1 -0
  18. package/iframe/sandbox-eblock.js +1 -1
  19. package/js/amplitude.min.js +8 -10
  20. package/js/browser-image-compression.js +3054 -1
  21. package/js/sourcebuster.min.js +0 -1
  22. package/package.json +1 -1
  23. package/static/css/{8778.3f22f159.chunk.css → 2557.2ede4a53.chunk.css} +2 -2
  24. package/static/css/{6310.ce3b451b.chunk.css → 6310.49bbc429.chunk.css} +2 -2
  25. package/static/css/9617.36fe0d8e.chunk.css +2 -0
  26. package/static/css/main.dec6a584.css +2 -0
  27. package/static/js/1241.e3e56034.js +2 -0
  28. package/static/js/1330.ef930318.js +2 -0
  29. package/static/js/1332.0cb959b4.js +2 -0
  30. package/static/js/1377.2c61acc1.js +2 -0
  31. package/static/js/1454.84d2c0a8.js +2 -0
  32. package/static/js/1502.8a2f6e6b.js +2 -0
  33. package/static/js/1510.e74cce46.js +2 -0
  34. package/static/js/1626.3320a5f3.js +2 -0
  35. package/static/js/1640.27be7178.js +2 -0
  36. package/static/js/1788.d2bc729b.js +2 -0
  37. package/static/js/{1807.edd17ae4.js → 1807.0ba6ab90.js} +3 -3
  38. package/static/js/1872.43ec6943.js +2 -0
  39. package/static/js/{1902.a37551ca.js → 1902.f48fb9a9.js} +2 -2
  40. package/static/js/{1940.18a1ab22.js → 1940.524f0244.js} +3 -3
  41. package/static/js/197.6d76c202.js +2 -0
  42. package/static/js/2066.c62582aa.js +2 -0
  43. package/static/js/2114.e385ca42.js +2 -0
  44. package/static/js/2139.775a0a57.js +3 -0
  45. package/static/js/2408.c5572548.js +2 -0
  46. package/static/js/2438.712814b0.js +2 -0
  47. package/static/js/2491.d65e25c3.js +3 -0
  48. package/static/js/2491.d65e25c3.js.LICENSE.txt +163 -0
  49. package/static/js/2557.c5dfa9a5.js +2 -0
  50. package/static/js/2827.36a23b69.js +2 -0
  51. package/static/js/284.efb80df6.js +2 -0
  52. package/static/js/2844.54191136.js +2 -0
  53. package/static/js/290.b615a90b.js +2 -0
  54. package/static/js/2917.a6e819bf.js +2 -0
  55. package/static/js/2988.2496986e.js +2 -0
  56. package/static/js/327.31ca6e0d.js +3 -0
  57. package/static/js/327.31ca6e0d.js.LICENSE.txt +29 -0
  58. package/static/js/3302.84e32b62.js +2 -0
  59. package/static/js/3411.311c6ae0.js +2 -0
  60. package/static/js/3624.c30f383e.js +2 -0
  61. package/static/js/3628.0deca530.js +3 -0
  62. package/static/js/3711.102a68ee.js +2 -0
  63. package/static/js/3816.8f941c79.js +2 -0
  64. package/static/js/3914.72124e24.js +2 -0
  65. package/static/js/4425.47aa4461.js +2 -0
  66. package/static/js/4607.f88cf27a.js +2 -0
  67. package/static/js/4686.180d7a12.js +2 -0
  68. package/static/js/4702.eb86f466.js +2 -0
  69. package/static/js/4813.b282e8cb.js +2 -0
  70. package/static/js/4823.ddb0914d.js +2 -0
  71. package/static/js/494.447cdadd.js +2 -0
  72. package/static/js/5108.b3eccf14.js +2 -0
  73. package/static/js/5261.8499aaa1.js +2 -0
  74. package/static/js/5322.413feb5a.js +2 -0
  75. package/static/js/5432.a1089dad.js +2 -0
  76. package/static/js/5466.50904f4e.js +2 -0
  77. package/static/js/5641.7f2999ab.js +3 -0
  78. package/static/js/{2076.a35d6556.js.LICENSE.txt → 5641.7f2999ab.js.LICENSE.txt} +0 -9
  79. package/static/js/5653.016de6aa.js +2 -0
  80. package/static/js/566.a759ee99.js +3 -0
  81. package/static/js/566.a759ee99.js.LICENSE.txt +20 -0
  82. package/static/js/5827.9dcc9443.js +2 -0
  83. package/static/js/5862.faad8f74.js +2 -0
  84. package/static/js/5864.6033ee51.js +2 -0
  85. package/static/js/5902.33cce976.js +2 -0
  86. package/static/js/5980.d73d6b51.js +2 -0
  87. package/static/js/6033.eb6097f0.js +2 -0
  88. package/static/js/6135.3b810692.js +2 -0
  89. package/static/js/6310.cafc9a48.js +2 -0
  90. package/static/js/6418.59058d0d.js +2 -0
  91. package/static/js/6428.57a30f96.js +2 -0
  92. package/static/js/6552.271c84f5.js +2 -0
  93. package/static/js/6618.feb19bcb.js +2 -0
  94. package/static/js/6764.2a43d6d5.js +2 -0
  95. package/static/js/6832.2e6f8499.js +2 -0
  96. package/static/js/7234.d3966e99.js +2 -0
  97. package/static/js/7288.efae06f4.js +2 -0
  98. package/static/js/737.b395c2b2.js +2 -0
  99. package/static/js/7426.1de30709.js +2 -0
  100. package/static/js/7673.2db4eeee.js +3 -0
  101. package/static/js/{5255.9c7c7b3d.js.LICENSE.txt → 7673.2db4eeee.js.LICENSE.txt} +9 -0
  102. package/static/js/77.9fcf0459.js +2 -0
  103. package/static/js/7974.db4992e0.js +2 -0
  104. package/static/js/8013.2ada21e8.js +2 -0
  105. package/static/js/8466.d3339ec9.js +2 -0
  106. package/static/js/8534.a012d026.js +2 -0
  107. package/static/js/8580.1528b456.js +2 -0
  108. package/static/js/8590.3e646adc.js +2 -0
  109. package/static/js/8682.b39ae089.js +2 -0
  110. package/static/js/8796.27f3a38e.js +2 -0
  111. package/static/js/8839.75fb5ef2.js +2 -0
  112. package/static/js/912.42ae1bb7.js +3 -0
  113. package/static/js/9169.a1d48107.js +2 -0
  114. package/static/js/9200.f1b7e119.js +2 -0
  115. package/static/js/9487.6209c75a.js +3 -0
  116. package/static/js/9487.6209c75a.js.LICENSE.txt +24 -0
  117. package/static/js/9508.4fb40b12.js +2 -0
  118. package/static/js/9578.eb817052.js +2 -0
  119. package/static/js/9617.a3001b3b.js +3 -0
  120. package/static/js/9716.e99deec1.js +2 -0
  121. package/static/js/emailmaker_core.b7120b7c.js +3 -0
  122. package/iframe/iframe-eblock.dfbe43189ad0132f9332.html +0 -1
  123. package/iframe/iframe.dfbe43189ad0132f9332.html +0 -1
  124. package/iframe/js/174.65a3f00f.js +0 -1
  125. package/iframe/js/525.590fe008.js +0 -1
  126. package/iframe/js/882.f76853fe.js +0 -1
  127. package/static/css/3934.8026f9d8.chunk.css +0 -2
  128. package/static/css/main.4042dfaa.css +0 -2
  129. package/static/js/1117.2e051755.js +0 -3
  130. package/static/js/1117.2e051755.js.LICENSE.txt +0 -40
  131. package/static/js/1157.1e6829d5.js +0 -3
  132. package/static/js/1157.1e6829d5.js.LICENSE.txt +0 -9
  133. package/static/js/1241.9f7c977b.js +0 -2
  134. package/static/js/1330.607183c7.js +0 -2
  135. package/static/js/1332.3eba834b.js +0 -2
  136. package/static/js/1377.b486b1f4.js +0 -2
  137. package/static/js/1454.23356a65.js +0 -2
  138. package/static/js/1502.6be06fc7.js +0 -2
  139. package/static/js/1510.32a77efc.js +0 -2
  140. package/static/js/1626.0cd4dd3f.js +0 -2
  141. package/static/js/1640.7ae88653.js +0 -2
  142. package/static/js/1788.e7e85733.js +0 -2
  143. package/static/js/1872.610556e1.js +0 -2
  144. package/static/js/197.64f9fd6b.js +0 -2
  145. package/static/js/2066.a4cfddd1.js +0 -2
  146. package/static/js/2076.a35d6556.js +0 -3
  147. package/static/js/2114.dff67863.js +0 -2
  148. package/static/js/2139.fe670ca3.js +0 -3
  149. package/static/js/2408.8dcea713.js +0 -2
  150. package/static/js/2438.02617e55.js +0 -2
  151. package/static/js/2827.e02551c9.js +0 -2
  152. package/static/js/284.89002158.js +0 -2
  153. package/static/js/2844.4c02df45.js +0 -2
  154. package/static/js/290.3b771060.js +0 -2
  155. package/static/js/2917.f75d7ce1.js +0 -2
  156. package/static/js/2988.6d43f35a.js +0 -2
  157. package/static/js/3302.9b320bc9.js +0 -2
  158. package/static/js/3411.69f4008b.js +0 -2
  159. package/static/js/3624.a7076f34.js +0 -2
  160. package/static/js/3628.d51bff41.js +0 -3
  161. package/static/js/3711.d621dbad.js +0 -2
  162. package/static/js/3816.bf684fe1.js +0 -2
  163. package/static/js/3914.c63f1b85.js +0 -2
  164. package/static/js/3934.0fa3a225.js +0 -3
  165. package/static/js/4425.39579a63.js +0 -2
  166. package/static/js/4607.25f2d561.js +0 -2
  167. package/static/js/4686.6a800b56.js +0 -2
  168. package/static/js/4702.de98cbd5.js +0 -2
  169. package/static/js/4813.ca2fe39e.js +0 -2
  170. package/static/js/4823.d4ba65be.js +0 -2
  171. package/static/js/494.87c48e86.js +0 -2
  172. package/static/js/5108.473a7fe1.js +0 -2
  173. package/static/js/5255.9c7c7b3d.js +0 -3
  174. package/static/js/5261.3e64116f.js +0 -2
  175. package/static/js/5279.3b38adf9.js +0 -2
  176. package/static/js/5322.ce259c32.js +0 -2
  177. package/static/js/5466.a0f769cb.js +0 -2
  178. package/static/js/5612.37f3811e.js +0 -3
  179. package/static/js/5612.37f3811e.js.LICENSE.txt +0 -30
  180. package/static/js/5653.5f06277c.js +0 -2
  181. package/static/js/5827.6555a26a.js +0 -2
  182. package/static/js/5862.225d9aac.js +0 -2
  183. package/static/js/5864.340bc721.js +0 -2
  184. package/static/js/5902.73cb2cc4.js +0 -2
  185. package/static/js/5980.fbc691ed.js +0 -2
  186. package/static/js/6033.71847c1c.js +0 -2
  187. package/static/js/6135.ceb22131.js +0 -2
  188. package/static/js/6310.27dbb05e.js +0 -2
  189. package/static/js/6418.5c3bf780.js +0 -2
  190. package/static/js/6428.8b233458.js +0 -2
  191. package/static/js/6552.9d811323.js +0 -2
  192. package/static/js/6618.8866f1fa.js +0 -2
  193. package/static/js/6764.9e4a7f5f.js +0 -2
  194. package/static/js/6832.4c4f3da7.js +0 -2
  195. package/static/js/7288.170ea51b.js +0 -2
  196. package/static/js/737.fae14b35.js +0 -2
  197. package/static/js/7394.ff9436a5.js +0 -3
  198. package/static/js/7426.eaa2cbe4.js +0 -2
  199. package/static/js/77.6ea8ad5d.js +0 -2
  200. package/static/js/7974.5b71f208.js +0 -2
  201. package/static/js/8466.ae622785.js +0 -2
  202. package/static/js/8534.10b79ff1.js +0 -2
  203. package/static/js/8559.e923c875.js +0 -2
  204. package/static/js/8580.dd55156b.js +0 -2
  205. package/static/js/8590.2779de33.js +0 -2
  206. package/static/js/8682.ec99bbfe.js +0 -2
  207. package/static/js/8778.f3616411.js +0 -2
  208. package/static/js/8796.a6838d71.js +0 -2
  209. package/static/js/8839.25cace14.js +0 -2
  210. package/static/js/9169.dee65ca6.js +0 -2
  211. package/static/js/9200.63433716.js +0 -2
  212. package/static/js/9508.a68ced7b.js +0 -2
  213. package/static/js/9716.fb4af6bc.js +0 -2
  214. package/static/js/emailmaker_core.5b5a28fd.js +0 -3
  215. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +0 -1
  216. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +0 -1
  217. /package/iframe/js/{525.590fe008.js.LICENSE.txt → 525.b23a9b7e.js.LICENSE.txt} +0 -0
  218. /package/iframe/js/{174.65a3f00f.js.LICENSE.txt → 667.43e50d38.js.LICENSE.txt} +0 -0
  219. /package/iframe/js/{882.f76853fe.js.LICENSE.txt → 882.d1c8c97b.js.LICENSE.txt} +0 -0
  220. /package/static/js/{1807.edd17ae4.js.LICENSE.txt → 1807.0ba6ab90.js.LICENSE.txt} +0 -0
  221. /package/static/js/{1940.18a1ab22.js.LICENSE.txt → 1940.524f0244.js.LICENSE.txt} +0 -0
  222. /package/static/js/{2139.fe670ca3.js.LICENSE.txt → 2139.775a0a57.js.LICENSE.txt} +0 -0
  223. /package/static/js/{3628.d51bff41.js.LICENSE.txt → 3628.0deca530.js.LICENSE.txt} +0 -0
  224. /package/static/js/{3934.0fa3a225.js.LICENSE.txt → 912.42ae1bb7.js.LICENSE.txt} +0 -0
  225. /package/static/js/{7394.ff9436a5.js.LICENSE.txt → 9617.a3001b3b.js.LICENSE.txt} +0 -0
  226. /package/static/js/{emailmaker_core.5b5a28fd.js.LICENSE.txt → emailmaker_core.b7120b7c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[8580],{5973:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLParser=t.Reporter=t.HTMLRules=t.HTMLHint=void 0;const r=n(55200);t.HTMLParser=r.default;const i=n(12835);t.Reporter=i.default;const o=n(27492);t.HTMLRules=o;function s(e,t){return new Array(e+1).join(t||" ")}t.HTMLHint=new class{constructor(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}addRule(e){this.rules[e.id]=e}verify(e,t=this.defaultRuleset){0===Object.keys(t).length&&(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,(e,n)=>(n.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,(e,n,r)=>(t[n]=!(void 0!==r&&r.length>0)||JSON.parse(r),"")),""));const n=this.parseDisableComments(e),o=new r.default,s=new i.default(e,t,n),a=this.rules;let l;for(const r in t)l=a[r],void 0!==l&&!1!==t[r]&&l.init(o,s,t[r]);return o.parse(e),s.messages}parseDisableComments(e){var t;const n={},r=e.split(/\r?\n/),i=/<!--\s*htmlhint-(disable|enable)(?:-next-line)?(?:\s+([^\r\n]+?))?\s*-->/gi,o=[];let s;for(;null!==(s=i.exec(e));){const n=e.substring(0,s.index).split(/\r?\n/).length,r=s[1].toLowerCase(),i=s[0].includes("-next-line"),a=null===(t=s[2])||void 0===t?void 0:t.trim();o.push({line:n,command:r,isNextLine:i,rulesStr:a})}let a=null,l=!1;for(let c=0;c<r.length;c++){const e=c+1,t=o.find(t=>t.line===e);if(t)if("disable"===t.command)if(t.isNextLine){const r=e+1;if(t.rulesStr){const e=t.rulesStr.split(/\s+/).filter(e=>e.length>0);n[r]||(n[r]={}),n[r].rules||(n[r].rules=new Set),e.forEach(e=>n[r].rules.add(e))}else n[r]||(n[r]={}),n[r].all=!0}else if(t.rulesStr){const e=t.rulesStr.split(/\s+/).filter(e=>e.length>0);a=new Set(e),l=!1}else a=null,l=!0;else"enable"===t.command&&(a=null,l=!1);(null!==a||l)&&(n[e]||(n[e]={}),l&&!0!==n[e].all?n[e].all=!0:a&&(n[e].rules||(n[e].rules=new Set),a.forEach(t=>n[e].rules.add(t))))}return n}format(e,t={}){const n=[],r={white:"",grey:"",red:"",reset:""};t.colors&&(r.white="\x1b[37m",r.grey="\x1b[90m",r.red="\x1b[31m",r.reset="\x1b[39m");const i=t.indent||0;return e.forEach(e=>{let t=e.evidence;const o=e.line,a=e.col,l=t.length;let c=a>41?a-40:1,u=t.length>a+60?a+60:l;a<41&&(u+=40-a+1),t=t.replace(/\t/g," ").substring(c-1,u),c>1&&(t=`...${t}`,c-=3),u<l&&(t+="..."),n.push(`${r.white+s(i)}L${o} |${r.grey}${t}${r.reset}`);let d=a-c;const h=t.substring(0,d).match(/[^\u0000-\u00ff]/g);null!==h&&(d+=h.length),n.push(`${r.white+s(i)+s(String(o).length+3+d)}^ ${r.red}${e.message} (${e.rule.id})${r.reset}`)}),n}},Object.values(o).forEach(e=>{t.HTMLHint.addRule(e)})},55200:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}makeMap(e){const t={},n=e.split(",");for(let r=0;r<n.length;r++)t[n[r]]=!0;return t}parse(e){const t=this._mapCdataTags,n=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,r=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,i=/\r?\n/g;let o,s,a,l,c,u,d=0,h=null,f=[],p=0,g=0,m=1;const b=this._arrBlocks;this.fire("start",{pos:0,line:1,col:1});const y=()=>{const e=l.find(e=>"type"===e.name)||{value:""};return t[a]&&-1===e.value.indexOf("text/ng-template")},w=(e,t,n,r)=>{const o=n-g+1;for(void 0===r&&(r={}),r.raw=t,r.pos=n,r.line=m,r.col=o,b.push(r),this.fire(e,r);i.exec(t);)m++,g=n+i.lastIndex};for(;o=n.exec(e);)if(s=o.index,s>d&&(u=e.substring(d,s),h?f.push(u):w("text",u,d)),d=n.lastIndex,!(a=o[1])||(h&&a===h&&(u=f.join(""),w("cdata",u,p,{tagName:h,attrs:c}),h=null,c=void 0,f=[]),h))if(h)f.push(o[0]);else if(a=o[4]){l=[];const e=o[5];let t,n=0;for(;t=r.exec(e);){const e=t[1],r=t[2]?t[2]:t[4]?t[4]:"",i=t[3]?t[3]:t[5]?t[5]:t[6]?t[6]:"";l.push({name:e,value:i,quote:r,index:t.index,raw:t[0]}),n+=t[0].length}n===e.length?(w("tagstart",o[0],s,{tagName:a,attrs:l,close:o[6]}),y()&&(h=a,c=l.concat(),f=[],p=d)):w("text",o[0],s)}else(o[2]||o[3])&&w("comment",o[0],s,{content:o[2]||o[3],long:!!o[2]});else w("tagend",o[0],s,{tagName:a});e.length>d&&(u=e.substring(d,e.length),w("text",u,d)),this.fire("end",{pos:d,line:m,col:e.length-g+1})}addListener(e,t){const n=this._listeners,r=e.split(/[,\s]/);let i;for(let o=0,s=r.length;o<s;o++)i=r[o],void 0===n[i]&&(n[i]=[]),n[i].push(t)}fire(e,t){void 0===t&&(t={}),t.type=e;let n=[];const r=this._listeners[e],i=this._listeners.all;void 0!==r&&(n=n.concat(r)),void 0!==i&&(n=n.concat(i));const o=this.lastEvent;null!==o&&(delete o.lastEvent,t.lastEvent=o),this.lastEvent=t;for(let s=0,a=n.length;s<a;s++)n[s].call(this,t)}removeListener(e,t){const n=this._listeners[e];if(void 0!==n)for(let r=0,i=n.length;r<i;r++)if(n[r]===t){n.splice(r,1);break}}fixPos(e,t){const n=e.raw.substr(0,t).split(/\r?\n/),r=n.length-1;let i,o=e.line;return r>0?(o+=r,i=n[r].length+1):i=e.col+t,{line:o,col:i}}getMapAttrs(e){const t={};let n;for(let r=0,i=e.length;r<i;r++)n=e[r],t[n.name]=n.value;return t}}},12835:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n={}){this.html=e,this.lines=e.split(/\r?\n/);const r=/\r?\n/.exec(e);this.brLen=null!==r?r[0].length:0,this.ruleset=t,this.messages=[],this.disabledRulesMap=n}info(e,t,n,r,i){this.report("info",e,t,n,r,i)}warn(e,t,n,r,i){this.report("warning",e,t,n,r,i)}error(e,t,n,r,i){this.report("error",e,t,n,r,i)}report(e,t,n,r,i,o){const s=this.disabledRulesMap[n];if(s){if(!0===s.all)return;if(s.rules&&s.rules.has(i.id))return}const a=this.lines,l=this.brLen;let c="",u=0;for(let d=n-1,h=a.length;d<h&&(c=a[d],u=c.length,r>u&&n<h);d++)n++,1!==(r-=u)&&(r-=l);this.messages.push({type:e,message:t,raw:o,evidence:c,line:n,col:r,rule:{id:i.id,description:i.description,link:`https://htmlhint.com/rules/${i.id}`}})}}},17277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;let s;"img"!==r||"alt"in i?("area"===r&&"href"in i||"input"===r&&"image"===i.type)&&("alt"in i&&""!==i.alt||(s="area"===r?"area[href]":"input[type=image]",t.warn(`The alt attribute of ${s} must have a value.`,n.line,o,this,n.raw))):t.warn("An alt attribute must be present on <img> elements.",n.line,o,this,n.raw)})}}},89565:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPath","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","onBlur","onChange","onClick","onFocus","onKeyUp","onLoad","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"];function r(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};const n=t[0],r=t[t.length-1],i=t[t.length-2],o="/"===n&&("/"===r||"/"===i&&"i"===r);if(o){return o&&"i"===r?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e)}return e===t}t.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init(e,t,i){const o=(Array.isArray(i)?i:[]).concat(n);e.addListener("tagstart",e=>{const n=e.attrs;let i;const s=e.col+e.tagName.length+1;for(let a=0,l=n.length;a<l;a++){i=n[a];const l=i.name;o.find(e=>r(l,e))||l===l.toLowerCase()||t.error(`The attribute name of [ ${l} ] must be in lowercase.`,e.line,s+i.index,this,i.raw)}})}}},86308:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r,i;const o=e.col+e.tagName.length+1,s={};for(let a=0,l=n.length;a<l;a++)r=n[a],i=r.name,!0===s[i]&&t.error(`Duplicate of attribute name [ ${r.name} ] was found.`,e.line,o+r.index,this,r.raw),s[i]=!0})}}},49734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init(e,t,n){const r=Array.isArray(n)?n:[];e.addListener("tagstart",e=>{const n=e.attrs,i=e.col+e.tagName.length+1;for(let o=0;o<n.length;o++)if(-1===r.indexOf(n[o].name)){const r=/(\s*)=(\s*)/.exec(n[o].raw.trim());!r||0===r[1].length&&0===r[2].length||t.error(`The attribute '${n[o].name}' must not have spaces between the name and value.`,e.line,i+n[o].index,this,n[o].raw)}})}}},53027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init(e,t){const n={},r=["class","id","name","src","for","type","rel","href","value","title","alt","role"];for(let i=0;i<r.length;i++)n[r[i]]=i;e.addListener("tagstart",e=>{const r=e.attrs,i=[];for(let t=0;t<r.length;t++)i.push(r[t].name);const o=JSON.stringify(i);i.sort((e,t)=>void 0!==n[e]?void 0!==n[t]?n[e]-n[t]:-1:e.startsWith("data-")?t.startsWith("data-")?e.localeCompare(t):1:void 0!==n[t]?1:t.startsWith("data-")?-1:e.localeCompare(t)),o!==JSON.stringify(i)&&t.error(`Inaccurate order ${o} should be in hierarchy ${JSON.stringify(i)} `,e.line,e.col,this,e.raw)})}}},52548:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1,o=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;let s;for(let a=0,l=n.length;a<l;a++)if(r=n[a],s=o.exec(r.value),null!==s){const n=escape(s[0]).replace(/%u/,"\\u").replace(/%/,"\\x");t.warn(`The value of attribute [ ${r.name} ] cannot contain an unsafe char [ ${n} ].`,e.line,i+r.index,this,r.raw)}})}}},55429:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],(""!==r.value&&'"'!==r.quote||""===r.value&&"'"===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in double quotes.`,e.line,i+r.index,this,r.raw)})}}},13220:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-no-duplication",description:"Class attributes should not contain duplicate values. Other attributes can be checked via configuration.",init(e,t,n){const r=Array.isArray(n)?n:["class"];e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++){i=n[s];const a=i.name.toLowerCase();if(!r.includes(a))continue;if(!i.value||!/\s/.test(i.value))continue;const l=i.value.trim().split(/\s+/),c={};for(const n of l){if(n&&!0===c[n]){t.error(`Duplicate value [ ${n} ] was found in attribute [ ${i.name} ].`,e.line,o+i.index,this,i.raw);break}c[n]=!0}}})}}},45189:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-not-empty",description:"All attributes must have values.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],""===r.quote&&""===r.value&&t.warn(`The attribute [ ${r.name} ] must have a value.`,e.line,i+r.index,this,r.raw)})}}},79302:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],(""!==r.value&&"'"!==r.quote||""===r.value&&'"'===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in single quotes.`,e.line,i+r.index,this,r.raw)})}}},20027:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init(e,t,n){const r=Array.isArray(n)?n:[];e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;n.forEach(n=>{i=n;const s=n.name;-1===r.indexOf(s)&&(n.value.trim()!==n.value&&t.error(`The attributes of [ ${s} ] must not have leading or trailing whitespace.`,e.line,o+i.index,this,i.raw),n.value.replace(/ +(?= )/g,"")!==n.value&&t.error(`The attributes of [ ${s} ] must be separated by only one space.`,e.line,o+i.index,this,i.raw))})})}}},23373:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"button-type-require",description:'The type attribute of a <button> element must be present with a valid value: "button", "submit", or "reset".',init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase();if("button"===r){const i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if(void 0===i.type)t.warn("The type attribute must be present on <button> elements.",n.line,o,this,n.raw);else{const e=i.type.toLowerCase();"button"!==e&&"submit"!==e&&"reset"!==e&&t.warn('The type attribute of <button> must have a valid value: "button", "submit", or "reset".',n.line,o,this,n.raw)}}})}}},55101:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-first",description:"Doctype must be declared first (comments and whitespace allowed before DOCTYPE).",init(e,t){let n=!1,r=!1;const i=o=>{if(!("start"===o.type||"text"===o.type&&/^\s*$/.test(o.raw))&&!n)return"comment"===o.type&&!1===o.long&&/^DOCTYPE\s+/i.test(o.content)?(n=!0,void(r&&t.error("Doctype must be declared before any non-comment content.",o.line,o.col,this,o.raw))):void("comment"!==o.type&&(r=!0,t.error("Doctype must be declared before any non-comment content.",o.line,o.col,this,o.raw),e.removeListener("all",i)))};e.addListener("all",i)}}},90179:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init(e,t){const n=e=>{!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,this,e.raw)},r=()=>{e.removeListener("comment",n),e.removeListener("tagstart",r)};e.addListener("all",n),e.addListener("tagstart",r)}}},47320:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"empty-tag-not-self-closed",description:"Empty tags must not use self closed syntax.",init(e,t){const n=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const r=e.tagName.toLowerCase();void 0!==n[r]&&e.close&&t.error(`The empty tag : [ ${r} ] must not use self closed syntax.`,e.line,e.col,this,e.raw)})}}},16650:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"form-method-require",description:'The method attribute of a <form> element must be present with a valid value: "get", "post", or "dialog".',init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase();if("form"===r){const i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if(void 0===i.method)t.warn("The method attribute must be present on <form> elements.",n.line,o,this,n.raw);else{const e=i.method.toLowerCase();"get"!==e&&"post"!==e&&"dialog"!==e&&t.warn('The method attribute of <form> must have a valid value: "get", "post", or "dialog".',n.line,o,this,n.raw)}}})}}},45624:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"frame-title-require",description:"A <frame> or <iframe> element must have an accessible name.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if("frame"===r||"iframe"===r){const e=i.role;if("presentation"===e||"none"===e)return;const s="aria-label"in i&&""!==i["aria-label"].trim(),a="aria-labelledby"in i&&""!==i["aria-labelledby"].trim(),l="title"in i&&""!==i.title.trim();s||a||l||t.warn(`A <${r}> element must have an accessible name.`,n.line,o,this,n.raw)}})}}},24487:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"h1-require",description:"<h1> must be present in <body> tag and not be empty.",init(e,t){let n=0,r=!1,i=null,o=null,s=!1;e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();"body"===t?(n++,1===n&&(r=!1,i=e)):"h1"===t&&n>0&&(r=!0,o=e,s=!0)}),e.addListener("tagend",e=>{const a=e.tagName.toLowerCase();"h1"===a&&o?(s&&t.warn("<h1> tag must not be empty.",o.line,o.col,this,o.raw),o=null):"body"===a&&(1===n&&!r&&i&&t.warn("<h1> must be present in <body> tag.",i.line,i.col,this,i.raw),n--,n<0&&(n=0))}),e.addListener("text",e=>{o&&s&&e.raw&&!/^\s*$/.test(e.raw)&&(s=!1)}),e.addListener("end",()=>{n>0&&!r&&i&&t.warn("<h1> must be present in <body> tag.",i.line,i.col,this,i.raw)})}}},90711:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init(e,t,n){const r=/^(text\/javascript|application\/javascript)$/i;let i=!1;const o=o=>{const s=e.getMapAttrs(o.attrs),a=s.type,l=s.defer,c=o.tagName.toLowerCase();if("head"===c&&(i=!0),!0===i&&"script"===c){const e="module"===a,i=void 0!==l,c=void 0!==s.async;(!a||!0===r.test(a)||e)&&("allow-non-blocking"===n?e||i||c||t.warn('The <script> tag cannot be used in a <head> tag unless it has type="module", defer, or async attribute.',o.line,o.col,this,o.raw):t.warn("The <script> tag cannot be used in a <head> tag.",o.line,o.col,this,o.raw))}},s=t=>{"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",o),e.removeListener("tagend",s))};e.addListener("tagstart",o),e.addListener("tagend",s)}}},28572:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init(e,t,n){const r="abs"===n?"absolute":"relative";e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++)if(i=n[s],"href"===i.name){("absolute"===r&&!1===/^\w+?:/.test(i.value)||"relative"===r&&!0===/^https?:\/\//.test(i.value))&&t.warn(`The value of the href attribute [ ${i.value} ] must be ${r}.`,e.line,o+i.index,this,i.raw);break}})}}},22998:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default={id:"html-lang-require",description:"The lang attribute of an <html> element must be present and should be valid.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1,s=new RegExp("((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))","g");"html"===r&&("lang"in i?i.lang?s.test(i.lang)||t.warn("The lang attribute value of <html> element must be a valid BCP47.",n.line,o,this,n.raw):t.warn("The lang attribute of <html> element must have a value.",n.line,o,this,n.raw):t.warn("An lang attribute must be present on <html> elements.",n.line,o,this,n.raw))})}}},10143:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r,i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++)r=n[s],i=r.name,/^(id|class)$/i.test(i)&&/(^|[-_])ad([-_]|$)/i.test(r.value)&&t.warn(`The value of attribute ${i} cannot use the ad keyword.`,e.line,o+r.index,this,r.raw)})}}},89514:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init(e,t,n){let r;if(r="string"===typeof n?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[n]:n,"object"===typeof r&&r.regId){let n=r.regId;const i=r.message;n instanceof RegExp||(n=new RegExp(n)),e.addListener("tagstart",e=>{const r=e.attrs;let o;const s=e.col+e.tagName.length+1;for(let a=0,l=r.length;a<l;a++)if(o=r[a],"id"===o.name.toLowerCase()&&!1===n.test(o.value)&&t.warn(i,e.line,s+o.index,this,o.raw),"class"===o.name.toLowerCase()){const r=o.value.split(/\s+/g);let a;for(let l=0,c=r.length;l<c;l++)a=r[l],a&&!1===n.test(a)&&t.warn(i,e.line,s+o.index,this,a)}})}}}},26639:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-unique",description:"The value of id attributes must be unique.",init(e,t){const n={};e.addListener("tagstart",e=>{const r=e.attrs;let i,o;const s=e.col+e.tagName.length+1;for(let a=0,l=r.length;a<l;a++)if(i=r[a],"id"===i.name.toLowerCase()){o=i.value,o&&(void 0===n[o]?n[o]=1:n[o]++,n[o]>1&&t.error(`The id value [ ${o} ] must be unique.`,e.line,s+i.index,this,i.raw));break}})}}},27492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleRequire=t.tagSelfClose=t.tagsCheck=t.tagPair=t.tagnameSpecialChars=t.tagnameLowercase=t.tagNoObsolete=t.styleDisabled=t.srcNotEmpty=t.specCharEscape=t.spaceTabMixedDisabled=t.scriptDisabled=t.metaViewportRequire=t.metaDescriptionRequire=t.metaCharsetRequire=t.mainRequire=t.linkRelCanonicalRequire=t.inputRequiresLabel=t.inlineStyleDisabled=t.inlineScriptDisabled=t.idUnique=t.idClassValue=t.idClassAdDisabled=t.htmlLangRequire=t.hrefAbsOrRel=t.headScriptDisabled=t.h1Require=t.frameTitleRequire=t.formMethodRequire=t.emptyTagNotSelfClosed=t.doctypeHTML5=t.doctypeFirst=t.buttonTypeRequire=t.attrWhitespace=t.attrValueSingleQuotes=t.attrValueNotEmpty=t.attrValueDoubleQuotes=t.attrUnsafeChars=t.attrSort=t.attrValueNoDuplication=t.attrNoUnnecessaryWhitespace=t.attrNoDuplication=t.attrLowercase=t.altRequire=void 0;var r=n(17277);Object.defineProperty(t,"altRequire",{enumerable:!0,get:function(){return r.default}});var i=n(89565);Object.defineProperty(t,"attrLowercase",{enumerable:!0,get:function(){return i.default}});var o=n(86308);Object.defineProperty(t,"attrNoDuplication",{enumerable:!0,get:function(){return o.default}});var s=n(49734);Object.defineProperty(t,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return s.default}});var a=n(13220);Object.defineProperty(t,"attrValueNoDuplication",{enumerable:!0,get:function(){return a.default}});var l=n(53027);Object.defineProperty(t,"attrSort",{enumerable:!0,get:function(){return l.default}});var c=n(52548);Object.defineProperty(t,"attrUnsafeChars",{enumerable:!0,get:function(){return c.default}});var u=n(55429);Object.defineProperty(t,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return u.default}});var d=n(45189);Object.defineProperty(t,"attrValueNotEmpty",{enumerable:!0,get:function(){return d.default}});var h=n(79302);Object.defineProperty(t,"attrValueSingleQuotes",{enumerable:!0,get:function(){return h.default}});var f=n(20027);Object.defineProperty(t,"attrWhitespace",{enumerable:!0,get:function(){return f.default}});var p=n(23373);Object.defineProperty(t,"buttonTypeRequire",{enumerable:!0,get:function(){return p.default}});var g=n(55101);Object.defineProperty(t,"doctypeFirst",{enumerable:!0,get:function(){return g.default}});var m=n(90179);Object.defineProperty(t,"doctypeHTML5",{enumerable:!0,get:function(){return m.default}});var b=n(47320);Object.defineProperty(t,"emptyTagNotSelfClosed",{enumerable:!0,get:function(){return b.default}});var y=n(16650);Object.defineProperty(t,"formMethodRequire",{enumerable:!0,get:function(){return y.default}});var w=n(45624);Object.defineProperty(t,"frameTitleRequire",{enumerable:!0,get:function(){return w.default}});var v=n(24487);Object.defineProperty(t,"h1Require",{enumerable:!0,get:function(){return v.default}});var k=n(90711);Object.defineProperty(t,"headScriptDisabled",{enumerable:!0,get:function(){return k.default}});var x=n(28572);Object.defineProperty(t,"hrefAbsOrRel",{enumerable:!0,get:function(){return x.default}});var _=n(22998);Object.defineProperty(t,"htmlLangRequire",{enumerable:!0,get:function(){return _.default}});var C=n(10143);Object.defineProperty(t,"idClassAdDisabled",{enumerable:!0,get:function(){return C.default}});var S=n(89514);Object.defineProperty(t,"idClassValue",{enumerable:!0,get:function(){return S.default}});var E=n(26639);Object.defineProperty(t,"idUnique",{enumerable:!0,get:function(){return E.default}});var L=n(3676);Object.defineProperty(t,"inlineScriptDisabled",{enumerable:!0,get:function(){return L.default}});var O=n(10188);Object.defineProperty(t,"inlineStyleDisabled",{enumerable:!0,get:function(){return O.default}});var A=n(97266);Object.defineProperty(t,"inputRequiresLabel",{enumerable:!0,get:function(){return A.default}});var $=n(59597);Object.defineProperty(t,"linkRelCanonicalRequire",{enumerable:!0,get:function(){return $.default}});var M=n(90305);Object.defineProperty(t,"mainRequire",{enumerable:!0,get:function(){return M.default}});var j=n(89352);Object.defineProperty(t,"metaCharsetRequire",{enumerable:!0,get:function(){return j.default}});var D=n(25738);Object.defineProperty(t,"metaDescriptionRequire",{enumerable:!0,get:function(){return D.default}});var N=n(70416);Object.defineProperty(t,"metaViewportRequire",{enumerable:!0,get:function(){return N.default}});var T=n(18394);Object.defineProperty(t,"scriptDisabled",{enumerable:!0,get:function(){return T.default}});var P=n(81855);Object.defineProperty(t,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return P.default}});var z=n(50168);Object.defineProperty(t,"specCharEscape",{enumerable:!0,get:function(){return z.default}});var R=n(71038);Object.defineProperty(t,"srcNotEmpty",{enumerable:!0,get:function(){return R.default}});var I=n(45249);Object.defineProperty(t,"styleDisabled",{enumerable:!0,get:function(){return I.default}});var q=n(20932);Object.defineProperty(t,"tagNoObsolete",{enumerable:!0,get:function(){return q.default}});var U=n(70251);Object.defineProperty(t,"tagnameLowercase",{enumerable:!0,get:function(){return U.default}});var F=n(21548);Object.defineProperty(t,"tagnameSpecialChars",{enumerable:!0,get:function(){return F.default}});var V=n(11713);Object.defineProperty(t,"tagPair",{enumerable:!0,get:function(){return V.default}});var W=n(46022);Object.defineProperty(t,"tagsCheck",{enumerable:!0,get:function(){return W.default}});var B=n(82470);Object.defineProperty(t,"tagSelfClose",{enumerable:!0,get:function(){return B.default}});var H=n(33740);Object.defineProperty(t,"titleRequire",{enumerable:!0,get:function(){return H.default}})},3676:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;let o;const s=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i;for(let a=0,l=n.length;a<l;a++)r=n[a],o=r.name.toLowerCase(),!0===s.test(o)?t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw):"src"!==o&&"href"!==o||/^\s*javascript:/i.test(r.value)&&t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw)})}}},10188:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],"style"===r.name.toLowerCase()&&t.warn(`Inline style [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw)})}}},97266:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init(e,t){const n=[],r=[];e.addListener("tagstart",t=>{const i=t.tagName.toLowerCase(),o=e.getMapAttrs(t.attrs),s=t.col+i.length+1;"input"===i&&"hidden"!==o.type&&r.push({event:t,col:s,id:o.id}),"label"===i&&"for"in o&&""!==o.for&&n.push({event:t,col:s,forValue:o.for})}),e.addListener("end",()=>{r.forEach(e=>{(function(e){let t=!1;return n.forEach(n=>{e.id&&e.id===n.forValue&&(t=!0)}),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,this,e.event.raw)})})}}},59597:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"link-rel-canonical-require",description:'<link rel="canonical"> with non-blank href must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("link"===s){const n=e.getMapAttrs(t.attrs);n.rel&&"canonical"===n.rel.toLowerCase()&&(r=!0,i=n.href||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<link rel="canonical"> href attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<link rel="canonical"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},90305:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"main-require",description:"<main> must be present in <body> tag.",init(e,t){let n=0,r=!1,i=null;e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();"body"===t?(n++,1===n&&(r=!1,i=e)):"main"===t&&n>0&&(r=!0)}),e.addListener("tagend",e=>{"body"===e.tagName.toLowerCase()&&(1===n&&!r&&i&&t.warn("<main> must be present in <body> tag.",i.line,i.col,this,i.raw),n--,n<0&&(n=0))}),e.addListener("end",()=>{n>0&&!r&&i&&t.warn("<main> must be present in <body> tag.",i.line,i.col,this,i.raw)})}}},89352:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-charset-require",description:'<meta charset=""> must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);void 0!==n.charset&&(r=!0,i=n.charset||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta charset=""> value must not be empty.',o.line,o.col,this,o.raw):t.error('<meta charset=""> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},25738:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-description-require",description:'<meta name="description"> with non-blank content must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);n.name&&"description"===n.name.toLowerCase()&&(r=!0,i=n.content||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta name="description"> content attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<meta name="description"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},70416:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-viewport-require",description:'<meta name="viewport"> with non-blank content must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);n.name&&"viewport"===n.name.toLowerCase()&&(r=!0,i=n.content||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta name="viewport"> content attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<meta name="viewport"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},18394:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"script-disabled",description:"The <script> tag cannot be used.",init(e,t){e.addListener("tagstart",e=>{"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,this,e.raw)})}}},81855:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init(e,t,n){let r="nomix",i=null;if("string"===typeof n){const e=/^([a-z]+)(\d+)?/.exec(n);e&&(r=e[1],i=e[2]&&parseInt(e[2],10))}e.addListener("text",n=>{const o=n.raw,s=/(^|\r?\n)([ \t]+)/g;let a;for(;a=s.exec(o);){const o=e.fixPos(n,a.index+a[1].length);if(1!==o.col)continue;const s=a[2];"space"===r?i?!1!==/^ +$/.test(s)&&s.length%i===0||t.warn(`Please use space for indentation and keep ${i} length.`,o.line,1,this,n.raw):!1===/^ +$/.test(s)&&t.warn("Please use space for indentation.",o.line,1,this,n.raw):"tab"===r&&!1===/^\t+$/.test(s)?t.warn("Please use tab for indentation.",o.line,1,this,n.raw):!0===/ +\t|\t+ /.test(s)&&t.warn("Do not mix tabs and spaces for indentation.",o.line,1,this,n.raw)}})}}},50168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"spec-char-escape",description:"Special characters must be escaped.",init(e,t){e.addListener("text",n=>{const r=n.raw,i=/([<>])/g;let o;for(;o=i.exec(r);){const r=e.fixPos(n,o.index);t.error(`Special characters must be escaped : [ ${o[0]} ].`,r.line,r.col,this,n.raw)}})}}},71038:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init(e,t){e.addListener("tagstart",e=>{const n=e.tagName,r=e.attrs;let i;const o=e.col+n.length+1;for(let s=0,a=r.length;s<a;s++)i=r[s],(!0===/^(img|script|embed|bgsound|iframe)$/.test(n)&&"src"===i.name||"link"===n&&"href"===i.name||"object"===n&&"data"===i.name)&&""===i.value&&t.error(`The attribute [ ${i.name} ] of the tag [ ${n} ] must have a value.`,e.line,o+i.index,this,i.raw)})}}},45249:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"style-disabled",description:"<style> tags cannot be used.",init(e,t){e.addListener("tagstart",e=>{"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,this,e.raw)})}}},20932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=["applet","acronym","bgsound","dir","frame","frameset","noframes","isindex","keygen","listing","menuitem","nextid","noembed","plaintext","rb","rtc","strike","xmp","basefont","big","blink","center","font","marquee","multicol","nobr","spacer","tt"];t.default={id:"tag-no-obsolete",description:"Disallows the use of obsolete HTML tags.",init(e,t,r){e.addListener("tagstart,tagend",e=>{const r=e.tagName.toLowerCase();n.includes(r)&&t.error(`The tag [ ${e.tagName} ] is obsolete in HTML5 and should not be used.`,e.line,e.col,this,e.raw)})}}},11713:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-pair",description:"Tag must be paired.",init(e,t){const n=[],r=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();void 0!==r[t]||e.close||n.push({tagName:t,line:e.line,col:e.col,raw:e.raw})}),e.addListener("tagend",e=>{const r=e.tagName.toLowerCase();let i;for(i=n.length-1;i>=0&&n[i].tagName!==r;i--);if(i>=0){const r=[];for(let e=n.length-1;e>i;e--)r.push(`</${n[e].tagName}>`);if(r.length>0){const i=n[n.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], start tag match failed [ ${i.raw} ] on line ${i.line}.`,i.line||e.line,i.col||e.col,this,e.raw)}n.length=i}else t.error(`Tag must be paired, no start tag: [ ${e.raw} ]`,e.line,e.col,this,e.raw)}),e.addListener("end",e=>{const r=[];for(let t=n.length-1;t>=0;t--)r.push(`</${n[t].tagName}>`);if(r.length>0){const i=n[n.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], open tag match failed [ ${i.raw} ] on line ${i.line}.`,e.line,e.col,this,"")}})}}},82470:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-self-close",description:"Empty tags must be self closed.",init(e,t){const n=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const r=e.tagName.toLowerCase();void 0!==n[r]&&(e.close||t.warn(`The empty tag : [ ${r} ] must be self closed.`,e.line,e.col,this,e.raw))})}}},70251:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];t.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init(e,t,r){const i=(Array.isArray(r)?r:[]).concat(n);e.addListener("tagstart,tagend",e=>{const n=e.tagName;i.find(e=>function(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};const n=t[0],r=t[t.length-1],i=t[t.length-2],o="/"===n&&("/"===r||"/"===i&&"i"===r);if(o)return o&&"i"===r?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e);return e===t}(n,e))||n===n.toLowerCase()||t.error(`The html element name of [ ${n} ] must be in lowercase.`,e.line,e.col,this,e.raw)})}}},21548:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-specialchars",description:"All special characters must be escaped.",init(e,t){const n=/[^a-zA-Z0-9\-:_]/;e.addListener("tagstart,tagend",e=>{const r=e.tagName;n.test(r)&&t.error(`The html element name of [ ${r} ] contains special character.`,e.line,e.col,this,e.raw)})}}},46022:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});let n={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}};t.default={id:"tags-check",description:"Checks html tags.",init(e,t,r){n={...n,...r},e.addListener("tagstart",e=>{const r=e.attrs,i=e.col+e.tagName.length+1,o=e.tagName.toLowerCase();if(n[o]){const s=n[o];if(!0!==s.selfclosing||e.close?!1===s.selfclosing&&e.close&&t.warn(`The <${o}> tag must not be selfclosing.`,e.line,e.col,this,e.raw):t.warn(`The <${o}> tag must be selfclosing.`,e.line,e.col,this,e.raw),Array.isArray(s.attrsRequired)){s.attrsRequired.forEach(n=>{if(Array.isArray(n)){const s=n.map(e=>e),a=s.shift(),l=s;r.some(e=>e.name===a)?r.forEach(n=>{n.name===a&&-1===l.indexOf(n.value)&&t.error(`The <${o}> tag must have attr '${a}' with one value of '${l.join("' or '")}'.`,e.line,i,this,e.raw)}):t.error(`The <${o}> tag must have attr '${a}'.`,e.line,i,this,e.raw)}else r.some(e=>-1!==n.split("|").indexOf(e.name))||t.error(`The <${o}> tag must have attr '${n}'.`,e.line,i,this,e.raw)})}if(Array.isArray(s.attrsOptional)){s.attrsOptional.forEach(n=>{if(Array.isArray(n)){const s=n.map(e=>e),a=s.shift(),l=s;r.some(e=>e.name===a)&&r.forEach(n=>{n.name===a&&-1===l.indexOf(n.value)&&t.error(`The <${o}> tag must have optional attr '${a}' with one value of '${l.join("' or '")}'.`,e.line,i,this,e.raw)})}})}if(Array.isArray(s.redundantAttrs)){s.redundantAttrs.forEach(n=>{r.some(e=>e.name===n)&&t.error(`The attr '${n}' is redundant for <${o}> and should be omitted.`,e.line,i,this,e.raw)})}}})}}},33740:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"title-require",description:"<title> must be present in <head> tag.",init(e,t){let n=!1,r=!1;const i=e=>{const t=e.tagName.toLowerCase();"head"===t?n=!0:"title"===t&&n&&(r=!0)},o=n=>{const s=n.tagName.toLowerCase();if(r&&"title"===s){const e=n.lastEvent;("text"!==e.type||"text"===e.type&&!0===/^\s*$/.test(e.raw))&&t.error("<title></title> must not be empty.",n.line,n.col,this,n.raw)}else"head"===s&&(!1===r&&t.error("<title> must be present in <head> tag.",n.line,n.col,this,n.raw),e.removeListener("tagstart",i),e.removeListener("tagend",o))};e.addListener("tagstart",i),e.addListener("tagend",o)}}},85629:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLMonacoLinter=void 0;const r=n(27461);t.HTMLMonacoLinter=class{constructor(e,t,n){this.editor=e,this.monaco=t,this.ruleset=n}lint(){var e;const t=this.editor.getValue();if("html"===(null===(e=this.editor.getModel())||void 0===e?void 0:e.getLanguageId())){const e=new r.HTMLMonacoMarks(t,this.ruleset,this.editor.getModel()||void 0).getEditorMarks(this.monaco),n=this.editor.getModel();if(null===n)throw new Error("Your model still does't exist.");this.monaco.editor.setModelMarkers(n,"owner",e)}}watch(){this.lint(),this.editor.onDidChangeModelContent(e=>{this.lint()})}}},27461:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLMonacoMarks=void 0;const r=n(5973),i=n(15476),o={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0};t.HTMLMonacoMarks=class{constructor(e,t=o,n){this.html=e,this.ruleset=t,this.linterResponse=this.lint(),this.model=n}lint(){return r.HTMLHint.verify(this.html,this.ruleset)}getEditorMarks(e){return this.linterResponse.map(t=>({startLineNumber:t.line,startColumn:t.col,endLineNumber:t.line,endColumn:""!==t.evidence?t.col+t.evidence.length:void 0!==this.model?this.model.getLineLength(t.line):t.col+1,message:t.message,severity:e.MarkerSeverity[(0,i.capitalize)(t.type)]}))}getLinterResponse(){return this.linterResponse}}},59097:(e,t,n)=>{t.Ay=void 0;var r=n(27461);var i=n(85629);Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return i.HTMLMonacoLinter}})},15476:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=void 0;t.capitalize=e=>{const t=e.split(" ");for(var n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join(" ")}},73696:(e,t,n)=>{n.r(t),n.d(t,{default:()=>qh});var r=n(69622),i=n(1936);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function f(e){return{}.toString.call(e).includes("Object")}function p(e){return"function"===typeof e}var g=h(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),m={changes:function(e,t){return f(t)||g("changeType"),Object.keys(t).some(function(t){return!function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)})&&g("changeField"),t},selector:function(e){p(e)||g("selectorType")},handler:function(e){p(e)||f(e)||g("handlerType"),f(e)&&Object.values(e).some(function(e){return!p(e)})&&g("handlersType")},initial:function(e){var t;e||g("initialIsRequired"),f(e)||g("initialType"),t=e,Object.keys(t).length||g("initialContent")}};function b(e,t){return p(t)?t(e.current):t}function y(e,t){return e.current=d(d({},e.current),t),t}function w(e,t,n){return p(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var v={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m.initial(e),m.handler(t);var n={current:e},r=h(w)(n,t),i=h(y)(n),o=h(m.changes)(e),s=h(b)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return m.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,s)(e)}]}};const k=v;var x,_=(x=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=x.length?x.apply(this,r):function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return e.apply(t,[].concat(r,i))}})({configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "}),C={config:function(e){var t;return e||_("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||_("configType"),e.urls?{paths:{vs:e.urls.monacoBase}}:e}};function S(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],S(e[n],t[n]))}),l(l({},e),t)}var E={type:"cancelation",msg:"operation is manually canceled"};function L(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(E):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var O,A,$=["monaco"],M=k.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),j=(A=2,function(e){if(Array.isArray(e))return e}(O=M)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(O,A)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(O,A)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),D=j[0],N=j[1];function T(e){return document.body.appendChild(e)}function P(e){var t=D(function(e){return{config:e.config,reject:e.reject}}),n=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function z(){var e=D(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;R(n),e.resolve(n)},function(t){e.reject(t)})}function R(e){D().monaco||N({monaco:e})}var I=new Promise(function(e,t){return N({resolve:e,reject:t})}),q={config:function(e){var t=C.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,$);N(function(e){return{config:S(e.config,r),monaco:n}})},init:function(){var e=D(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(N({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),L(I);if(window.monaco&&window.monaco.editor)return R(window.monaco),e.resolve(window.monaco),L(I);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(T,P)(z)}return L(I)},__getMonacoInstance:function(){return D(function(e){return e.monaco})}},U={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},F={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var V=function({children:e}){return i.createElement("div",{style:F.container},e)},W=V;var B=function({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:s,wrapperProps:a}){return i.createElement("section",{style:{...U.wrapper,width:e,height:t},...a},!n&&i.createElement(W,null,r),i.createElement("div",{ref:o,style:{...U.fullWidth,...!n&&U.hide},className:s}))},H=(0,i.memo)(B);var Z=function(e){(0,i.useEffect)(e,[])};var J=function(e,t,n=!0){let r=(0,i.useRef)(!0);(0,i.useEffect)(r.current||!n?()=>{r.current=!1}:e,t)};function X(){}function Y(e,t,n,r){return function(e,t){return e.editor.getModel(G(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?G(e,r):void 0)}(e,t,n,r)}function G(e,t){return e.Uri.parse(t)}var K=function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:s,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:h={},height:f="100%",width:p="100%",className:g,wrapperProps:m={},beforeMount:b=X,onMount:y=X}){let[w,v]=(0,i.useState)(!1),[k,x]=(0,i.useState)(!0),_=(0,i.useRef)(null),C=(0,i.useRef)(null),S=(0,i.useRef)(null),E=(0,i.useRef)(y),L=(0,i.useRef)(b),O=(0,i.useRef)(!1);Z(()=>{let e=q.init();return e.then(e=>(C.current=e)&&x(!1)).catch(e=>"cancelation"!==e?.type&&void 0),()=>_.current?function(){let e=_.current?.getModel();l||e?.original?.dispose(),c||e?.modified?.dispose(),_.current?.dispose()}():e.cancel()}),J(()=>{if(_.current&&C.current){let t=_.current.getOriginalEditor(),i=Y(C.current,e||"",r||n||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],w),J(()=>{if(_.current&&C.current){let e=_.current.getModifiedEditor(),r=Y(C.current,t||"",o||n||"text",a||"");r!==e.getModel()&&e.setModel(r)}},[a],w),J(()=>{let e=_.current.getModifiedEditor();e.getOption(C.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],w),J(()=>{_.current?.getModel()?.original.setValue(e||"")},[e],w),J(()=>{let{original:e,modified:t}=_.current.getModel();C.current.editor.setModelLanguage(e,r||n||"text"),C.current.editor.setModelLanguage(t,o||n||"text")},[n,r,o],w),J(()=>{C.current?.editor.setTheme(u)},[u],w),J(()=>{_.current?.updateOptions(h)},[h],w);let A=(0,i.useCallback)(()=>{if(!C.current)return;L.current(C.current);let i=Y(C.current,e||"",r||n||"text",s||""),l=Y(C.current,t||"",o||n||"text",a||"");_.current?.setModel({original:i,modified:l})},[n,t,o,e,r,s,a]),$=(0,i.useCallback)(()=>{!O.current&&S.current&&(_.current=C.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...h}),A(),C.current?.editor.setTheme(u),v(!0),O.current=!0)},[h,u,A]);return(0,i.useEffect)(()=>{w&&E.current(_.current,C.current)},[w]),(0,i.useEffect)(()=>{!k&&!w&&$()},[k,w,$]),i.createElement(H,{width:p,height:f,isEditorReady:w,loading:d,_ref:S,className:g,wrapperProps:m})};(0,i.memo)(K);var Q=function(e){let t=(0,i.useRef)();return(0,i.useEffect)(()=>{t.current=e},[e]),t.current},ee=new Map;var te=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:s,theme:a="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:m,wrapperProps:b={},beforeMount:y=X,onMount:w=X,onChange:v,onValidate:k=X}){let[x,_]=(0,i.useState)(!1),[C,S]=(0,i.useState)(!0),E=(0,i.useRef)(null),L=(0,i.useRef)(null),O=(0,i.useRef)(null),A=(0,i.useRef)(w),$=(0,i.useRef)(y),M=(0,i.useRef)(),j=(0,i.useRef)(r),D=Q(s),N=(0,i.useRef)(!1),T=(0,i.useRef)(!1);Z(()=>{let e=q.init();return e.then(e=>(E.current=e)&&S(!1)).catch(e=>"cancelation"!==e?.type&&void 0),()=>L.current?(M.current?.dispose(),f?h&&ee.set(s,L.current.saveViewState()):L.current.getModel()?.dispose(),void L.current.dispose()):e.cancel()}),J(()=>{let i=Y(E.current,e||r||"",t||o||"",s||n||"");i!==L.current?.getModel()&&(h&&ee.set(D,L.current?.saveViewState()),L.current?.setModel(i),h&&L.current?.restoreViewState(ee.get(s)))},[s],x),J(()=>{L.current?.updateOptions(u)},[u],x),J(()=>{!L.current||void 0===r||(L.current.getOption(E.current.editor.EditorOption.readOnly)?L.current.setValue(r):r!==L.current.getValue()&&(T.current=!0,L.current.executeEdits("",[{range:L.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),L.current.pushUndoStop(),T.current=!1))},[r],x),J(()=>{let e=L.current?.getModel();e&&o&&E.current?.editor.setModelLanguage(e,o)},[o],x),J(()=>{void 0!==l&&L.current?.revealLine(l)},[l],x),J(()=>{E.current?.editor.setTheme(a)},[a],x);let P=(0,i.useCallback)(()=>{if(O.current&&E.current&&!N.current){$.current(E.current);let i=s||n,c=Y(E.current,r||e||"",t||o||"",i||"");L.current=E.current?.editor.create(O.current,{model:c,automaticLayout:!0,...u},d),h&&L.current.restoreViewState(ee.get(i)),E.current.editor.setTheme(a),void 0!==l&&L.current.revealLine(l),_(!0),N.current=!0}},[e,t,n,r,o,s,u,d,h,a,l]);return(0,i.useEffect)(()=>{x&&A.current(L.current,E.current)},[x]),(0,i.useEffect)(()=>{!C&&!x&&P()},[C,x,P]),j.current=r,(0,i.useEffect)(()=>{x&&v&&(M.current?.dispose(),M.current=L.current?.onDidChangeModelContent(e=>{T.current||v(L.current.getValue(),e)}))},[x,v]),(0,i.useEffect)(()=>{if(x){let e=E.current.editor.onDidChangeMarkers(e=>{let t=L.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=E.current.editor.getModelMarkers({resource:t});k?.(e)}});return()=>{e?.dispose()}}return()=>{}},[x,k]),i.createElement(H,{width:p,height:g,isEditorReady:x,loading:c,_ref:O,className:m,wrapperProps:b})},ne=(0,i.memo)(te),re=n(71715),ie=n(59097),oe=n(7714),se=n(59),ae=n(39503);const le=100;class ce extends se.m{constructor(e,t,n,r){super(e,t,n,r),this._onScrollDisposable=null,this._editor=e}updateColorDecorators(e){if(this._onScrollDisposable&&(this._onScrollDisposable.dispose(),this._onScrollDisposable=null),e.length>=500){const t=this._editor;let[n,r]=[Number.MAX_VALUE,Number.MIN_VALUE];const i=()=>{const i=t.getVisibleRanges(),[o,s]=i.reduce((e,{startLineNumber:t,endLineNumber:n})=>[Math.min(t,e[0]),Math.max(n,e[1])],[Number.MAX_VALUE,Number.MIN_VALUE]);if(n-o>le||s-r>le){let t=e.filter(({colorInfo:e})=>{const{startLineNumber:t,endLineNumber:n}=e.range;return o-t<le&&n-s<le});super.updateColorDecorators(t)}};this._onScrollDisposable=t.onDidScrollChange(i),i()}else super.updateColorDecorators(e)}dispose(){var e;null===(e=this._onScrollDisposable)||void 0===e||e.dispose(),super.dispose()}}var ue=n(98173),de=n(52898),he=n(68069),fe=n(38343),pe=n(15582),ge=n(59463),me=n(93506);function be(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function ye(e){return e>47&&e<58}function we(e,t,n){return n=n||90,(e&=-33)>=(t=t||65)&&e<=n}function ve(e){return ye(e)||ke(e)}function ke(e){return 95===e||we(e)}function xe(e){return function(e){return 32===e||9===e||160===e}(e)||10===e||13===e}function _e(e){return 39===e||34===e}class Ce{constructor(e,t,n){null==n&&"string"===typeof e&&(n=e.length),this.string=e,this.pos=this.start=t||0,this.end=n||0}eof(){return this.pos>=this.end}limit(e,t){return new Ce(this.string,e,t)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(e){const t=this.peek(),n="function"===typeof e?e(t):t===e;return n&&this.next(),n}eatWhile(e){const t=this.pos;for(;!this.eof()&&this.eat(e););return this.pos!==t}backUp(e){this.pos-=e||1}current(){return this.substring(this.start,this.pos)}substring(e,t){return this.string.slice(e,t)}error(e,t=this.pos){return new Se(`${e} at ${t+1}`,t,this.string)}}class Se extends Error{constructor(e,t,n){super(e),this.pos=t,this.string=n}}function Ee(e){return e.tokens[e.pos]}function Le(e){return e.tokens[e.pos++]}function Oe(e,t=e.start,n=e.pos){return e.tokens.slice(t,n)}function Ae(e){return e.pos<e.size}function $e(e,t){const n=Ee(e);return!(!n||!t(n))&&(e.pos++,!0)}function Me(e,t,n=Ee(e)){n&&null!=n.start&&(t+=` at ${n.start}`);const r=new Error(t);return r.pos=n&&n.start,r}function je(e,t){const n={type:"TokenGroup",elements:[]};let r,i=n;const o=[];for(;Ae(e)&&(r=Ne(e,t)||De(e,t));)if(i.elements.push(r),$e(e,nt))o.push(i),i=r;else{if($e(e,rt))continue;if($e(e,it))do{o.length&&(i=o.pop())}while($e(e,it))}return n}function De(e,t){if($e(e,et)){const n=je(e,t);return Fe(Le(e),"group",!1)&&(n.repeat=function(e){return Ze(Ee(e))?e.tokens[e.pos++]:void 0}(e)),n}}function Ne(e,t){let n;const r={type:"TokenElement",name:void 0,attributes:void 0,value:void 0,repeat:void 0,selfClose:!1,elements:[]};for(function(e,t){const n=e.pos;if(t.jsx&&$e(e,Je))for(;Ae(e);){const{pos:t}=e;if(!$e(e,Ye)||!$e(e,Je)){e.pos=t;break}}for(;Ae(e)&&$e(e,Xe););if(e.pos!==n)return e.start=n,!0;return!1}(e,t)&&(r.name=Oe(e));Ae(e);)if(e.start=e.pos,r.repeat||tt(r)||!$e(e,Ze))if(!r.value&&qe(e))r.value=Ue(e);else{if(!(n=Pe(e,"id",t)||Pe(e,"class",t)||Te(e))){!tt(r)&&$e(e,ot)&&(r.selfClose=!0,!r.repeat&&$e(e,Ze)&&(r.repeat=e.tokens[e.pos-1]));break}r.attributes?r.attributes=r.attributes.concat(n):r.attributes=Array.isArray(n)?n.slice():[n]}else r.repeat=e.tokens[e.pos-1];return tt(r)?void 0:r}function Te(e){if($e(e,Ge)){const t=[];let n;for(;Ae(e);)if(n=ze(e))t.push(n);else{if($e(e,Ke))break;if(!$e(e,Be))throw Me(e,`Unexpected "${Ee(e).type}" token`)}return t}}function Pe(e,t,n){if(Ve(Ee(e),t)){e.pos++;const i={name:[(r=t,{type:"Literal",value:r})]};return n.jsx&&qe(e)?(i.value=Ue(e),i.expression=!0):i.value=Ie(e)?Oe(e):void 0,i}var r}function ze(e){return Re(e)?{value:Oe(e)}:Ie(e,!0)?{name:Oe(e),value:$e(e,He)&&(Re(e)||Ie(e,!0))?Oe(e):void 0}:void 0}function Re(e){const t=e.pos,n=Ee(e);if(We(n)){for(e.pos++;Ae(e);)if(We(Le(e),n.single))return e.start=t,!0;throw Me(e,"Unclosed quote",n)}return!1}function Ie(e,t){const n=e.pos,r={attribute:0,expression:0,group:0};for(;Ae(e);){const n=Ee(e);if(r.expression)Fe(n,"expression")&&(r[n.context]+=n.open?1:-1);else{if(We(n)||Ve(n)||Be(n)||Ze(n))break;if(Fe(n)){if(!t)break;if(n.open)r[n.context]++;else{if(!r[n.context])break;r[n.context]--}}}e.pos++}return n!==e.pos&&(e.start=n,!0)}function qe(e){const t=e.pos;if($e(e,Qe)){let n=0;for(;Ae(e);){const t=Le(e);if(Fe(t,"expression"))if(t.open)n++;else{if(!n)break;n--}}return e.start=t,!0}return!1}function Ue(e){let t=e.start,n=e.pos;return Fe(e.tokens[t],"expression",!0)&&t++,Fe(e.tokens[n-1],"expression",!1)&&n--,Oe(e,t,n)}function Fe(e,t,n){return Boolean(e&&"Bracket"===e.type&&(!t||e.context===t)&&(null==n||e.open===n))}function Ve(e,t){return Boolean(e&&"Operator"===e.type&&(!t||e.operator===t))}function We(e,t){return Boolean(e&&"Quote"===e.type&&(null==t||e.single===t))}function Be(e){return Boolean(e&&"WhiteSpace"===e.type)}function He(e){return Ve(e,"equal")}function Ze(e){return Boolean(e&&"Repeater"===e.type)}function Je(e){if(function(e){return"Literal"===e.type}(e)){const t=e.value.charCodeAt(0);return t>=65&&t<=90}return!1}function Xe(e){return"Literal"===e.type||"RepeaterNumber"===e.type||"RepeaterPlaceholder"===e.type}function Ye(e){return Ve(e,"class")}function Ge(e){return Fe(e,"attribute",!0)}function Ke(e){return Fe(e,"attribute",!1)}function Qe(e){return Fe(e,"expression",!0)}function et(e){return Fe(e,"group",!0)}function tt(e){return!e.name&&!e.value&&!e.attributes}function nt(e){return Ve(e,"child")}function rt(e){return Ve(e,"sibling")}function it(e){return Ve(e,"climb")}function ot(e){return Ve(e,"close")}function st(e){return!!e.eat(92)&&(e.start=e.pos,e.eof()||e.pos++,!0)}function at(e,t){return function(e,t){const n=e.pos;if((t.expression||t.attribute)&&e.eat(36)&&e.eat(123)){let t;e.start=e.pos;let r="";if(e.eatWhile(ye)?(t=Number(e.current()),r=e.eat(58)?lt(e):""):we(e.peek())&&(r=lt(e)),e.eat(125))return{type:"Field",index:t,name:r,start:n,end:e.pos};throw e.error("Expecting }")}e.pos=n}(e,t)||function(e){const t=e.pos;if(e.eat(36)&&e.eat(35))return{type:"RepeaterPlaceholder",value:void 0,start:t,end:e.pos};e.pos=t}(e)||function(e){const t=e.pos;if(e.eatWhile(36)){const n=e.pos-t;let r=!1,i=1,o=0;if(e.eat(64)){for(;e.eat(94);)o++;r=e.eat(45),e.start=e.pos,e.eatWhile(ye)&&(i=Number(e.current()))}return e.start=t,{type:"RepeaterNumber",size:n,reverse:r,base:i,parent:o,start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eat(42)){e.start=e.pos;let n=1,r=!1;return e.eatWhile(ye)?n=Number(e.current()):r=!0,{type:"Repeater",count:n,value:0,implicit:r,start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eatWhile(xe))return{type:"WhiteSpace",start:t,end:e.pos,value:e.substring(t,e.pos)}}(e)||function(e,t){const n=e.pos;let r="";for(;!e.eof();){if(st(e)){r+=e.current();continue}const n=e.peek();if(n===t.quote||36===n||ct(n,t))break;if(t.expression&&125===n)break;if(!t.quote&&!t.expression){if(!t.attribute&&!gt(n))break;if(ut(n,t)||dt(n,t)||_e(n)||ht(n))break}r+=e.string[e.pos++]}if(n!==e.pos)return e.start=n,{type:"Literal",value:r,start:n,end:e.pos}}(e,t)||function(e){const t=ft(e.peek());if(t)return{type:"Operator",operator:t,start:e.pos++,end:e.pos}}(e)||function(e){const t=e.peek();if(_e(t))return{type:"Quote",single:39===t,start:e.pos++,end:e.pos}}(e)||function(e){const t=e.peek(),n=ht(t);if(n)return{type:"Bracket",open:pt(t),context:n,start:e.pos++,end:e.pos}}(e)}function lt(e){const t=[];for(e.start=e.pos;!e.eof();)if(e.eat(123))t.push(e.pos);else if(e.eat(125)){if(!t.length){e.pos--;break}t.pop()}else e.pos++;if(t.length)throw e.pos=t.pop(),e.error("Expecting }");return e.current()}function ct(e,t){const n=ft(e);return!(!n||t.quote||t.expression)&&(!t.attribute||"equal"===n)}function ut(e,t){return xe(e)&&!t.expression}function dt(e,t){return 42===e&&!t.attribute&&!t.expression}function ht(e){return 40===e||41===e?"group":91===e||93===e?"attribute":123===e||125===e?"expression":void 0}function ft(e){return(62===e?"child":43===e&&"sibling")||94===e&&"climb"||46===e&&"class"||35===e&&"id"||47===e&&"close"||61===e&&"equal"||void 0}function pt(e){return 123===e||91===e||40===e}function gt(e){return ve(e)||45===e||58===e||33===e}const mt={child:">",class:".",climb:"^",id:"#",equal:"=",close:"/",sibling:"+"},bt={Literal:e=>e.value,Quote:e=>e.single?"'":'"',Bracket:e=>"attribute"===e.context?e.open?"[":"]":"expression"===e.context?e.open?"{":"}":e.open?"(":"}",Operator:e=>mt[e.operator],Field:(e,t)=>null!=e.index?e.name?`\${${e.index}:${e.name}}`:`\${${e.index}`:e.name?t.getVariable(e.name):"",RepeaterPlaceholder(e,t){let n;for(let r=t.repeaters.length-1;r>=0;r--)if(t.repeaters[r].implicit){n=t.repeaters[r];break}return t.inserted=!0,t.getText(n&&n.value)},RepeaterNumber(e,t){let n=1;const r=t.repeaters.length-1,i=t.repeaters[r];if(i&&(n=e.reverse?e.base+i.count-i.value-1:e.base+i.value,e.parent)){const o=Math.max(0,r-e.parent);if(o!==r){const e=t.repeaters[o];n+=i.count*e.value}}let o=String(n);for(;o.length<e.size;)o="0"+o;return o},WhiteSpace:e=>e.value};function yt(e,t){if(!bt[e.type])throw new Error(`Unknown token ${e.type}`);return bt[e.type](e,t)}const wt=/^((https?:|ftp:|file:)?\/\/|(www|ftp)\.)[^ ]*$/,vt=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,5}$/;function kt(e,t={}){let n,r=!1;t.text&&(n=Array.isArray(t.text)?t.text.filter(e=>e.trim()):t.text);const i={type:"Abbreviation",children:Ct(e,{inserted:!1,repeaters:[],text:t.text,cleanText:n,repeatGuard:t.maxRepeat||Number.POSITIVE_INFINITY,getText(e){var i;let o;if(r=!0,Array.isArray(t.text)){if(void 0!==e&&e>=0&&e<n.length)return n[e];o=void 0!==e?t.text[e]:t.text.join("\n")}else o=null!==(i=t.text)&&void 0!==i?i:"";return o},getVariable(e){const n=t.variables&&t.variables[e];return null!=n?n:e}})};if(null!=t.text&&!r){const e=Mt($t(i.children));if(e){const n=Array.isArray(t.text)?t.text.join("\n"):t.text;jt(e,n),"a"===e.name&&t.href&&function(e,t){var n;let r="";wt.test(t)?(r=t,/\w+:/.test(r)||r.startsWith("//")||(r=`http://${r}`)):vt.test(t)&&(r=`mailto:${t}`);const i=null===(n=e.attributes)||void 0===n?void 0:n.find(e=>"href"===e.name);i?i.value||(i.value=[r]):(e.attributes||(e.attributes=[]),e.attributes.push({name:"href",value:[r],valueType:"doubleQuote"}))}(e,n)}}return i}function xt(e,t){let n=[];if(e.repeat){const r=e.repeat,i=Object.assign({},r);let o;i.count=i.implicit&&Array.isArray(t.text)?t.cleanText.length:i.count||1,t.repeaters.push(i);for(let s=0;s<i.count;s++){if(i.value=s,e.repeat=i,o=Ot(e)?Ct(e,t):_t(e,t),i.implicit&&!t.inserted){const e=$t(o),n=e&&Mt(e);n&&jt(n,t.getText(i.value))}if(n=n.concat(o),--t.repeatGuard<=0)break}t.repeaters.pop(),e.repeat=r,i.implicit&&(t.inserted=!0)}else n=n.concat(Ot(e)?Ct(e,t):_t(e,t));return n}function _t(e,t){let n=[];const r={type:"AbbreviationNode",name:e.name&&Et(e.name,t),value:e.value&&Lt(e.value,t),attributes:void 0,children:n,repeat:e.repeat&&Object.assign({},e.repeat),selfClosing:e.selfClose};let i=[r];for(const o of e.elements)n=n.concat(xt(o,t));if(e.attributes){r.attributes=[];for(const n of e.attributes)r.attributes.push(St(n,t))}return r.name||r.attributes||!r.value||r.value.some(At)?r.children=n:i=i.concat(n),i}function Ct(e,t){let n=[];for(const r of e.elements)n=n.concat(xt(r,t));return e.repeat&&(n=function(e,t){for(const n of e)n.repeat||(n.repeat=Object.assign({},t));return e}(n,e.repeat)),n}function St(e,t){let n,r=!1,i=!1,o=e.expression?"expression":"raw";const s=e.name&&Et(e.name,t);if(s&&"!"===s[0]&&(r=!0),s&&"."===s[s.length-1]&&(i=!0),e.value){const r=e.value.slice();if(We(r[0])){const e=r.shift();r.length&&$t(r).type===e.type&&r.pop(),o=e.single?"singleQuote":"doubleQuote"}else Fe(r[0],"expression",!0)&&(o="expression",r.shift(),Fe($t(r),"expression",!1)&&r.pop());n=Lt(r,t)}return{name:i||r?s.slice(r?1:0,i?-1:void 0):s,value:n,boolean:i,implied:r,valueType:o}}function Et(e,t){let n="";for(let r=0;r<e.length;r++)n+=yt(e[r],t);return n}function Lt(e,t){const n=[];let r="";for(let i,o=0;o<e.length;o++)i=e[o],At(i)?(r&&(n.push(r),r=""),n.push(i)):r+=yt(i,t);return r&&n.push(r),n}function Ot(e){return"TokenGroup"===e.type}function At(e){return"object"===typeof e&&"Field"===e.type&&null!=e.index}function $t(e){return e[e.length-1]}function Mt(e){return e.children.length?Mt($t(e.children)):e}function jt(e,t){if(e.value){"string"===typeof $t(e.value)?e.value[e.value.length-1]+=t:e.value.push(t)}else e.value=[t]}function Dt(e,t){try{return kt(function(e,t={}){const n={tokens:r=e,start:0,pos:0,size:r.length};var r;const i=je(n,t);if(Ae(n))throw Me(n,"Unexpected character");return i}("string"===typeof e?function(e){const t=new Ce(e),n=[],r={group:0,attribute:0,expression:0,quote:0};let i,o=0;for(;!t.eof();){if(o=t.peek(),i=at(t,r),!i)throw t.error("Unexpected character");n.push(i),"Quote"===i.type?r.quote=o===r.quote?0:o:"Bracket"===i.type&&(r[i.context]+=i.open?1:-1)}return n}(e):e,t),t)}catch(n){throw n instanceof Se&&"string"===typeof e&&(n.message+=`\n${e}\n${"-".repeat(n.pos)}^`),n}}function Nt(e,t){return function(e){const t=e.pos;if(e.eat(36)&&e.eat(123)){let n;e.start=e.pos;let r="";if(e.eatWhile(ye)?(n=Number(e.current()),r=e.eat(58)?Tt(e):""):we(e.peek())&&(r=Tt(e)),e.eat(125))return{type:"Field",index:n,name:r,start:t,end:e.pos};throw e.error("Expecting }")}e.pos=t}(e)||function(e){const t=e.pos;if(function(e){const t=e.pos;e.eat(45);const n=e.pos,r=e.eatWhile(ye),i=e.pos;if(e.eat(46)){const t=e.eatWhile(ye);r||t||(e.pos=i)}e.pos===n&&(e.pos=t);return e.pos!==t}(e)){e.start=t;const n=e.current();return e.start=e.pos,e.eat(37)||e.eatWhile(ke),{type:"NumberValue",value:Number(n),rawValue:n,unit:e.current(),start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eat(35)){const n=e.pos;let r="",i="";if(e.eatWhile(qt)?(r=e.substring(n,e.pos),i=zt(e)):e.eat(116)?(r="0",i=zt(e)||"0"):i=zt(e),r||i||e.eof()){const{r:n,g:o,b:s,a:a}=function(e,t){let n="0",r="0",i="0",o=Number(null!=t&&""!==t?t:1);if("t"===e)o=0;else switch(e.length){case 0:break;case 1:n=r=i=e+e;break;case 2:n=r=i=e;break;case 3:n=e[0]+e[0],r=e[1]+e[1],i=e[2]+e[2];break;default:n=(e+=e).slice(0,2),r=e.slice(2,4),i=e.slice(4,6)}return{r:parseInt(n,16),g:parseInt(r,16),b:parseInt(i,16),a:o}}(r,i);return{type:"ColorValue",r:n,g:o,b:s,a:a,raw:e.substring(t+1,e.pos),start:t,end:e.pos}}return Pt(e,t)}e.pos=t}(e)||function(e){const t=e.peek(),n=e.pos;let r=!1;if(_e(t)){for(e.pos++;!e.eof();){if(e.eat(t)){r=!0;break}e.pos++}return e.start=n,{type:"StringValue",value:e.substring(n+1,e.pos-(r?1:0)),quote:39===t?"single":"double",start:n,end:e.pos}}}(e)||function(e){const t=e.peek();if(function(e){return 40===e||41===e}(t))return{type:"Bracket",open:40===t,start:e.pos++,end:e.pos}}(e)||Rt(e)||function(e){const t=e.pos;if(e.eatWhile(xe))return{type:"WhiteSpace",start:t,end:e.pos}}(e)||function(e,t){const n=e.pos;e.eat(It)?e.eatWhile(n?Ut:Ft):e.eat(ke)?e.eatWhile(t?Ft:Ut):(e.eat(46),e.eatWhile(Ft));if(n!==e.pos)return e.start=n,Pt(e,e.start=n)}(e,t)}function Tt(e){const t=[];for(e.start=e.pos;!e.eof();)if(e.eat(123))t.push(e.pos);else if(e.eat(125)){if(!t.length){e.pos--;break}t.pop()}else e.pos++;if(t.length)throw e.pos=t.pop(),e.error("Expecting }");return e.current()}function Pt(e,t=e.start,n=e.pos){return{type:"Literal",value:e.substring(t,n),start:t,end:n}}function zt(e){const t=e.pos;return e.eat(46)?(e.start=t,e.eatWhile(ye)?e.current():"1"):""}function Rt(e){const t=(43===(n=e.peek())?"+":33===n&&"!")||44===n&&","||58===n&&":"||45===n&&"-"||void 0;var n;if(t)return{type:"Operator",operator:t,start:e.pos++,end:e.pos}}function It(e){return 64===e||36===e}function qt(e){return ye(e)||we(e,65,70)}function Ut(e){return ve(e)||45===e}function Ft(e){return ke(e)||37===e||47===e}function Vt(e){return"ColorValue"===e.type||"NumberValue"===e.type&&!e.unit}function Wt(e,t){let n=0,r=0;for(;t.length;){const e=Bt(t);if("Literal"!==e.type&&"NumberValue"!==e.type)break;n=e.start,r||(r=e.end),t.pop()}n!==r&&t.push(Pt(e,n,r))}function Bt(e){return e[e.length-1]}function Ht(e){return e.tokens[e.pos]}function Zt(e){return e.pos<e.size}function Jt(e,t){return!!t(Ht(e))&&(e.pos++,!0)}function Xt(e,t,n=Ht(e)){n&&null!=n.start&&(t+=` at ${n.start}`);const r=new Error(t);return r.pos=n&&n.start,r}function Yt(e,t){let n,r,i=!1;const o=[],s=Ht(e),a=!!t.value;for(a||!Qt(s)||function(e){const t=e.tokens[e.pos],n=e.tokens[e.pos+1];return t&&n&&Qt(t)&&"Bracket"===n.type}(e)||(e.pos++,n=s.value,Jt(e,dn)),a&&Jt(e,rn);Zt(e);)if(Jt(e,cn))i=!0;else if(r=Gt(e,a))o.push(r);else if(!Jt(e,ln))break;if(n||o.length||i)return{name:n,value:o,important:i}}function Gt(e,t){const n=[];let r,i;for(;Zt(e);)if(r=Ht(e),un(r))e.pos++,Qt(r)&&(i=Kt(e))?n.push({type:"FunctionCall",name:r.value,arguments:i}):n.push(r);else{if(!(dn(r)||t&&rn(r)))break;e.pos++}return n.length?{type:"CSSValue",value:n}:void 0}function Kt(e){const t=e.pos;if(Jt(e,tn)){const n=[];let r;for(;Zt(e)&&!Jt(e,nn);)if(r=Gt(e,!0))n.push(r);else if(!Jt(e,rn)&&!Jt(e,an))throw Xt(e,"Unexpected token");return e.start=t,n}}function Qt(e){return e&&"Literal"===e.type}function en(e,t){return e&&"Bracket"===e.type&&(null==t||e.open===t)}function tn(e){return en(e,!0)}function nn(e){return en(e,!1)}function rn(e){return e&&"WhiteSpace"===e.type}function on(e,t){return e&&"Operator"===e.type&&(!t||e.operator===t)}function sn(e){return on(e,"+")}function an(e){return on(e,",")}function ln(e){return an(e)}function cn(e){return on(e,"!")}function un(e){return"StringValue"===e.type||"ColorValue"===e.type||"NumberValue"===e.type||"Literal"===e.type||"Field"===e.type}function dn(e){return on(e,":")||on(e,"-")}function hn(e,t){try{const n="string"===typeof e?function(e,t){let n,r=0;const i=new Ce(e),o=[];for(;!i.eof();){if(n=Nt(i,0===r&&!t),!n)throw i.error("Unexpected character");if("Bracket"===n.type&&(!r&&n.open&&Wt(i,o),r+=n.open?1:-1,r<0))throw i.error("Unexpected bracket",n.start);o.push(n),Vt(n)&&(n=Rt(i))&&o.push(n)}return o}(e,t&&t.value):e;return function(e,t={}){const n=function(e){return{tokens:e,start:0,pos:0,size:e.length}}(e),r=[];let i;for(;Zt(n);)if(i=Yt(n,t))r.push(i);else if(!Jt(n,sn))throw Xt(n,"Unexpected token");return r}(n,t)}catch(n){throw n instanceof Se&&"string"===typeof e&&(n.message+=`\n${e}\n${"-".repeat(n.pos)}^`),n}}function fn(e,t,n){if(e&&t){e.length&&n&&gn(e,n);for(const n of t)gn(e,n);return e}const r=e||t;return r&&r.slice()}function pn(e,t,n){return e.name=t.name,n.options["output.reverseAttributes"]||(e.value=t.value),e.implied||(e.implied=t.implied),e.boolean||(e.boolean=t.boolean),"expression"!==e.valueType&&(e.valueType=t.valueType),e}function gn(e,t){const n=e.length-1;"string"===typeof e[n]&&"string"===typeof t?e[n]+=t:e.push(t)}function mn(e){let t;for(;e.children.length;)t=e,e=e.children[e.children.length-1];return{parent:t,node:e}}function bn(e){return"AbbreviationNode"===e.type}function yn(e,t,n){let r=[];for(const i of e.children){const e=t(i);if(e){r=r.concat(e.children);const n=mn(e);bn(n.node)&&(n.node.children=n.node.children.concat(yn(i,t)))}else r.push(i),i.children=yn(i,t)}return e.children=r}function wn(e,t){e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=e.repeat)}function vn(e,t=0){return{options:e,value:"",level:t,offset:0,line:0,column:0}}function kn(e,t){An(e,(0,e.options["output.text"])(t,e.offset,e.line,e.column))}function xn(e,t){const n=t.split(/\r\n|\r|\n/g);for(let r=0,i=n.length-1;r<=i;r++)kn(e,n[r]),r!==i&&_n(e,!0)}function _n(e,t){const n=e.options["output.baseIndent"];kn(e,e.options["output.newline"]+n),e.line++,e.column=n.length,t&&function(e,t=e.level){const n=e.options["output.indent"];kn(e,n.repeat(Math.max(t,0)))}(e,!0===t?e.level:t)}function Cn(e,t,n){An(e,(0,e.options["output.field"])(t,n,e.offset,e.line,e.column))}function Sn(e,t){return $n(e,t.options["output.attributeCase"])}function En(e,t,n){return"expression"===e.valueType?n?"{":"}":"single"===t.options["output.attributeQuotes"]?"'":'"'}function Ln(e,t){return e.boolean||t.options["output.booleanAttributes"].includes((e.name||"").toLowerCase())}function On(e,t){return"string"===typeof e?t.options.inlineElements.includes(e.toLowerCase()):e.name?On(e.name,t):Boolean(e.value&&!e.attributes)}function An(e,t){e.value+=t,e.offset+=t.length,e.column+=t.length}function $n(e,t){return t?"upper"===t?e.toUpperCase():e.toLowerCase():e}const Mn={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};function jn(e,t,n){const r=function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(bn(n))return n}}(t),i=n.context?n.context.name:"",o=((r?r.name:i)||"").toLowerCase();e.name=Mn[o]||(On(o,n)?"span":"div")}const Dn={ru:{common:["\u0434\u0430\u043b\u0435\u043a\u043e-\u0434\u0430\u043b\u0435\u043a\u043e","\u0437\u0430","\u0441\u043b\u043e\u0432\u0435\u0441\u043d\u044b\u043c\u0438","\u0433\u043e\u0440\u0430\u043c\u0438","\u0432 \u0441\u0442\u0440\u0430\u043d\u0435","\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0436\u0438\u0432\u0443\u0442","\u0440\u044b\u0431\u043d\u044b\u0435","\u0442\u0435\u043a\u0441\u0442\u044b"],words:["\u0432\u0434\u0430\u043b\u0438","\u043e\u0442 \u0432\u0441\u0435\u0445","\u043e\u043d\u0438","\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445","\u0434\u043e\u043c\u0430\u0445","\u043d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443","\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430","\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e","\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e","\u043e\u043a\u0435\u0430\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439","\u0440\u0443\u0447\u0435\u0435\u043a","\u0434\u0430\u043b\u044c","\u0436\u0443\u0440\u0447\u0438\u0442","\u043f\u043e \u0432\u0441\u0435\u0439","\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442","\u0435\u0435","\u0432\u0441\u0435\u043c\u0438","\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438","\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438","\u044d\u0442\u0430","\u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f","\u0441\u0442\u0440\u0430\u043d\u0430","\u043a\u043e\u0442\u043e\u0440\u043e\u0439","\u0436\u0430\u0440\u0435\u043d\u043d\u044b\u0435","\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f","\u0437\u0430\u043b\u0435\u0442\u0430\u044e\u0442","\u043f\u0440\u044f\u043c\u043e","\u0440\u043e\u0442","\u0434\u0430\u0436\u0435","\u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0430\u044f","\u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f","\u043d\u0435","\u0438\u043c\u0435\u0435\u0442","\u0432\u043b\u0430\u0441\u0442\u0438","\u043d\u0430\u0434","\u0440\u044b\u0431\u043d\u044b\u043c\u0438","\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438","\u0432\u0435\u0434\u0443\u0449\u0438\u043c\u0438","\u0431\u0435\u0437\u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u043d\u044b\u0439","\u043e\u0431\u0440\u0430\u0437","\u0436\u0438\u0437\u043d\u0438","\u043e\u0434\u043d\u0430\u0436\u0434\u044b","\u043e\u0434\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f","\u0441\u0442\u0440\u043e\u0447\u043a\u0430","\u0440\u044b\u0431\u043d\u043e\u0433\u043e","\u0442\u0435\u043a\u0441\u0442\u0430","\u0438\u043c\u0435\u043d\u0438","lorem","ipsum","\u0440\u0435\u0448\u0438\u043b\u0430","\u0432\u044b\u0439\u0442\u0438","\u0431\u043e\u043b\u044c\u0448\u043e\u0439","\u043c\u0438\u0440","\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438","\u0432\u0435\u043b\u0438\u043a\u0438\u0439","\u043e\u043a\u0441\u043c\u043e\u043a\u0441","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b","\u043e","\u0437\u043b\u044b\u0445","\u0437\u0430\u043f\u044f\u0442\u044b\u0445","\u0434\u0438\u043a\u0438\u0445","\u0437\u043d\u0430\u043a\u0430\u0445","\u0432\u043e\u043f\u0440\u043e\u0441\u0430","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0445","\u0442\u043e\u0447\u043a\u0430\u0445","\u0437\u0430\u043f\u044f\u0442\u043e\u0439","\u043d\u043e","\u0442\u0435\u043a\u0441\u0442","\u0434\u0430\u043b","\u0441\u0431\u0438\u0442\u044c","\u0441\u0435\u0431\u044f","\u0442\u043e\u043b\u043a\u0443","\u043e\u043d","\u0441\u043e\u0431\u0440\u0430\u043b","\u0441\u0435\u043c\u044c","\u0441\u0432\u043e\u0438\u0445","\u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445","\u0431\u0443\u043a\u0432","\u043f\u043e\u0434\u043f\u043e\u044f\u0441\u0430\u043b","\u0438\u043d\u0438\u0446\u0438\u0430\u043b","\u0437\u0430","\u043f\u043e\u044f\u0441","\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f","\u0434\u043e\u0440\u043e\u0433\u0443","\u0432\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c","\u043f\u0435\u0440\u0432\u0443\u044e","\u0432\u0435\u0440\u0448\u0438\u043d\u0443","\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445","\u0433\u043e\u0440","\u0431\u0440\u043e\u0441\u0438\u043b","\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439","\u0432\u0437\u0433\u043b\u044f\u0434","\u043d\u0430\u0437\u0430\u0434","\u0441\u0438\u043b\u0443\u044d\u0442","\u0441\u0432\u043e\u0435\u0433\u043e","\u0440\u043e\u0434\u043d\u043e\u0433\u043e","\u0433\u043e\u0440\u043e\u0434\u0430","\u0431\u0443\u043a\u0432\u043e\u0433\u0440\u0430\u0434","\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0434\u0435\u0440\u0435\u0432\u043d\u0438","\u0430\u043b\u0444\u0430\u0432\u0438\u0442","\u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0441\u0432\u043e\u0435\u0433\u043e","\u043f\u0435\u0440\u0435\u0443\u043b\u043a\u0430","\u0433\u0440\u0443\u0441\u0442\u043d\u044b\u0439","\u0440\u0435\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439","\u0432\u043e\u043f\u0440\u043e\u0441","\u0441\u043a\u0430\u0442\u0438\u043b\u0441\u044f","\u0435\u0433\u043e","\u0449\u0435\u043a\u0435","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0434\u043e\u0440\u043e\u0433\u0435","\u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u044c","\u043e\u043d\u0430","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b\u0430","\u043c\u043e\u0435\u0439","\u0432\u0441\u0435","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f","\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e","\u0440\u0430\u0437","\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435","\u0447\u0442\u043e","\u043c\u0435\u043d\u044f","\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c","\u044d\u0442\u043e","\u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430","\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0441\u044f","\u0442\u044b","\u043b\u0443\u0447\u0448\u0435","\u0441\u0432\u043e\u044e","\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e","\u0441\u0442\u0440\u0430\u043d\u0443","\u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0432\u0448\u0438\u0441\u044c","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u0438","\u043d\u0430\u0448","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0432\u0441\u043a\u043e\u0440\u0435","\u0435\u043c\u0443","\u043f\u043e\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0439","\u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044c","\u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445","\u0442\u0435\u043a\u0441\u0442\u043e\u0432","\u043d\u0430\u043f\u043e\u0438\u0432\u0448\u0438\u0439","\u044f\u0437\u044b\u043a\u043e\u043c","\u0440\u0435\u0447\u044c\u044e","\u0437\u0430\u043c\u0430\u043d\u0438\u0432\u0448\u0438\u0439","\u0441\u0432\u043e\u0435","\u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u043e","\u043a\u043e\u0442\u043e\u0440\u043e\u0435","\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e","\u0441\u043d\u043e\u0432\u0430","\u0441\u043d\u043e\u0432\u0430","\u0441\u0432\u043e\u0438\u0445","\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445","\u0435\u0441\u043b\u0438","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438","\u0442\u043e","\u0436\u0438\u0432\u0435\u0442","\u0442\u0430\u043c","\u0434\u043e","\u0441\u0438\u0445","\u043f\u043e\u0440"]},sp:{common:["mujer","uno","dolor","m\xe1s","de","poder","mismo","si"],words:["ejercicio","preferencia","perspicacia","laboral","pa\xf1o","suntuoso","molde","namibia","planeador","mirar","dem\xe1s","oficinista","excepci\xf3n","odio","consecuencia","casi","auto","chicharra","velo","elixir","ataque","no","odio","temporal","cu\xf3rum","dign\xedsimo","facilismo","letra","nihilista","expedici\xf3n","alma","alveolar","aparte","le\xf3n","animal","como","paria","belleza","modo","natividad","justo","ataque","s\xe9quito","pillo","sed","ex","y","voluminoso","temporalidad","verdades","racional","asunci\xf3n","incidente","marejada","placenta","amanecer","fuga","previsor","presentaci\xf3n","lejos","necesariamente","sospechoso","adiposidad","quind\xedo","p\xf3cima","voluble","d\xe9bito","sinti\xf3","accesorio","falda","sapiencia","volutas","queso","permacultura","laudo","soluciones","entero","pan","litro","tonelada","culpa","libertario","mosca","dictado","reincidente","nascimiento","dolor","escolar","impedimento","m\xednima","mayores","repugnante","dulce","obcecado","monta\xf1a","enigma","total","delet\xe9reo","d\xe9cima","c\xe1bala","fotograf\xeda","dolores","molesto","olvido","paciencia","resiliencia","voluntad","molestias","magn\xedfico","distinci\xf3n","ovni","marejada","cerro","torre","y","abogada","manantial","corporal","agua","crep\xfasculo","ataque","desierto","laboriosamente","angustia","afortunado","alma","encefalograma","materialidad","cosas","o","renuncia","error","menos","conejo","abad\xeda","analfabeto","remo","fugacidad","oficio","en","alm\xe1cigo","vos","pan","represi\xf3n","n\xfameros","triste","refugiado","trote","inventor","corchea","repelente","magma","recusado","patr\xf3n","expl\xedcito","paloma","s\xedndrome","inmune","autoinmune","comodidad","ley","vietnamita","demonio","tasmania","repeler","ap\xe9ndice","arquitecto","columna","yugo","computador","mula","a","prop\xf3sito","fantas\xeda","alias","rayo","tenedor","deleznable","ventana","cara","anemia","corrupto"]},latin:{common:["lorem","ipsum","dolor","sit","amet","consectetur","adipisicing","elit"],words:["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]}},Nn=/^lorem([a-z]*)(\d*)(-\d*)?$/i;function Tn(e,t){return Math.floor(Math.random()*(t-e)+e)}function Pn(e,t){const n=e.length,r=Math.min(n,t),i=[];for(;i.length<r;){const t=e[Tn(0,n)];i.includes(t)||i.push(t)}return i}function zn(e,t){return e.length&&(e=[Rn(e[0])].concat(e.slice(1))),e.join(" ")+(t||(n="?!...")[Tn(0,n.length-1)]);var n}function Rn(e){return e[0].toUpperCase()+e.slice(1)}function In(e){if(e.length<2)return e;const t=(e=e.slice()).length,n=/,$/;let r=0;r=t>3&&t<=6?Tn(0,1):t>6&&t<=12?Tn(0,2):Tn(1,4);for(let i,o=0;o<r;o++)i=Tn(0,t-2),n.test(e[i])||(e[i]+=",");return e}function qn(e,t,n){const r=[];let i,o=0;for(n&&e.common&&(i=e.common.slice(0,t),o+=i.length,r.push(zn(In(i),".")));o<t;)i=Pn(e.words,Math.min(Tn(2,30),t-o)),o+=i.length,r.push(zn(In(i)));return r.join(" ")}function Un(e){"class"===e.name?e.name="className":"for"===e.name&&(e.name="htmlFor")}function Fn(e){return"select"!==e.name}const Vn=/^(-+)([a-z0-9]+[a-z0-9-]*)/i,Wn=/^(_+)([a-z0-9]+[a-z0-9-_]*)/i,Bn=e=>/^[a-z]\-/i.test(e),Hn=e=>/^[a-z]/i.test(e);function Zn(e,t,n){!function(e){const t=Jn(e),n=[];for(const r of t.classNames){const e=r.indexOf("_");e>0&&!r.startsWith("-")?(n.push(r.slice(0,e)),n.push(r.slice(e))):n.push(r)}n.length&&(t.classNames=n.filter(tr),t.block=Gn(t.classNames),Qn(e,t.classNames.join(" ")))}(e),function(e,t,n){const r=Jn(e),i=[],{options:o}=n,s=t.slice(1).concat(e);for(let l of r.classNames){let e,t="";const r=l;(e=l.match(Vn))&&(t=Yn(s,e[1].length,n.context)+o["bem.element"]+e[2],i.push(t),l=l.slice(e[0].length)),(e=l.match(Wn))&&(t||(t=Yn(s,e[1].length),i.push(t)),i.push(`${t}${o["bem.modifier"]}${e[2]}`),l=l.slice(e[0].length)),l===r&&i.push(r)}const a=i.filter(tr);a.length&&Qn(e,a.join(" "))}(e,t,n)}function Jn(e){if(!e._bem){let t="";if(e.attributes)for(const n of e.attributes)if("class"===n.name&&n.value){t=er(n.value);break}e._bem=Xn(t)}return e._bem}function Xn(e){const t=e?e.split(/\s+/):[];return{classNames:t,block:Gn(t)}}function Yn(e,t=0,n){let r=Math.max(e.length-t,0);do{const t=e[r];if(t){const e=Jn(t);if(e.block)return e.block}}while(0<r--);if(n){const e=function(e){return e._bem||(e._bem=Xn(e.attributes&&e.attributes.class||"")),e._bem}(n);if(e.block)return e.block}return""}function Gn(e){return Kn(e,Bn)||Kn(e,Hn)||void 0}function Kn(e,t){for(const n of e){if(Vn.test(n)||Wn.test(n))break;if(t(n))return n}}function Qn(e,t){for(const n of e.attributes)if("class"===n.name){n.value=[t];break}}function er(e){let t="";for(const n of e)t+="string"===typeof n?n:n.name;return t}function tr(e,t,n){return!!e&&n.indexOf(e)===t}function nr(e,t,n){const r=(e,r,o)=>{const{parent:s,current:a}=n;n.parent=a,n.current=e,t(e,r,o,n,i),n.current=a,n.parent=s},i=(e,t,i)=>{n.ancestors.push(n.current),r(e,t,i),n.ancestors.pop()};e.children.forEach(r)}function rr(e){return{current:null,parent:void 0,ancestors:[],config:e,field:1,out:vn(e.options)}}const ir=[{type:"Field",index:0,name:""}];function or(e){return!!e&&(!e.name&&!e.attributes)}function sr(e,t){return!!e&&On(e,t)}function ar(e){return"object"===typeof e&&"Field"===e.type}function lr(e,t){const{out:n}=t;let r=-1;for(const i of e)"string"===typeof i?xn(n,i):(Cn(n,t.field+i.index,i.name),i.index>r&&(r=i.index));-1!==r&&(t.field+=r+1)}function cr(e){return!e.implied||"raw"!==e.valueType||!!e.value&&e.value.length>0}function ur(e){const t=[],n={pos:0,text:e};let r,i=n.pos,o=n.pos;for(;n.pos<n.text.length;)o=n.pos,(r=dr(n))?(i!==n.pos&&t.push(e.slice(i,o)),t.push(r),i=n.pos):n.pos++;return i!==n.pos&&t.push(e.slice(i)),t}function dr(e){if(91===hr(e)){const t=++e.pos;let n=t,r=t,i=1;for(;e.pos<e.text.length;){const o=hr(e);if(fr(o)){for(n=e.pos;pr(hr(e));)e.pos++;r=e.pos}else{if(91===o)i++;else if(93===o&&0===--i)return{before:e.text.slice(t,n),after:e.text.slice(r,e.pos++),name:e.text.slice(n,r)};e.pos++}}}}function hr(e,t=e.pos){return e.text.charCodeAt(t)}function fr(e){return e>=65&&e<=90}function pr(e){return fr(e)||e>47&&e<58||95===e||45===e}function gr(e,t){const{comment:n}=t;if(!n.enabled||!n.trigger||!e.name||!e.attributes)return!1;for(const r of e.attributes)if(r.name&&n.trigger.includes(r.name))return!0;return!1}function mr(e,t,n){const r={},{out:i}=n;for(const o of e.attributes)o.name&&o.value&&(r[o.name.toUpperCase()]=o.value);for(const o of t)"string"===typeof o?xn(i,o):r[o.name]&&(xn(i,o.before),lr(r[o.name],n),xn(i,o.after))}const br=/^<([\w\-:]+)[\s>]/;function yr(e,t){const n=rr(t);return n.comment=function(e){const{options:t}=e;return{enabled:t["comment.enabled"],trigger:t["comment.trigger"],before:t["comment.before"]?ur(t["comment.before"]):void 0,after:t["comment.after"]?ur(t["comment.after"]):void 0}}(t),nr(e,wr,n),n.out.value}function wr(e,t,n,r,i){const{out:o,config:s}=r,a=xr(e,t,n,r),l=function(e){const{config:t,parent:n}=e;if(!n||or(n)||n.name&&t.options["output.formatSkip"].includes(n.name))return 0;return 1}(r);if(o.level+=l,a&&_n(o,!0),e.name){const t=function(e,t){return $n(e,t.options["output.tagCase"])}(e.name,s);if(function(e,t){gr(e,t)&&t.comment.before&&mr(e,t.comment.before,t)}(e,r),xn(o,`<${t}`),e.attributes)for(const n of e.attributes)cr(n)&&vr(n,r);if(!e.selfClosing||e.children.length||e.value){if(xn(o,">"),!kr(e,r,i)){if(e.value){const t=e.value.some(_r)||function(e,t){if(e.length&&"string"===typeof e[0]){const n=br.exec(e[0]);if((null===n||void 0===n?void 0:n.length)&&!t.options.inlineElements.includes(n[1].toLowerCase()))return!0}return!1}(e.value,s);t&&_n(r.out,++o.level),lr(e.value,r),t&&_n(r.out,--o.level)}if(e.children.forEach(i),!e.value&&!e.children.length){const t=s.options["output.formatLeafNode"]||s.options["output.formatForce"].includes(e.name);t&&_n(r.out,++o.level),lr(ir,r),t&&_n(r.out,--o.level)}}xn(o,`</${t}>`),function(e,t){gr(e,t)&&t.comment.after&&mr(e,t.comment.after,t)}(e,r)}else xn(o,`${function(e){switch(e.options["output.selfClosingStyle"]){case"xhtml":return" /";case"xml":return"/";default:return""}}(s)}>`)}else!kr(e,r,i)&&e.value&&(lr(e.value,r),e.children.forEach(i));if(a&&t===n.length-1&&r.parent){const e=or(r.parent)?0:1;_n(o,o.level-e)}o.level-=l}function vr(e,t){const{out:n,config:r}=t;if(e.name){const i=Sn(e.name,r),o=En(e,r,!0),s=En(e,r);let a=e.value;Ln(e,r)&&!a?r.options["output.compactBoolean"]||(a=[i]):a||(a=ir),xn(n," "+i),a?(xn(n,"="+o),lr(a,t),xn(n,s)):"html"!==r.options["output.selfClosingStyle"]&&xn(n,"="+o+s)}}function kr(e,t,n){if(e.value&&e.children.length){const r=e.value.findIndex(ar);if(-1!==r){lr(e.value.slice(0,r),t);const i=t.out.line;let o=r+1;return e.children.forEach(n),t.out.line!==i&&"string"===typeof e.value[o]&&xn(t.out,e.value[o++].trimLeft()),lr(e.value.slice(o),t),!0}}return!1}function xr(e,t,n,r){const{config:i,parent:o}=r;if(!i.options["output.format"])return!1;if(0===t&&!o)return!1;if(o&&or(o)&&1===n.length)return!1;if(or(e)){if(or(n[t-1])||or(n[t+1])||e.value.some(_r)||e.value.some(ar)&&e.children.length)return!0}if(On(e,i)){if(0===t){for(let e=0;e<n.length;e++)if(!On(n[e],i))return!0}else if(!On(n[t-1],i))return!0;if(i.options["output.inlineBreak"]){let e=1,r=t,o=t;for(;sr(n[--r],i);)e++;for(;sr(n[++o],i);)e++;if(e>=i.options["output.inlineBreak"])return!0}for(let t=0,n=e.children.length;t<n;t++)if(xr(e.children[t],t,e.children,r))return!0;return!1}return!0}function _r(e){return"string"===typeof e&&/\r|\n/.test(e)}function Cr(e,t,n){const r=rr(t);return r.options=n||{},nr(e,Sr,r),r.out.value}function Sr(e,t,n,r,i){const{out:o,options:s}=r,{primary:a,secondary:l}=function(e){const t=[],n=[];if(e.attributes)for(const r of e.attributes)Er(r)?t.push(r):n.push(r);return{primary:t,secondary:n}}(e),c=r.parent?1:0;o.level+=c,function(e,t,n,r){if(!r.parent&&0===t)return!1;return!or(e)}(e,t,0,r)&&_n(o,!0),!e.name||"div"===e.name&&a.length||xn(o,(s.beforeName||"")+e.name+(s.afterName||"")),function(e,t){for(const n of e)if(n.value)if("class"===n.name){xn(t.out,".");lr(n.value.map(e=>"string"===typeof e?e.replace(/\s+/g,"."):e),t)}else xn(t.out,"#"),lr(n.value,t)}(a,r),function(e,t){if(e.length){const{out:n,config:r,options:i}=t;i.beforeAttribute&&xn(n,i.beforeAttribute);for(let o=0;o<e.length;o++){const s=e[o];xn(n,Sn(s.name||"",r)),Ln(s,r)&&!s.value?!r.options["output.compactBoolean"]&&i.booleanValue&&xn(n,"="+i.booleanValue):(xn(n,"="+En(s,r,!0)),lr(s.value||ir,t),xn(n,En(s,r))),o!==e.length-1&&i.glueAttribute&&xn(n,i.glueAttribute)}i.afterAttribute&&xn(n,i.afterAttribute)}}(l.filter(cr),r),!e.selfClosing||e.value||e.children.length?(!function(e,t){if(!e.value&&e.children.length)return;const n=e.value||ir,r=function(e){const t=[];let n=[];for(const r of e)if("string"===typeof r){const e=r.split(/\r\n?|\n/g);for(n.push(e.shift()||"");e.length;)t.push(n),n=[e.shift()||""]}else n.push(r);return n.length&&t.push(n),t}(n),{out:i,options:o}=t;if(1===r.length)(e.name||e.attributes)&&kn(i," "),lr(n,t);else{const e=[];let n=0;for(const t of r){const r=Lr(t);e.push(r),r>n&&(n=r)}i.level++;for(let s=0;s<r.length;s++)_n(i,!0),o.beforeTextLine&&kn(i,o.beforeTextLine),lr(r[s],t),o.afterTextLine&&(kn(i," ".repeat(n-e[s])),kn(i,o.afterTextLine));i.level--}}(e,r),e.children.forEach(i)):r.options.selfClose&&xn(o,r.options.selfClose),o.level-=c}function Er(e){return"class"===e.name||"id"===e.name}function Lr(e){let t=0;for(const n of e)t+="string"===typeof n?n.length:n.name.length;return t}const Or={html:yr,haml:function(e,t){return Cr(e,t,{beforeName:"%",beforeAttribute:"(",afterAttribute:")",glueAttribute:" ",afterTextLine:" |",booleanValue:"true",selfClose:"/"})},slim:function(e,t){return Cr(e,t,{beforeAttribute:" ",glueAttribute:" ",beforeTextLine:"| ",selfClose:"/"})},pug:function(e,t){return Cr(e,t,{beforeAttribute:"(",afterAttribute:")",glueAttribute:", ",beforeTextLine:"| ",selfClose:"xml"===t.options["output.selfClosingStyle"]?"/":""})}};function Ar(e,t){let n;if("string"===typeof e){let r=t;t.options["jsx.enabled"]&&(r=Object.assign(Object.assign({},r),{jsx:!0})),t.options["markup.href"]&&(r=Object.assign(Object.assign({},r),{href:!0})),e=Dt(e,r),n=t.text,t.text=void 0}return e=function(e,t){const n=[],r=t.options["output.reverseAttributes"],i=e=>{const o=e.name&&t.snippets[e.name];if(!o||n.includes(o))return null;const s=Dt(o,t);n.push(o),yn(s,i),n.pop();for(const t of s.children){if(e.attributes){const n=t.attributes||[],i=e.attributes||[];t.attributes=r?i.concat(n):n.concat(i)}wn(e,t)}return s};return yn(e,i),e}(e,t),function(e,t,n){const r=[e],i=e=>{t(e,r,n),r.push(e),e.children.forEach(i),r.pop()};e.children.forEach(i)}(e,Mr,t),t.text=null!==n&&void 0!==n?n:t.text,e}function $r(e,t){return(Or[t.syntax]||yr)(e,t)}function Mr(e,t,n){!function(e,t,n){!e.name&&e.attributes&&jn(e,t,n)}(e,t,n),function(e,t){if(!e.attributes)return;const n=[],r={};for(const i of e.attributes)if(i.name){const e=i.name;if(e in r){const n=r[e];"class"===e?n.value=fn(n.value,i.value," "):pn(n,i,t)}else n.push(r[e]=Object.assign({},i))}else n.push(i);e.attributes=n}(e,n),function(e,t,n){let r;if(e.name&&(r=e.name.match(Nn))){const i=Dn[r[1]]||Dn.latin,o=r[2]?Math.max(1,Number(r[2])):30,s=Tn(o,r[3]?Math.max(o,Number(r[3].slice(1))):o),a=e.repeat||function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if("AbbreviationNode"===n.type&&n.repeat)return n.repeat}}(t);e.name=e.attributes=void 0,e.value=[qn(i,s,!a||0===a.value)],e.repeat&&t.length>1&&jn(e,t,n)}}(e,t,n),"xsl"===n.syntax&&function(e){var t;"xsl:variable"!==(t=e.name)&&"xsl:with-param"!==t||!e.attributes||!e.children.length&&!e.value||(e.attributes=e.attributes.filter(Fn))}(e),n.options["jsx.enabled"]&&function(e){e.attributes&&e.attributes.forEach(Un)}(e),n.options["bem.enabled"]&&Zn(e,t,n)}const jr=/^([a-z-]+)(?:\s*:\s*([^\n\r;]+?);*)?$/,Dr={value:!0};function Nr(e,t){const n=t.match(jr);if(n){const t={},r=n[2]?n[2].split("|").map(Pr):[];for(const e of r)for(const n of e)Rr(n,t);return{type:"Property",key:e,property:n[1],value:r,keywords:t,dependencies:[]}}return{type:"Raw",key:e,value:t}}function Tr(e,t){return e.key===t.key?0:e.key<t.key?-1:1}function Pr(e){return hn(e.trim(),Dr)[0].value}function zr(e){return"Property"===e.type}function Rr(e,t){for(const n of e.value)if("Literal"===n.type)t[n.value]=n;else if("FunctionCall"===n.type)t[n.name]=n;else if("Field"===n.type){const e=n.name.trim();e&&(t[e]={type:"Literal",value:e})}}function Ir(e,t,n=!1){if((e=e.toLowerCase())===(t=t.toLowerCase()))return 1;if(!e||!t||e.charCodeAt(0)!==t.charCodeAt(0))return 0;const r=e.length,i=t.length;if(!n&&r>i)return 0;const o=Math.min(r,i),s=Math.max(r,i);let a=1,l=1,c=s,u=0,d=0,h=!1,f=!1;for(;a<r;){for(u=e.charCodeAt(a),h=!1,f=!1;l<i;){if(d=t.charCodeAt(l),u===d){h=!0,c+=s-(f?a:l);break}f=45===d,l++}if(!h){if(!n)return 0;break}a++}const p=s-o;return c*(a/s)/(qr(s)-qr(p))}function qr(e){return e*(e+1)/2}function Ur(e,t){return e.r||e.g||e.b||e.a?1===e.a?function(e,t){const n=t&&Vr(e.r)&&Vr(e.g)&&Vr(e.b)?Wr:Br;return"#"+n(e.r)+n(e.g)+n(e.b)}(e,t):function(e){const t=[e.r,e.g,e.b];1!==e.a&&t.push(Fr(e.a,8));return`${3===t.length?"rgb":"rgba"}(${t.join(", ")})`}(e):"transparent"}function Fr(e,t=4){return e.toFixed(t).replace(/\.?0+$/,"")}function Vr(e){return!(e%17)}function Wr(e){return(e>>4).toString(16)}function Br(e){return function(e,t){for(;e.length<t;)e="0"+e;return e}(e.toString(16),2)}function Hr(e,t){var n;const r=vn(t.options),i=t.options["output.format"];"@@section"===(null===(n=t.context)||void 0===n?void 0:n.name)&&(e=e.filter(e=>e.snippet));for(let o=0;o<e.length;o++)i&&0!==o&&_n(r,!0),Zr(e[o],r,t);return r.value}function Zr(e,t,n){const r=n.options["stylesheet.json"];if(e.name){const i=r?e.name.replace(/\-(\w)/g,(e,t)=>t.toUpperCase()):e.name;xn(t,i+n.options["stylesheet.between"]),e.value.length?function(e,t,n){const r=n.options["stylesheet.json"],i=r?function(e){if(1===e.value.length){const t=e.value[0];if(1===t.value.length&&"NumberValue"===t.value[0].type)return t.value[0]}}(e):null;if(!i||i.unit&&"px"!==i.unit){const i=function(e){return e.options["stylesheet.jsonDoubleQuotes"]?'"':"'"}(n);r&&kn(t,i);for(let r=0;r<e.value.length;r++)0!==r&&kn(t,", "),Xr(e.value[r],t,n);r&&kn(t,i)}else kn(t,String(i.value))}(e,t,n):Cn(t,0,""),r?kn(t,","):(Jr(e,t,!0),kn(t,n.options["stylesheet.after"]))}else{for(const r of e.value)for(const e of r.value)Yr(e,t,n);Jr(e,t,e.value.length>0)}}function Jr(e,t,n){e.important&&(n&&kn(t," "),kn(t,"!important"))}function Xr(e,t,n){for(let r=0,i=-1;r<e.value.length;r++){const o=e.value[r];0===r||"Field"===o.type&&o.start===i||kn(t," "),Yr(o,t,n),i=o.end}}function Yr(e,t,n){if("ColorValue"===e.type)kn(t,Ur(e,n.options["stylesheet.shortHex"]));else if("Literal"===e.type)xn(t,e.value);else if("NumberValue"===e.type)xn(t,Fr(e.value,4)+e.unit);else if("StringValue"===e.type){const n="double"===e.quote?'"':"'";xn(t,n+e.value+n)}else if("Field"===e.type)Cn(t,e.index,e.name);else if("FunctionCall"===e.type){kn(t,e.name+"(");for(let r=0;r<e.arguments.length;r++)r&&kn(t,", "),Xr(e.arguments[r],t,n);kn(t,")")}}const Gr="lg";function Kr(e,t){var n;const r=(null===(n=t.cache)||void 0===n?void 0:n.stylesheetSnippets)||function(e){const t=[];for(const n of Object.keys(e))t.push(Nr(n,e[n]));return function(e){e=e.slice().sort(Tr);const t=[];let n;for(const r of e.filter(zr)){for(;t.length;){if(n=t[t.length-1],r.property.startsWith(n.property)&&45===r.property.charCodeAt(n.property.length)){n.dependencies.push(r),t.push(r);break}t.pop()}t.length||t.push(r)}return e}(t)}(t.snippets);t.cache&&(t.cache.stylesheetSnippets=r),"string"===typeof e&&(e=hn(e,{value:ci(t)}));const i=function(e,t){if(t.context){if("@@section"===t.context.name)return e.filter(e=>"Raw"===e.type);if("@@property"===t.context.name)return e.filter(e=>"Property"===e.type)}return e}(r,t);for(const o of e)Qr(o,i,t);return e}function Qr(e,t,n){if(!function(e,t){let n=null;const r=1===e.value.length?e.value[0]:null;if(r&&1===r.value.length){const e=r.value[0];"FunctionCall"===e.type&&e.name===Gr&&(n=e)}if(n||e.name===Gr)return n=n?Object.assign(Object.assign({},n),{name:"linear-gradient"}):{type:"FunctionCall",name:"linear-gradient",arguments:[ii(si(0,""))]},t.context||(e.name="background-image"),e.value=[ii(n)],!0;return!1}(e,n)){const r=n.options["stylesheet.fuzzySearchMinScore"];if(ci(n)){const i=n.context.name,o=t.find(e=>"Property"===e.type&&e.property===i);ei(e,n,o,r),e.snippet=o}else if(e.name){const i=ti(e.name,t,r,!0);e.snippet=i,i&&("Property"===i.type?function(e,t,n){const r=e.name,i=function(e,t){for(let n=0,r=0;n<e.length;n++){if(r=t.indexOf(e[n],r),-1===r)return e.slice(n);r++}return""}(r,t.key);if(i){if(e.value.length)return e;const r=ri(i,n,t);if(!r)return e;e.value.push(ii(r))}if(e.name=t.property,e.value.length)ei(e,n,t);else if(t.value.length){const r=t.value[0];e.value=1===t.value.length||r.some(ai)?r:r.map(e=>li(e,n))}}(e,i,n):function(e,t){let n,r=0;const i=/\$\{(\d+)(:[^}]+)?\}/g,o=e.value[0],s=[];for(;n=i.exec(t.value);)r!==n.index&&s.push(oi(t.value.slice(r,n.index))),r=n.index+n[0].length,o&&o.value.length?s.push(o.value.shift()):s.push(si(Number(n[1]),n[2]?n[2].slice(1):""));const a=t.value.slice(r);a&&s.push(oi(a));e.name=void 0,e.value=[ii(...s)]}(e,i))}}return(e.name||n.context)&&function(e,t){const n=t.options["stylesheet.unitAliases"],r=t.options["stylesheet.unitless"];for(const i of e.value)for(const o of i.value)"NumberValue"===o.type&&(o.unit?o.unit=n[o.unit]||o.unit:0===o.value||r.includes(e.name)||(o.unit=o.rawValue.includes(".")?t.options["stylesheet.floatUnit"]:t.options["stylesheet.intUnit"]))}(e,n),e}function ei(e,t,n,r){for(const i of e.value){const e=[];for(const o of i.value)if("Literal"===o.type)e.push(ri(o.value,t,n,r)||o);else if("FunctionCall"===o.type){const i=ri(o.name,t,n,r);i&&"FunctionCall"===i.type?e.push(Object.assign(Object.assign({},i),{arguments:o.arguments.concat(i.arguments.slice(o.arguments.length))})):e.push(o)}else e.push(o);i.value=e}}function ti(e,t,n=0,r=!1){let i=null,o=0;for(const s of t){const t=Ir(e,ni(s),r);if(1===t)return s;t&&t>=o&&(o=t,i=s)}return o>=n?i:null}function ni(e){return"string"===typeof e?e:e.key}function ri(e,t,n,r){let i;if(n){if(i=ti(e,Object.keys(n.keywords),r))return n.keywords[i];for(const t of n.dependencies)if(i=ti(e,Object.keys(t.keywords),r))return t.keywords[i]}return(i=ti(e,t.options["stylesheet.keywords"],r))?oi(i):null}function ii(...e){return{type:"CSSValue",value:e}}function oi(e){return{type:"Literal",value:e}}function si(e,t){return{type:"Field",index:e,name:t}}function ai(e){for(const t of e.value)if("Field"===t.type||"FunctionCall"===t.type&&t.arguments.some(ai))return!0;return!1}function li(e,t,n={index:1}){let r=[];for(const i of e.value)switch(i.type){case"ColorValue":r.push(si(n.index++,Ur(i,t.options["stylesheet.shortHex"])));break;case"Literal":r.push(si(n.index++,i.value));break;case"NumberValue":r.push(si(n.index++,`${i.value}${i.unit}`));break;case"StringValue":const e="single"===i.quote?"'":'"';r.push(si(n.index++,e+i.value+e));break;case"FunctionCall":r.push(si(n.index++,i.name),oi("("));for(let o=0,s=i.arguments.length;o<s;o++)r=r.concat(li(i.arguments[o],t,n).value),o!==s-1&&r.push(oi(", "));r.push(oi(")"));break;default:r.push(i)}return Object.assign(Object.assign({},e),{value:r})}function ci(e){return!!e.context&&("@@value"===e.context.name||!e.context.name.startsWith("@@"))}const ui={markup:"html",stylesheet:"css"},di={type:"markup",syntax:"html",variables:{lang:"en",locale:"en-US",charset:"UTF-8",indentation:"\t",newline:"\n"},snippets:{},options:{inlineElements:["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"],"output.indent":"\t","output.baseIndent":"","output.newline":"\n","output.tagCase":"","output.attributeCase":"","output.attributeQuotes":"double","output.format":!0,"output.formatLeafNode":!1,"output.formatSkip":["html"],"output.formatForce":["body"],"output.inlineBreak":3,"output.compactBoolean":!1,"output.booleanAttributes":["contenteditable","seamless","async","autofocus","autoplay","checked","controls","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","novalidate","readonly","required","reversed","selected","typemustmatch"],"output.reverseAttributes":!1,"output.selfClosingStyle":"html","output.field":(e,t)=>t,"output.text":e=>e,"markup.href":!0,"comment.enabled":!1,"comment.trigger":["id","class"],"comment.before":"","comment.after":"\n\x3c!-- /[#ID][.CLASS] --\x3e","bem.enabled":!1,"bem.element":"__","bem.modifier":"_","jsx.enabled":!1,"stylesheet.keywords":["auto","inherit","unset","none"],"stylesheet.unitless":["z-index","line-height","opacity","font-weight","zoom","flex","flex-grow","flex-shrink"],"stylesheet.shortHex":!0,"stylesheet.between":": ","stylesheet.after":";","stylesheet.intUnit":"px","stylesheet.floatUnit":"em","stylesheet.unitAliases":{e:"em",p:"%",x:"ex",r:"rem"},"stylesheet.json":!1,"stylesheet.jsonDoubleQuotes":!1,"stylesheet.fuzzySearchMinScore":0}},hi={markup:{snippets:fi({a:"a[href]","a:blank":"a[href='http://${0}' target='_blank' rel='noopener noreferrer']","a:link":"a[href='http://${0}']","a:mail":"a[href='mailto:${0}']","a:tel":"a[href='tel:+${0}']",abbr:"abbr[title]","acr|acronym":"acronym[title]",base:"base[href]/",basefont:"basefont/",br:"br/",frame:"frame/",hr:"hr/",bdo:"bdo[dir]","bdo:r":"bdo[dir=rtl]","bdo:l":"bdo[dir=ltr]",col:"col/",link:"link[rel=stylesheet href]/","link:css":"link[href='${1:style}.css']","link:print":"link[href='${1:print}.css' media=print]","link:favicon":"link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']","link:mf|link:manifest":"link[rel='manifest' href='${1:manifest.json}']","link:touch":"link[rel=apple-touch-icon href='${1:favicon.png}']","link:rss":"link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']","link:atom":"link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']","link:im|link:import":"link[rel=import href='${1:component}.html']",meta:"meta/","meta:utf":"meta[http-equiv=Content-Type content='text/html;charset=UTF-8']","meta:vp":"meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']","meta:compat":"meta[http-equiv=X-UA-Compatible content='${1:IE=7}']","meta:edge":"meta:compat[content='${1:ie=edge}']","meta:redirect":"meta[http-equiv=refresh content='0; url=${1:http://example.com}']","meta:kw":"meta[name=keywords content]","meta:desc":"meta[name=description content]",style:"style",script:"script","script:src":"script[src]",img:"img[src alt]/","img:s|img:srcset":"img[srcset src alt]","img:z|img:sizes":"img[sizes srcset src alt]",picture:"picture","src|source":"source/","src:sc|source:src":"source[src type]","src:s|source:srcset":"source[srcset]","src:t|source:type":"source[srcset type='${1:image/}']","src:z|source:sizes":"source[sizes srcset]","src:m|source:media":"source[media='(${1:min-width: })' srcset]","src:mt|source:media:type":"source:media[type='${2:image/}']","src:mz|source:media:sizes":"source:media[sizes srcset]","src:zt|source:sizes:type":"source[sizes srcset type='${1:image/}']",iframe:"iframe[src frameborder=0]",embed:"embed[src type]/",object:"object[data type]",param:"param[name value]/",map:"map[name]",area:"area[shape coords href alt]/","area:d":"area[shape=default]","area:c":"area[shape=circle]","area:r":"area[shape=rect]","area:p":"area[shape=poly]",form:"form[action]","form:get":"form[method=get]","form:post":"form[method=post]",label:"label[for]",input:"input[type=${1:text}]/",inp:"input[name=${1} id=${1}]","input:h|input:hidden":"input[type=hidden name]","input:t|input:text":"inp[type=text]","input:search":"inp[type=search]","input:email":"inp[type=email]","input:url":"inp[type=url]","input:p|input:password":"inp[type=password]","input:datetime":"inp[type=datetime]","input:date":"inp[type=date]","input:datetime-local":"inp[type=datetime-local]","input:month":"inp[type=month]","input:week":"inp[type=week]","input:time":"inp[type=time]","input:tel":"inp[type=tel]","input:number":"inp[type=number]","input:color":"inp[type=color]","input:c|input:checkbox":"inp[type=checkbox]","input:r|input:radio":"inp[type=radio]","input:range":"inp[type=range]","input:f|input:file":"inp[type=file]","input:s|input:submit":"input[type=submit value]","input:i|input:image":"input[type=image src alt]","input:b|input:btn|input:button":"input[type=button value]","input:reset":"input:button[type=reset]",isindex:"isindex/",select:"select[name=${1} id=${1}]","select:d|select:disabled":"select[disabled.]","opt|option":"option[value]",textarea:"textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",marquee:"marquee[behavior direction]","menu:c|menu:context":"menu[type=context]","menu:t|menu:toolbar":"menu[type=toolbar]",video:"video[src]",audio:"audio[src]","html:xml":"html[xmlns=http://www.w3.org/1999/xhtml]",keygen:"keygen/",command:"command/","btn:s|button:s|button:submit":"button[type=submit]","btn:r|button:r|button:reset":"button[type=reset]","btn:d|button:d|button:disabled":"button[disabled.]","fst:d|fset:d|fieldset:d|fieldset:disabled":"fieldset[disabled.]",bq:"blockquote",fig:"figure",figc:"figcaption",pic:"picture",ifr:"iframe",emb:"embed",obj:"object",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",mn:"main",tem:"template",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",out:"output",det:"details",sum:"summary",cmd:"command","ri:d|ri:dpr":"img:s","ri:v|ri:viewport":"img:z","ri:a|ri:art":"pic>src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{<!DOCTYPE html>}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta[http-equiv='X-UA-Compatible'][content='IE=edge']+meta:vp+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{\x3c!-- ${0} --\x3e}","cc:ie":"{\x3c!--[if IE]>${0}<![endif]--\x3e}","cc:noie":"{\x3c!--[if !IE]>\x3c!--\x3e${0}\x3c!--<![endif]--\x3e}"})},xhtml:{options:{"output.selfClosingStyle":"xhtml"}},xml:{options:{"output.selfClosingStyle":"xml"}},xsl:{snippets:fi({"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":'{<?xml version="1.0" encoding="UTF-8"?>}'}),options:{"output.selfClosingStyle":"xml"}},jsx:{options:{"jsx.enabled":!0}},pug:{snippets:fi({"!!!":"{doctype html}"})},stylesheet:{snippets:fi({"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${2});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:start|end|flex-start|flex-end|center|space-between|space-around|stretch|space-evenly",ai:"align-items:start|end|flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:time",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:start|end|auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:${1:#000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:${1:#000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:${1:#000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:${1:#000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:${1:#000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:${1:#000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:#000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:${1:#000}",cr:"color:rgb(${1:0}, ${2:0}, ${3:0})",cra:"color:rgba(${1:0}, ${2:0}, ${3:0}, ${4:.5})",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters(${0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|grid|inline-grid|subgrid|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fd:"font-display:auto|block|swap|fallback|optional",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fft:'font-family:"Times New Roman", Times, Baskerville, Georgia, serif',ffa:'font-family:Arial, "Helvetica Neue", Helvetica, sans-serif',ffv:"font-family:Verdana, Geneva, sans-serif",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fvs:"font-variation-settings:normal|inherit|initial|unset",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fsz:"font-size",fsza:"font-size-adjust",gtc:"grid-template-columns:repeat(${0})|minmax()",gtr:"grid-template-rows:repeat(${0})|minmax()",gta:"grid-template-areas",gt:"grid-template",gg:"grid-gap",gcg:"grid-column-gap",grg:"grid-row-gap",gac:"grid-auto-columns:auto|minmax()",gar:"grid-auto-rows:auto|minmax()",gaf:"grid-auto-flow:row|column|dense|inherit|initial|unset",gd:"grid",gc:"grid-column",gcs:"grid-column-start",gce:"grid-column-end",gr:"grid-row",grs:"grid-row-start",gre:"grid-row-end",ga:"grid-area",h:"height",jc:"justify-content:start|end|stretch|flex-start|flex-end|center|space-between|space-around|space-evenly",ji:"justify-items:start|end|center|stretch",js:"justify-self:start|end|center|stretch",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:${1:#000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick","op|opa":"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"})},sass:{options:{"stylesheet.after":""}},stylus:{options:{"stylesheet.between":" ","stylesheet.after":""}}};function fi(e){const t={};return Object.keys(e).forEach(n=>{for(const r of n.split("|"))t[r]=e[n]}),t}function pi(e={},t={}){const n=e.type||"markup",r=e.syntax||ui[n];return Object.assign(Object.assign(Object.assign({},di),e),{type:n,syntax:r,variables:gi(n,r,"variables",e,t),snippets:gi(n,r,"snippets",e,t),options:gi(n,r,"options",e,t)})}function gi(e,t,n,r,i={}){const o=hi[e],s=i[e],a=hi[t],l=i[t];return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},di[n]),o&&o[n]),a&&a[n]),s&&s[n]),l&&l[n]),r[n])}function mi(e,t=0){return{text:e,start:t,pos:e.length}}function bi(e){return e.pos===e.start}function yi(e,t=0){return e.text.charCodeAt(e.pos-1+t)}function wi(e){if(!bi(e))return e.text.charCodeAt(--e.pos)}function vi(e,t){if(bi(e))return!1;const n="function"===typeof t?t(yi(e)):t===yi(e);return n&&e.pos--,!!n}function ki(e,t){const n=e.pos;for(;vi(e,t););return e.pos<n}function xi(e){return 39===e||34===e}const _i={91:93,40:41,123:125};function Ci(e){const t=e.pos;if(!vi(e,62))return!1;let n=!1;for(vi(e,47);!bi(e);){if(ki(e,Ai),Li(e)){if(vi(e,47)){n=vi(e,60);break}if(vi(e,60)){n=!0;break}if(vi(e,Ai))continue;if(vi(e,61)){if(Li(e))continue;break}if(Ei(e)){n=!0;break}break}if(!Si(e))break}return e.pos=t,n}function Si(e){return function(e){const t=e.pos;if(function(e){const t=e.pos,n=wi(e);if(xi(n))for(;!bi(e);)if(wi(e)===n&&92!==yi(e))return!0;return e.pos=t,!1}(e)&&vi(e,61)&&Li(e))return!0;return e.pos=t,!1}(e)||Ei(e)}function Ei(e){const t=e.pos,n=[];for(;!bi(e);){const t=yi(e);if(ji(t))n.push(t);else if(Mi(t)){if(n.pop()!==_i[t])break}else if(!$i(t))break;e.pos--}return!(t===e.pos||!vi(e,61)||!Li(e))||(e.pos=t,!1)}function Li(e){return ki(e,Oi)}function Oi(e){return 58===e||45===e||function(e){return e&=-33,e>=65&&e<=90}(e)||function(e){return e>47&&e<58}(e)}function Ai(e){return 32===e||9===e}function $i(e){return!isNaN(e)&&61!==e&&!Ai(e)&&!xi(e)}function Mi(e){return 123===e||40===e||91===e}function ji(e){return 125===e||41===e||93===e}const Di=e=>e.charCodeAt(0),Ni="#.*:$-_!@%^+>/".split("").map(Di),Ti={type:"markup",lookAhead:!0,prefix:""};function Pi(e,t=e.length,n={}){const r=Object.assign(Object.assign({},Ti),n);let i;t=Math.min(e.length,Math.max(0,null==t?e.length:t)),r.lookAhead&&(t=function(e,t,n){xi(e.charCodeAt(t))&&t++;for(;Ui(e.charCodeAt(t),n.type);)t++;return t}(e,t,r));const o=function(e,t,n){if(!n)return 0;const r=mi(e),i=n.split("").map(Di);let o;r.pos=t;for(;!bi(r);)if(!zi(r,93,91)&&!zi(r,125,123)){if(o=r.pos,Ri(r,i))return o;r.pos--}return-1}(e,t,r.prefix||"");if(-1===o)return;const s=mi(e,o);s.pos=t;const a=[];for(;!bi(s);){if(i=yi(s),a.includes(125)){if(125===i){a.push(i),s.pos--;continue}if(123!==i){s.pos--;continue}}if(Ui(i,r.type))a.push(i);else if(qi(i,r.type)){if(a.pop()!==_i[i])break}else{if(a.includes(93)||a.includes(125)){s.pos--;continue}if(Ci(s)||!Ii(i))break}s.pos--}if(!a.length&&s.pos!==t){const r=e.slice(s.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:r,location:t-r.length,start:n.prefix?o-n.prefix.length:t-r.length,end:t}}}function zi(e,t,n){const r=e.pos;if(vi(e,t))for(;!bi(e);){if(vi(e,n))return!0;e.pos--}return e.pos=r,!1}function Ri(e,t){const n=e.pos;let r=!1;for(let i=t.length-1;i>=0&&!bi(e)&&vi(e,t[i]);i--)r=0===i;return r||(e.pos=n),r}function Ii(e){return e>64&&e<91||e>96&&e<123||e>47&&e<58||Ni.includes(e)}function qi(e,t){return 40===e||"markup"===t&&(91===e||123===e)}function Ui(e,t){return 41===e||"markup"===t&&(93===e||125===e)}function Fi(e,t){const n=pi(t);return"stylesheet"===n.type?function(e,t){return Hr(Kr(e,t),t)}(e,n):function(e,t){return $r(Ar(e,t),t)}(e,n)}var Vi,Wi={properties:["additive-symbols","align-content","align-items","justify-items","justify-self","justify-items","align-self","all","alt","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","behavior","block-size","border","border-block-end","border-block-start","border-block-end-color","border-block-start-color","border-block-end-style","border-block-start-style","border-block-end-width","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline-end","border-inline-start","border-inline-end-color","border-inline-start-color","border-inline-end-style","border-inline-start-style","border-inline-end-width","border-inline-start-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation-filters","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","columns","column-span","column-width","contain","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","enable-background","fallback","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","height","hyphens","image-orientation","image-rendering","ime-mode","inline-size","isolation","justify-content","kerning","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marker","marker-end","marker-mid","marker-start","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","motion","motion-offset","motion-path","motion-rotation","-moz-animation","-moz-animation-delay","-moz-animation-direction","-moz-animation-duration","-moz-animation-iteration-count","-moz-animation-name","-moz-animation-play-state","-moz-animation-timing-function","-moz-appearance","-moz-backface-visibility","-moz-background-clip","-moz-background-inline-policy","-moz-background-origin","-moz-border-bottom-colors","-moz-border-image","-moz-border-left-colors","-moz-border-right-colors","-moz-border-top-colors","-moz-box-align","-moz-box-direction","-moz-box-flex","-moz-box-flexgroup","-moz-box-ordinal-group","-moz-box-orient","-moz-box-pack","-moz-box-sizing","-moz-column-count","-moz-column-gap","-moz-column-rule","-moz-column-rule-color","-moz-column-rule-style","-moz-column-rule-width","-moz-columns","-moz-column-width","-moz-font-feature-settings","-moz-hyphens","-moz-perspective","-moz-perspective-origin","-moz-text-align-last","-moz-text-decoration-color","-moz-text-decoration-line","-moz-text-decoration-style","-moz-text-size-adjust","-moz-transform","-moz-transform-origin","-moz-transition","-moz-transition-delay","-moz-transition-duration","-moz-transition-property","-moz-transition-timing-function","-moz-user-focus","-moz-user-select","-ms-accelerator","-ms-behavior","-ms-block-progression","-ms-content-zoom-chaining","-ms-content-zooming","-ms-content-zoom-limit","-ms-content-zoom-limit-max","-ms-content-zoom-limit-min","-ms-content-zoom-snap","-ms-content-zoom-snap-points","-ms-content-zoom-snap-type","-ms-filter","-ms-flex","-ms-flex-align","-ms-flex-direction","-ms-flex-flow","-ms-flex-item-align","-ms-flex-line-pack","-ms-flex-order","-ms-flex-pack","-ms-flex-wrap","-ms-flow-from","-ms-flow-into","-ms-grid-column","-ms-grid-column-align","-ms-grid-columns","-ms-grid-column-span","-ms-grid-layer","-ms-grid-row","-ms-grid-row-align","-ms-grid-rows","-ms-grid-row-span","-ms-high-contrast-adjust","-ms-hyphenate-limit-chars","-ms-hyphenate-limit-lines","-ms-hyphenate-limit-zone","-ms-hyphens","-ms-ime-mode","-ms-interpolation-mode","-ms-layout-grid","-ms-layout-grid-char","-ms-layout-grid-line","-ms-layout-grid-mode","-ms-layout-grid-type","-ms-line-break","-ms-overflow-style","-ms-perspective","-ms-perspective-origin","-ms-perspective-origin-x","-ms-perspective-origin-y","-ms-progress-appearance","-ms-scrollbar-3dlight-color","-ms-scrollbar-arrow-color","-ms-scrollbar-base-color","-ms-scrollbar-darkshadow-color","-ms-scrollbar-face-color","-ms-scrollbar-highlight-color","-ms-scrollbar-shadow-color","-ms-scrollbar-track-color","-ms-scroll-chaining","-ms-scroll-limit","-ms-scroll-limit-x-max","-ms-scroll-limit-x-min","-ms-scroll-limit-y-max","-ms-scroll-limit-y-min","-ms-scroll-rails","-ms-scroll-snap-points-x","-ms-scroll-snap-points-y","-ms-scroll-snap-type","-ms-scroll-snap-x","-ms-scroll-snap-y","-ms-scroll-translation","-ms-text-align-last","-ms-text-autospace","-ms-text-combine-horizontal","-ms-text-justify","-ms-text-kashida-space","-ms-text-overflow","-ms-text-size-adjust","-ms-text-underline-position","-ms-touch-action","-ms-touch-select","-ms-transform","-ms-transform-origin","-ms-transform-origin-x","-ms-transform-origin-y","-ms-transform-origin-z","-ms-user-select","-ms-word-break","-ms-word-wrap","-ms-wrap-flow","-ms-wrap-margin","-ms-wrap-through","-ms-writing-mode","-ms-zoom","-ms-zoom-animation","nav-down","nav-index","nav-left","nav-right","nav-up","negative","-o-animation","-o-animation-delay","-o-animation-direction","-o-animation-duration","-o-animation-fill-mode","-o-animation-iteration-count","-o-animation-name","-o-animation-play-state","-o-animation-timing-function","object-fit","object-position","-o-border-image","-o-object-fit","-o-object-position","opacity","order","orphans","-o-table-baseline","-o-tab-size","-o-text-overflow","-o-transform","-o-transform-origin","-o-transition","-o-transition-delay","-o-transition-duration","-o-transition-property","-o-transition-timing-function","offset-block-end","offset-block-start","offset-inline-end","offset-inline-start","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","pad","padding","padding-bottom","padding-block-end","padding-block-start","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","paint-order","perspective","perspective-origin","pointer-events","position","prefix","quotes","range","resize","right","ruby-align","ruby-overhang","ruby-position","ruby-span","scrollbar-3dlight-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-darkshadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","scroll-behavior","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","shape-rendering","size","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","suffix","system","symbols","table-layout","tab-size","text-align","text-align-last","text-anchor","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","unicode-range","user-select","vertical-align","visibility","-webkit-animation","-webkit-animation-delay","-webkit-animation-direction","-webkit-animation-duration","-webkit-animation-fill-mode","-webkit-animation-iteration-count","-webkit-animation-name","-webkit-animation-play-state","-webkit-animation-timing-function","-webkit-appearance","-webkit-backdrop-filter","-webkit-backface-visibility","-webkit-background-clip","-webkit-background-composite","-webkit-background-origin","-webkit-border-image","-webkit-box-align","-webkit-box-direction","-webkit-box-flex","-webkit-box-flex-group","-webkit-box-ordinal-group","-webkit-box-orient","-webkit-box-pack","-webkit-box-reflect","-webkit-box-sizing","-webkit-break-after","-webkit-break-before","-webkit-break-inside","-webkit-column-break-after","-webkit-column-break-before","-webkit-column-break-inside","-webkit-column-count","-webkit-column-gap","-webkit-column-rule","-webkit-column-rule-color","-webkit-column-rule-style","-webkit-column-rule-width","-webkit-columns","-webkit-column-span","-webkit-column-width","-webkit-filter","-webkit-flow-from","-webkit-flow-into","-webkit-font-feature-settings","-webkit-hyphens","-webkit-line-break","-webkit-margin-bottom-collapse","-webkit-margin-collapse","-webkit-margin-start","-webkit-margin-top-collapse","-webkit-mask-clip","-webkit-mask-image","-webkit-mask-origin","-webkit-mask-repeat","-webkit-mask-size","-webkit-nbsp-mode","-webkit-overflow-scrolling","-webkit-padding-start","-webkit-perspective","-webkit-perspective-origin","-webkit-region-fragment","-webkit-tap-highlight-color","-webkit-text-fill-color","-webkit-text-size-adjust","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-touch-callout","-webkit-transform","-webkit-transform-origin","-webkit-transform-origin-x","-webkit-transform-origin-y","-webkit-transform-origin-z","-webkit-transform-style","-webkit-transition","-webkit-transition-delay","-webkit-transition-duration","-webkit-transition-property","-webkit-transition-timing-function","-webkit-user-drag","-webkit-user-modify","-webkit-user-select","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","zoom"]},Bi={tags:["body","head","html","address","blockquote","dd","div","section","article","aside","header","footer","nav","menu","dl","dt","fieldset","form","frame","frameset","h1","h2","h3","h4","h5","h6","iframe","noframes","object","ol","p","ul","applet","center","dir","hr","pre","a","abbr","acronym","area","b","base","basefont","bdo","big","br","button","caption","cite","code","col","colgroup","del","dfn","em","font","i","img","input","ins","isindex","kbd","label","legend","li","link","map","meta","noscript","optgroup","option","param","q","s","samp","script","select","small","span","strike","strong","style","sub","sup","table","tbody","td","textarea","tfoot","th","thead","title","tr","tt","u","var","canvas","main","figure","plaintext","figcaption","hgroup","details","summary"]},Hi=new Map,Zi=new Map,Ji=/^[a-z,A-Z,!,(,[,#,\.\{]/,Xi=/^[a-z,A-Z,!,(,[,#,\.]/,Yi=/^-?[a-z,A-Z,!,@,#]/,Gi=/[a-z,A-Z\.]/,Ki=be(be([],Bi.tags,!0),["lorem"],!1),Qi="bem",eo="|",to="t",no="c";function ro(e,t,n,r,i){var o,s=co(r);if(!s){if(!Hi.has(r)){var a=function(e){var t=uo(e),n={type:t,syntax:e},r=pi(n);return"xml"===e?{}:r.snippets}(r);Hi.set(r,Object.keys(a))}Vi=null!==(o=Hi.get(r))&&void 0!==o?o:[]}var l={lookAhead:!s,type:uo(r)},c=function(e,t,n,r){var i=t.getLineContent(n.lineNumber),o=i.substr(0,n.column-1),s=function(e,t){for(var n,r=0;r<3;r++)if(e.endsWith("".concat(eo).concat(Qi),t))t-=4,n=n?Qi+","+n:Qi;else if(e.endsWith("".concat(eo).concat(no),t))t-=2,n=n?"c,"+n:no;else{if(!e.endsWith("".concat(eo).concat(to),t))break;t-=2,n=n?"t,"+n:to}return{pos:t,filter:n}}(o,n.column-1),a=s.pos,l=s.filter,c=l?l.length+1:0,u=Pi(i,a,r);if(!u)return;var d=new e.Range(n.lineNumber,u.location+1,n.lineNumber,u.location+u.abbreviation.length+c+1);return{abbreviationRange:d,abbreviation:u.abbreviation,currentLineTillPosition:o,filter:l}}(e,t,n,l);if(c){var u=c.abbreviationRange,d=c.abbreviation,h=c.currentLineTillPosition,f=c.filter,p=function(e){if(e){var t=e.match(/[\w,:,-,\.]*$/);if(t)return t[0]}}(h);if(p!==d||!h.endsWith("<".concat(d))||s){var g,m=function(e,t){var n=uo(e),r=t?t.split(",").map(function(e){return e.trim()}):[],i=r.includes("bem"),o=r.includes("c"),s={"output.formatSkip":["html"],"output.formatForce":["body"],"output.field":lo,"output.inlineBreak":0,"output.compactBoolean":!1,"output.reverseAttributes":!1,"markup.href":!0,"comment.enabled":o,"comment.trigger":["id","class"],"comment.before":"","comment.after":"\n\x3c!-- /[#ID][.CLASS] --\x3e","bem.enabled":i,"bem.element":"__","bem.modifier":"_","jsx.enabled":"jsx"===e,"stylesheet.shortHex":!0,"stylesheet.between":"stylus"===e?" ":": ","stylesheet.after":"sass"===e||"stylus"===e?"":";","stylesheet.intUnit":"px","stylesheet.floatUnit":"em","stylesheet.unitAliases":{e:"em",p:"%",x:"ex",r:"rem"},"stylesheet.fuzzySearchMinScore":.3,"output.format":!0,"output.selfClosingStyle":"html"};return{type:n,options:s,variables:{},snippets:{},syntax:e,text:void 0,maxRepeat:1e3}}(r,f),b="",y=[];if(function(t,n){if(function(e,t){if(!t)return!1;if(co(e)){if(t.includes("#")){if(t.startsWith("#"))return/^#[\d,a-f,A-F]{1,6}$/.test(t);if(Ki.includes(t.substring(0,t.indexOf("#"))))return!1}return Yi.test(t)}if(t.startsWith("!"))return!/[^!]/.test(t);if((/\(/.test(t)||/\)/.test(t))&&!/\{[^\}\{]*[\(\)]+[^\}\{]*\}(?:[>\+\*\^]|$)/.test(t)&&!/\(.*\)[>\+\*\^]/.test(t)&&!/\[[^\[\]\(\)]+=".*"\]/.test(t)&&!/[>\+\*\^]\(.*\)/.test(t))return!1;if("jsx"===e)return Xi.test(t)&&Gi.test(t);return Ji.test(t)&&Gi.test(t)}(t,d)){try{b=Fi(n,m),s&&"!important".startsWith(n)&&(b="!important")}catch(A){}b&&!function(e,t,n,r){var i,o;if(co(e)&&r){var s=null!==(i=r["stylesheet.between"])&&void 0!==i?i:": ",a=null!==(o=r["stylesheet.after"])&&void 0!==o?o:";",l=t.indexOf(s[0],Math.max(t.length-s.length,0));l=l>=0?l:t.length;var c=t.substring(0,l);return n==="".concat(c).concat(s,"${0}").concat(a)||n.replace(/\s/g,"")===t.replace(/\s/g,"")+a}if("xml"===e&&Ki.some(function(e){return e.startsWith(t.toLowerCase())}))return!0;if(Ki.includes(t.toLowerCase())||Vi.includes(t))return!1;if(/[-,:]/.test(t)&&!/--|::/.test(t)&&!t.endsWith(":"))return!1;if("."===t)return!1;var u=t.match(/^([a-z,A-Z,\d]*)\.$/);if(u)return!u[1]||!Bi.tags.includes(u[1]);if("jsx"===e&&/^([A-Z][A-Za-z0-9]*)+$/.test(t))return!1;return n.toLowerCase()==="<".concat(t.toLowerCase(),">${1}</").concat(t.toLowerCase(),">")}(t,n,b,m.options)&&(g={kind:e.languages.CompletionItemKind.Property,label:d+(f?"|"+f.replace(",","|"):""),documentation:oo(b),detail:"Emmet abbreviation",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u,insertText:so(ao(b))},y=[g])}}(r,d),s){if(d.length>4&&Wi.properties.some(function(e){return e.startsWith(d)}))return{suggestions:[],incomplete:!0};if(g&&b.length){g.range=u,g.insertText=so(ao(b)),g.documentation=oo(b),g.label=b.replace(/([^\\])\$\{\d+\}/g,"$1").replace(/\$\{\d+:([^\}]+)\}/g,"$1"),g.filterText=d;var w=Zi.has(r)?Zi.get(r):Zi.get("css");if(!(y=io(e,null!==w&&void 0!==w?w:[],d,d,u,m,"Emmet Custom Snippet",!1)).find(function(e){return e.insertText===(null===g||void 0===g?void 0:g.insertText)})){var v=new RegExp(".*"+d.split("").map(function(e){return"$"===e||"+"===e?"\\"+e:e}).join(".*")+".*","i");(/\d/.test(d)||v.test(g.label))&&y.push(g)}}}else{var k=d,x=d.match(/(>|\+)([\w:-]+)$/);if(x&&3===x.length&&(k=x[2]),"xml"!==r){var _=io(e,Ki,k,d,u,m,"Emmet Abbreviation");y=y.concat(_)}if(!0===i.showAbbreviationSuggestions){var C=io(e,Vi.filter(function(e){return!Ki.includes(e)}),k,d,u,m,"Emmet Abbreviation");g&&C.length>0&&k!==d&&(g.sortText="0"+g.label,C.forEach(function(e){e.filterText=d,e.sortText="9"+d})),y=y.concat(C)}"html"===r&&y.length>=2&&d.includes(":")&&(null===g||void 0===g?void 0:g.insertText)==="<".concat(d,">${0}</").concat(d,">")&&(y=y.filter(function(e){return e.label!==d}))}return!0===i.showSuggestionsAsSnippets&&y.forEach(function(t){return t.kind=e.languages.CompletionItemKind.Snippet}),y.length?{suggestions:y,incomplete:!0}:void 0}}}function io(e,t,n,r,i,o,s,a){if(void 0===a&&(a=!0),!n||!t)return[];var l=[];return t.forEach(function(t){if(t.startsWith(n.toLowerCase())&&(!a||t!==n.toLowerCase())){var c,u=r+t.substr(n.length);try{c=Fi(u,o)}catch(A){}if(c){var d={kind:e.languages.CompletionItemKind.Property,label:n+t.substr(n.length),documentation:oo(c),detail:s,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:i,insertText:so(ao(c))};l.push(d)}}}),l}function oo(e){return e.replace(/([^\\])\$\{\d+\}/g,"$1|").replace(/\$\{\d+:([^\}]+)\}/g,"$1")}function so(e){return e?e.replace(/([^\\])(\$)([^\{])/g,"$1\\$2$3"):e}function ao(e){if(!e||!e.trim())return e;var t=-1,n=[],r=!1,i=!1,o=0,s=e.length;try{for(;o<s&&!r;)if("$"==e[o++]&&"{"==e[o++]){for(var a=-1,l=-1;o<s&&/\d/.test(e[o]);)a=a<0?o:a,l=o+1,o++;if(!(-1===a||-1===l||o>=s||"}"!=e[o]&&":"!=e[o])){var c=e.substring(a,l);if(r="0"===c)break;var u=!1;if(":"==e[o++])for(;o<s;){if("}"==e[o]){u=!0;break}o++}Number(c)>Number(t)?(t=Number(c),n=[{numberStart:a,numberEnd:l}],i=!u):Number(c)===t&&n.push({numberStart:a,numberEnd:l})}}}catch(A){}if(i&&!r)for(var d=0;d<n.length;d++){var h=n[d].numberStart,f=n[d].numberEnd;e=e.substr(0,h)+"0"+e.substr(f)}return e}var lo=function(e,t){return"${".concat(e).concat(t?":"+t:"","}")};function co(e){return"css"===e}function uo(e){return co(e)?"stylesheet":"markup"}function ho(e,t,n,r){var i=e[t],o=i.type,s=i.language;return"html"===n&&"html"===s?""===o&&(0===t||"delimiter.html"===e[t-1].type)||"text.html.basic"===e[0].type:"css"===n&&"css"===s?""===o||o==="tag."+r:"jsx"===n&&(!!t&&["identifier.js","type.identifier.js","identifier.ts","type.identifier.ts"].includes(o))}var fo={html:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],jade:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],slim:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],haml:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],xml:[".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],xsl:["!",".","}","*","$","/","]",">","0","1","2","3","4","5","6","7","8","9"],css:[":","!","-","0","1","2","3","4","5","6","7","8","9"],scss:[":","!","-","0","1","2","3","4","5","6","7","8","9"],sass:[":","!","0","1","2","3","4","5","6","7","8","9"],less:[":","!","-","0","1","2","3","4","5","6","7","8","9"],stylus:[":","!","0","1","2","3","4","5","6","7","8","9"],javascript:["!",".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],typescript:["!",".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"]},po={handlebars:"html",php:"html",twig:"html"},go={showExpandedAbbreviation:"always",showAbbreviationSuggestions:!0,showSuggestionsAsSnippets:!1};function mo(e,t,n){if(e){var r=t.map(function(t){return e.languages.registerCompletionItemProvider(t,{triggerCharacters:fo[po[t]||t],provideCompletionItems:function(t,r){return function(e,t,n,r){for(var i,o=t.column,s=t.lineNumber,a=e._tokenization||e.tokenization._tokenization,l=a._tokenizationStateStore,c=l.tokenizationSupport||a._tokenizationSupport,u=l.getBeginState(s-1).clone(),d=c.tokenize(e.getLineContent(s),!0,u,0),h=d.tokens,f=!1,p=h.length-1;p>=0;p--){var g=h[p];if(o-1>g.offset){if(!(f=ho(h,p,n,r))&&"css"===n&&"attribute.value.html"===g.type){do{if(p--<=0){if(0==s--)break;p=(h=(d=c.tokenize(e.getLineContent(s),!0,u,0)).tokens).length-1}g=h[p]}while("attribute.name.html"===g.type);"style"===((null===(i=e.getWordAtPosition({column:g.offset,lineNumber:s}))||void 0===i?void 0:i.word)||"")&&(f=!0)}break}}return f}(t,r,n,n)?ro(e,t,r,n,go):void 0}})});return function(){r.forEach(function(e){return e.dispose()})}}}var bo=n(7314),yo=n(942),wo=n(65185),vo=n(65893);const ko=(e,t)=>(_o(),Co(e.user.color,t),e.cursor?[{range:new ge.Range(e.cursor.lineNumber,e.cursor.column,e.cursor.lineNumber,e.cursor.column),options:{className:`applyColorToThis backgroundPrefix-${e.user.color.slice(1)}`,afterContentClassName:"cursor-hover",beforeContentClassName:"",style:`--cursor-color: ${e.user.color};`}}]:[]),xo=e=>e.selection?[{range:new ge.Range(e.selection.startLineNumber,e.selection.startColumn,e.selection.endLineNumber,e.selection.endColumn),options:{className:"user-selection-decoration"}}]:[],_o=()=>{const e=document.styleSheets[0];Array.from(e.cssRules).some(e=>e.cssText.includes(".applyColorToThis"))||e.insertRule(".applyColorToThis {\n border-left: 2px solid var(--cursor-color, #000);\n color: var(--cursor-color, #000);\n }",e.cssRules.length)},Co=(e,t)=>{const n=`backgroundPrefix-${e.slice(1)}`,r=document.styleSheets[0];Array.from(r.cssRules).some(e=>e.cssText.includes(`.${n}`))||r.insertRule(`.${n} { --cursor-color: ${e===t.color?"#000000":e}; }`,r.cssRules.length)},So=(e,t,n)=>{if(!e.textContent){const r=document.createElement("div");r.style.background=t,r.style.color="#fff",r.textContent=n,r.className="cursor-hover",e.appendChild(r)}},Eo=(e,t,n,r,i,o)=>{if(r)return;i(!0);const s=e.flatMap(e=>[...ko(e,o),...xo(e)]);n.current=t.deltaDecorations(n.current,s.map(e=>({range:e.range,options:e.options})));((e,t,n,r,i)=>{for(let d=0;d<e.length;d++){const h=e[d],f=h.className.split(" ");for(const e of f)if(e.startsWith(t)){const d=`#${e.replace(t,"")}`,f=r.find(e=>e.user.color===d);var o,s,a,l,c,u;f&&(n&&d!==(null===i||void 0===i?void 0:i.color)?So(h,d,null!==f&&void 0!==f&&null!==(o=f.user)&&void 0!==o&&null!==(s=o.name)&&void 0!==s&&s.first_name?`${null===f||void 0===f||null===(a=f.user)||void 0===a||null===(l=a.name)||void 0===l?void 0:l.first_name} ${null===f||void 0===f||null===(c=f.user)||void 0===c||null===(u=c.name)||void 0===u?void 0:u.last_name}`.replace(/[\n\r]/g,""):f.user.name.email.split("@")[0]):h.style.backgroundColor=d)}}})(document.getElementsByClassName("applyColorToThis"),"backgroundPrefix-",!0,e,o),i(!1)},Lo=()=>{const e=50,t=(e,t,n)=>e>100&&t>50&&t<150&&n<100,n=(e,t,n)=>{const r=e=>{const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)};return.2126*r(e)+.7152*r(t)+.0722*r(n)},r=(e,t,r)=>(n(255,255,255)+.05)/(n(e,t,r)+.05)>=4.5;let i;do{const n=Math.floor(206*Math.random()+e),o=Math.floor(206*Math.random()+e),s=Math.floor(206*Math.random()+e);n+o+s>=400&&!t(n,o,s)&&r(n,o,s)&&(i=`#${(n<<16|o<<8|s).toString(16).padStart(6,"0")}`)}while(!i);return i},Oo=()=>new Map,Ao=e=>{const t=Oo();return e.forEach((e,n)=>{t.set(n,e)}),t},$o=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},Mo=()=>new Set,jo=e=>e[e.length-1],Do=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},No=Array.from,To=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Po=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},zo=Array.isArray;class Ro{constructor(){this._observers=Oo()}on(e,t){return $o(this._observers,e,Mo).add(t),t}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return No((this._observers.get(e)||Oo()).values()).forEach(e=>e(...t))}destroy(){this._observers=Oo()}}class Io{constructor(){this._observers=Oo()}on(e,t){$o(this._observers,e,Mo).add(t)}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return No((this._observers.get(e)||Oo()).values()).forEach(e=>e(...t))}destroy(){this._observers=Oo()}}const qo=Math.floor,Uo=(Math.ceil,Math.abs),Fo=(Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),Vo=(e,t)=>e>t?e:t,Wo=(Number.isNaN,Math.pow),Bo=(Math.sign,e=>0!==e?e<0:1/e<0),Ho=64,Zo=128,Jo=127,Xo=2147483647,Yo=Number.MAX_SAFE_INTEGER,Go=Number.MIN_SAFE_INTEGER,Ko=Number.isInteger||(e=>"number"===typeof e&&isFinite(e)&&qo(e)===e),Qo=(Number.isNaN,Number.parseInt,String.fromCharCode),es=(String.fromCodePoint,Qo(65535),/^\s*/g),ts=/([A-Z])/g,ns=(e,t)=>(e=>e.replace(es,""))(e.replace(ts,e=>`${t}${(e=>e.toLowerCase())(e)}`)),rs="undefined"!==typeof TextEncoder?new TextEncoder:null,is=rs?e=>rs.encode(e):e=>{const t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.codePointAt(i);return r};let os="undefined"===typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});os&&1===os.decode(new Uint8Array).length&&(os=null);const ss=(e,t)=>((e,t)=>{const n=new Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n})(t,()=>e).join("");class as{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const ls=()=>new as,cs=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},us=e=>{const t=new Uint8Array(cs(e));let n=0;for(let r=0;r<e.bufs.length;r++){const i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},ds=(e,t)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},hs=ds,fs=(e,t)=>{for(;t>Jo;)ds(e,Zo|Jo&t),t=qo(t/128);ds(e,Jo&t)},ps=(e,t)=>{const n=Bo(t);for(n&&(t=-t),ds(e,(t>63?Zo:0)|(n?Ho:0)|63&t),t=qo(t/64);t>0;)ds(e,(t>Jo?Zo:0)|Jo&t),t=qo(t/128)},gs=new Uint8Array(3e4),ms=gs.length/3,bs=rs&&rs.encodeInto?(e,t)=>{if(t.length<ms){const n=rs.encodeInto(t,gs).written||0;fs(e,n);for(let t=0;t<n;t++)ds(e,gs[t])}else ws(e,is(t))}:(e,t)=>{const n=unescape(encodeURIComponent(t)),r=n.length;fs(e,r);for(let i=0;i<r;i++)ds(e,n.codePointAt(i))},ys=(e,t)=>{const n=e.cbuf.length,r=e.cpos,i=Fo(n-r,t.length),o=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Vo(2*n,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)},ws=(e,t)=>{fs(e,t.byteLength),ys(e,t)},vs=(e,t)=>{((e,t)=>{const n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*Vo(n,t)),e.cpos=0)})(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},ks=new DataView(new ArrayBuffer(4)),xs=(e,t)=>{switch(typeof t){case"string":ds(e,119),bs(e,t);break;case"number":Ko(t)&&Uo(t)<=Xo?(ds(e,125),ps(e,t)):(n=t,ks.setFloat32(0,n),ks.getFloat32(0)===n?(ds(e,124),((e,t)=>{vs(e,4).setFloat32(0,t,!1)})(e,t)):(ds(e,123),((e,t)=>{vs(e,8).setFloat64(0,t,!1)})(e,t)));break;case"bigint":ds(e,122),((e,t)=>{vs(e,8).setBigInt64(0,t,!1)})(e,t);break;case"object":if(null===t)ds(e,126);else if(zo(t)){ds(e,117),fs(e,t.length);for(let n=0;n<t.length;n++)xs(e,t[n])}else if(t instanceof Uint8Array)ds(e,116),ws(e,t);else{ds(e,118);const n=Object.keys(t);fs(e,n.length);for(let r=0;r<n.length;r++){const i=n[r];bs(e,i),xs(e,t[i])}}break;case"boolean":ds(e,t?120:121);break;default:ds(e,127)}var n};class _s extends as{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&fs(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const Cs=e=>{e.count>0&&(ps(e.encoder,1===e.count?e.s:-e.s),e.count>1&&fs(e.encoder,e.count-2))};class Ss{constructor(){this.encoder=new as,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Cs(this),this.count=1,this.s=e)}toUint8Array(){return Cs(this),us(this.encoder)}}const Es=e=>{if(e.count>0){const t=2*e.diff+(1===e.count?0:1);ps(e.encoder,t),e.count>1&&fs(e.encoder,e.count-2)}};class Ls{constructor(){this.encoder=new as,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(Es(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return Es(this),us(this.encoder)}}class Os{constructor(){this.sarr=[],this.s="",this.lensE=new Ss}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new as;return this.sarr.push(this.s),this.s="",bs(e,this.sarr.join("")),ys(e,this.lensE.toUint8Array()),us(e)}}const As=e=>new Error(e),$s=()=>{throw As("Method unimplemented")},Ms=()=>{throw As("Unexpected case")},js=As("Unexpected end of array"),Ds=As("Integer out of Range");class Ns{constructor(e){this.arr=e,this.pos=0}}const Ts=e=>new Ns(e),Ps=e=>e.pos!==e.arr.length,zs=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Rs=e=>zs(e,qs(e)),Is=e=>e.arr[e.pos++],qs=e=>{let t=0,n=1;const r=e.arr.length;for(;e.pos<r;){const r=e.arr[e.pos++];if(t+=(r&Jo)*n,n*=128,r<Zo)return t;if(t>Yo)throw Ds}throw js},Us=e=>{let t=e.arr[e.pos++],n=63&t,r=64;const i=(t&Ho)>0?-1:1;if(0===(t&Zo))return i*n;const o=e.arr.length;for(;e.pos<o;){if(t=e.arr[e.pos++],n+=(t&Jo)*r,r*=128,t<Zo)return i*n;if(n>Yo)throw Ds}throw js},Fs=os?e=>os.decode(Rs(e)):e=>{let t=qs(e);if(0===t)return"";{let n=String.fromCodePoint(Is(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Is(e));else for(;t>0;){const r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Vs=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},Ws=[e=>{},e=>null,Us,e=>Vs(e,4).getFloat32(0,!1),e=>Vs(e,8).getFloat64(0,!1),e=>Vs(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Fs,e=>{const t=qs(e),n={};for(let r=0;r<t;r++){n[Fs(e)]=Bs(e)}return n},e=>{const t=qs(e),n=[];for(let r=0;r<t;r++)n.push(Bs(e));return n},Rs],Bs=e=>Ws[127-Is(e)](e);class Hs extends Ns{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),Ps(this)?this.count=qs(this)+1:this.count=-1),this.count--,this.s}}class Zs extends Ns{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=Us(this);const e=Bo(this.s);this.count=1,e&&(this.s=-this.s,this.count=qs(this)+2)}return this.count--,this.s}}class Js extends Ns{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){const e=Us(this),t=1&e;this.diff=qo(e/2),this.count=1,t&&(this.count=qs(this)+2)}return this.s+=this.diff,this.count--,this.s}}class Xs{constructor(e){this.decoder=new Zs(e),this.str=Fs(this.decoder),this.spos=0}read(){const e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}crypto.subtle;const Ys=crypto.getRandomValues.bind(crypto),Gs=(Math.random,()=>Ys(new Uint32Array(1))[0]),Ks=[1e7]+-1e3+-4e3+-8e3+-1e11,Qs=()=>Ks.replace(/[018]/g,e=>(e^Gs()&15>>e/4).toString(16)),ea=e=>new Promise(e),ta=(Promise.all.bind(Promise),e=>void 0===e?null:e);let na=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},ra=!0;try{"undefined"!==typeof localStorage&&localStorage&&(na=localStorage,ra=!1)}catch(A){}const ia=na,oa=Symbol("Equality"),sa=(e,t)=>e===t||!!e?.[oa]?.(t)||!1,aa=Object.assign,la=Object.keys,ca=(Object.values,e=>la(e).length),ua=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},da=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ha=Object.freeze,fa=e=>{for(const t in e){const n=e[t];"object"!==typeof n&&"function"!==typeof n||fa(e[t])}return ha(e)},pa=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&pa(e,t,n+1)}},ga=e=>e,ma=(e,t)=>{if(e===t)return!0;if(null==e||null==t||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(null!=e[oa])return e[oa](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(const n of e.keys())if(!t.has(n)||!ma(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(ca(e)!==ca(t))return!1;for(const n in e)if(!da(e,n)||!ma(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!ma(e[n],t[n]))return!1;break;default:return!1}return!0};var ba=n(54650);const ya="undefined"!==typeof ba&&ba.release&&/node|io\.js/.test(ba.release.name)&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof ba?ba:0),wa="undefined"!==typeof window&&"undefined"!==typeof document&&!ya;"undefined"!==typeof navigator&&/Mac/.test(navigator.platform);let va;const ka=[],xa=()=>{if(void 0===va)if(ya){va=Oo();const e=ba.argv;let t=null;for(let n=0;n<e.length;n++){const r=e[n];"-"===r[0]?(null!==t&&va.set(t,""),t=r):null!==t?(va.set(t,r),t=null):ka.push(r)}null!==t&&va.set(t,"")}else"object"===typeof location?(va=Oo(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){const[t,n]=e.split("=");va.set(`--${ns(t,"-")}`,n),va.set(`-${ns(t,"-")}`,n)}})):va=Oo();return va},_a=e=>xa().has(e),Ca=e=>ta(ya?{}[e.toUpperCase().replaceAll("-","_")]:ia.getItem(e)),Sa=e=>_a("--"+e)||null!==Ca(e),Ea=Sa("production");ya&&["true","1","2"].includes({}.FORCE_COLOR)||!_a("--no-colors")&&!Sa("no-color")&&(!ya||ba.stdout.isTTY)&&(!ya||_a("--color")||null!==Ca("COLORTERM")||(Ca("TERM")||"").includes("color"));var La=n(91691).Buffer;const Oa=e=>new Uint8Array(e),Aa=wa?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=Qo(e[n]);return btoa(t)}:e=>La.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),$a=wa?e=>{const t=atob(e),n=Oa(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}:e=>{const t=La.from(e,"base64");return((e,t,n)=>new Uint8Array(e,t,n))(t.buffer,t.byteOffset,t.byteLength)};class Ma{constructor(e,t){this.left=e,this.right=t}}const ja=(e,t)=>new Ma(e,t),Da=e=>e.next()>=.5,Na=(e,t,n)=>qo(e.next()*(n+1-t)+t),Ta=(e,t,n)=>qo(e.next()*(n+1-t)+t),Pa=(e,t,n)=>Ta(e,t,n),za=e=>Qo(Pa(e,97,122)),Ra=(e,t)=>t[Pa(e,0,t.length-1)],Ia=Symbol("0schema");class qa{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){const e=[];for(let t=this._rerrs.length-1;t>0;t--){const n=this._rerrs[t];e.push(ss(" ",2*(this._rerrs.length-t))+`${null!=n.path?`[${n.path}] `:""}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join("\n")}}const Ua=(e,t)=>e===t||null!=e&&null!=t&&e.constructor===t.constructor&&(e[oa]?sa(e,t):zo(e)?To(e,e=>Po(t,t=>Ua(e,t))):"object"===typeof e&&ua(e,(e,n)=>Ua(e,t[n])));class Fa{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),Ua(t,n)}equals(e){return this.constructor===e.constructor&&ma(this.shape,e.shape)}[Ia](){return!0}[oa](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){$s()}get nullable(){return kl(this,Pl)}get optional(){return new el(this)}cast(e){return ql(e,this),e}expect(e){return ql(e,this),e}}class Va extends Fa{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t=void 0){const n=e?.constructor===this.shape&&(null==this._c||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor!==this.shape?"Constructor match failed":"Check failed"),n}}const Wa=(e,t=null)=>new Va(e,t);Wa(Va);class Ba extends Fa{constructor(e){super(),this.shape=e}check(e,t){const n=this.shape(e);return!n&&t?.extend(null,"custom prop",e?.constructor.name,"failed to check custom prop"),n}}const Ha=e=>new Ba(e);Wa(Ba);class Za extends Fa{constructor(e){super(),this.shape=e}check(e,t){const n=this.shape.some(t=>t===e);return!n&&t?.extend(null,this.shape.join(" | "),e.toString()),n}}const Ja=(...e)=>new Za(e),Xa=Wa(Za),Ya=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>"\\"+e)),Ga=e=>Ml.check(e)?[Ya(e)]:Xa.check(e)?e.shape.map(e=>e+""):$l.check(e)?["[+-]?\\d+.?\\d*"]:jl.check(e)?[".*"]:xl.check(e)?e.shape.map(Ga).flat(1):void Ms();class Ka extends Fa{constructor(e){super(),this.shape=e,this._r=new RegExp("^"+e.map(Ga).map(e=>`(${e.join("|")})`).join("")+"$")}check(e,t){const n=null!=this._r.exec(e);return!n&&t?.extend(null,this._r.toString(),e.toString(),"String doesn't match string template."),n}}Wa(Ka);const Qa=Symbol("optional");class el extends Fa{constructor(e){super(),this.shape=e}check(e,t){const n=void 0===e||this.shape.check(e);return!n&&t?.extend(null,"undefined (optional)","()"),n}get[Qa](){return!0}}const tl=Wa(el);class nl extends Fa{check(e,t){return t?.extend(null,"never",typeof e),!1}}new nl,Wa(nl);class rl extends Fa{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new rl(this.shape,!0)}check(e,t){return null==e?(t?.extend(null,"object","null"),!1):ua(this.shape,(n,r)=>{const i=this._isPartial&&!da(e,r)||n.check(e[r],t);return!i&&t?.extend(r.toString(),n.toString(),typeof e[r],"Object property does not match"),i})}}const il=Wa(rl),ol=Ha(e=>null!=e&&(e.constructor===Object||null==e.constructor));class sl extends Fa{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return null!=e&&ua(e,(n,r)=>{const i=this.shape.keys.check(r,t);return!i&&t?.extend(r+"","Record",typeof e,i?"Key doesn't match schema":"Value doesn't match value"),i&&this.shape.values.check(n,t)})}}const al=(e,t)=>new sl(e,t),ll=Wa(sl);class cl extends Fa{constructor(e){super(),this.shape=e}check(e,t){return null!=e&&ua(this.shape,(n,r)=>{const i=n.check(e[r],t);return!i&&t?.extend(r.toString(),"Tuple",typeof n),i})}}Wa(cl);class ul extends Fa{constructor(e){super(),this.shape=1===e.length?e[0]:new vl(e)}check(e,t){const n=zo(e)&&To(e,e=>this.shape.check(e));return!n&&t?.extend(null,"Array",""),n}}const dl=(...e)=>new ul(e),hl=Wa(ul),fl=Ha(e=>zo(e));class pl extends Fa{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){const n=e instanceof this.shape&&(null==this._c||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name),n}}Wa(pl);const gl=((e,t=null)=>new pl(e,t))(Fa);class ml extends Fa{constructor(e){super(),this.len=e.length-1,this.args=((...e)=>new cl(e))(...e.slice(-1)),this.res=e[this.len]}check(e,t){const n=e.constructor===Function&&e.length<=this.len;return!n&&t?.extend(null,"function",typeof e),n}}const bl=Wa(ml),yl=Ha(e=>"function"===typeof e);class wl extends Fa{constructor(e){super(),this.shape=e}check(e,t){const n=To(this.shape,n=>n.check(e,t));return!n&&t?.extend(null,"Intersectinon",typeof e),n}}Wa(wl,e=>e.shape.length>0);class vl extends Fa{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){const n=Po(this.shape,n=>n.check(e,t));return t?.extend(null,"Union",typeof e),n}}const kl=(...e)=>e.findIndex(e=>xl.check(e))>=0?kl(...e.map(e=>Il(e)).map(e=>xl.check(e)?e.shape:[e]).flat(1)):1===e.length?e[0]:new vl(e),xl=Wa(vl),_l=()=>!0,Cl=Ha(_l),Sl=Wa(Ba,e=>e.shape===_l),El=Ha(e=>"bigint"===typeof e),Ll=Ha(e=>e===El),Ol=Ha(e=>"symbol"===typeof e),Al=(Ha(e=>e===Ol),Ha(e=>"number"===typeof e)),$l=Ha(e=>e===Al),Ml=Ha(e=>"string"===typeof e),jl=Ha(e=>e===Ml),Dl=Ha(e=>"boolean"===typeof e),Nl=Ha(e=>e===Dl),Tl=Ja(void 0),Pl=(Wa(Za,e=>1===e.shape.length&&void 0===e.shape[0]),Ja(void 0),Ja(null)),zl=Wa(Za,e=>1===e.shape.length&&null===e.shape[0]),Rl=(Wa(Uint8Array),Wa(Va,e=>e.shape===Uint8Array),kl(Al,Ml,Pl,Tl,El,Dl,Ol)),Il=((()=>{const e=dl(Cl),t=al(Ml,Cl),n=kl(Al,Ml,Pl,Dl,e,t);e.shape=n,t.shape.values=n})(),e=>{if(gl.check(e))return e;if(ol.check(e)){const t={};for(const n in e)t[n]=Il(e[n]);return new rl(t)}return fl.check(e)?kl(...e.map(Il)):Rl.check(e)?Ja(e):yl.check(e)?Wa(e):void Ms()}),ql=Ea?()=>{}:(e,t)=>{const n=new qa;if(!t.check(e,n))throw As(`Expected value to be of type ${t.constructor.name}.\n${n.toString()}`)};class Ul{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:Il(e),h:t}),this}else(e){return this.if(Cl,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){const r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw As("Unhandled pattern")}}}const Fl=(Vl=Cl,new Ul(Vl)).if($l,(e,t)=>Na(t,Go,Yo)).if(jl,(e,t)=>((e,t=0,n=20)=>{const r=Pa(e,t,n);let i="";for(let o=0;o<r;o++)i+=za(e);return i})(t)).if(Nl,(e,t)=>Da(t)).if(Ll,(e,t)=>BigInt(Na(t,Go,Yo))).if(xl,(e,t)=>Wl(t,Ra(t,e.shape))).if(il,(e,t)=>{const n={};for(const r in e.shape){let i=e.shape[r];if(tl.check(i)){if(Da(t))continue;i=i.shape}n[r]=Fl(i,t)}return n}).if(hl,(e,t)=>{const n=[],r=Ta(t,0,42);for(let i=0;i<r;i++)n.push(Wl(t,e.shape));return n}).if(Xa,(e,t)=>Ra(t,e.shape)).if(zl,(e,t)=>null).if(bl,(e,t)=>{const n=Wl(t,e.res);return()=>n}).if(Sl,(e,t)=>Wl(t,Ra(t,[Al,Ml,Pl,Tl,El,Dl,dl(Al),al(kl("a","b","c"),Al)]))).if(ll,(e,t)=>{const n={},r=Na(t,0,3);for(let i=0;i<r;i++){const r=Wl(t,e.shape.keys),i=Wl(t,e.shape.values);n[r]=i}return n}).done();var Vl;const Wl=(e,t)=>Fl(Il(t),e),Bl="undefined"!==typeof document?document:{},Hl=(Ha(e=>e.nodeType===Xl),"undefined"!==typeof DOMParser&&new DOMParser,Ha(e=>e.nodeType===Hl),Ha(e=>e.nodeType===Zl),Bl.ELEMENT_NODE),Zl=Bl.TEXT_NODE,Jl=(Bl.CDATA_SECTION_NODE,Bl.COMMENT_NODE,Bl.DOCUMENT_NODE),Xl=(Bl.DOCUMENT_TYPE_NODE,Bl.DOCUMENT_FRAGMENT_NODE),Yl=(Ha(e=>e.nodeType===Jl),Symbol),Gl=Date.now,Kl=Yl(),Ql=Yl(),ec=Yl(),tc=Yl(),nc=Yl(),rc=Yl(),ic=Yl(),oc=Yl(),sc=Yl();Gl();ja("font-weight","bold"),ja("font-weight","normal"),ja("color","blue"),ja("color","green"),ja("color","grey"),ja("color","red"),ja("color","purple"),ja("color","orange"),ja("color","black");const ac=(...e)=>{cc.forEach(t=>t.print(e))},lc=(...e)=>{e.unshift(oc),cc.forEach(t=>t.print(e))},cc=Mo();const uc=e=>({[Symbol.iterator](){return this},next:e}),dc=(e,t)=>uc(()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}});class hc{constructor(e,t){this.clock=e,this.len=t}}class fc{constructor(){this.clients=new Map}}const pc=(e,t,n)=>t.clients.forEach((t,r)=>{const i=e.doc.store.clients.get(r);if(null!=i){const r=i[i.length-1],o=r.id.clock+r.length;for(let s=0,a=t[s];s<t.length&&a.clock<o;a=t[++s])gu(e,i,a.clock,a.len,n)}}),gc=(e,t)=>{const n=e.clients.get(t.client);return void 0!==n&&null!==((e,t)=>{let n=0,r=e.length-1;for(;n<=r;){const i=qo((n+r)/2),o=e[i],s=o.clock;if(s<=t){if(t<s+o.len)return i;n=i+1}else r=i-1}return null})(n,t.clock)},mc=e=>{e.clients.forEach(e=>{let t,n;for(e.sort((e,t)=>e.clock-t.clock),t=1,n=1;t<e.length;t++){const r=e[n-1],i=e[t];r.clock+r.len>=i.clock?e[n-1]=new hc(r.clock,Vo(r.len,i.clock+i.len-r.clock)):(n<t&&(e[n]=i),n++)}e.length=n})},bc=e=>{const t=new fc;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){const o=r.slice();for(let t=n+1;t<e.length;t++)Do(o,e[t].clients.get(i)||[]);t.clients.set(i,o)}});return mc(t),t},yc=(e,t,n,r)=>{$o(e.clients,t,()=>[]).push(new hc(n,r))},wc=()=>new fc,vc=e=>{const t=wc();return e.clients.forEach((e,n)=>{const r=[];for(let t=0;t<e.length;t++){const n=e[t];if(n.deleted){const i=n.id.clock;let o=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[1+ ++t])o+=n.length;r.push(new hc(i,o))}}r.length>0&&t.clients.set(n,r)}),t},kc=(e,t)=>{fs(e.restEncoder,t.clients.size),No(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),fs(e.restEncoder,t);const r=n.length;fs(e.restEncoder,r);for(let i=0;i<r;i++){const t=n[i];e.writeDsClock(t.clock),e.writeDsLen(t.len)}})},xc=e=>{const t=new fc,n=qs(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();const n=qs(e.restDecoder),r=qs(e.restDecoder);if(r>0){const i=$o(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new hc(e.readDsClock(),e.readDsLen()))}}return t},_c=(e,t,n)=>{const r=new fc,i=qs(e.restDecoder);for(let o=0;o<i;o++){e.resetDsCurVal();const i=qs(e.restDecoder),o=qs(e.restDecoder),s=n.clients.get(i)||[],a=lu(n,i);for(let n=0;n<o;n++){const n=e.readDsClock(),o=n+e.readDsLen();if(n<a){a<o&&yc(r,i,a,o-a);let e=uu(s,n),l=s[e];for(!l.deleted&&l.id.clock<n&&(s.splice(e+1,0,nh(t,l,n-l.id.clock)),e++);e<s.length&&(l=s[e++],l.id.clock<o);)l.deleted||(o<l.id.clock+l.length&&s.splice(e,0,nh(t,l,o-l.id.clock)),l.delete(t))}else yc(r,i,n,o-n)}}if(r.clients.size>0){const e=new Dc;return fs(e.restEncoder,0),kc(e,r),e.toUint8Array()}return null},Cc=Gs;class Sc extends Ro{constructor({guid:e=Qs(),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:o=!1,shouldLoad:s=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=Cc(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new su,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=s,this.autoLoad=o,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=ea(e=>{this.on("load",()=>{this.isLoaded=!0,e(this)})});const a=()=>ea(e=>{const t=n=>{void 0!==n&&!0!==n||(this.off("sync",t),e())};this.on("sync",t)});this.on("sync",e=>{!1===e&&this.isSynced&&(this.whenSynced=a()),this.isSynced=void 0===e||!0===e,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=a()}load(){const e=this._item;null===e||this.shouldLoad||_u(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(No(this.subdocs).map(e=>e.guid))}transact(e,t=null){return _u(this,e,t)}get(e,t=Bu){const n=$o(this.share,e,()=>{const e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==Bu&&r!==t){if(r===Bu){const r=new t;r._map=n._map,n._map.forEach(e=>{for(;null!==e;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;null!==e;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}throw new Error(`Type with the name ${e} has already been defined with a different constructor`)}return n}getArray(e=""){return this.get(e,cd)}getText(e=""){return this.get(e,Ld)}getMap(e=""){return this.get(e,dd)}getXmlElement(e=""){return this.get(e,$d)}getXmlFragment(e=""){return this.get(e,Ad)}toJSON(){const e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,No(this.subdocs).forEach(e=>e.destroy());const e=this._item;if(null!==e){this._item=null;const t=e.content;t.doc=new Sc({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,_u(e.parent.doc,n=>{const r=t.doc;e.deleted||n.subdocsAdded.add(r),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Ec{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return qs(this.restDecoder)}readDsLen(){return qs(this.restDecoder)}}class Lc extends Ec{readLeftID(){return Xc(qs(this.restDecoder),qs(this.restDecoder))}readRightID(){return Xc(qs(this.restDecoder),qs(this.restDecoder))}readClient(){return qs(this.restDecoder)}readInfo(){return Is(this.restDecoder)}readString(){return Fs(this.restDecoder)}readParentInfo(){return 1===qs(this.restDecoder)}readTypeRef(){return qs(this.restDecoder)}readLen(){return qs(this.restDecoder)}readAny(){return Bs(this.restDecoder)}readBuf(){return(e=>{const t=Oa(e.byteLength);return t.set(e),t})(Rs(this.restDecoder))}readJSON(){return JSON.parse(Fs(this.restDecoder))}readKey(){return Fs(this.restDecoder)}}class Oc{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=qs(this.restDecoder),this.dsCurrVal}readDsLen(){const e=qs(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class Ac extends Oc{constructor(e){super(e),this.keys=[],qs(e),this.keyClockDecoder=new Js(Rs(e)),this.clientDecoder=new Zs(Rs(e)),this.leftClockDecoder=new Js(Rs(e)),this.rightClockDecoder=new Js(Rs(e)),this.infoDecoder=new Hs(Rs(e),Is),this.stringDecoder=new Xs(Rs(e)),this.parentInfoDecoder=new Hs(Rs(e),Is),this.typeRefDecoder=new Zs(Rs(e)),this.lenDecoder=new Zs(Rs(e))}readLeftID(){return new Zc(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Zc(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return 1===this.parentInfoDecoder.read()}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Bs(this.restDecoder)}readBuf(){return Rs(this.restDecoder)}readJSON(){return Bs(this.restDecoder)}readKey(){const e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{const e=this.stringDecoder.read();return this.keys.push(e),e}}}class $c{constructor(){this.restEncoder=ls()}toUint8Array(){return us(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){fs(this.restEncoder,e)}writeDsLen(e){fs(this.restEncoder,e)}}class Mc extends $c{writeLeftID(e){fs(this.restEncoder,e.client),fs(this.restEncoder,e.clock)}writeRightID(e){fs(this.restEncoder,e.client),fs(this.restEncoder,e.clock)}writeClient(e){fs(this.restEncoder,e)}writeInfo(e){hs(this.restEncoder,e)}writeString(e){bs(this.restEncoder,e)}writeParentInfo(e){fs(this.restEncoder,e?1:0)}writeTypeRef(e){fs(this.restEncoder,e)}writeLen(e){fs(this.restEncoder,e)}writeAny(e){xs(this.restEncoder,e)}writeBuf(e){ws(this.restEncoder,e)}writeJSON(e){bs(this.restEncoder,JSON.stringify(e))}writeKey(e){bs(this.restEncoder,e)}}class jc{constructor(){this.restEncoder=ls(),this.dsCurrVal=0}toUint8Array(){return us(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const t=e-this.dsCurrVal;this.dsCurrVal=e,fs(this.restEncoder,t)}writeDsLen(e){0===e&&Ms(),fs(this.restEncoder,e-1),this.dsCurrVal+=e}}class Dc extends jc{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Ls,this.clientEncoder=new Ss,this.leftClockEncoder=new Ls,this.rightClockEncoder=new Ls,this.infoEncoder=new _s(hs),this.stringEncoder=new Os,this.parentInfoEncoder=new _s(hs),this.typeRefEncoder=new Ss,this.lenEncoder=new Ss}toUint8Array(){const e=ls();return fs(e,0),ws(e,this.keyClockEncoder.toUint8Array()),ws(e,this.clientEncoder.toUint8Array()),ws(e,this.leftClockEncoder.toUint8Array()),ws(e,this.rightClockEncoder.toUint8Array()),ws(e,us(this.infoEncoder)),ws(e,this.stringEncoder.toUint8Array()),ws(e,us(this.parentInfoEncoder)),ws(e,this.typeRefEncoder.toUint8Array()),ws(e,this.lenEncoder.toUint8Array()),ys(e,us(this.restEncoder)),us(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){xs(this.restEncoder,e)}writeBuf(e){ws(this.restEncoder,e)}writeJSON(e){xs(this.restEncoder,e)}writeKey(e){const t=this.keyMap.get(e);void 0===t?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}const Nc=(e,t,n)=>{const r=new Map;n.forEach((e,n)=>{lu(t,n)>e&&r.set(n,e)}),au(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),fs(e.restEncoder,r.size),No(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{((e,t,n,r)=>{r=Vo(r,t[0].id.clock);const i=uu(t,r);fs(e.restEncoder,t.length-i),e.writeClient(n),fs(e.restEncoder,r);const o=t[i];o.write(e,r-o.id.clock);for(let s=i+1;s<t.length;s++)t[s].write(e,0)})(e,t.clients.get(n),n,r)})},Tc=(e,t,n,r=new Ac(e))=>_u(t,e=>{e.local=!1;let t=!1;const n=e.doc,i=n.store,o=((e,t)=>{const n=Oo(),r=qs(e.restDecoder);for(let i=0;i<r;i++){const r=qs(e.restDecoder),i=new Array(r),o=e.readClient();let s=qs(e.restDecoder);n.set(o,{i:0,refs:i});for(let n=0;n<r;n++){const r=e.readInfo();switch(31&r){case 0:{const t=e.readLen();i[n]=new Td(Xc(o,s),t),s+=t;break}case 10:{const t=qs(e.restDecoder);i[n]=new sh(Xc(o,s),t),s+=t;break}default:{const a=0===(192&r),l=new rh(Xc(o,s),null,(r&Zo)===Zo?e.readLeftID():null,null,(r&Ho)===Ho?e.readRightID():null,a?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,a&&32===(32&r)?e.readString():null,ih(e,r));i[n]=l,s+=l.length}}}}return n})(r,n),s=((e,t,n)=>{const r=[];let i=No(n.keys()).sort((e,t)=>e-t);if(0===i.length)return null;const o=()=>{if(0===i.length)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;){if(i.pop(),!(i.length>0))return null;e=n.get(i[i.length-1])}return e};let s=o();if(null===s)return null;const a=new su,l=new Map,c=(e,t)=>{const n=l.get(e);(null==n||n>t)&&l.set(e,t)};let u=s.refs[s.i++];const d=new Map,h=()=>{for(const e of r){const t=e.id.client,r=n.get(t);r?(r.i--,a.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):a.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(u.constructor!==sh){const i=$o(d,u.id.client,()=>lu(t,u.id.client))-u.id.clock;if(i<0)r.push(u),c(u.id.client,u.id.clock-1),h();else{const o=u.getMissing(e,t);if(null!==o){r.push(u);const e=n.get(o)||{refs:[],i:0};if(e.refs.length!==e.i){u=e.refs[e.i++];continue}c(o,lu(t,o)),h()}else(0===i||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(null!==s&&s.i<s.refs.length)u=s.refs[s.i++];else{if(s=o(),null===s)break;u=s.refs[s.i++]}}if(a.clients.size>0){const e=new Dc;return Nc(e,a,new Map),fs(e.restEncoder,0),{missing:l,update:e.toUint8Array()}}return null})(e,i,o),a=i.pendingStructs;if(a){for(const[e,n]of a.missing)if(n<lu(i,e)){t=!0;break}if(s){for(const[e,t]of s.missing){const n=a.missing.get(e);(null==n||n>t)&&a.missing.set(e,t)}a.update=Ou([a.update,s.update])}}else i.pendingStructs=s;const l=_c(r,e,i);if(i.pendingDs){const t=new Ac(Ts(i.pendingDs));qs(t.restDecoder);const n=_c(t,e,i);i.pendingDs=l&&n?Ou([l,n]):l||n}else i.pendingDs=l;if(t){const t=i.pendingStructs.update;i.pendingStructs=null,Pc(e.doc,t)}},n,!1),Pc=(e,t,n,r=Ac)=>{const i=Ts(t);Tc(i,e,n,new r(i))},zc=(e,t=new Uint8Array([0]),n=new Dc)=>{((e,t,n=new Map)=>{Nc(e,t.store,n),kc(e,vc(t.store))})(n,e,Ic(t));const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(Au(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===Mc)return Eu(r.map((e,t)=>0===t?e:Nu(e)));if(n.constructor===Dc)return Ou(r)}return r[0]},Rc=e=>{const t=new Map,n=qs(e.restDecoder);for(let r=0;r<n;r++){const n=qs(e.restDecoder),r=qs(e.restDecoder);t.set(n,r)}return t},Ic=e=>Rc(new Ec(Ts(e))),qc=(e,t)=>(fs(e.restEncoder,t.size),No(t.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{fs(e.restEncoder,t),fs(e.restEncoder,n)}),e),Uc=(e,t=new jc)=>(e instanceof Map?qc(t,e):((e,t)=>{qc(e,au(t.store))})(t,e),t.toUint8Array());class Fc{constructor(){this.l=[]}}const Vc=()=>new Fc,Wc=(e,t)=>e.l.push(t),Bc=(e,t)=>{const n=e.l;n.length;e.l=n.filter(e=>t!==e),e.l.length},Hc=(e,t,n)=>pa(e.l,[t,n]);class Zc{constructor(e,t){this.client=e,this.clock=t}}const Jc=(e,t)=>e===t||null!==e&&null!==t&&e.client===t.client&&e.clock===t.clock,Xc=(e,t)=>new Zc(e,t),Yc=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw Ms()};class Gc{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}}class Kc{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}}const Qc=(e,t,n)=>{let r=null,i=null;return null===e._item?i=Yc(e):r=Xc(e._item.id.client,e._item.id.clock),new Gc(r,i,t,n)},eu=(e,t,n=0)=>{let r=e._start;if(n<0){if(0===t)return Qc(e,null,n);t--}for(;null!==r;){if(!r.deleted&&r.countable){if(r.length>t)return Qc(e,Xc(r.id.client,r.id.clock+t),n);t-=r.length}if(null===r.right&&n<0)return Qc(e,r.lastId,n);r=r.right}return Qc(e,null,n)},tu=(e,t,n=!0)=>{const r=t.store,i=e.item,o=e.type,s=e.tname,a=e.assoc;let l=null,c=0;if(null!==i){if(lu(r,i.client)<=i.clock)return null;const e=n?th(r,i):((e,t)=>{const n=du(e,t);return{item:n,diff:t.clock-n.id.clock}})(r,i),t=e.item;if(!(t instanceof rh))return null;if(l=t.parent,null===l._item||!l._item.deleted){c=t.deleted||!t.countable?0:e.diff+(a>=0?0:1);let n=t.left;for(;null!==n;)!n.deleted&&n.countable&&(c+=n.length),n=n.left}}else{if(null!==s)l=t.get(s);else{if(null===o)throw Ms();{if(lu(r,o.client)<=o.clock)return null;const{item:e}=n?th(r,o):{item:du(r,o)};if(!(e instanceof rh&&e.content instanceof eh))return null;l=e.content.type}}c=a>=0?l._length:0}return((e,t,n=0)=>new Kc(e,t,n))(l,c,e.assoc)};class nu{constructor(e,t){this.ds=e,this.sv=t}}const ru=(e,t)=>new nu(e,t),iu=(ru(wc(),new Map),(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!gc(t.ds,e.id)),ou=(e,t)=>{const n=$o(e.meta,ou,Mo),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<lu(r,n)&&fu(e,Xc(n,t))}),pc(e,t.ds,e=>{}),n.add(t))};class su{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const au=e=>{const t=new Map;return e.clients.forEach((e,n)=>{const r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},lu=(e,t)=>{const n=e.clients.get(t);if(void 0===n)return 0;const r=n[n.length-1];return r.id.clock+r.length},cu=(e,t)=>{let n=e.clients.get(t.id.client);if(void 0===n)n=[],e.clients.set(t.id.client,n);else{const e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw Ms()}n.push(t)},uu=(e,t)=>{let n=0,r=e.length-1,i=e[r],o=i.id.clock;if(o===t)return r;let s=qo(t/(o+i.length-1)*r);for(;n<=r;){if(i=e[s],o=i.id.clock,o<=t){if(t<o+i.length)return s;n=s+1}else r=s-1;s=qo((n+r)/2)}throw Ms()},du=(e,t)=>{const n=e.clients.get(t.client);return n[uu(n,t.clock)]},hu=(e,t,n)=>{const r=uu(t,n),i=t[r];return i.id.clock<n&&i instanceof rh?(t.splice(r+1,0,nh(e,i,n-i.id.clock)),r+1):r},fu=(e,t)=>{const n=e.doc.store.clients.get(t.client);return n[hu(e,n,t.clock)]},pu=(e,t,n)=>{const r=t.clients.get(n.client),i=uu(r,n.clock),o=r[i];return n.clock!==o.id.clock+o.length-1&&o.constructor!==Td&&r.splice(i+1,0,nh(e,o,n.clock-o.id.clock+1)),o},gu=(e,t,n,r,i)=>{if(0===r)return;const o=n+r;let s,a=hu(e,t,n);do{s=t[a++],o<s.id.clock+s.length&&hu(e,t,o),i(s)}while(a<t.length&&t[a].id.clock<o)};class mu{constructor(e,t,n){this.doc=e,this.deleteSet=new fc,this.beforeState=au(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const bu=(e,t)=>!(0===t.deleteSet.clients.size&&!((e,t)=>{for(const[n,r]of e)if(t(r,n))return!0;return!1})(t.afterState,(e,n)=>t.beforeState.get(n)!==e))&&(mc(t.deleteSet),((e,t)=>{Nc(e,t.doc.store,t.beforeState)})(e,t),kc(e,t.deleteSet),!0),yu=(e,t,n)=>{const r=t._item;(null===r||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&$o(e.changed,t,Mo).add(n)},wu=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0&&(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n));n=r,r=e[--i-1])n instanceof rh&&null!==n.parentSub&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);const o=t-i;return o&&e.splice(t+1-o,o),o},vu=(e,t,n)=>{for(const[r,i]of e.clients.entries()){const e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){const o=i[r],s=o.clock+o.len;for(let r=uu(e,o.clock),i=e[r];r<e.length&&i.id.clock<s;i=e[++r]){const i=e[r];if(o.clock+o.len<=i.id.clock)break;i instanceof rh&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},ku=(e,t)=>{e.clients.forEach((e,n)=>{const r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){const n=e[t];for(let e=Fo(r.length-1,1+uu(r,n.clock+n.len-1)),t=r[e];e>0&&t.id.clock>=n.clock;t=r[e])e-=1+wu(r,e)}})},xu=(e,t)=>{if(t<e.length){const n=e[t],r=n.doc,i=r.store,o=n.deleteSet,s=n._mergeStructs;try{mc(o),n.afterState=au(n.doc.store),r.emit("beforeObserverCalls",[n,r]);const e=[];n.changed.forEach((t,r)=>e.push(()=>{null!==r._item&&r._item.deleted||r._callObserver(n,t)})),e.push(()=>{n.changedParentTypes.forEach((t,r)=>{r._dEH.l.length>0&&(null===r._item||!r._item.deleted)&&((t=t.filter(e=>null===e.target._item||!e.target._item.deleted)).forEach(e=>{e.currentTarget=r,e._path=null}),t.sort((e,t)=>e.path.length-t.path.length),e.push(()=>{Hc(r._dEH,t,n)}))}),e.push(()=>r.emit("afterTransaction",[n,r])),e.push(()=>{n._needFormattingCleanup&&Cd(n)})}),pa(e,[])}finally{r.gc&&vu(o,i,r.gcFilter),ku(o,i),n.afterState.forEach((e,t)=>{const r=n.beforeState.get(t)||0;if(r!==e){const e=i.clients.get(t),n=Vo(uu(e,r),1);for(let t=e.length-1;t>=n;)t-=1+wu(e,t)}});for(let e=s.length-1;e>=0;e--){const{client:t,clock:n}=s[e].id,r=i.clients.get(t),o=uu(r,n);o+1<r.length&&wu(r,o+1)>1||o>0&&wu(r,o)}if(n.local||n.afterState.get(r.clientID)===n.beforeState.get(r.clientID)||(ac(oc,Kl,"[yjs] ",Ql,rc,"Changed the client-id because another client seems to be using it."),r.clientID=Cc()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){const e=new Mc;bu(e,n)&&r.emit("update",[e.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){const e=new Dc;bu(e,n)&&r.emit("updateV2",[e.toUint8Array(),n.origin,r,n])}const{subdocsAdded:a,subdocsLoaded:l,subdocsRemoved:c}=n;(a.size>0||c.size>0||l.size>0)&&(a.forEach(e=>{e.clientID=r.clientID,null==e.collectionid&&(e.collectionid=r.collectionid),r.subdocs.add(e)}),c.forEach(e=>r.subdocs.delete(e)),r.emit("subdocs",[{loaded:l,added:a,removed:c},r,n]),c.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,e])):xu(e,t+1)}}},_u=(e,t,n=null,r=!0)=>{const i=e._transactionCleanups;let o=!1,s=null;null===e._transaction&&(o=!0,e._transaction=new mu(e,n,r),i.push(e._transaction),1===i.length&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{s=t(e._transaction)}finally{if(o){const t=e._transaction===i[0];e._transaction=null,t&&xu(i,0)}}return s};class Cu{constructor(e,t){this.gen=function*(e){const t=qs(e.restDecoder);for(let n=0;n<t;n++){const t=qs(e.restDecoder),n=e.readClient();let r=qs(e.restDecoder);for(let i=0;i<t;i++){const t=e.readInfo();if(10===t){const t=qs(e.restDecoder);yield new sh(Xc(n,r),t),r+=t}else if(0!==(31&t)){const i=0===(192&t),o=new rh(Xc(n,r),null,(t&Zo)===Zo?e.readLeftID():null,null,(t&Ho)===Ho?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&32===(32&t)?e.readString():null,ih(e,t));yield o,r+=o.length}else{const t=e.readLen();yield new Td(Xc(n,r),t),r+=t}}}}(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do{this.curr=this.gen.next().value||null}while(this.filterSkips&&null!==this.curr&&this.curr.constructor===sh);return this.curr}}class Su{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}const Eu=e=>Ou(e,Lc,Mc),Lu=(e,t)=>{if(e.constructor===Td){const{client:n,clock:r}=e.id;return new Td(Xc(n,r+t),e.length-t)}if(e.constructor===sh){const{client:n,clock:r}=e.id;return new sh(Xc(n,r+t),e.length-t)}{const n=e,{client:r,clock:i}=n.id;return new rh(Xc(r,i+t),null,Xc(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},Ou=(e,t=Ac,n=Dc)=>{if(1===e.length)return e[0];const r=e.map(e=>new t(Ts(e)));let i=r.map(e=>new Cu(e,!0)),o=null;const s=new n,a=new Su(s);for(;i=i.filter(e=>null!==e.curr),i.sort((e,t)=>{if(e.curr.id.client===t.curr.id.client){const n=e.curr.id.clock-t.curr.id.clock;return 0===n?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===sh?1:-1:n}return t.curr.id.client-e.curr.id.client}),0!==i.length;){const e=i[0],t=e.curr.id.client;if(null!==o){let n=e.curr,r=!1;for(;null!==n&&n.id.clock+n.length<=o.struct.id.clock+o.struct.length&&n.id.client>=o.struct.id.client;)n=e.next(),r=!0;if(null===n||n.id.client!==t||r&&n.id.clock>o.struct.id.clock+o.struct.length)continue;if(t!==o.struct.id.client)Mu(a,o.struct,o.offset),o={struct:n,offset:0},e.next();else if(o.struct.id.clock+o.struct.length<n.id.clock)if(o.struct.constructor===sh)o.struct.length=n.id.clock+n.length-o.struct.id.clock;else{Mu(a,o.struct,o.offset);const e=n.id.clock-o.struct.id.clock-o.struct.length;o={struct:new sh(Xc(t,o.struct.id.clock+o.struct.length),e),offset:0}}else{const t=o.struct.id.clock+o.struct.length-n.id.clock;t>0&&(o.struct.constructor===sh?o.struct.length-=t:n=Lu(n,t)),o.struct.mergeWith(n)||(Mu(a,o.struct,o.offset),o={struct:n,offset:0},e.next())}}else o={struct:e.curr,offset:0},e.next();for(let n=e.curr;null!==n&&n.id.client===t&&n.id.clock===o.struct.id.clock+o.struct.length&&n.constructor!==sh;n=e.next())Mu(a,o.struct,o.offset),o={struct:n,offset:0}}null!==o&&(Mu(a,o.struct,o.offset),o=null),ju(a);const l=r.map(e=>xc(e)),c=bc(l);return kc(s,c),s.toUint8Array()},Au=(e,t,n=Ac,r=Dc)=>{const i=Ic(t),o=new r,s=new Su(o),a=new n(Ts(e)),l=new Cu(a,!1);for(;l.curr;){const e=l.curr,t=e.id.client,n=i.get(t)||0;if(l.curr.constructor!==sh)if(e.id.clock+e.length>n)for(Mu(s,e,Vo(n-e.id.clock,0)),l.next();l.curr&&l.curr.id.client===t;)Mu(s,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===t&&l.curr.id.clock+l.curr.length<=n;)l.next();else l.next()}ju(s);const c=xc(a);return kc(o,c),o.toUint8Array()},$u=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:us(e.encoder.restEncoder)}),e.encoder.restEncoder=ls(),e.written=0)},Mu=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&$u(e),0===e.written&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),fs(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},ju=e=>{$u(e);const t=e.encoder.restEncoder;fs(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){const r=e.clientStructs[n];fs(t,r.written),ys(t,r.restEncoder)}},Du=(e,t,n,r)=>{const i=new n(Ts(e)),o=new Cu(i,!1),s=new r,a=new Su(s);for(let c=o.curr;null!==c;c=o.next())Mu(a,t(c),0);ju(a);const l=xc(i);return kc(s,l),s.toUint8Array()},Nu=e=>Du(e,ga,Ac,Mc),Tu="You must not compute changes after the event-handler fired.";class Pu{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=zu(this.currentTarget,this.target))}deletes(e){return gc(this.transaction.deleteSet,e.id)}get keys(){if(null===this._keys){if(0===this.transaction.doc._transactionCleanups.length)throw As(Tu);const e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(null!==n){const r=t._map.get(n);let i,o;if(this.adds(r)){let e=r.left;for(;null!==e&&this.adds(e);)e=e.left;if(this.deletes(r)){if(null===e||!this.deletes(e))return;i="delete",o=jo(e.content.getContent())}else null!==e&&this.deletes(e)?(i="update",o=jo(e.content.getContent())):(i="add",o=void 0)}else{if(!this.deletes(r))return;i="delete",o=jo(r.content.getContent())}e.set(n,{action:i,oldValue:o})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(null===e){if(0===this.transaction.doc._transactionCleanups.length)throw As(Tu);const t=this.target,n=Mo(),r=Mo(),i=[];e={added:n,deleted:r,delta:i,keys:this.keys};if(this.transaction.changed.get(t).has(null)){let e=null;const o=()=>{e&&i.push(e)};for(let i=t._start;null!==i;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&(null!==e&&void 0!==e.delete||(o(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?(null!==e&&void 0!==e.insert||(o(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):(null!==e&&void 0!==e.retain||(o(),e={retain:0}),e.retain+=i.length);null!==e&&void 0===e.retain&&o()}this._changes=e}return e}}const zu=(e,t)=>{const n=[];for(;null!==t._item&&t!==e;){if(null!==t._item.parentSub)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&null!==r;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},Ru=()=>{lc("Invalid access: Add Yjs type to a document before reading data.")};let Iu=0;class qu{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=Iu++}}const Uu=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=Iu++},Fu=(e,t)=>{if(null===e._start||0===t||null===e._searchMarker)return null;const n=0===e._searchMarker.length?null:e._searchMarker.reduce((e,n)=>Uo(t-e.index)<Uo(t-n.index)?e:n);let r=e._start,i=0;for(null!==n&&(r=n.p,i=n.index,(e=>{e.timestamp=Iu++})(n));null!==r.right&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;null!==r.left&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;null!==r.left&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return null!==n&&Uo(n.index-i)<r.parent.length/80?(Uu(n,r,i),n):((e,t,n)=>{if(e.length>=80){const r=e.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return Uu(r,t,n),r}{const r=new qu(t,n);return e.push(r),r}})(e._searchMarker,r,i)},Vu=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){const i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(null===t||!0===t.marker){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=Vo(t,i.index+n))}},Wu=(e,t,n)=>{const r=e,i=t.changedParentTypes;for(;$o(i,e,()=>[]).push(n),null!==e._item;)e=e._item.parent;Hc(r._eH,n,t)};class Bu{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=Vc(),this._dEH=Vc(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw $s()}clone(){throw $s()}_write(e){}get _first(){let e=this._start;for(;null!==e&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){Wc(this._eH,e)}observeDeep(e){Wc(this._dEH,e)}unobserve(e){Bc(this._eH,e)}unobserveDeep(e){Bc(this._dEH,e)}toJSON(){}}const Hu=(e,t,n)=>{e.doc??Ru(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t;const i=[];let o=e._start;for(;null!==o&&r>0;){if(o.countable&&!o.deleted){const e=o.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}o=o.right}return i},Zu=e=>{e.doc??Ru();const t=[];let n=e._start;for(;null!==n;){if(n.countable&&!n.deleted){const e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},Ju=(e,t)=>{let n=0,r=e._start;for(e.doc??Ru();null!==r;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},Xu=(e,t)=>{const n=[];return Ju(e,(r,i)=>{n.push(t(r,i,e))}),n},Yu=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(null===n){for(;null!==t&&t.deleted;)t=t.right;if(null===t)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}const e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},Gu=(e,t)=>{e.doc??Ru();const n=Fu(e,t);let r=e._start;for(null!==n&&(r=n.p,t-=n.index);null!==r;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},Ku=(e,t,n,r)=>{let i=n;const o=e.doc,s=o.clientID,a=o.store,l=null===n?t._start:n.right;let c=[];const u=()=>{c.length>0&&(i=new rh(Xc(s,lu(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new Wd(c)),i.integrate(e,0),c=[])};r.forEach(n=>{if(null===n)c.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new rh(Xc(s,lu(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new Pd(new Uint8Array(n))),i.integrate(e,0);break;case Sc:i=new rh(Xc(s,lu(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new Id(n)),i.integrate(e,0);break;default:if(!(n instanceof Bu))throw new Error("Unexpected content type in insert operation");i=new rh(Xc(s,lu(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new eh(n)),i.integrate(e,0)}}}),u()},Qu=()=>As("Length exceeded!"),ed=(e,t,n,r)=>{if(n>t._length)throw Qu();if(0===n)return t._searchMarker&&Vu(t._searchMarker,n,r.length),Ku(e,t,null,r);const i=n,o=Fu(t,n);let s=t._start;for(null!==o&&(s=o.p,0===(n-=o.index)&&(s=s.prev,n+=s&&s.countable&&!s.deleted?s.length:0));null!==s;s=s.right)if(!s.deleted&&s.countable){if(n<=s.length){n<s.length&&fu(e,Xc(s.id.client,s.id.clock+n));break}n-=s.length}return t._searchMarker&&Vu(t._searchMarker,i,r.length),Ku(e,t,s,r)},td=(e,t,n,r)=>{if(0===r)return;const i=n,o=r,s=Fu(t,n);let a=t._start;for(null!==s&&(a=s.p,n-=s.index);null!==a&&n>0;a=a.right)!a.deleted&&a.countable&&(n<a.length&&fu(e,Xc(a.id.client,a.id.clock+n)),n-=a.length);for(;r>0&&null!==a;)a.deleted||(r<a.length&&fu(e,Xc(a.id.client,a.id.clock+r)),a.delete(e),r-=a.length),a=a.right;if(r>0)throw Qu();t._searchMarker&&Vu(t._searchMarker,i,-o+r)},nd=(e,t,n)=>{const r=t._map.get(n);void 0!==r&&r.delete(e)},rd=(e,t,n,r)=>{const i=t._map.get(n)||null,o=e.doc,s=o.clientID;let a;if(null==r)a=new Wd([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:a=new Wd([r]);break;case Uint8Array:a=new Pd(r);break;case Sc:a=new Id(r);break;default:if(!(r instanceof Bu))throw new Error("Unexpected content type");a=new eh(r)}new rh(Xc(s,lu(o.store,s)),i,i&&i.lastId,null,null,t,n,a).integrate(e,0)},id=(e,t)=>{e.doc??Ru();const n=e._map.get(t);return void 0===n||n.deleted?void 0:n.content.getContent()[n.length-1]},od=e=>{const t={};return e.doc??Ru(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},sd=(e,t)=>{e.doc??Ru();const n=e._map.get(t);return void 0!==n&&!n.deleted},ad=e=>{return e.doc??Ru(),t=e._map.entries(),n=e=>!e[1].deleted,uc(()=>{let e;do{e=t.next()}while(!e.done&&!n(e.value));return e});var t,n};class ld extends Pu{}class cd extends Bu{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const t=new cd;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new cd}clone(){const e=new cd;return e.insert(0,this.toArray().map(e=>e instanceof Bu?e.clone():e)),e}get length(){return this.doc??Ru(),this._length}_callObserver(e,t){super._callObserver(e,t),Wu(this,e,new ld(this,e))}insert(e,t){null!==this.doc?_u(this.doc,n=>{ed(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}push(e){null!==this.doc?_u(this.doc,t=>{((e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;Ku(e,t,r,n)})(t,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){null!==this.doc?_u(this.doc,n=>{td(n,this,e,t)}):this._prelimContent.splice(e,t)}get(e){return Gu(this,e)}toArray(){return Zu(this)}slice(e=0,t=this.length){return Hu(this,e,t)}toJSON(){return this.map(e=>e instanceof Bu?e.toJSON():e)}map(e){return Xu(this,e)}forEach(e){Ju(this,e)}[Symbol.iterator](){return Yu(this)}_write(e){e.writeTypeRef(Zd)}}class ud extends Pu{constructor(e,t,n){super(e,t),this.keysChanged=n}}class dd extends Bu{constructor(e){super(),this._prelimContent=null,this._prelimContent=void 0===e?new Map:new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new dd}clone(){const e=new dd;return this.forEach((t,n)=>{e.set(n,t instanceof Bu?t.clone():t)}),e}_callObserver(e,t){Wu(this,e,new ud(this,e,t))}toJSON(){this.doc??Ru();const e={};return this._map.forEach((t,n)=>{if(!t.deleted){const r=t.content.getContent()[t.length-1];e[n]=r instanceof Bu?r.toJSON():r}}),e}get size(){return[...ad(this)].length}keys(){return dc(ad(this),e=>e[0])}values(){return dc(ad(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return dc(ad(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Ru(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){null!==this.doc?_u(this.doc,t=>{nd(t,this,e)}):this._prelimContent.delete(e)}set(e,t){return null!==this.doc?_u(this.doc,n=>{rd(n,this,e,t)}):this._prelimContent.set(e,t),t}get(e){return id(this,e)}has(e){return sd(this,e)}clear(){null!==this.doc?_u(this.doc,e=>{this.forEach(function(t,n,r){nd(e,r,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(Jd)}}const hd=(e,t)=>e===t||"object"===typeof e&&"object"===typeof t&&e&&t&&((e,t)=>e===t||ca(e)===ca(t)&&ua(e,(e,n)=>(void 0!==e||da(t,n))&&sa(t[n],e)))(e,t);class fd{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){if(null===this.right&&Ms(),this.right.content.constructor===Ud)this.right.deleted||bd(this.currentAttributes,this.right.content);else this.right.deleted||(this.index+=this.right.length);this.left=this.right,this.right=this.right.right}}const pd=(e,t,n)=>{for(;null!==t.right&&n>0;){if(t.right.content.constructor===Ud)t.right.deleted||bd(t.currentAttributes,t.right.content);else t.right.deleted||(n<t.right.length&&fu(e,Xc(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);t.left=t.right,t.right=t.right.right}return t},gd=(e,t,n,r)=>{const i=new Map,o=r?Fu(t,n):null;if(o){const t=new fd(o.p.left,o.p,o.index,i);return pd(e,t,n-o.index)}{const r=new fd(null,t._start,0,i);return pd(e,r,n)}},md=(e,t,n,r)=>{for(;null!==n.right&&(!0===n.right.deleted||n.right.content.constructor===Ud&&hd(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();const i=e.doc,o=i.clientID;r.forEach((r,s)=>{const a=n.left,l=n.right,c=new rh(Xc(o,lu(i.store,o)),a,a&&a.lastId,l,l&&l.id,t,null,new Ud(s,r));c.integrate(e,0),n.right=c,n.forward()})},bd=(e,t)=>{const{key:n,value:r}=t;null===r?e.delete(n):e.set(n,r)},yd=(e,t)=>{for(;null!==e.right&&(e.right.deleted||e.right.content.constructor===Ud&&hd(t[e.right.content.key]??null,e.right.content.value));)e.forward()},wd=(e,t,n,r)=>{const i=e.doc,o=i.clientID,s=new Map;for(const a in r){const l=r[a],c=n.currentAttributes.get(a)??null;if(!hd(c,l)){s.set(a,c);const{left:r,right:u}=n;n.right=new rh(Xc(o,lu(i.store,o)),r,r&&r.lastId,u,u&&u.id,t,null,new Ud(a,l)),n.right.integrate(e,0),n.forward()}}return s},vd=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{void 0===i[t]&&(i[t]=null)});const o=e.doc,s=o.clientID;yd(n,i);const a=wd(e,t,n,i),l=r.constructor===String?new Bd(r):r instanceof Bu?new eh(r):new qd(r);let{left:c,right:u,index:d}=n;t._searchMarker&&Vu(t._searchMarker,n.index,l.getLength()),u=new rh(Xc(s,lu(o.store,s)),c,c&&c.lastId,u,u&&u.id,t,null,l),u.integrate(e,0),n.right=u,n.index=d,n.forward(),md(e,t,n,a)},kd=(e,t,n,r,i)=>{const o=e.doc,s=o.clientID;yd(n,i);const a=wd(e,t,n,i);e:for(;null!==n.right&&(r>0||a.size>0&&(n.right.deleted||n.right.content.constructor===Ud));){if(!n.right.deleted)switch(n.right.content.constructor){case Ud:{const{key:t,value:o}=n.right.content,s=i[t];if(void 0!==s){if(hd(s,o))a.delete(t);else{if(0===r)break e;a.set(t,o)}n.right.delete(e)}else n.currentAttributes.set(t,o);break}default:r<n.right.length&&fu(e,Xc(n.right.id.client,n.right.id.clock+r)),r-=n.right.length}n.forward()}if(r>0){let i="";for(;r>0;r--)i+="\n";n.right=new rh(Xc(s,lu(o.store,s)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new Bd(i)),n.right.integrate(e,0),n.forward()}md(e,t,n,a)},xd=(e,t,n,r,i)=>{let o=t;const s=Oo();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===Ud){const e=o.content;s.set(e.key,e)}o=o.right}let a=0,l=!1;for(;t!==o;){if(n===t&&(l=!0),!t.deleted){const n=t.content;switch(n.constructor){case Ud:{const{key:o,value:c}=n,u=r.get(o)??null;s.get(o)===n&&u!==c||(t.delete(e),a++,l||(i.get(o)??null)!==c||u===c||(null===u?i.delete(o):i.set(o,u))),l||t.deleted||bd(i,n);break}}}t=t.right}return a},_d=e=>{let t=0;return _u(e.doc,n=>{let r=e._start,i=e._start,o=Oo();const s=Ao(o);for(;i;){if(!1===i.deleted)if(i.content.constructor===Ud)bd(s,i.content);else t+=xd(n,r,i,o,s),o=Ao(s),r=i;i=i.right}}),t},Cd=e=>{const t=new Set,n=e.doc;for(const[r,i]of e.afterState.entries()){const o=e.beforeState.get(r)||0;i!==o&&gu(e,n.store.clients.get(r),o,i,e=>{e.deleted||e.content.constructor!==Ud||e.constructor===Td||t.add(e.parent)})}_u(n,n=>{pc(e,e.deleteSet,e=>{if(e instanceof Td||!e.parent._hasFormatting||t.has(e.parent))return;const r=e.parent;e.content.constructor===Ud?t.add(r):((e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===Ud){const r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}})(n,e)});for(const e of t)_d(e)})},Sd=(e,t,n)=>{const r=n,i=Ao(t.currentAttributes),o=t.right;for(;n>0&&null!==t.right;){if(!1===t.right.deleted)switch(t.right.content.constructor){case eh:case qd:case Bd:n<t.right.length&&fu(e,Xc(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e)}t.forward()}o&&xd(e,o,t.right,i,t.currentAttributes);const s=(t.left||t.right).parent;return s._searchMarker&&Vu(s._searchMarker,t.index,-r+n),t};class Ed extends Pu{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{null===e?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){if(null===this._changes){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(null===this._delta){const e=this.target.doc,t=[];_u(e,e=>{const n=new Map,r=new Map;let i=this.target._start,o=null;const s={};let a="",l=0,c=0;const u=()=>{if(null!==o){let e=null;switch(o){case"delete":c>0&&(e={delete:c}),c=0;break;case"insert":("object"===typeof a||a.length>0)&&(e={insert:a},n.size>0&&(e.attributes={},n.forEach((t,n)=>{null!==t&&(e.attributes[n]=t)}))),a="";break;case"retain":l>0&&(e={retain:l},(e=>{for(const t in e)return!1;return!0})(s)||(e.attributes=aa({},s))),l=0}e&&t.push(e),o=null}};for(;null!==i;){switch(i.content.constructor){case eh:case qd:this.adds(i)?this.deletes(i)||(u(),o="insert",a=i.content.getContent()[0],u()):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=1):i.deleted||("retain"!==o&&(u(),o="retain"),l+=1);break;case Bd:this.adds(i)?this.deletes(i)||("insert"!==o&&(u(),o="insert"),a+=i.content.str):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=i.length):i.deleted||("retain"!==o&&(u(),o="retain"),l+=i.length);break;case Ud:{const{key:t,value:a}=i.content;if(this.adds(i)){if(!this.deletes(i)){const l=n.get(t)??null;hd(l,a)?null!==a&&i.delete(e):("retain"===o&&u(),hd(a,r.get(t)??null)?delete s[t]:s[t]=a)}}else if(this.deletes(i)){r.set(t,a);const e=n.get(t)??null;hd(e,a)||("retain"===o&&u(),s[t]=e)}else if(!i.deleted){r.set(t,a);const n=s[t];void 0!==n&&(hd(n,a)?null!==n&&i.delete(e):("retain"===o&&u(),null===a?delete s[t]:s[t]=a))}i.deleted||("insert"===o&&u(),bd(n,i.content));break}}i=i.right}for(u();t.length>0;){const e=t[t.length-1];if(void 0===e.retain||void 0!==e.attributes)break;t.pop()}}),this._delta=t}return this._delta}}class Ld extends Bu{constructor(e){super(),this._pending=void 0!==e?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Ru(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(A){}this._pending=null}_copy(){return new Ld}clone(){const e=new Ld;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);const n=new Ed(this,e,t);Wu(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Ru();let e="",t=this._start;for(;null!==t;)!t.deleted&&t.countable&&t.content.constructor===Bd&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){null!==this.doc?_u(this.doc,n=>{const r=new fd(null,this._start,0,new Map);for(let i=0;i<e.length;i++){const o=e[i];if(void 0!==o.insert){const s=t||"string"!==typeof o.insert||i!==e.length-1||null!==r.right||"\n"!==o.insert.slice(-1)?o.insert:o.insert.slice(0,-1);("string"!==typeof s||s.length>0)&&vd(n,this,r,s,o.attributes||{})}else void 0!==o.retain?kd(n,this,r,o.retain,o.attributes||{}):void 0!==o.delete&&Sd(n,r,o.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,t,n){this.doc??Ru();const r=[],i=new Map,o=this.doc;let s="",a=this._start;function l(){if(s.length>0){const e={};let t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});const n={insert:s};t&&(n.attributes=e),r.push(n),s=""}}const c=()=>{for(;null!==a;){if(iu(a,e)||void 0!==t&&iu(a,t))switch(a.content.constructor){case Bd:{const r=i.get("ychange");void 0===e||iu(a,e)?void 0===t||iu(a,t)?void 0!==r&&(l(),i.delete("ychange")):void 0!==r&&r.user===a.id.client&&"added"===r.type||(l(),i.set("ychange",n?n("added",a.id):{type:"added"})):void 0!==r&&r.user===a.id.client&&"removed"===r.type||(l(),i.set("ychange",n?n("removed",a.id):{type:"removed"})),s+=a.content.str;break}case eh:case qd:{l();const e={insert:a.content.getContent()[0]};if(i.size>0){const t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case Ud:iu(a,e)&&(l(),bd(i,a.content))}a=a.right}l()};return e||t?_u(o,n=>{e&&ou(n,e),t&&ou(n,t),c()},"cleanup"):c(),r}insert(e,t,n){if(t.length<=0)return;const r=this.doc;null!==r?_u(r,r=>{const i=gd(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),vd(r,this,i,t,n)}):this._pending.push(()=>this.insert(e,t,n))}insertEmbed(e,t,n){const r=this.doc;null!==r?_u(r,r=>{const i=gd(r,this,e,!n);vd(r,this,i,t,n||{})}):this._pending.push(()=>this.insertEmbed(e,t,n||{}))}delete(e,t){if(0===t)return;const n=this.doc;null!==n?_u(n,n=>{Sd(n,gd(n,this,e,!0),t)}):this._pending.push(()=>this.delete(e,t))}format(e,t,n){if(0===t)return;const r=this.doc;null!==r?_u(r,r=>{const i=gd(r,this,e,!1);null!==i.right&&kd(r,this,i,t,n)}):this._pending.push(()=>this.format(e,t,n))}removeAttribute(e){null!==this.doc?_u(this.doc,t=>{nd(t,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,t){null!==this.doc?_u(this.doc,n=>{rd(n,this,e,t)}):this._pending.push(()=>this.setAttribute(e,t))}getAttribute(e){return id(this,e)}getAttributes(){return od(this)}_write(e){e.writeTypeRef(Xd)}}class Od{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Ru()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(null!==e&&(!this._firstCall||e.deleted||!this._filter(t)))do{if(t=e.content.type,e.deleted||t.constructor!==$d&&t.constructor!==Ad||null===t._start)for(;null!==e;){const t=e.next;if(null!==t){e=t;break}e=e.parent===this._root?null:e.parent._item}else e=t._start}while(null!==e&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,null===e?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class Ad extends Bu{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Ad}clone(){const e=new Ad;return e.insert(0,this.toArray().map(e=>e instanceof Bu?e.clone():e)),e}get length(){return this.doc??Ru(),null===this._prelimContent?this._length:this._prelimContent.length}createTreeWalker(e){return new Od(this,e)}querySelector(e){e=e.toUpperCase();const t=new Od(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),No(new Od(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){Wu(this,e,new Md(this,t,e))}toString(){return Xu(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},n){const r=e.createDocumentFragment();return void 0!==n&&n._createAssociation(r,this),Ju(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){null!==this.doc?_u(this.doc,n=>{ed(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(null!==this.doc)_u(this.doc,n=>{const r=e&&e instanceof Bu?e._item:e;Ku(n,this,r,t)});else{const n=this._prelimContent,r=null===e?0:n.findIndex(t=>t===e)+1;if(0===r&&null!==e)throw As("Reference item not found");n.splice(r,0,...t)}}delete(e,t=1){null!==this.doc?_u(this.doc,n=>{td(n,this,e,t)}):this._prelimContent.splice(e,t)}toArray(){return Zu(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Gu(this,e)}slice(e=0,t=this.length){return Hu(this,e,t)}forEach(e){Ju(this,e)}_write(e){e.writeTypeRef(Gd)}}class $d extends Ad{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new $d(this.nodeName)}clone(){const e=new $d(this.nodeName);return((e,t)=>{for(const n in e)t(e[n],n)})(this.getAttributes(),(t,n)=>{e.setAttribute(n,t)}),e.insert(0,this.toArray().map(e=>e instanceof Bu?e.clone():e)),e}toString(){const e=this.getAttributes(),t=[],n=[];for(const o in e)n.push(o);n.sort();const r=n.length;for(let o=0;o<r;o++){const r=n[o];t.push(r+'="'+e[r]+'"')}const i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?" "+t.join(" "):""}>${super.toString()}</${i}>`}removeAttribute(e){null!==this.doc?_u(this.doc,t=>{nd(t,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,t){null!==this.doc?_u(this.doc,n=>{rd(n,this,e,t)}):this._prelimAttrs.set(e,t)}getAttribute(e){return id(this,e)}hasAttribute(e){return sd(this,e)}getAttributes(e){return e?((e,t)=>{const n={};return e._map.forEach((e,r)=>{let i=e;for(;null!==i&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;null!==i&&iu(i,t)&&(n[r]=i.content.getContent()[i.length-1])}),n})(this,e):od(this)}toDOM(e=document,t={},n){const r=e.createElement(this.nodeName),i=this.getAttributes();for(const o in i){const e=i[o];"string"===typeof e&&r.setAttribute(o,e)}return Ju(this,i=>{r.appendChild(i.toDOM(e,t,n))}),void 0!==n&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(Yd),e.writeKey(this.nodeName)}}class Md extends Pu{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{null===e?this.childListChanged=!0:this.attributesChanged.add(e)})}}class jd extends dd{constructor(e){super(),this.hookName=e}_copy(){return new jd(this.hookName)}clone(){const e=new jd(this.hookName);return this.forEach((t,n)=>{e.set(n,t)}),e}toDOM(e=document,t={},n){const r=t[this.hookName];let i;return i=void 0!==r?r.createDom(this):document.createElement(this.hookName),i.setAttribute("data-yjs-hook",this.hookName),void 0!==n&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(Kd),e.writeKey(this.hookName)}}class Dd extends Ld{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new Dd}clone(){const e=new Dd;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,n){const r=e.createTextNode(this.toString());return void 0!==n&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{const t=[];for(const r in e.attributes){const n=[];for(const t in e.attributes[r])n.push({key:t,value:e.attributes[r][t]});n.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:r,attrs:n})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n="";for(let r=0;r<t.length;r++){const e=t[r];n+=`<${e.nodeName}`;for(let t=0;t<e.attrs.length;t++){const r=e.attrs[t];n+=` ${r.key}="${r.value}"`}n+=">"}n+=e.insert;for(let r=t.length-1;r>=0;r--)n+=`</${t[r].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Qd)}}class Nd{constructor(e,t){this.id=e,this.length=t}get deleted(){throw $s()}mergeWith(e){return!1}write(e,t,n){throw $s()}integrate(e,t){throw $s()}}class Td extends Nd{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),cu(e.doc.store,this)}write(e,t){e.writeInfo(0),e.writeLen(this.length-t)}getMissing(e,t){return null}}class Pd{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Pd(this.content)}splice(e){throw $s()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class zd{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new zd(this.len)}splice(e){const t=new zd(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){yc(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}const Rd=(e,t)=>new Sc({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class Id{constructor(e){e._item,this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),null!==e.meta&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Id(Rd(this.doc.guid,this.opts))}splice(e){throw $s()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class qd{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new qd(this.embed)}splice(e){throw $s()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class Ud{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new Ud(this.key,this.value)}splice(e){throw $s()}mergeWith(e){return!1}integrate(e,t){const n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}class Fd{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Fd(this.arr)}splice(e){const t=new Fd(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeString(void 0===t?"undefined":JSON.stringify(t))}}getRef(){return 2}}const Vd="development"===Ca("node_env");class Wd{constructor(e){this.arr=e,Vd&&fa(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Wd(this.arr)}splice(e){const t=new Wd(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeAny(t)}}getRef(){return 8}}class Bd{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new Bd(this.str)}splice(e){const t=new Bd(this.str.slice(e));this.str=this.str.slice(0,e);const n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"\ufffd",t.str="\ufffd"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(0===t?this.str:this.str.slice(t))}getRef(){return 4}}const Hd=[e=>new cd,e=>new dd,e=>new Ld,e=>new $d(e.readKey()),e=>new Ad,e=>new jd(e.readKey()),e=>new Dd],Zd=0,Jd=1,Xd=2,Yd=3,Gd=4,Kd=5,Qd=6;class eh{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new eh(this.type._copy())}splice(e){throw $s()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;null!==t;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;null!==t;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;null!==t;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}const th=(e,t)=>{let n,r=t,i=0;do{i>0&&(r=Xc(r.client,r.clock+i)),n=du(e,r),i=r.clock-n.id.clock,r=n.redone}while(null!==r&&n instanceof rh);return{item:n,diff:i}},nh=(e,t,n)=>{const{client:r,clock:i}=t.id,o=new rh(Xc(r,i+n),t,Xc(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),null!==t.redone&&(o.redone=Xc(t.redone.client,t.redone.clock+n)),t.right=o,null!==o.right&&(o.right.left=o),e._mergeStructs.push(o),null!==o.parentSub&&null===o.right&&o.parent._map.set(o.parentSub,o),t.length=n,o};class rh extends Nd{constructor(e,t,n,r,i,o,s,a){super(e,a.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=o,this.parentSub=s,this.redone=null,this.content=a,this.info=this.content.isCountable()?2:0}set marker(e){(8&this.info)>0!==e&&(this.info^=8)}get marker(){return(8&this.info)>0}get keep(){return(1&this.info)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(2&this.info)>0}get deleted(){return(4&this.info)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=lu(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=lu(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Zc&&this.id.client!==this.parent.client&&this.parent.clock>=lu(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=pu(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=fu(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Td||this.right&&this.right.constructor===Td)this.parent=null;else if(this.parent){if(this.parent.constructor===Zc){const e=du(t,this.parent);e.constructor===Td?this.parent=null:this.parent=e.content.type}}else this.left&&this.left.constructor===rh?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===rh&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=pu(e,e.doc.store,Xc(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||null!==this.right.left)||this.left&&this.left.right!==this.right){let t,n=this.left;if(null!==n)t=n.right;else if(null!==this.parentSub)for(t=this.parent._map.get(this.parentSub)||null;null!==t&&null!==t.left;)t=t.left;else t=this.parent._start;const r=new Set,i=new Set;for(;null!==t&&t!==this.right;){if(i.add(t),r.add(t),Jc(this.origin,t.origin)){if(t.id.client<this.id.client)n=t,r.clear();else if(Jc(this.rightOrigin,t.rightOrigin))break}else{if(null===t.origin||!i.has(du(e.doc.store,t.origin)))break;r.has(du(e.doc.store,t.origin))||(n=t,r.clear())}t=t.right}this.left=n}if(null!==this.left){const e=this.left.right;this.right=e,this.left.right=this}else{let e;if(null!==this.parentSub)for(e=this.parent._map.get(this.parentSub)||null;null!==e&&null!==e.left;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}null!==this.right?this.right.left=this:null!==this.parentSub&&(this.parent._map.set(this.parentSub,this),null!==this.left&&this.left.delete(e)),null===this.parentSub&&this.countable&&!this.deleted&&(this.parent._length+=this.length),cu(e.doc.store,this),this.content.integrate(e,this),yu(e,this.parent,this.parentSub),(null!==this.parent._item&&this.parent._item.deleted||null!==this.parentSub&&null!==this.right)&&this.delete(e)}else new Td(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;null!==e&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;null!==e&&e.deleted;)e=e.left;return e}get lastId(){return 1===this.length?this.id:Xc(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Jc(e.origin,this.lastId)&&this.right===e&&Jc(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&null===this.redone&&null===e.redone&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,null!==this.right&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const t=this.parent;this.countable&&null===this.parentSub&&(t._length-=this.length),this.markDeleted(),yc(e.deleteSet,this.id.client,this.id.clock,this.length),yu(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw Ms();this.content.gc(e),t?((e,t,n)=>{const r=e.clients.get(t.id.client);r[uu(r,t.id.clock)]=n})(e,this,new Td(this.id,this.length)):this.content=new zd(this.length)}write(e,t){const n=t>0?Xc(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,o=31&this.content.getRef()|(null===n?0:Zo)|(null===r?0:Ho)|(null===i?0:32);if(e.writeInfo(o),null!==n&&e.writeLeftID(n),null!==r&&e.writeRightID(r),null===n&&null===r){const t=this.parent;if(void 0!==t._item){const n=t._item;if(null===n){const n=Yc(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===Zc?(e.writeParentInfo(!1),e.writeLeftID(t)):Ms();null!==i&&e.writeString(i)}this.content.write(e,t)}}const ih=(e,t)=>oh[31&t](e),oh=[()=>{Ms()},e=>new zd(e.readLen()),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++){const t=e.readString();"undefined"===t?n.push(void 0):n.push(JSON.parse(t))}return new Fd(n)},e=>new Pd(e.readBuf()),e=>new Bd(e.readString()),e=>new qd(e.readJSON()),e=>new Ud(e.readKey(),e.readJSON()),e=>new eh(Hd[e.readTypeRef()](e)),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new Wd(n)},e=>new Id(Rd(e.readString(),e.readAny())),()=>{Ms()}];class sh extends Nd{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){Ms()}write(e,t){e.writeInfo(10),fs(e.restEncoder,this.length-t)}getMissing(e,t){return null}}const ah="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:{},lh="__ $YJS$ __";ah[lh],ah[lh]=!0;const ch=new Map;const uh="undefined"===typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:$a(t.newValue||"")}),t=this._onChange,ra||addEventListener("storage",t)}postMessage(e){ia.setItem(this.room,Aa((e=>new Uint8Array(e))(e)))}close(){var e;e=this._onChange,ra||removeEventListener("storage",e)}}:BroadcastChannel,dh=e=>$o(ch,e,()=>{const t=Mo(),n=new uh(e);return n.onmessage=e=>t.forEach(t=>t(e.data,"broadcastchannel")),{bc:n,subs:t}}),hh=(e,t,n=null)=>{const r=dh(e);r.bc.postMessage(t),r.subs.forEach(e=>e(t,n))},fh=(e,t)=>{fs(e,0);const n=(e=>Uc(e,new $c))(t);ws(e,n)},ph=(e,t,n)=>{fs(e,1),ws(e,((e,t)=>zc(e,t,new Mc))(t,n))},gh=(e,t,n,r)=>{try{((e,t,n)=>{Pc(e,t,n,Lc)})(t,Rs(e),n)}catch(i){null!=r&&r(i)}},mh=gh,bh=(e,t,n,r,i)=>{const o=qs(e);switch(o){case 0:((e,t,n)=>{ph(t,n,Rs(e))})(e,t,n);break;case 1:gh(e,n,r,i);break;case 2:mh(e,n,r,i);break;default:throw new Error("Unknown message type")}return o},yh=3e4;class wh extends Io{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=Gl();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&yh<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&vh(this,t,"timeout")},qo(3e3)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const t=this.clientID,n=this.meta.get(t),r=void 0===n?0:n.clock+1,i=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:Gl()});const o=[],s=[],a=[],l=[];null===e?l.push(t):null==i?null!=e&&o.push(t):(s.push(t),ma(i,e)||a.push(t)),(o.length>0||a.length>0||l.length>0)&&this.emit("change",[{added:o,updated:a,removed:l},"local"]),this.emit("update",[{added:o,updated:s,removed:l},"local"])}setLocalStateField(e,t){const n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}const vh=(e,t,n)=>{const r=[];for(let i=0;i<t.length;i++){const n=t[i];if(e.states.has(n)){if(e.states.delete(n),n===e.clientID){const t=e.meta.get(n);e.meta.set(n,{clock:t.clock+1,lastUpdated:Gl()})}r.push(n)}}r.length>0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},kh=(e,t,n=e.states)=>{const r=t.length,i=ls();fs(i,r);for(let o=0;o<r;o++){const r=t[o],s=n.get(r)||null,a=e.meta.get(r).clock;fs(i,r),fs(i,a),bs(i,JSON.stringify(s))}return us(i)};var xh=n(54650);const _h=[];_h[0]=(e,t,n,r,i)=>{fs(e,0);const o=bh(t,e,n.doc,n);r&&1===o&&!n.synced&&(n.synced=!0)},_h[3]=(e,t,n,r,i)=>{fs(e,1),ws(e,kh(n.awareness,Array.from(n.awareness.getStates().keys())))},_h[1]=(e,t,n,r,i)=>{((e,t,n)=>{const r=Ts(t),i=Gl(),o=[],s=[],a=[],l=[],c=qs(r);for(let u=0;u<c;u++){const t=qs(r);let n=qs(r);const c=JSON.parse(Fs(r)),u=e.meta.get(t),d=e.states.get(t),h=void 0===u?0:u.clock;(h<n||h===n&&null===c&&e.states.has(t))&&(null===c?t===e.clientID&&null!=e.getLocalState()?n++:e.states.delete(t):e.states.set(t,c),e.meta.set(t,{clock:n,lastUpdated:i}),void 0===u&&null!==c?o.push(t):void 0!==u&&null===c?l.push(t):null!==c&&(ma(c,d)||a.push(t),s.push(t)))}(o.length>0||a.length>0||l.length>0)&&e.emit("change",[{added:o,updated:a,removed:l},n]),(o.length>0||s.length>0||l.length>0)&&e.emit("update",[{added:o,updated:s,removed:l},n])})(n.awareness,Rs(t),n)},_h[2]=(e,t,n,r,i)=>{((e,t,n)=>{0===qs(e)&&n(t,Fs(e))})(t,n.doc,(e,t)=>Ch(n,t))};const Ch=(e,t)=>{},Sh=(e,t,n)=>{const r=Ts(t),i=ls(),o=qs(r),s=e.messageHandlers[o];return s&&s(i,r,e,n,o),i},Eh=(e,t,n)=>{t===e.ws&&(e.emit("connection-close",[n,e]),e.ws=null,t.close(),e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,vh(e.awareness,Array.from(e.awareness.getStates().keys()).filter(t=>t!==e.doc.clientID),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(Lh,Fo(100*Wo(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e))},Lh=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url,e.protocols);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=n=>{e.wsLastMessageReceived=Gl();const r=Sh(e,new Uint8Array(n.data),!0);cs(r)>1&&t.send(us(r))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=n=>{Eh(e,t,n)},t.onopen=()=>{e.wsLastMessageReceived=Gl(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const n=ls();if(fs(n,0),fh(n,e.doc),t.send(us(n)),null!==e.awareness.getLocalState()){const n=ls();fs(n,1),ws(n,kh(e.awareness,[e.doc.clientID])),t.send(us(n))}},e.emit("status",[{status:"connecting"}])}},Oh=(e,t)=>{const n=e.ws;e.wsconnected&&n&&n.readyState===n.OPEN&&n.send(t),e.bcconnected&&hh(e.bcChannel,t,e)};class Ah extends Ro{constructor(e,t,n,{connect:r=!0,awareness:i=new wh(n),params:o={},protocols:s=[],WebSocketPolyfill:a=WebSocket,resyncInterval:l=-1,maxBackoffTime:c=2500,disableBc:u=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);this.serverUrl=e,this.bcChannel=e+"/"+t,this.maxBackoffTime=c,this.params=o,this.protocols=s,this.roomname=t,this.doc=n,this._WS=a,this.awareness=i,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=u,this.wsUnsuccessfulReconnects=0,this.messageHandlers=_h.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=r,this._resyncInterval=0,l>0&&(this._resyncInterval=setInterval(()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=ls();fs(e,0),fh(e,n),this.ws.send(us(e))}},l)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=Sh(this,new Uint8Array(e),!1);cs(t)>1&&hh(this.bcChannel,us(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=ls();fs(t,0),((e,t)=>{fs(e,2),ws(e,t)})(t,e),Oh(this,us(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:n},r)=>{const o=e.concat(t).concat(n),s=ls();fs(s,1),ws(s,kh(i,o)),Oh(this,us(s))},this._exitHandler=()=>{vh(this.awareness,[n.clientID],"app closed")},ya&&"undefined"!==typeof xh&&xh.on("exit",this._exitHandler),i.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval(()=>{this.wsconnected&&3e4<Gl()-this.wsLastMessageReceived&&Eh(this,this.ws,null)},3e3),r&&this.connect()}get url(){const e=(e=>((e,t)=>{const n=[];for(const r in e)n.push(t(e[r],r));return n})(e,(e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&"))(this.params);return this.serverUrl+"/"+this.roomname+(0===e.length?"":"?"+e)}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),ya&&"undefined"!==typeof xh&&xh.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;this.bcconnected||(((e,t)=>{dh(e).subs.add(t)})(this.bcChannel,this._bcSubscriber),this.bcconnected=!0);const e=ls();fs(e,0),fh(e,this.doc),hh(this.bcChannel,us(e),this);const t=ls();fs(t,0),ph(t,this.doc),hh(this.bcChannel,us(t),this);const n=ls();fs(n,3),hh(this.bcChannel,us(n),this);const r=ls();fs(r,1),ws(r,kh(this.awareness,[this.doc.clientID])),hh(this.bcChannel,us(r),this)}disconnectBc(){const e=ls();fs(e,1),ws(e,kh(this.awareness,[this.doc.clientID],new Map)),Oh(this,us(e)),this.bcconnected&&(((e,t)=>{const n=dh(e),r=n.subs.delete(t);r&&0===n.subs.size&&(n.bc.close(),ch.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&Eh(this,this.ws,null)}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(Lh(this),this.connectBc())}}class $h{constructor(e,t,n){this.start=e,this.end=t,this.direction=n}}class Mh{constructor(e,t,n=new Set,r=null){this.doc=e.doc,this.ytext=e,this.monacoModel=t,this.editors=n,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this._savedSelections=new Map,this._beforeTransaction=()=>{this.mux(()=>{this._savedSelections=new Map,n.forEach(n=>{if(n.getModel()===t){const r=((e,t,n)=>{const r=e.getSelection();if(null!==r){const e=r.getStartPosition(),i=r.getEndPosition(),o=eu(n,t.getOffsetAt(e)),s=eu(n,t.getOffsetAt(i));return new $h(o,s,r.getDirection())}return null})(n,t,e);null!==r&&this._savedSelections.set(n,r)}})})},this.doc.on("beforeAllTransactions",this._beforeTransaction),this._decorations=new Map,this._rerenderDecorations=()=>{n.forEach(n=>{if(r&&n.getModel()===t){const i=this._decorations.get(n)||[],o=[];r.getStates().forEach((n,r)=>{if(r!==this.doc.clientID&&null!=n.selection&&null!=n.selection.anchor&&null!=n.selection.head){const i=tu(n.selection.anchor,this.doc),s=tu(n.selection.head,this.doc);if(null!==i&&null!==s&&i.type===e&&s.type===e){let e,n,a,l;i.index<s.index?(e=t.getPositionAt(i.index),n=t.getPositionAt(s.index),a="yRemoteSelectionHead yRemoteSelectionHead-"+r,l=null):(e=t.getPositionAt(s.index),n=t.getPositionAt(i.index),a=null,l="yRemoteSelectionHead yRemoteSelectionHead-"+r),o.push({range:new ge.Range(e.lineNumber,e.column,n.lineNumber,n.column),options:{className:"yRemoteSelection yRemoteSelection-"+r,afterContentClassName:a,beforeContentClassName:l}})}}}),this._decorations.set(n,n.deltaDecorations(i,o))}else this._decorations.delete(n)})},this._ytextObserver=n=>{this.mux(()=>{let r=0;n.delta.forEach(e=>{if(void 0!==e.retain)r+=e.retain;else if(void 0!==e.insert){const n=t.getPositionAt(r),i=new ge.Selection(n.lineNumber,n.column,n.lineNumber,n.column),o=e.insert;t.applyEdits([{range:i,text:o}]),r+=o.length}else{if(void 0===e.delete)throw Ms();{const n=t.getPositionAt(r),i=t.getPositionAt(r+e.delete),o=new ge.Selection(n.lineNumber,n.column,i.lineNumber,i.column);t.applyEdits([{range:o,text:""}])}}}),this._savedSelections.forEach((t,n)=>{const r=((e,t,n,r)=>{const i=tu(n.start,r),o=tu(n.end,r);if(null!==i&&null!==o&&i.type===t&&o.type===t){const t=e.getModel(),r=t.getPositionAt(i.index),s=t.getPositionAt(o.index);return ge.Selection.createWithDirection(r.lineNumber,r.column,s.lineNumber,s.column,n.direction)}return null})(n,e,t,this.doc);null!==r&&n.setSelection(r)})}),this._rerenderDecorations()},e.observe(this._ytextObserver);{const n=e.toString();t.getValue()!==n&&t.setValue(n)}this._monacoChangeHandler=t.onDidChangeContent(t=>{this.mux(()=>{this.doc.transact(()=>{t.changes.sort((e,t)=>t.rangeOffset-e.rangeOffset).forEach(t=>{e.delete(t.rangeOffset,t.rangeLength),e.insert(t.rangeOffset,t.text)})},this)})}),this._monacoDisposeHandler=t.onWillDispose(()=>{this.destroy()}),r&&(n.forEach(n=>{n.onDidChangeCursorSelection(()=>{if(n.getModel()===t){const i=n.getSelection();if(null===i)return;let o=t.getOffsetAt(i.getStartPosition()),s=t.getOffsetAt(i.getEndPosition());if(i.getDirection()===ge.SelectionDirection.RTL){const e=o;o=s,s=e}r.setLocalStateField("selection",{anchor:eu(e,o),head:eu(e,s)})}}),r.on("change",this._rerenderDecorations)}),this.awareness=r)}destroy(){this._monacoChangeHandler.dispose(),this._monacoDisposeHandler.dispose(),this.ytext.unobserve(this._ytextObserver),this.doc.off("beforeAllTransactions",this._beforeTransaction),this.awareness&&this.awareness.off("change",this._rerenderDecorations)}}var jh=n(89591),Dh=n(31345);var Nh=n(2896);const Th=({email:e,editorRef:t,setIsSpin:n,newEmailAiGeneratorRef:r})=>{const o=(0,i.useMemo)(()=>new Sc,[]),s=(0,bo.fn)(),a=(0,i.useRef)([]),l=(0,i.useRef)([]),c=(0,i.useRef)(!1),u=(0,i.useRef)(0),d=(0,i.useRef)(""),[h,f]=(0,i.useState)(null),[p,g]=(0,i.useState)(null),[m,b]=(0,i.useState)(!1),[y,w]=(0,i.useState)([]),[v,k]=(0,i.useState)(!1),[x,_]=(0,i.useState)(!1),C=(0,bo.aD)(s),S=(0,re.d4)(ue.C1),{saveEmailFromEditor:E}=function(e,t){const[n]=(0,jh.LX)(),r=(0,re.d4)(Dh.jY),o=(0,i.useCallback)(()=>{const i=(new Date).toISOString().slice(0,19).replace("T"," "),o=me.EW.isPlugin?r:e.project,s={parent:null===e||void 0===e?void 0:e.id,...void 0!==(null===e||void 0===e?void 0:e.meta)?{meta:e.meta}:{},title:e.title,author:e.author,project:o,html:(null===t||void 0===t?void 0:t.getValue())||"",excerpt:i,subject:e.subject,preheader:e.preheader,common_styles:e.common_styles,parent_email:e.parent_email};n({emailId:null===e||void 0===e?void 0:e.id,body:s}).catch(e=>{})},[t,e,r,n]);return{saveEmailFromEditor:o}}(e,h),L=(0,i.useRef)(null),[O,A]=(0,i.useState)(!1),[$]=(0,jh.dN)(),M=null===e||void 0===e?void 0:e.id,j=!(M!==Nh.LA&&!me.EW.isPlugin),D=(0,i.useMemo)(()=>({name:{first_name:j?null===S||void 0===S?void 0:S.username:null===S||void 0===S?void 0:S.first_name,last_name:j?"":null===S||void 0===S?void 0:S.last_name,email:null===S||void 0===S?void 0:S.email},color:Lo()}),[S,j]),N=(0,i.useMemo)(()=>((e,t)=>e.filter(e=>e.user.color!==t.color))(y,D),[D,y]),T=(0,i.useCallback)(()=>{p&&(null===p||void 0===p||p.destroy(),g(null))},[p]),P=(0,i.useCallback)(()=>{try{E()}catch(e){}},[E]),z=(0,i.useCallback)(async e=>{try{const t={emailId:M,source:"editor",html:e};return await $(t).unwrap(),!0}catch(t){return!1}},[M,$]),R=(0,i.useCallback)(async e=>{if(await z(e)&&O){const e=setTimeout(()=>{A(!1)},0);return()=>clearTimeout(e)}},[z,A,O]);(0,i.useEffect)(()=>{M&&me._P.isEditor&&(1===y.length&&u.current>1&&p&&P(),u.current=y.length)},[y.length,p,P]),(0,i.useEffect)(()=>{if(!M||!me._P.isEditor||O)return;const e=j?`${M}-plugin`:`${M}-collaborate`,t=new Ah(Nh.ZW,e,o);return g(t),t.awareness.setLocalStateField("user",D),()=>{null===t||void 0===t||t.destroy(),null===o||void 0===o||o.destroy()}},[o,D,j,M,O]);const I=(0,i.useCallback)(e=>{if(!c.current){c.current=!0;try{const t=l.current,n=Array.from(e.getStates().values());(n.length>1||n.length!==t.length)&&(w(n),requestAnimationFrame(()=>{Eo(n,h,a,m,b,D)})),l.current=n}finally{c.current=!1}}},[h,a,m,b,D]);if((0,i.useEffect)(()=>{if(!p||!h||!me._P.isEditor||!t.current||!h.getModel()||O)return;let e=null;const r=p.awareness,i=o.getText("monaco"),s=async o=>{const s=Array.from(r.getStates().values());if(o){if(i._length>0&&s.length>1&&!L.current){var a,l;const e=e=>e.replace(/\s+/g," ").trim();e((null===h||void 0===h||null===(a=h.getModel())||void 0===a||null===(l=a.getValue())||void 0===l?void 0:l.toString())||"")!==e(i.toString())&&(await async function(e,t){await new Promise(n=>{const r=()=>{var i,o,s;null===t||void 0===t||t(!0);((null===(i=e.current)||void 0===i||null===(o=i.getModel())||void 0===o||null===(s=o.getValue())||void 0===s?void 0:s.length)||0)>0?n():setTimeout(r,100)};r()})}(t,n),null===n||void 0===n||n(!1),h.executeEdits("collaboration",[{range:h.getModel().getFullModelRange(),text:i.toString(),forceMoveMarkers:!0}]))}var c,u;if(i._length>0&&1===s.length&&!L.current)i.applyDelta([{delete:i._length},{insert:null===(c=t.current)||void 0===c?void 0:c.getModel().getValue()}]);if(0===i._length)i.insert(0,null===(u=t.current)||void 0===u?void 0:u.getModel().getValue());L.current&&i.applyDelta([{delete:i._length},{insert:L.current}]),e=new Mh(i,null===h||void 0===h?void 0:h.getModel(),new Set([h]),r),null===h||void 0===h||h.onDidChangeCursorPosition(e=>((e,t)=>{t.setLocalStateField("cursor",e.position)})(e,r)),null===h||void 0===h||h.onDidChangeCursorSelection(e=>((e,t)=>{const n=e.selection;t.setLocalStateField("selection",{startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.endColumn})})(e,r)),r.on("change",()=>I(r)),L.current=null}};return p.on("sync",s),()=>{e&&e.destroy(),p.off("sync",s)}},[h,p,o,t,I,n,O]),(0,i.useEffect)(()=>{if(!p||!h||!me._P.isEditor||!t.current||O)return;const e=null===p||void 0===p?void 0:p.awareness,n=setInterval(()=>{I(e)},Nh.pX);return()=>clearInterval(n)},[p,h,m,t,v,I,T,O]),(0,i.useEffect)(()=>{if(!M||!me._P.isEditor)return;if(v)return;const e=(({CHECK_INTERVAL:e,SLEEP_THRESHOLD:t,provider:n,handleOfflineCollaboration:r,isNewEmailGeneration:i,saveEmailFromEditor:o})=>{let s=Date.now();return setInterval(()=>{const e=Date.now(),r=e-s;r>t&&n&&(o(),window.location.reload(),window.location.reload()),r<t&&!n&&document.visibilityState,s=e},e)})({CHECK_INTERVAL:Nh.Pp,SLEEP_THRESHOLD:Nh.Q9,provider:p,handleOfflineCollaboration:T,isNewEmailGeneration:O,saveEmailFromEditor:E});return()=>{clearInterval(e)}},[M,p,v,T,k,O]),h&&N.length>0){var q,U;const e=(null===h||void 0===h||null===(q=h.getModel())||void 0===q||null===(U=q.getValue())||void 0===U?void 0:U.toString())||"";d.current!==e&&"clear"in C&&C.clear(),d.current=e}const F=(()=>{const[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const e=navigator.platform.toUpperCase().includes("MAC"),n=n=>{const r=(e?n.metaKey:n.ctrlKey)&&"KeyZ"===n.code,i=r&&n.shiftKey;(r||i)&&(t(!0),n.preventDefault())},r=()=>{t(!1)},i=e=>{var n;"application_action"===(null===(n=e.data)||void 0===n?void 0:n.operation)&&("undo"!==e.data.action&&"redo"!==e.data.action||(t(!0),setTimeout(()=>t(!1),500)))};return document.addEventListener("keydown",n,!0),document.addEventListener("keyup",r,!0),window.addEventListener("message",i),()=>{document.removeEventListener("keydown",n,!0),document.removeEventListener("keyup",r,!0),window.removeEventListener("message",i)}},[]),e})()&&N.length>0;return(0,i.useEffect)(()=>{if(!M||!me._P.isEditor)return;const e=setInterval(()=>{if(null!==r&&void 0!==r&&r.current&&!O&&(T(),A(!0)),(null===r||void 0===r||!r.current)&&O){const e=null===s||void 0===s?void 0:s.getValue();L.current=e,R(e)}},300);return()=>clearInterval(e)},[O,p,M,me._P.isEditor]),(0,i.useEffect)(()=>{if(!M||!me._P.isEditor)return;const e=()=>{"hidden"===document.visibilityState&&E()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[e,M,me._P.isEditor]),[h,N,f,v,F]};n(99705);var Ph=n(12650),zh=n(6403),Rh=n(47706);!function(){const e={editorWorkerService:"editor.worker.js",html:"html.worker.js",css:"css.worker.js",typescript:"ts.worker.js",json:"json.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"};function t(e,t){/^(\/\/)/.test(e)&&(e=window.location.protocol+e);const n=new Blob(["/*"+t+'*/importScripts("'+e+'");'],{type:"application/javascript"});return URL.createObjectURL(n)}emailmakerMonacoEnvironment.getWorkerUrl=(r,i)=>{const o=n.p,s=(o?o.replace(/\/$/,"")+"/":"")+e[i];const a=new URL(s,window.location.origin),l=a.protocol;if("http:"===l||"https:"===l){if(a.protocol!==window.location.protocol||a.hostname!==window.location.hostname)return t(s,i);if("localhost"===a.hostname&&(a.port||"80")!==(window.location.port||"80"))return t(s,i)}else if("file:"===l)return t(s,i);return s}}(),(0,bo.Xb)(),ge.languages.html.htmlDefaults.options.format.wrapLineLength=0,q.config({monaco:ge}),function(e,t){const n=ae.dS.getEditorContributions().find(t=>t.id===e);if(!n)throw new Error(`No contribution ${e}`);n.ctor=t(n)}(ce.ID,()=>ce),function(e,t){void 0===e&&(e=window.monaco),void 0===t&&(t=["html"]),mo(e,t,"html")}(ge),function(e,t){void 0===e&&(e=window.monaco),void 0===t&&(t=["css"]),mo(e,t,"css")}(ge,["html"]);const Ih="'Source Code Pro', Consolas, 'Courier New', monospace",qh=({email:e,readOnly:t,setOtherUsers:n,newEmailAiGeneratorRef:o})=>{const s=(0,bo.fn)();"html"!==s.getLanguageId()&&ge.editor.setModelLanguage(s,"html");const a=(0,wo.ml)(vo.AZ.ON_CODE_VALIDATE_ID),l=(0,oe.XW)(),c=(0,re.d4)(de.Up),u=(0,re.d4)(he.Up),d=(0,re.d4)(de.VZ),h=null!==e&&void 0!==e&&e.hasOwnProperty("type")?u:c,f=(0,re.d4)(ue.hZ),p=(0,re.wA)(),g=(0,i.useRef)(null),m=(0,i.useRef)(null),b=(0,i.useRef)(null),y=(0,i.useRef)([]),w=(0,yo.rD)(),v=(0,i.useCallback)(()=>{p((0,ue.ku)(!1))},[p]),[k,x]=(0,i.useState)(!1),_=(0,zh.hN)(),{__:C}=(0,Rh.s9)(),{token:S}=(0,r.rd)(),[,E,L,O,A]=Th({email:e,editorRef:m,setIsSpin:x,newEmailAiGeneratorRef:o});y.current=E,(0,i.useEffect)(()=>{t||n(y.current)},[null===E||void 0===E?void 0:E.length,n,t]);const $=(0,i.useMemo)(()=>()=>{_.error({message:C(Nh.k0)})},[C,_]),M=(0,i.useMemo)(()=>()=>{_.warning({message:C(Nh.LJ)})},[C,_]);(0,i.useEffect)(()=>{O&&$()},[O,$]),(0,i.useEffect)(()=>{A&&M()},[A,M]),(0,i.useEffect)(()=>v(),[v]),(0,i.useEffect)(()=>{if(d){const{current:e}=g;e&&(e.revealRangeInCenterIfOutsideViewport(d),e.setSelection(d))}},[d]);const j=(0,i.useCallback)(()=>{if(g.current){const e=g.current.getDomNode();if(e){const t=f.fontFamily||Ih,n=f.fontSize||14;e.style.setProperty("--monaco-editor-font-family",t,"important"),e.style.setProperty("--monaco-monospace-font",t,"important"),e.style.setProperty("--monaco-editor-font-size",`${n}px`,"important"),e.style.setProperty("font-family",t,"important"),e.style.setProperty("font-size",`${n}px`,"important")}}},[f.fontFamily,f.fontSize]);(0,i.useEffect)(()=>{if(j(),g.current){const e=g.current.getDomNode();if(e){const t=new MutationObserver(()=>{j()});return t.observe(e,{childList:!0,subtree:!0}),()=>{t.disconnect()}}}},[f.fontFamily,j]);(0,i.useEffect)(()=>{matchMedia(me.F3).addEventListener("change",t=>{const n=window.localStorage.getItem(me.V0.em_color_scheme),r=t.matches?me.nd:me.T;e.hasOwnProperty("type")?p(n?(0,he.eX)(n===me.nd?`vs-${n}`:me.T):(0,he.eX)(r===me.nd?`vs-${r}`:me.T)):p(n?(0,de.eX)(n===me.nd?`vs-${n}`:me.T):(0,de.eX)(r===me.nd?`vs-${r}`:me.T))})},[p,e]),(0,i.useEffect)(()=>{const t=window.localStorage.getItem(me.V0.em_color_scheme),n=matchMedia(me.F3).matches?me.nd:me.T;null!==e&&void 0!==e&&e.hasOwnProperty("type")?p(t?(0,he.eX)(t===me.nd?`vs-${t}`:me.T):(0,he.eX)(n===me.nd?`vs-${n}`:me.T)):p(t?(0,de.eX)(t===me.nd?`vs-${t}`:me.T):(0,de.eX)(n===me.nd?`vs-${n}`:me.T))},[p,e]);(0,pe.A)(e=>{const t=e.data.operation,n=e.data;b.current=t,t===me.Ru.UPDATE_EDITOR_POSITION_FROM_IFRAME&&(e=>{const{current:t}=g;if(t&&!t.hasTextFocus()){const n=t.getModel(),r=n.getPositionAt(e.start),i=n.getPositionAt(e.end),o={startColumn:r.column,startLineNumber:r.lineNumber,endColumn:i.column,endLineNumber:i.lineNumber};t.revealRangeInCenterIfOutsideViewport(o),t.setSelection(o)}})(n.data)});const D=(0,i.useMemo)(()=>document.createElement("div"),[]),N=(0,i.useMemo)(()=>({...f,fontFamily:f.fontFamily||Ih,fontSize:f.fontSize||14,fontWeight:f.fontWeight||"normal",domReadOnly:t,readOnly:t,unusualLineTerminators:"off",mouseWheelZoom:!0,wordWrap:w.onlyCodeModeInMobile?"off":f.wordWrap,ariaContainerElement:D,unicodeHighlight:{ambiguousCharacters:!1,invisibleCharacters:!1}}),[f,w.onlyCodeModeInMobile,t,D]);return(null===s||void 0===s?void 0:s.uri)&&i.createElement(i.Fragment,null,k&&i.createElement(Ph.A,{style:{position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:null===S||void 0===S?void 0:S.zIndexPopupBase,background:null===S||void 0===S?void 0:S.colorBgLayout}}),i.createElement("div",{id:"monaco-editor-root",style:{width:"100%",height:"100%"}},i.createElement(ne,{theme:h,className:"monaco-editor",defaultLanguage:"html",onMount:(e,t)=>{g.current=e,m.current=e;const n=e.getContribution("editor.linkDetector").openerService,r=n.open.bind(n),i=document.createElement("div"),o=new ie.Ay(e,ge,{"doctype-html5":!1,"html-lang-require":!1,"head-script-disabled":!1,"style-disabled":!1,"script-disabled":!1,"attr-lowercase":!1,"attr-value-single-quotes":!1,"attr-value-not-empty":!1,"attr-sorted":!1,"attr-whitespace":!1,"input-requires-label":!1,"tag-self-close":!1,"tagname-lowercase":!1,"href-abs-or-rel":!1,"inline-style-disabled":!1,"space-tab-mixed-disabled":!1,"attr-no-unnecessary-whitespace":!0,"tags-check":{img:{selfclosing:!1,attrsRequired:["src","alt"]},a:{selfclosing:!1,attrsRequired:["href"]}},"empty-tag-not-self-closed":!1,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0,"alt-require":!0,"inline-script-disabled":!0,"id-class-value":!1,"id-class-ad-disabled":!0,"attr-unsafe-chars":!0,csslint:{"display-property-grouping":!0,"known-properties":!0}});me._P.isEditor&&m.current&&L(m.current),o.watch(),e.getContribution("editor.linkDetector").openerService.open=e=>(i.innerHTML=e,r(i.textContent)),p((0,ue.ku)(!0)),e.onMouseUp(()=>{const t=e.getSelection();t.startColumn===t.endColumn&&t.startLineNumber===t.endLineNumber&&(async e=>{const{current:t}=g;if(t){const n=t.getModel();l({operation:me.Ru.UPDATE_EDITOR_POSITION_FROM_EDITOR,data:n.getOffsetAt(e)})}})(e.getPosition())}),e.onDidBlurEditorWidget(()=>{l({operation:me.Ru.EDITOR_CHANGE_FOCUS,data:!1}),p((0,fe.YT)(!1))}),e.onDidFocusEditorWidget(()=>{l({operation:me.Ru.EDITOR_CHANGE_FOCUS,data:!0}),p((0,fe.YT)(!0))}),e.onDidChangeModelContent(()=>{setTimeout(()=>{j()},0)}),setTimeout(()=>{j()},100)},options:N,keepCurrentModel:!0,path:s.uri.toString(),onValidate:function(e){var t;"Doctype must be declared first."!==(null===(t=e[0])||void 0===t?void 0:t.message)&&(me.EW.isPlugin&&a.fire(e),p((0,de.Bj)(e)))}})))}}}]);
2
+ //# sourceMappingURL=8580.1528b456.js.map