ct-rich-text-editor 1.0.8 → 1.0.9

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 (180) hide show
  1. package/dist/App.d.ts +4 -0
  2. package/dist/Provider/EditorProvider.d.ts +19 -0
  3. package/dist/Provider/LexicalProvider.d.ts +7 -0
  4. package/dist/api/ai/index.d.ts +15 -0
  5. package/dist/api/auth.d.ts +101 -0
  6. package/dist/api/config/axios.d.ts +3 -0
  7. package/dist/api/config/endpoints.d.ts +11 -0
  8. package/dist/assets/style.css +1 -0
  9. package/dist/babel-1c4a328b.js +7479 -0
  10. package/dist/babel-1c4a328b.js.map +1 -0
  11. package/dist/components/AiPlugin/index.d.ts +4 -0
  12. package/dist/components/AlignMenu/AlignMenu.d.ts +10 -0
  13. package/dist/components/AlignMenu/index.d.ts +1 -0
  14. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +5 -0
  15. package/dist/components/BlockFormatMenu/constants.d.ts +14 -0
  16. package/dist/components/BlockFormatMenu/index.d.ts +1 -0
  17. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
  18. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
  19. package/dist/components/CodeActionMenuPlugin/index.d.ts +5 -0
  20. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -0
  21. package/dist/components/ColorPicker/ColorPicker.d.ts +5 -0
  22. package/dist/components/ColorPicker/index.d.ts +1 -0
  23. package/dist/components/ConfigurableEditorWithAuth.d.ts +15 -0
  24. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +5 -0
  25. package/dist/components/EmojiPickerWidget/index.d.ts +1 -0
  26. package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -0
  27. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +6 -0
  28. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +9 -0
  29. package/dist/components/FontSizePicker/FontSizeControl.d.ts +4 -0
  30. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +5 -0
  31. package/dist/components/FormatTextMenu/index.d.ts +1 -0
  32. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +8 -0
  33. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +10 -0
  34. package/dist/components/ImageView/ImageDialog/index.d.ts +7 -0
  35. package/dist/components/ImageView/ImageResizer.d.ts +17 -0
  36. package/dist/components/ImageView/index.d.ts +15 -0
  37. package/dist/components/InsertMenu/InsertMenu.d.ts +10 -0
  38. package/dist/components/InsertMenu/index.d.ts +1 -0
  39. package/dist/components/Placeholder/Placeholder.d.ts +5 -0
  40. package/dist/components/Placeholder/index.d.ts +1 -0
  41. package/dist/components/Placeholder/styles.d.ts +1 -0
  42. package/dist/components/ScopedEditor.d.ts +8 -0
  43. package/dist/components/TableColorPicker/index.d.ts +9 -0
  44. package/dist/components/TableModal/TableModal.d.ts +11 -0
  45. package/dist/components/Toolbar/Toolbar.d.ts +5 -0
  46. package/dist/components/Toolbar/index.d.ts +1 -0
  47. package/dist/components/Toolbar/styles.d.ts +6 -0
  48. package/dist/components/ui/button.d.ts +12 -0
  49. package/dist/components/ui/dialog.d.ts +19 -0
  50. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  51. package/dist/components/ui/input.d.ts +3 -0
  52. package/dist/components/ui/label.d.ts +5 -0
  53. package/dist/components/ui/popover.d.ts +7 -0
  54. package/dist/components/ui/select.d.ts +13 -0
  55. package/dist/components/ui/separator.d.ts +4 -0
  56. package/dist/components/ui/tooltip.d.ts +7 -0
  57. package/dist/constants.d.ts +36 -0
  58. package/dist/context/ToolbarContext.d.ts +56 -0
  59. package/dist/editorConfig.d.ts +37 -0
  60. package/dist/estree-2cbea43c.js +4668 -0
  61. package/dist/estree-2cbea43c.js.map +1 -0
  62. package/dist/hooks/useBlockFormat.d.ts +22 -0
  63. package/dist/hooks/useColorPicker.d.ts +6 -0
  64. package/dist/hooks/useCustomCommands.d.ts +4 -0
  65. package/dist/hooks/useDebounce.d.ts +1 -0
  66. package/dist/hooks/useEditorToolbar.d.ts +11 -0
  67. package/dist/hooks/useInsertMenu.d.ts +9 -0
  68. package/dist/hooks/useModal.d.ts +5 -0
  69. package/dist/hooks/useS3Uploader.d.ts +11 -0
  70. package/dist/html-c18fb60e.js +2842 -0
  71. package/dist/html-c18fb60e.js.map +1 -0
  72. package/dist/index-988ead1c.js +32204 -0
  73. package/dist/index-988ead1c.js.map +1 -0
  74. package/dist/index-9ce51b54.js +632 -0
  75. package/dist/index-9ce51b54.js.map +1 -0
  76. package/dist/index.d.ts +6 -0
  77. package/dist/index.js +21 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/lib/utils.d.ts +3 -0
  80. package/dist/main.d.ts +1 -0
  81. package/dist/markdown-39c3822b.js +3548 -0
  82. package/dist/markdown-39c3822b.js.map +1 -0
  83. package/dist/nodes/EmbedNode.d.ts +27 -0
  84. package/dist/nodes/ImageNode.d.ts +48 -0
  85. package/dist/nodes/MentionNode.d.ts +76 -0
  86. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +14 -0
  87. package/dist/pages/ConfigurableEditor/index.d.ts +2 -0
  88. package/dist/pages/NotFound.d.ts +2 -0
  89. package/dist/pages/RichTextEditor.d.ts +6 -0
  90. package/dist/pages/TextareaEditor.d.ts +6 -0
  91. package/dist/pages/styles.d.ts +5 -0
  92. package/dist/plugins/AIChatPlugin.d.ts +6 -0
  93. package/dist/plugins/CodeHighlightPlugin.d.ts +4 -0
  94. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +31 -0
  95. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -0
  96. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +9 -0
  97. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -0
  98. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -0
  99. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +4 -0
  100. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +7 -0
  101. package/dist/plugins/FilePlugin.d.ts +8 -0
  102. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
  103. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +25 -0
  104. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -0
  105. package/dist/plugins/HtmlImportPlugin.d.ts +5 -0
  106. package/dist/plugins/ImagePlugin.d.ts +10 -0
  107. package/dist/plugins/LinkPlugin/index.d.ts +7 -0
  108. package/dist/plugins/LocalStoragePlugin.d.ts +9 -0
  109. package/dist/plugins/MentionsPlugin/index.d.ts +8 -0
  110. package/dist/plugins/RichTextPastePlugin/index.d.ts +1 -0
  111. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +7 -0
  112. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +3 -0
  113. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -0
  114. package/dist/plugins/TableActionMenuPlugin/index.d.ts +7 -0
  115. package/dist/plugins/TableCellResizer/index.d.ts +3 -0
  116. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +11 -0
  117. package/dist/plugins/TablePlugin.d.ts +1 -0
  118. package/dist/plugins/TreeViewPlugin.d.ts +4 -0
  119. package/dist/postcss-bbcc713e.js +5152 -0
  120. package/dist/postcss-bbcc713e.js.map +1 -0
  121. package/dist/standalone-36ad3877.js +2601 -0
  122. package/dist/standalone-36ad3877.js.map +1 -0
  123. package/dist/styles/PlaygroundEditorTheme.d.ts +4 -0
  124. package/dist/types.d.ts +134 -0
  125. package/dist/typescript-39d06710.js +13534 -0
  126. package/dist/typescript-39d06710.js.map +1 -0
  127. package/dist/ui/ColorPicker.d.ts +14 -0
  128. package/dist/ui/Icons.d.ts +35 -0
  129. package/dist/ui/TextInput.d.ts +12 -0
  130. package/dist/utils/debounce.d.ts +7 -0
  131. package/dist/utils/getDOMRangeRect.d.ts +13 -0
  132. package/dist/utils/getSelectedNode.d.ts +4 -0
  133. package/dist/utils/helper.d.ts +3 -0
  134. package/dist/utils/index.d.ts +6 -0
  135. package/dist/utils/invarient.d.ts +1 -0
  136. package/dist/utils/setFloatingElemPosition.d.ts +8 -0
  137. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  138. package/dist/utils/url.d.ts +9 -0
  139. package/package.json +2 -4
  140. package/dist/assets/babel-70ddf1b3.js +0 -16
  141. package/dist/assets/babel-70ddf1b3.js.map +0 -1
  142. package/dist/assets/chevron-down-7ab1bec2.svg +0 -1
  143. package/dist/assets/close-5a175ff6.svg +0 -1
  144. package/dist/assets/code-211c00f3.svg +0 -1
  145. package/dist/assets/copy-0a348586.svg +0 -1
  146. package/dist/assets/estree-e637acda.js +0 -37
  147. package/dist/assets/estree-e637acda.js.map +0 -1
  148. package/dist/assets/html-132cf17b.js +0 -23
  149. package/dist/assets/html-132cf17b.js.map +0 -1
  150. package/dist/assets/index-92719fbf.js +0 -2
  151. package/dist/assets/index-92719fbf.js.map +0 -1
  152. package/dist/assets/index-a2d0e228.js +0 -443
  153. package/dist/assets/index-a2d0e228.js.map +0 -1
  154. package/dist/assets/index-db471160.css +0 -1
  155. package/dist/assets/link-dabc7da5.svg +0 -1
  156. package/dist/assets/markdown-d8306e54.js +0 -64
  157. package/dist/assets/markdown-d8306e54.js.map +0 -1
  158. package/dist/assets/pencil-fill-633b2c8d.svg +0 -1
  159. package/dist/assets/plus-cc33d039.svg +0 -1
  160. package/dist/assets/postcss-25dc98df.js +0 -55
  161. package/dist/assets/postcss-25dc98df.js.map +0 -1
  162. package/dist/assets/prettier-6c905155.svg +0 -1
  163. package/dist/assets/prettier-error-0ed0d492.svg +0 -1
  164. package/dist/assets/standalone-e79c0887.js +0 -40
  165. package/dist/assets/standalone-e79c0887.js.map +0 -1
  166. package/dist/assets/success-e7e6caa5.svg +0 -1
  167. package/dist/assets/trash-e93c6b1b.svg +0 -1
  168. package/dist/assets/type-bold-1f17e5da.svg +0 -1
  169. package/dist/assets/type-capitalize-2bd9e890.svg +0 -1
  170. package/dist/assets/type-italic-f9cdcec5.svg +0 -1
  171. package/dist/assets/type-lowercase-e9b820a3.svg +0 -3
  172. package/dist/assets/type-strikethrough-ea22e2f6.svg +0 -1
  173. package/dist/assets/type-subscript-84ecc6bb.svg +0 -1
  174. package/dist/assets/type-superscript-fd5795bc.svg +0 -1
  175. package/dist/assets/type-underline-9639e1cd.svg +0 -1
  176. package/dist/assets/type-uppercase-cd9fe147.svg +0 -3
  177. package/dist/assets/typescript-c6c5f850.js +0 -21
  178. package/dist/assets/typescript-c6c5f850.js.map +0 -1
  179. package/dist/assets/user-085d4653.svg +0 -1
  180. package/dist/index.html +0 -18
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8.571 23.429A.571.571 0 0 1 8 24H2.286a.571.571 0 0 1 0-1.143H8c.316 0 .571.256.571.572zM8 20.57H6.857a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zm-5.714 1.143H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM8 18.286H2.286a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zM16 16H5.714a.571.571 0 0 0 0 1.143H16A.571.571 0 0 0 16 16zM2.286 17.143h1.143a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm17.143-3.429H16a.571.571 0 0 0 0 1.143h3.429a.571.571 0 0 0 0-1.143zM9.143 14.857h4.571a.571.571 0 0 0 0-1.143H9.143a.571.571 0 0 0 0 1.143zm-6.857 0h4.571a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM20.57 11.43h-9.14a.571.571 0 0 0 0 1.142h9.142a.571.571 0 0 0 0-1.142zM9.714 12a.571.571 0 0 0-.571-.571H5.714a.571.571 0 0 0 0 1.142h3.429A.571.571 0 0 0 9.714 12zm-7.428.571h1.143a.571.571 0 0 0 0-1.142H2.286a.571.571 0 0 0 0 1.142zm19.428-3.428H16a.571.571 0 0 0 0 1.143h5.714a.571.571 0 0 0 0-1.143zM2.286 10.286H8a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm13.143-2.857A.57.57 0 0 0 16 8h5.714a.571.571 0 0 0 0-1.143H16a.571.571 0 0 0-.571.572zm-8.572-.572a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143H6.857zM2.286 8H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm16.571-2.857c0 .315.256.571.572.571h1.142a.571.571 0 0 0 0-1.143H19.43a.571.571 0 0 0-.572.572zm-1.143 0a.571.571 0 0 0-.571-.572H12.57a.571.571 0 0 0 0 1.143h4.572a.571.571 0 0 0 .571-.571zm-15.428.571h8a.571.571 0 0 0 0-1.143h-8a.571.571 0 0 0 0 1.143zm5.143-2.857c0 .316.255.572.571.572h11.429a.571.571 0 0 0 0-1.143H8a.571.571 0 0 0-.571.571zm-5.143.572h3.428a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm0-2.286H16A.571.571 0 0 0 16 0H2.286a.571.571 0 0 0 0 1.143z"/></svg>
@@ -1 +0,0 @@
1
- <svg style="color:red" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8.571 23.429A.571.571 0 0 1 8 24H2.286a.571.571 0 0 1 0-1.143H8c.316 0 .571.256.571.572zM8 20.57H6.857a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zm-5.714 1.143H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM8 18.286H2.286a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zM16 16H5.714a.571.571 0 0 0 0 1.143H16A.571.571 0 0 0 16 16zM2.286 17.143h1.143a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm17.143-3.429H16a.571.571 0 0 0 0 1.143h3.429a.571.571 0 0 0 0-1.143zM9.143 14.857h4.571a.571.571 0 0 0 0-1.143H9.143a.571.571 0 0 0 0 1.143zm-6.857 0h4.571a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM20.57 11.43h-9.14a.571.571 0 0 0 0 1.142h9.142a.571.571 0 0 0 0-1.142zM9.714 12a.571.571 0 0 0-.571-.571H5.714a.571.571 0 0 0 0 1.142h3.429A.571.571 0 0 0 9.714 12zm-7.428.571h1.143a.571.571 0 0 0 0-1.142H2.286a.571.571 0 0 0 0 1.142zm19.428-3.428H16a.571.571 0 0 0 0 1.143h5.714a.571.571 0 0 0 0-1.143zM2.286 10.286H8a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm13.143-2.857A.57.57 0 0 0 16 8h5.714a.571.571 0 0 0 0-1.143H16a.571.571 0 0 0-.571.572zm-8.572-.572a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143H6.857zM2.286 8H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm16.571-2.857c0 .315.256.571.572.571h1.142a.571.571 0 0 0 0-1.143H19.43a.571.571 0 0 0-.572.572zm-1.143 0a.571.571 0 0 0-.571-.572H12.57a.571.571 0 0 0 0 1.143h4.572a.571.571 0 0 0 .571-.571zm-15.428.571h8a.571.571 0 0 0 0-1.143h-8a.571.571 0 0 0 0 1.143zm5.143-2.857c0 .316.255.572.571.572h11.429a.571.571 0 0 0 0-1.143H8a.571.571 0 0 0-.571.571zm-5.143.572h3.428a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm0-2.286H16A.571.571 0 0 0 16 0H2.286a.571.571 0 0 0 0 1.143z" fill="red"/></svg>
@@ -1,40 +0,0 @@
1
- var Pt=Object.defineProperty;var $t=(e,u,t)=>u in e?Pt(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t;var he=(e,u,t)=>($t(e,typeof u!="symbol"?u+"":u,t),t);var Lt=Object.create,eu=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Wt=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty,Hu=e=>{throw TypeError(e)},Gu=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),uu=(e,u)=>{for(var t in u)eu(e,t,{get:u[t],enumerable:!0})},Vt=(e,u,t,r)=>{if(u&&typeof u=="object"||typeof u=="function")for(let D of Rt(u))!zt.call(e,D)&&D!==t&&eu(e,D,{get:()=>u[D],enumerable:!(r=Mt(u,D))||r.enumerable});return e},we=(e,u,t)=>(t=e!=null?Lt(Wt(e)):{},Vt(u||!e||!e.__esModule?eu(t,"default",{value:e,enumerable:!0}):t,e)),qt=(e,u,t)=>u.has(e)||Hu("Cannot "+t),Jt=(e,u,t)=>u.has(e)?Hu("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(e):u.set(e,t),le=(e,u,t)=>(qt(e,u,"access private method"),t),tu=Gu((e,u)=>{var t=new Proxy(String,{get:()=>t});u.exports=t}),Kt=Gu(e=>{Object.defineProperty(e,"__esModule",{value:!0});function u(){return new Proxy({},{get:()=>n=>n})}var t=/\r\n|[\n\r\u2028\u2029]/;function r(n,o,i){let a=Object.assign({column:0,line:-1},n.start),s=Object.assign({},a,n.end),{linesAbove:l=2,linesBelow:F=3}=i||{},c=a.line,d=a.column,f=s.line,p=s.column,h=Math.max(c-(l+1),0),g=Math.min(o.length,f+F);c===-1&&(h=0),f===-1&&(g=o.length);let y=f-c,C={};if(y)for(let m=0;m<=y;m++){let E=m+c;if(!d)C[E]=!0;else if(m===0){let v=o[E-1].length;C[E]=[d,v-d+1]}else if(m===y)C[E]=[0,p];else{let v=o[E-m].length;C[E]=[0,v]}}else d===p?d?C[c]=[d,0]:C[c]=!0:C[c]=[d,p-d];return{start:h,end:g,markerLines:C}}function D(n,o,i={}){let a=u(),s=n.split(t),{start:l,end:F,markerLines:c}=r(o,s,i),d=o.start&&typeof o.start.column=="number",f=String(F).length,p=n.split(t,F).slice(l,F).map((h,g)=>{let y=l+1+g,C=` ${` ${y}`.slice(-f)} |`,m=c[y],E=!c[y+1];if(m){let v="";if(Array.isArray(m)){let A=h.slice(0,Math.max(m[0]-1,0)).replace(/[^\t]/g," "),N=m[1]||1;v=[`
2
- `,a.gutter(C.replace(/\d/g," "))," ",A,a.marker("^").repeat(N)].join(""),E&&i.message&&(v+=" "+a.message(i.message))}return[a.marker(">"),a.gutter(C),h.length>0?` ${h}`:"",v].join("")}else return` ${a.gutter(C)}${h.length>0?` ${h}`:""}`}).join(`
3
- `);return i.message&&!d&&(p=`${" ".repeat(f+1)}${i.message}
4
- ${p}`),p}e.codeFrameColumns=D}),Yu={};uu(Yu,{__debug:()=>eo,check:()=>QD,doc:()=>Ot,format:()=>Tt,formatWithCursor:()=>jt,getSupportInfo:()=>XD,util:()=>_t,version:()=>wD});var Ut=(e,u,t,r)=>{if(!(e&&u==null))return u.replaceAll?u.replaceAll(t,r):t.global?u.replace(t,r):u.split(t).join(r)},ke=Ut;function _(){}_.prototype={diff:function(e,u){var t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=r.callback;typeof r=="function"&&(D=r,r={});var n=this;function o(C){return C=n.postProcess(C,r),D?(setTimeout(function(){D(C)},0),!0):C}e=this.castInput(e,r),u=this.castInput(u,r),e=this.removeEmpty(this.tokenize(e,r)),u=this.removeEmpty(this.tokenize(u,r));var i=u.length,a=e.length,s=1,l=i+a;r.maxEditLength!=null&&(l=Math.min(l,r.maxEditLength));var F=(t=r.timeout)!==null&&t!==void 0?t:1/0,c=Date.now()+F,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],u,e,0,r);if(d[0].oldPos+1>=a&&f+1>=i)return o(Cu(n,d[0].lastComponent,u,e,n.useLongestToken));var p=-1/0,h=1/0;function g(){for(var C=Math.max(p,-s);C<=Math.min(h,s);C+=2){var m=void 0,E=d[C-1],v=d[C+1];E&&(d[C-1]=void 0);var A=!1;if(v){var N=v.oldPos-C;A=v&&0<=N&&N<i}var ue=E&&E.oldPos+1<a;if(!A&&!ue){d[C]=void 0;continue}if(!ue||A&&E.oldPos<v.oldPos?m=n.addToPath(v,!0,!1,0,r):m=n.addToPath(E,!1,!0,1,r),f=n.extractCommon(m,u,e,C,r),m.oldPos+1>=a&&f+1>=i)return o(Cu(n,m.lastComponent,u,e,n.useLongestToken));d[C]=m,m.oldPos+1>=a&&(h=Math.min(h,C-1)),f+1>=i&&(p=Math.max(p,C+1))}s++}if(D)(function C(){setTimeout(function(){if(s>l||Date.now()>c)return D();g()||C()},0)})();else for(;s<=l&&Date.now()<=c;){var y=g();if(y)return y}},addToPath:function(e,u,t,r,D){var n=e.lastComponent;return n&&!D.oneChangePerToken&&n.added===u&&n.removed===t?{oldPos:e.oldPos+r,lastComponent:{count:n.count+1,added:u,removed:t,previousComponent:n.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:u,removed:t,previousComponent:n}}},extractCommon:function(e,u,t,r,D){for(var n=u.length,o=t.length,i=e.oldPos,a=i-r,s=0;a+1<n&&i+1<o&&this.equals(t[i+1],u[a+1],D);)a++,i++,s++,D.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return s&&!D.oneChangePerToken&&(e.lastComponent={count:s,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=i,a},equals:function(e,u,t){return t.comparator?t.comparator(e,u):e===u||t.ignoreCase&&e.toLowerCase()===u.toLowerCase()},removeEmpty:function(e){for(var u=[],t=0;t<e.length;t++)e[t]&&u.push(e[t]);return u},castInput:function(e){return e},tokenize:function(e){return Array.from(e)},join:function(e){return e.join("")},postProcess:function(e){return e}};function Cu(e,u,t,r,D){for(var n=[],o;u;)n.push(u),o=u.previousComponent,delete u.previousComponent,u=o;n.reverse();for(var i=0,a=n.length,s=0,l=0;i<a;i++){var F=n[i];if(F.removed)F.value=e.join(r.slice(l,l+F.count)),l+=F.count;else{if(!F.added&&D){var c=t.slice(s,s+F.count);c=c.map(function(d,f){var p=r[l+f];return p.length>d.length?p:d}),F.value=e.join(c)}else F.value=e.join(t.slice(s,s+F.count));s+=F.count,F.added||(l+=F.count)}}return n}function mu(e,u){var t;for(t=0;t<e.length&&t<u.length;t++)if(e[t]!=u[t])return e.slice(0,t);return e.slice(0,t)}function gu(e,u){var t;if(!e||!u||e[e.length-1]!=u[u.length-1])return"";for(t=0;t<e.length&&t<u.length;t++)if(e[e.length-(t+1)]!=u[u.length-(t+1)])return e.slice(-t);return e.slice(-t)}function ze(e,u,t){if(e.slice(0,u.length)!=u)throw Error("string ".concat(JSON.stringify(e)," doesn't start with prefix ").concat(JSON.stringify(u),"; this is a bug"));return t+e.slice(u.length)}function Ve(e,u,t){if(!u)return e+t;if(e.slice(-u.length)!=u)throw Error("string ".concat(JSON.stringify(e)," doesn't end with suffix ").concat(JSON.stringify(u),"; this is a bug"));return e.slice(0,-u.length)+t}function ce(e,u){return ze(e,u,"")}function Ce(e,u){return Ve(e,u,"")}function Eu(e,u){return u.slice(0,Ht(e,u))}function Ht(e,u){var t=0;e.length>u.length&&(t=e.length-u.length);var r=u.length;e.length<u.length&&(r=e.length);var D=Array(r),n=0;D[0]=0;for(var o=1;o<r;o++){for(u[o]==u[n]?D[o]=D[n]:D[o]=n;n>0&&u[o]!=u[n];)n=D[n];u[o]==u[n]&&n++}n=0;for(var i=t;i<e.length;i++){for(;n>0&&e[i]!=u[n];)n=D[n];e[i]==u[n]&&n++}return n}var Be="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Gt=new RegExp("[".concat(Be,"]+|\\s+|[^").concat(Be,"]"),"ug"),Se=new _;Se.equals=function(e,u,t){return t.ignoreCase&&(e=e.toLowerCase(),u=u.toLowerCase()),e.trim()===u.trim()};Se.tokenize=function(e){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t;if(u.intlSegmenter){if(u.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');t=Array.from(u.intlSegmenter.segment(e),function(n){return n.segment})}else t=e.match(Gt)||[];var r=[],D=null;return t.forEach(function(n){/\s/.test(n)?D==null?r.push(n):r.push(r.pop()+n):/\s/.test(D)?r[r.length-1]==D?r.push(r.pop()+n):r.push(D+n):r.push(n),D=n}),r};Se.join=function(e){return e.map(function(u,t){return t==0?u:u.replace(/^\s+/,"")}).join("")};Se.postProcess=function(e,u){if(!e||u.oneChangePerToken)return e;var t=null,r=null,D=null;return e.forEach(function(n){n.added?r=n:n.removed?D=n:((r||D)&&yu(t,D,r,n),t=n,r=null,D=null)}),(r||D)&&yu(t,D,r,null),e};function yu(e,u,t,r){if(u&&t){var D=u.value.match(/^\s*/)[0],n=u.value.match(/\s*$/)[0],o=t.value.match(/^\s*/)[0],i=t.value.match(/\s*$/)[0];if(e){var a=mu(D,o);e.value=Ve(e.value,o,a),u.value=ce(u.value,a),t.value=ce(t.value,a)}if(r){var s=gu(n,i);r.value=ze(r.value,i,s),u.value=Ce(u.value,s),t.value=Ce(t.value,s)}}else if(t)e&&(t.value=t.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(e&&r){var l=r.value.match(/^\s*/)[0],F=u.value.match(/^\s*/)[0],c=u.value.match(/\s*$/)[0],d=mu(l,F);u.value=ce(u.value,d);var f=gu(ce(l,d),c);u.value=Ce(u.value,f),r.value=ze(r.value,l,f),e.value=Ve(e.value,l,l.slice(0,l.length-f.length))}else if(r){var p=r.value.match(/^\s*/)[0],h=u.value.match(/\s*$/)[0],g=Eu(h,p);u.value=Ce(u.value,g)}else if(e){var y=e.value.match(/\s*$/)[0],C=u.value.match(/^\s*/)[0],m=Eu(y,C);u.value=ce(u.value,m)}}var Yt=new _;Yt.tokenize=function(e){var u=new RegExp("(\\r?\\n)|[".concat(Be,"]+|[^\\S\\n\\r]+|[^").concat(Be,"]"),"ug");return e.match(u)||[]};var ru=new _;ru.tokenize=function(e,u){u.stripTrailingCr&&(e=e.replace(/\r\n/g,`
5
- `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var D=0;D<r.length;D++){var n=r[D];D%2&&!u.newlineIsToken?t[t.length-1]+=n:t.push(n)}return t};ru.equals=function(e,u,t){return t.ignoreWhitespace?((!t.newlineIsToken||!e.includes(`
6
- `))&&(e=e.trim()),(!t.newlineIsToken||!u.includes(`
7
- `))&&(u=u.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith(`
8
- `)&&(e=e.slice(0,-1)),u.endsWith(`
9
- `)&&(u=u.slice(0,-1))),_.prototype.equals.call(this,e,u,t)};var Zt=new _;Zt.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Qt=new _;Qt.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function qe(e){"@babel/helpers - typeof";return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},qe(e)}var de=new _;de.useLongestToken=!0;de.tokenize=ru.tokenize;de.castInput=function(e,u){var t=u.undefinedReplacement,r=u.stringifyReplacer,D=r===void 0?function(n,o){return typeof o>"u"?t:o}:r;return typeof e=="string"?e:JSON.stringify(Je(e,null,null,D),D," ")};de.equals=function(e,u,t){return _.prototype.equals.call(de,e.replace(/,([\r\n])/g,"$1"),u.replace(/,([\r\n])/g,"$1"),t)};function Je(e,u,t,r,D){u=u||[],t=t||[],r&&(e=r(D,e));var n;for(n=0;n<u.length;n+=1)if(u[n]===e)return t[n];var o;if(Object.prototype.toString.call(e)==="[object Array]"){for(u.push(e),o=new Array(e.length),t.push(o),n=0;n<e.length;n+=1)o[n]=Je(e[n],u,t,r,D);return u.pop(),t.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),qe(e)==="object"&&e!==null){u.push(e),o={},t.push(o);var i=[],a;for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&i.push(a);for(i.sort(),n=0;n<i.length;n+=1)a=i[n],o[a]=Je(e[a],u,t,r,a);u.pop(),t.pop()}else o=e;return o}var be=new _;be.tokenize=function(e){return e.slice()};be.join=be.removeEmpty=function(e){return e};function Xt(e,u,t){return be.diff(e,u,t)}function er(e){let u=e.indexOf("\r");return u!==-1?e.charAt(u+1)===`
10
- `?"crlf":"cr":"lf"}function nu(e){switch(e){case"cr":return"\r";case"crlf":return`\r
11
- `;default:return`
12
- `}}function Zu(e,u){let t;switch(u){case`
13
- `:t=/\n/gu;break;case"\r":t=/\r/gu;break;case`\r
14
- `:t=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(u)}.`)}let r=e.match(t);return r?r.length:0}function ur(e){return ke(!1,e,/\r\n?/gu,`
15
- `)}var Q="string",P="array",X="cursor",$="indent",L="align",M="trim",k="group",j="fill",S="if-break",R="indent-if-break",W="line-suffix",z="line-suffix-boundary",b="line",T="label",x="break-parent",Qu=new Set([X,$,L,M,k,j,S,R,W,z,b,T,x]),tr=(e,u,t)=>{if(!(e&&u==null))return Array.isArray(u)||typeof u=="string"?u[t<0?u.length+t:t]:u.at(t)},B=tr;function rr(e){if(typeof e=="string")return Q;if(Array.isArray(e))return P;if(!e)return;let{type:u}=e;if(Qu.has(u))return u}var ee=rr,nr=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Dr(e){let u=e===null?"null":typeof e;if(u!=="string"&&u!=="object")return`Unexpected doc '${u}',
16
- Expected it to be 'string' or 'object'.`;if(ee(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let r=nr([...Qu].map(D=>`'${D}'`));return`Unexpected doc.type '${e.type}'.
17
- Expected it to be ${r}.`}var or=class extends Error{constructor(u){super(Dr(u));he(this,"name","InvalidDocError");this.doc=u}},ie=or,vu={};function ir(e,u,t,r){let D=[e];for(;D.length>0;){let n=D.pop();if(n===vu){t(D.pop());continue}t&&D.push(n,vu);let o=ee(n);if(!o)throw new ie(n);if((u==null?void 0:u(n))!==!1)switch(o){case P:case j:{let i=o===P?n:n.parts;for(let a=i.length,s=a-1;s>=0;--s)D.push(i[s]);break}case S:D.push(n.flatContents,n.breakContents);break;case k:if(r&&n.expandedStates)for(let i=n.expandedStates.length,a=i-1;a>=0;--a)D.push(n.expandedStates[a]);else D.push(n.contents);break;case L:case $:case R:case T:case W:D.push(n.contents);break;case Q:case X:case M:case z:case b:case x:break;default:throw new ie(n)}}}var Du=ir;function xe(e,u){if(typeof e=="string")return u(e);let t=new Map;return r(e);function r(n){if(t.has(n))return t.get(n);let o=D(n);return t.set(n,o),o}function D(n){switch(ee(n)){case P:return u(n.map(r));case j:return u({...n,parts:n.parts.map(r)});case S:return u({...n,breakContents:r(n.breakContents),flatContents:r(n.flatContents)});case k:{let{expandedStates:o,contents:i}=n;return o?(o=o.map(r),i=o[0]):i=r(i),u({...n,contents:i,expandedStates:o})}case L:case $:case R:case T:case W:return u({...n,contents:r(n.contents)});case Q:case X:case M:case z:case b:case x:return u(n);default:throw new ie(n)}}}function ou(e,u,t){let r=t,D=!1;function n(o){if(D)return!1;let i=u(o);i!==void 0&&(D=!0,r=i)}return Du(e,n),r}function ar(e){if(e.type===k&&e.break||e.type===b&&e.hard||e.type===x)return!0}function sr(e){return ou(e,ar,!1)}function Bu(e){if(e.length>0){let u=B(!1,e,-1);!u.expandedStates&&!u.break&&(u.break="propagated")}return null}function lr(e){let u=new Set,t=[];function r(n){if(n.type===x&&Bu(t),n.type===k){if(t.push(n),u.has(n))return!1;u.add(n)}}function D(n){n.type===k&&t.pop().break&&Bu(t)}Du(e,r,D,!0)}function cr(e){return e.type===b&&!e.hard?e.soft?"":" ":e.type===S?e.flatContents:e}function fr(e){return xe(e,cr)}function bu(e){for(e=[...e];e.length>=2&&B(!1,e,-2).type===b&&B(!1,e,-1).type===x;)e.length-=2;if(e.length>0){let u=fe(B(!1,e,-1));e[e.length-1]=u}return e}function fe(e){switch(ee(e)){case $:case R:case k:case W:case T:{let u=fe(e.contents);return{...e,contents:u}}case S:return{...e,breakContents:fe(e.breakContents),flatContents:fe(e.flatContents)};case j:return{...e,parts:bu(e.parts)};case P:return bu(e);case Q:return e.replace(/[\n\r]*$/u,"");case L:case X:case M:case z:case b:case x:break;default:throw new ie(e)}return e}function Xu(e){return fe(Fr(e))}function dr(e){switch(ee(e)){case j:if(e.parts.every(u=>u===""))return"";break;case k:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===k&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case L:case $:case R:case W:if(!e.contents)return"";break;case S:if(!e.flatContents&&!e.breakContents)return"";break;case P:{let u=[];for(let t of e){if(!t)continue;let[r,...D]=Array.isArray(t)?t:[t];typeof r=="string"&&typeof B(!1,u,-1)=="string"?u[u.length-1]+=r:u.push(r),u.push(...D)}return u.length===0?"":u.length===1?u[0]:u}case Q:case X:case M:case z:case b:case T:case x:break;default:throw new ie(e)}return e}function Fr(e){return xe(e,u=>dr(u))}function pr(e,u=rt){return xe(e,t=>typeof t=="string"?nt(u,t.split(`
18
- `)):t)}function hr(e){if(e.type===b)return!0}function Cr(e){return ou(e,hr,!1)}function Ee(e,u){return e.type===T?{...e,contents:u(e.contents)}:u(e)}var mr=()=>{},gr=mr;function Ae(e){return{type:$,contents:e}}function ae(e,u){return{type:L,contents:u,n:e}}function et(e,u={}){return gr(u.expandedStates),{type:k,id:u.id,contents:e,break:!!u.shouldBreak,expandedStates:u.expandedStates}}function Er(e){return ae(Number.NEGATIVE_INFINITY,e)}function yr(e){return ae({type:"root"},e)}function vr(e){return ae(-1,e)}function Br(e,u){return et(e[0],{...u,expandedStates:e})}function br(e){return{type:j,parts:e}}function Ar(e,u="",t={}){return{type:S,breakContents:e,flatContents:u,groupId:t.groupId}}function wr(e,u){return{type:R,contents:e,groupId:u.groupId,negate:u.negate}}function Ke(e){return{type:W,contents:e}}var kr={type:z},Ne={type:x},Sr={type:M},iu={type:b,hard:!0},ut={type:b,hard:!0,literal:!0},tt={type:b},xr={type:b,soft:!0},Y=[iu,Ne],rt=[ut,Ne],G={type:X};function nt(e,u){let t=[];for(let r=0;r<u.length;r++)r!==0&&t.push(e),t.push(u[r]);return t}function Dt(e,u,t){let r=e;if(u>0){for(let D=0;D<Math.floor(u/t);++D)r=Ae(r);r=ae(u%t,r),r=ae(Number.NEGATIVE_INFINITY,r)}return r}function Nr(e,u){return e?{type:T,label:e,contents:u}:u}function I(e){var u;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...I(r));else{let D=I(r);D!==""&&t.push(D)}return t}return e.type===S?{...e,breakContents:I(e.breakContents),flatContents:I(e.flatContents)}:e.type===k?{...e,contents:I(e.contents),expandedStates:(u=e.expandedStates)==null?void 0:u.map(I)}:e.type===j?{type:"fill",parts:e.parts.map(I)}:e.contents?{...e,contents:I(e.contents)}:e}function Or(e){let u=Object.create(null),t=new Set;return r(I(e));function r(n,o,i){var a,s;if(typeof n=="string")return JSON.stringify(n);if(Array.isArray(n)){let l=n.map(r).filter(Boolean);return l.length===1?l[0]:`[${l.join(", ")}]`}if(n.type===b){let l=((a=i==null?void 0:i[o+1])==null?void 0:a.type)===x;return n.literal?l?"literalline":"literallineWithoutBreakParent":n.hard?l?"hardline":"hardlineWithoutBreakParent":n.soft?"softline":"line"}if(n.type===x)return((s=i==null?void 0:i[o-1])==null?void 0:s.type)===b&&i[o-1].hard?void 0:"breakParent";if(n.type===M)return"trim";if(n.type===$)return"indent("+r(n.contents)+")";if(n.type===L)return n.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+r(n.contents)+")":n.n<0?"dedent("+r(n.contents)+")":n.n.type==="root"?"markAsRoot("+r(n.contents)+")":"align("+JSON.stringify(n.n)+", "+r(n.contents)+")";if(n.type===S)return"ifBreak("+r(n.breakContents)+(n.flatContents?", "+r(n.flatContents):"")+(n.groupId?(n.flatContents?"":', ""')+`, { groupId: ${D(n.groupId)} }`:"")+")";if(n.type===R){let l=[];n.negate&&l.push("negate: true"),n.groupId&&l.push(`groupId: ${D(n.groupId)}`);let F=l.length>0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${r(n.contents)}${F})`}if(n.type===k){let l=[];n.break&&n.break!=="propagated"&&l.push("shouldBreak: true"),n.id&&l.push(`id: ${D(n.id)}`);let F=l.length>0?`, { ${l.join(", ")} }`:"";return n.expandedStates?`conditionalGroup([${n.expandedStates.map(c=>r(c)).join(",")}]${F})`:`group(${r(n.contents)}${F})`}if(n.type===j)return`fill([${n.parts.map(l=>r(l)).join(", ")}])`;if(n.type===W)return"lineSuffix("+r(n.contents)+")";if(n.type===z)return"lineSuffixBoundary";if(n.type===T)return`label(${JSON.stringify(n.label)}, ${r(n.contents)})`;throw new Error("Unknown doc type "+n.type)}function D(n){if(typeof n!="symbol")return JSON.stringify(String(n));if(n in u)return u[n];let o=n.description||"symbol";for(let i=0;;i++){let a=o+(i>0?` #${i}`:"");if(!t.has(a))return t.add(a),u[n]=`Symbol.for(${JSON.stringify(a)})`}}}var _r=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function jr(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Tr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Ir=e=>!(jr(e)||Tr(e)),Pr=/[^\x20-\x7F]/u;function $r(e){if(!e)return 0;if(!Pr.test(e))return e.length;e=e.replace(_r()," ");let u=0;for(let t of e){let r=t.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||(u+=Ir(r)?1:2)}return u}var au=$r,w=Symbol("MODE_BREAK"),O=Symbol("MODE_FLAT"),te=Symbol("cursor"),Ue=Symbol("DOC_FILL_PRINTED_LENGTH");function ot(){return{value:"",length:0,queue:[]}}function Lr(e,u){return He(e,{type:"indent"},u)}function Mr(e,u,t){return u===Number.NEGATIVE_INFINITY?e.root||ot():u<0?He(e,{type:"dedent"},t):u?u.type==="root"?{...e,root:e}:He(e,{type:typeof u=="string"?"stringAlign":"numberAlign",n:u},t):e}function He(e,u,t){let r=u.type==="dedent"?e.queue.slice(0,-1):[...e.queue,u],D="",n=0,o=0,i=0;for(let f of r)switch(f.type){case"indent":l(),t.useTabs?a(1):s(t.tabWidth);break;case"stringAlign":l(),D+=f.n,n+=f.n.length;break;case"numberAlign":o+=1,i+=f.n;break;default:throw new Error(`Unexpected type '${f.type}'`)}return c(),{...e,value:D,length:n,queue:r};function a(f){D+=" ".repeat(f),n+=t.tabWidth*f}function s(f){D+=" ".repeat(f),n+=f}function l(){t.useTabs?F():c()}function F(){o>0&&a(o),d()}function c(){i>0&&s(i),d()}function d(){o=0,i=0}}function Ge(e){let u=0,t=0,r=e.length;e:for(;r--;){let D=e[r];if(D===te){t++;continue}for(let n=D.length-1;n>=0;n--){let o=D[n];if(o===" "||o===" ")u++;else{e[r]=D.slice(0,n+1);break e}}}if(u>0||t>0)for(e.length=r+1;t-- >0;)e.push(te);return u}function me(e,u,t,r,D,n){if(t===Number.POSITIVE_INFINITY)return!0;let o=u.length,i=[e],a=[];for(;t>=0;){if(i.length===0){if(o===0)return!0;i.push(u[--o]);continue}let{mode:s,doc:l}=i.pop(),F=ee(l);switch(F){case Q:a.push(l),t-=au(l);break;case P:case j:{let c=F===P?l:l.parts,d=l[Ue]??0;for(let f=c.length-1;f>=d;f--)i.push({mode:s,doc:c[f]});break}case $:case L:case R:case T:i.push({mode:s,doc:l.contents});break;case M:t+=Ge(a);break;case k:{if(n&&l.break)return!1;let c=l.break?w:s,d=l.expandedStates&&c===w?B(!1,l.expandedStates,-1):l.contents;i.push({mode:c,doc:d});break}case S:{let c=(l.groupId?D[l.groupId]||O:s)===w?l.breakContents:l.flatContents;c&&i.push({mode:s,doc:c});break}case b:if(s===w||l.hard)return!0;l.soft||(a.push(" "),t--);break;case W:r=!0;break;case z:if(r)return!1;break}}return!1}function Oe(e,u){let t={},r=u.printWidth,D=nu(u.endOfLine),n=0,o=[{ind:ot(),mode:w,doc:e}],i=[],a=!1,s=[],l=0;for(lr(e);o.length>0;){let{ind:c,mode:d,doc:f}=o.pop();switch(ee(f)){case Q:{let p=D!==`
19
- `?ke(!1,f,`
20
- `,D):f;i.push(p),o.length>0&&(n+=au(p));break}case P:for(let p=f.length-1;p>=0;p--)o.push({ind:c,mode:d,doc:f[p]});break;case X:if(l>=2)throw new Error("There are too many 'cursor' in doc.");i.push(te),l++;break;case $:o.push({ind:Lr(c,u),mode:d,doc:f.contents});break;case L:o.push({ind:Mr(c,f.n,u),mode:d,doc:f.contents});break;case M:n-=Ge(i);break;case k:switch(d){case O:if(!a){o.push({ind:c,mode:f.break?w:O,doc:f.contents});break}case w:{a=!1;let p={ind:c,mode:O,doc:f.contents},h=r-n,g=s.length>0;if(!f.break&&me(p,o,h,g,t))o.push(p);else if(f.expandedStates){let y=B(!1,f.expandedStates,-1);if(f.break){o.push({ind:c,mode:w,doc:y});break}else for(let C=1;C<f.expandedStates.length+1;C++)if(C>=f.expandedStates.length){o.push({ind:c,mode:w,doc:y});break}else{let m=f.expandedStates[C],E={ind:c,mode:O,doc:m};if(me(E,o,h,g,t)){o.push(E);break}}}else o.push({ind:c,mode:w,doc:f.contents});break}}f.id&&(t[f.id]=B(!1,o,-1).mode);break;case j:{let p=r-n,h=f[Ue]??0,{parts:g}=f,y=g.length-h;if(y===0)break;let C=g[h+0],m=g[h+1],E={ind:c,mode:O,doc:C},v={ind:c,mode:w,doc:C},A=me(E,[],p,s.length>0,t,!0);if(y===1){A?o.push(E):o.push(v);break}let N={ind:c,mode:O,doc:m},ue={ind:c,mode:w,doc:m};if(y===2){A?o.push(N,E):o.push(ue,v);break}let It=g[h+2],Ie={ind:c,mode:d,doc:{...f,[Ue]:h+2}};me({ind:c,mode:O,doc:[C,m,It]},[],p,s.length>0,t,!0)?o.push(Ie,N,E):A?o.push(Ie,ue,E):o.push(Ie,ue,v);break}case S:case R:{let p=f.groupId?t[f.groupId]:d;if(p===w){let h=f.type===S?f.breakContents:f.negate?f.contents:Ae(f.contents);h&&o.push({ind:c,mode:d,doc:h})}if(p===O){let h=f.type===S?f.flatContents:f.negate?Ae(f.contents):f.contents;h&&o.push({ind:c,mode:d,doc:h})}break}case W:s.push({ind:c,mode:d,doc:f.contents});break;case z:s.length>0&&o.push({ind:c,mode:d,doc:iu});break;case b:switch(d){case O:if(f.hard)a=!0;else{f.soft||(i.push(" "),n+=1);break}case w:if(s.length>0){o.push({ind:c,mode:d,doc:f},...s.reverse()),s.length=0;break}f.literal?c.root?(i.push(D,c.root.value),n=c.root.length):(i.push(D),n=0):(n-=Ge(i),i.push(D+c.value),n=c.length);break}break;case T:o.push({ind:c,mode:d,doc:f.contents});break;case x:break;default:throw new ie(f)}o.length===0&&s.length>0&&(o.push(...s.reverse()),s.length=0)}let F=i.indexOf(te);if(F!==-1){let c=i.indexOf(te,F+1);if(c===-1)return{formatted:i.filter(h=>h!==te).join("")};let d=i.slice(0,F).join(""),f=i.slice(F+1,c).join(""),p=i.slice(c+1).join("");return{formatted:d+f+p,cursorNodeStart:d.length,cursorNodeText:f}}return{formatted:i.join("")}}function Rr(e,u,t=0){let r=0;for(let D=t;D<e.length;++D)e[D]===" "?r=r+u-r%u:r++;return r}var su=Rr,K,Ye,ye,Wr=class{constructor(e){Jt(this,K),this.stack=[e]}get key(){let{stack:e,siblings:u}=this;return B(!1,e,u===null?-2:-4)??null}get index(){return this.siblings===null?null:B(!1,this.stack,-2)}get node(){return B(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,u=B(!1,e,-3);return Array.isArray(u)?u:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:u}=this;return e!==null&&u===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...le(this,K,ye).call(this)]}getName(){let{stack:e}=this,{length:u}=e;return u>1?B(!1,e,-2):null}getValue(){return B(!1,this.stack,-1)}getNode(e=0){let u=le(this,K,Ye).call(this,e);return u===-1?null:this.stack[u]}getParentNode(e=0){return this.getNode(e+1)}call(e,...u){let{stack:t}=this,{length:r}=t,D=B(!1,t,-1);for(let n of u)D=D[n],t.push(n,D);try{return e(this)}finally{t.length=r}}callParent(e,u=0){let t=le(this,K,Ye).call(this,u+1),r=this.stack.splice(t+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...u){let{stack:t}=this,{length:r}=t,D=B(!1,t,-1);for(let n of u)D=D[n],t.push(n,D);try{for(let n=0;n<D.length;++n)t.push(n,D[n]),e(this,n,D),t.length-=2}finally{t.length=r}}map(e,...u){let t=[];return this.each((r,D,n)=>{t[D]=e(r,D,n)},...u),t}match(...e){let u=this.stack.length-1,t=null,r=this.stack[u--];for(let D of e){if(r===void 0)return!1;let n=null;if(typeof t=="number"&&(n=t,t=this.stack[u--],r=this.stack[u--]),D&&!D(r,t,n))return!1;t=this.stack[u--],r=this.stack[u--]}return!0}findAncestor(e){for(let u of le(this,K,ye).call(this))if(e(u))return u}hasAncestor(e){for(let u of le(this,K,ye).call(this))if(e(u))return!0;return!1}};K=new WeakSet,Ye=function(e){let{stack:u}=this;for(let t=u.length-1;t>=0;t-=2)if(!Array.isArray(u[t])&&--e<0)return t;return-1},ye=function*(){let{stack:e}=this;for(let u=e.length-3;u>=0;u-=2){let t=e[u];Array.isArray(t)||(yield t)}};var zr=Wr,it=new Proxy(()=>{},{get:()=>it}),Ze=it;function Vr(e){return e!==null&&typeof e=="object"}var qr=Vr;function*_e(e,u){let{getVisitorKeys:t,filter:r=()=>!0}=u,D=n=>qr(n)&&r(n);for(let n of t(e)){let o=e[n];if(Array.isArray(o))for(let i of o)D(i)&&(yield i);else D(o)&&(yield o)}}function*Jr(e,u){let t=[e];for(let r=0;r<t.length;r++){let D=t[r];for(let n of _e(D,u))yield n,t.push(n)}}function Kr(e,u){return _e(e,u).next().done}function Fe(e){return(u,t,r)=>{let D=!!(r!=null&&r.backwards);if(t===!1)return!1;let{length:n}=u,o=t;for(;o>=0&&o<n;){let i=u.charAt(o);if(e instanceof RegExp){if(!e.test(i))return o}else if(!e.includes(i))return o;D?o--:o++}return o===-1||o===n?o:!1}}var Ur=Fe(/\s/u),q=Fe(" "),at=Fe(",; "),st=Fe(/[^\n\r]/u);function Hr(e,u,t){let r=!!(t!=null&&t.backwards);if(u===!1)return!1;let D=e.charAt(u);if(r){if(e.charAt(u-1)==="\r"&&D===`
21
- `)return u-2;if(D===`
22
- `||D==="\r"||D==="\u2028"||D==="\u2029")return u-1}else{if(D==="\r"&&e.charAt(u+1)===`
23
- `)return u+2;if(D===`
24
- `||D==="\r"||D==="\u2028"||D==="\u2029")return u+1}return u}var Z=Hr;function Gr(e,u,t={}){let r=q(e,t.backwards?u-1:u,t),D=Z(e,r,t);return r!==D}var V=Gr;function Yr(e){return Array.isArray(e)&&e.length>0}var Zr=Yr,lt=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Qr=e=>Object.keys(e).filter(u=>!lt.has(u));function Xr(e){return e?u=>e(u,lt):Qr}var je=Xr;function en(e){let u=e.type||e.kind||"(unknown type)",t=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return t.length>20&&(t=t.slice(0,19)+"…"),u+(t?" "+t:"")}function lu(e,u){(e.comments??(e.comments=[])).push(u),u.printed=!1,u.nodeDescription=en(e)}function re(e,u){u.leading=!0,u.trailing=!1,lu(e,u)}function U(e,u,t){u.leading=!1,u.trailing=!1,t&&(u.marker=t),lu(e,u)}function ne(e,u){u.leading=!1,u.trailing=!0,lu(e,u)}var Pe=new WeakMap;function cu(e,u){if(Pe.has(e))return Pe.get(e);let{printer:{getCommentChildNodes:t,canAttachComment:r,getVisitorKeys:D},locStart:n,locEnd:o}=u;if(!r)return[];let i=((t==null?void 0:t(e,u))??[..._e(e,{getVisitorKeys:je(D)})]).flatMap(a=>r(a)?[a]:cu(a,u));return i.sort((a,s)=>n(a)-n(s)||o(a)-o(s)),Pe.set(e,i),i}function ct(e,u,t,r){let{locStart:D,locEnd:n}=t,o=D(u),i=n(u),a=cu(e,t),s,l,F=0,c=a.length;for(;F<c;){let d=F+c>>1,f=a[d],p=D(f),h=n(f);if(p<=o&&i<=h)return ct(f,u,t,f);if(h<=o){s=f,F=d+1;continue}if(i<=p){l=f,c=d;continue}throw new Error("Comment location overlaps with node location")}if((r==null?void 0:r.type)==="TemplateLiteral"){let{quasis:d}=r,f=Le(d,u,t);s&&Le(d,s,t)!==f&&(s=null),l&&Le(d,l,t)!==f&&(l=null)}return{enclosingNode:r,precedingNode:s,followingNode:l}}var $e=()=>!1;function un(e,u){let{comments:t}=e;if(delete e.comments,!Zr(t)||!u.printer.canAttachComment)return;let r=[],{locStart:D,locEnd:n,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:i={}},originalText:a}=u,{ownLine:s=$e,endOfLine:l=$e,remaining:F=$e}=i,c=t.map((d,f)=>({...ct(e,d,u),comment:d,text:a,options:u,ast:e,isLastComment:t.length-1===f}));for(let[d,f]of c.entries()){let{comment:p,precedingNode:h,enclosingNode:g,followingNode:y,text:C,options:m,ast:E,isLastComment:v}=f;if(m.parser==="json"||m.parser==="json5"||m.parser==="jsonc"||m.parser==="__js_expression"||m.parser==="__ts_expression"||m.parser==="__vue_expression"||m.parser==="__vue_ts_expression"){if(D(p)-D(E)<=0){re(E,p);continue}if(n(p)-n(E)>=0){ne(E,p);continue}}let A;if(o?A=[f]:(p.enclosingNode=g,p.precedingNode=h,p.followingNode=y,A=[p,C,m,E,v]),tn(C,m,c,d))p.placement="ownLine",s(...A)||(y?re(y,p):h?ne(h,p):U(g||E,p));else if(rn(C,m,c,d))p.placement="endOfLine",l(...A)||(h?ne(h,p):y?re(y,p):U(g||E,p));else if(p.placement="remaining",!F(...A))if(h&&y){let N=r.length;N>0&&r[N-1].followingNode!==y&&Au(r,m),r.push(f)}else h?ne(h,p):y?re(y,p):U(g||E,p)}if(Au(r,u),!o)for(let d of t)delete d.precedingNode,delete d.enclosingNode,delete d.followingNode}var ft=e=>!/[\S\n\u2028\u2029]/u.test(e);function tn(e,u,t,r){let{comment:D,precedingNode:n}=t[r],{locStart:o,locEnd:i}=u,a=o(D);if(n)for(let s=r-1;s>=0;s--){let{comment:l,precedingNode:F}=t[s];if(F!==n||!ft(e.slice(i(l),a)))break;a=o(l)}return V(e,a,{backwards:!0})}function rn(e,u,t,r){let{comment:D,followingNode:n}=t[r],{locStart:o,locEnd:i}=u,a=i(D);if(n)for(let s=r+1;s<t.length;s++){let{comment:l,followingNode:F}=t[s];if(F!==n||!ft(e.slice(a,o(l))))break;a=i(l)}return V(e,a)}function Au(e,u){var t,r;let D=e.length;if(D===0)return;let{precedingNode:n,followingNode:o}=e[0],i=u.locStart(o),a;for(a=D;a>0;--a){let{comment:s,precedingNode:l,followingNode:F}=e[a-1];Ze.strictEqual(l,n),Ze.strictEqual(F,o);let c=u.originalText.slice(u.locEnd(s),i);if(((r=(t=u.printer).isGap)==null?void 0:r.call(t,c,u))??/^[\s(]*$/u.test(c))i=u.locStart(s);else break}for(let[s,{comment:l}]of e.entries())s<a?ne(n,l):re(o,l);for(let s of[n,o])s.comments&&s.comments.length>1&&s.comments.sort((l,F)=>u.locStart(l)-u.locStart(F));e.length=0}function Le(e,u,t){let r=t.locStart(u)-1;for(let D=1;D<e.length;++D)if(r<t.locStart(e[D]))return D-1;return 0}function nn(e,u){let t=u-1;t=q(e,t,{backwards:!0}),t=Z(e,t,{backwards:!0}),t=q(e,t,{backwards:!0});let r=Z(e,t,{backwards:!0});return t!==r}var fu=nn;function dt(e,u){let t=e.node;return t.printed=!0,u.printer.printComment(e,u)}function Dn(e,u){var t;let r=e.node,D=[dt(e,u)],{printer:n,originalText:o,locStart:i,locEnd:a}=u;if((t=n.isBlockComment)!=null&&t.call(n,r)){let l=V(o,a(r))?V(o,i(r),{backwards:!0})?Y:tt:" ";D.push(l)}else D.push(Y);let s=Z(o,q(o,a(r)));return s!==!1&&V(o,s)&&D.push(Y),D}function on(e,u,t){var r;let D=e.node,n=dt(e,u),{printer:o,originalText:i,locStart:a}=u,s=(r=o.isBlockComment)==null?void 0:r.call(o,D);if(t!=null&&t.hasLineSuffix&&!(t!=null&&t.isBlock)||V(i,a(D),{backwards:!0})){let l=fu(i,a(D));return{doc:Ke([Y,l?Y:"",n]),isBlock:s,hasLineSuffix:!0}}return!s||t!=null&&t.hasLineSuffix?{doc:[Ke([" ",n]),Ne],isBlock:s,hasLineSuffix:!0}:{doc:[" ",n],isBlock:s,hasLineSuffix:!1}}function an(e,u){let t=e.node;if(!t)return{};let r=u[Symbol.for("printedComments")];if((t.comments||[]).filter(i=>!r.has(i)).length===0)return{leading:"",trailing:""};let D=[],n=[],o;return e.each(()=>{let i=e.node;if(r!=null&&r.has(i))return;let{leading:a,trailing:s}=i;a?D.push(Dn(e,u)):s&&(o=on(e,u,o),n.push(o.doc))},"comments"),{leading:D,trailing:n}}function sn(e,u,t){let{leading:r,trailing:D}=an(e,t);return!r&&!D?u:Ee(u,n=>[r,n,D])}function ln(e){let{[Symbol.for("comments")]:u,[Symbol.for("printedComments")]:t}=e;for(let r of u){if(!r.printed&&!t.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}var Ft=class extends Error{constructor(){super(...arguments);he(this,"name","ConfigError")}},wu=class extends Error{constructor(){super(...arguments);he(this,"name","UndefinedParserError")}},cn={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
25
- (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
26
- The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
27
- The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment
28
- in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function pt({plugins:e=[],showDeprecated:u=!1}={}){let t=e.flatMap(D=>D.languages??[]),r=[];for(let D of dn(Object.assign({},...e.map(({options:n})=>n),cn)))!u&&D.deprecated||(Array.isArray(D.choices)&&(u||(D.choices=D.choices.filter(n=>!n.deprecated)),D.name==="parser"&&(D.choices=[...D.choices,...fn(D.choices,t,e)])),D.pluginDefaults=Object.fromEntries(e.filter(n=>{var o;return((o=n.defaultOptions)==null?void 0:o[D.name])!==void 0}).map(n=>[n.name,n.defaultOptions[D.name]])),r.push(D));return{languages:t,options:r}}function*fn(e,u,t){let r=new Set(e.map(D=>D.value));for(let D of u)if(D.parsers){for(let n of D.parsers)if(!r.has(n)){r.add(n);let o=t.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,n)),i=D.name;o!=null&&o.name&&(i+=` (plugin: ${o.name})`),yield{value:n,description:i}}}}function dn(e){let u=[];for(let[t,r]of Object.entries(e)){let D={name:t,...r};Array.isArray(D.default)&&(D.default=B(!1,D.default,-1).value),u.push(D)}return u}var Fn=e=>String(e).split(/[/\\]/u).pop();function ku(e,u){if(!u)return;let t=Fn(u).toLowerCase();return e.find(({filenames:r})=>r==null?void 0:r.some(D=>D.toLowerCase()===t))??e.find(({extensions:r})=>r==null?void 0:r.some(D=>t.endsWith(D)))}function pn(e,u){if(u)return e.find(({name:t})=>t.toLowerCase()===u)??e.find(({aliases:t})=>t==null?void 0:t.includes(u))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${u}`))}function hn(e,u){let t=e.plugins.flatMap(D=>D.languages??[]),r=pn(t,u.language)??ku(t,u.physicalFile)??ku(t,u.file)??(u.physicalFile,void 0);return r==null?void 0:r.parsers[0]}var Cn=hn,De={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(t=>De.value(t)).join(", ")}]`;let u=Object.keys(e);return u.length===0?"{}":`{ ${u.map(t=>`${De.key(t)}: ${De.value(e[t])}`).join(", ")} }`},pair:({key:e,value:u})=>De.value({[e]:u})},Su=we(tu(),1),mn=(e,u,{descriptor:t})=>{let r=[`${Su.default.yellow(typeof e=="string"?t.key(e):t.pair(e))} is deprecated`];return u&&r.push(`we now treat it as ${Su.default.blue(typeof u=="string"?t.key(u):t.pair(u))}`),r.join("; ")+"."},oe=we(tu(),1),ht=Symbol.for("vnopts.VALUE_NOT_EXIST"),ve=Symbol.for("vnopts.VALUE_UNCHANGED"),xu=" ".repeat(2),gn=(e,u,t)=>{let{text:r,list:D}=t.normalizeExpectedResult(t.schemas[e].expected(t)),n=[];return r&&n.push(Nu(e,u,r,t.descriptor)),D&&n.push([Nu(e,u,D.title,t.descriptor)].concat(D.values.map(o=>Ct(o,t.loggerPrintWidth))).join(`
29
- `)),mt(n,t.loggerPrintWidth)};function Nu(e,u,t,r){return[`Invalid ${oe.default.red(r.key(e))} value.`,`Expected ${oe.default.blue(t)},`,`but received ${u===ht?oe.default.gray("nothing"):oe.default.red(r.value(u))}.`].join(" ")}function Ct({text:e,list:u},t){let r=[];return e&&r.push(`- ${oe.default.blue(e)}`),u&&r.push([`- ${oe.default.blue(u.title)}:`].concat(u.values.map(D=>Ct(D,t-xu.length).replace(/^|\n/g,`$&${xu}`))).join(`
30
- `)),mt(r,t)}function mt(e,u){if(e.length===1)return e[0];let[t,r]=e,[D,n]=e.map(o=>o.split(`
31
- `,1)[0].length);return D>u&&D>n?r:t}var Ou=we(tu(),1),Me=[],_u=[];function En(e,u){if(e===u)return 0;let t=e;e.length>u.length&&(e=u,u=t);let r=e.length,D=u.length;for(;r>0&&e.charCodeAt(~-r)===u.charCodeAt(~-D);)r--,D--;let n=0;for(;n<r&&e.charCodeAt(n)===u.charCodeAt(n);)n++;if(r-=n,D-=n,r===0)return D;let o,i,a,s,l=0,F=0;for(;l<r;)_u[l]=e.charCodeAt(n+l),Me[l]=++l;for(;F<D;)for(o=u.charCodeAt(n+F),a=F++,i=F,l=0;l<r;l++)s=o===_u[l]?a:a+1,a=Me[l],i=Me[l]=a>i?s>i?i+1:s:s>a?a+1:s;return i}var gt=(e,u,{descriptor:t,logger:r,schemas:D})=>{let n=[`Ignored unknown option ${Ou.default.yellow(t.pair({key:e,value:u}))}.`],o=Object.keys(D).sort().find(i=>En(e,i)<3);o&&n.push(`Did you mean ${Ou.default.blue(t.key(o))}?`),r.warn(n.join(" "))},yn=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function vn(e,u){let t=new e(u),r=Object.create(t);for(let D of yn)D in u&&(r[D]=Bn(u[D],t,J.prototype[D].length));return r}var J=class{static create(e){return vn(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,u){return!1}deprecated(e,u){return!1}forward(e,u){}redirect(e,u){}overlap(e,u,t){return e}preprocess(e,u){return e}postprocess(e,u){return ve}};function Bn(e,u,t){return typeof e=="function"?(...r)=>e(...r.slice(0,t-1),u,...r.slice(t-1)):()=>e}var bn=class extends J{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,u){return u.schemas[this._sourceName].validate(e,u)}redirect(e,u){return this._sourceName}},An=class extends J{expected(){return"anything"}validate(){return!0}},wn=class extends J{constructor({valueSchema:e,name:u=e.name,...t}){super({...t,name:u}),this._valueSchema=e}expected(e){let{text:u,list:t}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:u&&`an array of ${u}`,list:t&&{title:"an array of the following values",values:[{list:t}]}}}validate(e,u){if(!Array.isArray(e))return!1;let t=[];for(let r of e){let D=u.normalizeValidateResult(this._valueSchema.validate(r,u),r);D!==!0&&t.push(D.value)}return t.length===0?!0:{value:t}}deprecated(e,u){let t=[];for(let r of e){let D=u.normalizeDeprecatedResult(this._valueSchema.deprecated(r,u),r);D!==!1&&t.push(...D.map(({value:n})=>({value:[n]})))}return t}forward(e,u){let t=[];for(let r of e){let D=u.normalizeForwardResult(this._valueSchema.forward(r,u),r);t.push(...D.map(ju))}return t}redirect(e,u){let t=[],r=[];for(let D of e){let n=u.normalizeRedirectResult(this._valueSchema.redirect(D,u),D);"remain"in n&&t.push(n.remain),r.push(...n.redirect.map(ju))}return t.length===0?{redirect:r}:{redirect:r,remain:t}}overlap(e,u){return e.concat(u)}};function ju({from:e,to:u}){return{from:[e],to:u}}var kn=class extends J{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function Sn(e,u){let t=Object.create(null);for(let r of e){let D=r[u];if(t[D])throw new Error(`Duplicate ${u} ${JSON.stringify(D)}`);t[D]=r}return t}function xn(e,u){let t=new Map;for(let r of e){let D=r[u];if(t.has(D))throw new Error(`Duplicate ${u} ${JSON.stringify(D)}`);t.set(D,r)}return t}function Nn(){let e=Object.create(null);return u=>{let t=JSON.stringify(u);return e[t]?!0:(e[t]=!0,!1)}}function On(e,u){let t=[],r=[];for(let D of e)u(D)?t.push(D):r.push(D);return[t,r]}function _n(e){return e===Math.floor(e)}function jn(e,u){if(e===u)return 0;let t=typeof e,r=typeof u,D=["undefined","object","boolean","number","string"];return t!==r?D.indexOf(t)-D.indexOf(r):t!=="string"?Number(e)-Number(u):e.localeCompare(u)}function Tn(e){return(...u)=>{let t=e(...u);return typeof t=="string"?new Error(t):t}}function Tu(e){return e===void 0?{}:e}function Et(e){if(typeof e=="string")return{text:e};let{text:u,list:t}=e;return In((u||t)!==void 0,"Unexpected `expected` result, there should be at least one field."),t?{text:u,list:{title:t.title,values:t.values.map(Et)}}:{text:u}}function Iu(e,u){return e===!0?!0:e===!1?{value:u}:e}function Pu(e,u,t=!1){return e===!1?!1:e===!0?t?!0:[{value:u}]:"value"in e?[e]:e.length===0?!1:e}function $u(e,u){return typeof e=="string"||"key"in e?{from:u,to:e}:"from"in e?{from:e.from,to:e.to}:{from:u,to:e.to}}function Qe(e,u){return e===void 0?[]:Array.isArray(e)?e.map(t=>$u(t,u)):[$u(e,u)]}function Lu(e,u){let t=Qe(typeof e=="object"&&"redirect"in e?e.redirect:e,u);return t.length===0?{remain:u,redirect:t}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:t}:{redirect:t}}function In(e,u){if(!e)throw new Error(u)}var Pn=class extends J{constructor(e){super(e),this._choices=xn(e.choices.map(u=>u&&typeof u=="object"?u:{value:u}),"value")}expected({descriptor:e}){let u=Array.from(this._choices.keys()).map(D=>this._choices.get(D)).filter(({hidden:D})=>!D).map(D=>D.value).sort(jn).map(e.value),t=u.slice(0,-2),r=u.slice(-2);return{text:t.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:u}}}validate(e){return this._choices.has(e)}deprecated(e){let u=this._choices.get(e);return u&&u.deprecated?{value:e}:!1}forward(e){let u=this._choices.get(e);return u?u.forward:void 0}redirect(e){let u=this._choices.get(e);return u?u.redirect:void 0}},$n=class extends J{expected(){return"a number"}validate(e,u){return typeof e=="number"}},Ln=class extends $n{expected(){return"an integer"}validate(e,u){return u.normalizeValidateResult(super.validate(e,u),e)===!0&&_n(e)}},Mu=class extends J{expected(){return"a string"}validate(e){return typeof e=="string"}},Mn=De,Rn=gt,Wn=gn,zn=mn,Vn=class{constructor(e,u){let{logger:t=console,loggerPrintWidth:r=80,descriptor:D=Mn,unknown:n=Rn,invalid:o=Wn,deprecated:i=zn,missing:a=()=>!1,required:s=()=>!1,preprocess:l=c=>c,postprocess:F=()=>ve}=u||{};this._utils={descriptor:D,logger:t||{warn:()=>{}},loggerPrintWidth:r,schemas:Sn(e,"name"),normalizeDefaultResult:Tu,normalizeExpectedResult:Et,normalizeDeprecatedResult:Pu,normalizeForwardResult:Qe,normalizeRedirectResult:Lu,normalizeValidateResult:Iu},this._unknownHandler=n,this._invalidHandler=Tn(o),this._deprecatedHandler=i,this._identifyMissing=(c,d)=>!(c in d)||a(c,d),this._identifyRequired=s,this._preprocess=l,this._postprocess=F,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Nn()}normalize(e){let u={},t=[this._preprocess(e,this._utils)],r=()=>{for(;t.length!==0;){let D=t.shift(),n=this._applyNormalization(D,u);t.push(...n)}};r();for(let D of Object.keys(this._utils.schemas)){let n=this._utils.schemas[D];if(!(D in u)){let o=Tu(n.default(this._utils));"value"in o&&t.push({[D]:o.value})}}r();for(let D of Object.keys(this._utils.schemas)){if(!(D in u))continue;let n=this._utils.schemas[D],o=u[D],i=n.postprocess(o,this._utils);i!==ve&&(this._applyValidation(i,D,n),u[D]=i)}return this._applyPostprocess(u),this._applyRequiredCheck(u),u}_applyNormalization(e,u){let t=[],{knownKeys:r,unknownKeys:D}=this._partitionOptionKeys(e);for(let n of r){let o=this._utils.schemas[n],i=o.preprocess(e[n],this._utils);this._applyValidation(i,n,o);let a=({from:F,to:c})=>{t.push(typeof c=="string"?{[c]:F}:{[c.key]:c.value})},s=({value:F,redirectTo:c})=>{let d=Pu(o.deprecated(F,this._utils),i,!0);if(d!==!1)if(d===!0)this._hasDeprecationWarned(n)||this._utils.logger.warn(this._deprecatedHandler(n,c,this._utils));else for(let{value:f}of d){let p={key:n,value:f};if(!this._hasDeprecationWarned(p)){let h=typeof c=="string"?{key:c,value:f}:c;this._utils.logger.warn(this._deprecatedHandler(p,h,this._utils))}}};Qe(o.forward(i,this._utils),i).forEach(a);let l=Lu(o.redirect(i,this._utils),i);if(l.redirect.forEach(a),"remain"in l){let F=l.remain;u[n]=n in u?o.overlap(u[n],F,this._utils):F,s({value:F})}for(let{from:F,to:c}of l.redirect)s({value:F,redirectTo:c})}for(let n of D){let o=e[n];this._applyUnknownHandler(n,o,u,(i,a)=>{t.push({[i]:a})})}return t}_applyRequiredCheck(e){for(let u of Object.keys(this._utils.schemas))if(this._identifyMissing(u,e)&&this._identifyRequired(u))throw this._invalidHandler(u,ht,this._utils)}_partitionOptionKeys(e){let[u,t]=On(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:u,unknownKeys:t}}_applyValidation(e,u,t){let r=Iu(t.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(u,r.value,this._utils)}_applyUnknownHandler(e,u,t,r){let D=this._unknownHandler(e,u,this._utils);if(D)for(let n of Object.keys(D)){if(this._identifyMissing(n,D))continue;let o=D[n];n in this._utils.schemas?r(n,o):t[n]=o}}_applyPostprocess(e){let u=this._postprocess(e,this._utils);if(u!==ve){if(u.delete)for(let t of u.delete)delete e[t];if(u.override){let{knownKeys:t,unknownKeys:r}=this._partitionOptionKeys(u.override);for(let D of t){let n=u.override[D];this._applyValidation(n,D,this._utils.schemas[D]),e[D]=n}for(let D of r){let n=u.override[D];this._applyUnknownHandler(D,n,e,(o,i)=>{let a=this._utils.schemas[o];this._applyValidation(i,o,a),e[o]=i})}}}}},Re;function qn(e,u,{logger:t=!1,isCLI:r=!1,passThrough:D=!1,FlagSchema:n,descriptor:o}={}){if(r){if(!n)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=De;let i=D?Array.isArray(D)?(c,d)=>D.includes(c)?{[c]:d}:void 0:(c,d)=>({[c]:d}):(c,d,f)=>{let{_:p,...h}=f.schemas;return gt(c,d,{...f,schemas:h})},a=Jn(u,{isCLI:r,FlagSchema:n}),s=new Vn(a,{logger:t,unknown:i,descriptor:o}),l=t!==!1;l&&Re&&(s._hasDeprecationWarned=Re);let F=s.normalize(e);return l&&(Re=s._hasDeprecationWarned),F}function Jn(e,{isCLI:u,FlagSchema:t}){let r=[];u&&r.push(An.create({name:"_"}));for(let D of e)r.push(Kn(D,{isCLI:u,optionInfos:e,FlagSchema:t})),D.alias&&u&&r.push(bn.create({name:D.alias,sourceName:D.name}));return r}function Kn(e,{isCLI:u,optionInfos:t,FlagSchema:r}){let{name:D}=e,n={name:D},o,i={};switch(e.type){case"int":o=Ln,u&&(n.preprocess=Number);break;case"string":o=Mu;break;case"choice":o=Pn,n.choices=e.choices.map(a=>a!=null&&a.redirect?{...a,redirect:{to:{key:e.name,value:a.redirect}}}:a);break;case"boolean":o=kn;break;case"flag":o=r,n.flags=t.flatMap(a=>[a.alias,a.description&&a.name,a.oppositeDescription&&`no-${a.name}`].filter(Boolean));break;case"path":o=Mu;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?n.validate=(a,s,l)=>e.exception(a)||s.validate(a,l):n.validate=(a,s,l)=>a===void 0||s.validate(a,l),e.redirect&&(i.redirect=a=>a?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(i.deprecated=!0),u&&!e.array){let a=n.preprocess||(s=>s);n.preprocess=(s,l,F)=>l.preprocess(a(Array.isArray(s)?B(!1,s,-1):s),F)}return e.array?wn.create({...u?{preprocess:a=>Array.isArray(a)?a:[a]}:{},...i,valueSchema:o.create(n)}):o.create({...n,...i})}var Un=qn,Hn=(e,u,t)=>{if(!(e&&u==null)){if(u.findLast)return u.findLast(t);for(let r=u.length-1;r>=0;r--){let D=u[r];if(t(D,r,u))return D}}},yt=Hn;function vt(e,u){if(!u)throw new Error("parserName is required.");let t=yt(!1,e,D=>D.parsers&&Object.prototype.hasOwnProperty.call(D.parsers,u));if(t)return t;let r=`Couldn't resolve parser "${u}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Ft(r)}function Gn(e,u){if(!u)throw new Error("astFormat is required.");let t=yt(!1,e,D=>D.printers&&Object.prototype.hasOwnProperty.call(D.printers,u));if(t)return t;let r=`Couldn't find plugin for AST format "${u}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Ft(r)}function Bt({plugins:e,parser:u}){let t=vt(e,u);return bt(t,u)}function bt(e,u){let t=e.parsers[u];return typeof t=="function"?t():t}function Yn(e,u){let t=e.printers[u];return typeof t=="function"?t():t}var Ru={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Zn(e,u={}){var t;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=Cn(r,{physicalFile:r.filepath}),!r.parser)throw new wu(`No parser could be inferred for file "${r.filepath}".`)}else throw new wu("No parser and no file path given, couldn't infer a parser.");let D=pt({plugins:e.plugins,showDeprecated:!0}).options,n={...Ru,...Object.fromEntries(D.filter(c=>c.default!==void 0).map(c=>[c.name,c.default]))},o=vt(r.plugins,r.parser),i=await bt(o,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let a=(t=o.printers)!=null&&t[i.astFormat]?o:Gn(r.plugins,i.astFormat),s=await Yn(a,i.astFormat);r.printer=s;let l=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,c])=>c!==void 0)):{},F={...n,...l};for(let[c,d]of Object.entries(F))(r[c]===null||r[c]===void 0)&&(r[c]=d);return r.parser==="json"&&(r.trailingComma="none"),Un(r,D,{passThrough:Object.keys(Ru),...u})}var se=Zn,Qn=we(Kt(),1);async function Xn(e,u){let t=await Bt(u),r=t.preprocess?t.preprocess(e,u):e;u.originalText=r;let D;try{D=await t.parse(r,u,u)}catch(n){eD(n,e)}return{text:r,ast:D}}function eD(e,u){let{loc:t}=e;if(t){let r=(0,Qn.codeFrameColumns)(u,t,{highlightCode:!0});throw e.message+=`
32
- `+r,e.codeFrame=r,e}throw e}var pe=Xn;async function uD(e,u,t,r,D){let{embeddedLanguageFormatting:n,printer:{embed:o,hasPrettierIgnore:i=()=>!1,getVisitorKeys:a}}=t;if(!o||n!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let s=je(o.getVisitorKeys??a),l=[];d();let F=e.stack;for(let{print:f,node:p,pathStack:h}of l)try{e.stack=h;let g=await f(c,u,e,t);g&&D.set(p,g)}catch(g){if(globalThis.PRETTIER_DEBUG)throw g}e.stack=F;function c(f,p){return tD(f,p,t,r)}function d(){let{node:f}=e;if(f===null||typeof f!="object"||i(e))return;for(let h of s(f))Array.isArray(f[h])?e.each(d,h):e.call(d,h);let p=o(e,t);if(p){if(typeof p=="function"){l.push({print:p,node:f,pathStack:[...e.stack]});return}D.set(f,p)}}}async function tD(e,u,t,r){let D=await se({...t,...u,parentParser:t.parser,originalText:e},{passThrough:!0}),{ast:n}=await pe(e,D),o=await r(n,D);return Xu(o)}function rD(e,u){let{originalText:t,[Symbol.for("comments")]:r,locStart:D,locEnd:n,[Symbol.for("printedComments")]:o}=u,{node:i}=e,a=D(i),s=n(i);for(let l of r)D(l)>=a&&n(l)<=s&&o.add(l);return t.slice(a,s)}var nD=rD;async function Te(e,u){({ast:e}=await At(e,u));let t=new Map,r=new zr(e),D=new Map;await uD(r,o,u,Te,D);let n=await Wu(r,u,o,void 0,D);if(ln(u),u.nodeAfterCursor&&!u.nodeBeforeCursor)return[G,n];if(u.nodeBeforeCursor&&!u.nodeAfterCursor)return[n,G];return n;function o(a,s){return a===void 0||a===r?i(s):Array.isArray(a)?r.call(()=>i(s),...a):r.call(()=>i(s),a)}function i(a){let s=r.node;if(s==null)return"";let l=s&&typeof s=="object"&&a===void 0;if(l&&t.has(s))return t.get(s);let F=Wu(r,u,o,a,D);return l&&t.set(s,F),F}}function Wu(e,u,t,r,D){var n;let{node:o}=e,{printer:i}=u,a;switch((n=i.hasPrettierIgnore)!=null&&n.call(i,e)?a=nD(e,u):D.has(o)?a=D.get(o):a=i.print(e,u,t,r),o){case u.cursorNode:a=Ee(a,s=>[G,s,G]);break;case u.nodeBeforeCursor:a=Ee(a,s=>[s,G]);break;case u.nodeAfterCursor:a=Ee(a,s=>[G,s]);break}return i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,u))&&(a=sn(e,a,u)),a}async function At(e,u){let t=e.comments??[];u[Symbol.for("comments")]=t,u[Symbol.for("tokens")]=e.tokens??[],u[Symbol.for("printedComments")]=new Set,un(e,u);let{printer:{preprocess:r}}=u;return e=r?await r(e,u):e,{ast:e,comments:t}}function DD(e,u){let{cursorOffset:t,locStart:r,locEnd:D}=u,n=je(u.printer.getVisitorKeys),o=d=>r(d)<=t&&D(d)>=t,i=e,a=[e];for(let d of Jr(e,{getVisitorKeys:n,filter:o}))a.push(d),i=d;if(Kr(i,{getVisitorKeys:n}))return{cursorNode:i};let s,l,F=-1,c=Number.POSITIVE_INFINITY;for(;a.length>0&&(s===void 0||l===void 0);){i=a.pop();let d=s!==void 0,f=l!==void 0;for(let p of _e(i,{getVisitorKeys:n})){if(!d){let h=D(p);h<=t&&h>F&&(s=p,F=h)}if(!f){let h=r(p);h>=t&&h<c&&(l=p,c=h)}}}return{nodeBeforeCursor:s,nodeAfterCursor:l}}var oD=DD;function iD(e,u){let{printer:{massageAstNode:t,getVisitorKeys:r}}=u;if(!t)return e;let D=je(r),n=t.ignoredProperties??new Set;return o(e);function o(i,a){if(!(i!==null&&typeof i=="object"))return i;if(Array.isArray(i))return i.map(c=>o(c,a)).filter(Boolean);let s={},l=new Set(D(i));for(let c in i)!Object.prototype.hasOwnProperty.call(i,c)||n.has(c)||(l.has(c)?s[c]=o(i[c],i):s[c]=i[c]);let F=t(i,s,a);if(F!==null)return F??s}}var aD=iD,sD=(e,u,t)=>{if(!(e&&u==null)){if(u.findLastIndex)return u.findLastIndex(t);for(let r=u.length-1;r>=0;r--){let D=u[r];if(t(D,r,u))return r}return-1}},lD=sD,cD=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function fD(e,u){let t=[e.node,...e.parentNodes],r=new Set([u.node,...u.parentNodes]);return t.find(D=>wt.has(D.type)&&r.has(D))}function zu(e){let u=lD(!1,e,t=>t.type!=="Program"&&t.type!=="File");return u===-1?e:e.slice(0,u+1)}function dD(e,u,{locStart:t,locEnd:r}){let D=e.node,n=u.node;if(D===n)return{startNode:D,endNode:n};let o=t(e.node);for(let a of zu(u.parentNodes))if(t(a)>=o)n=a;else break;let i=r(u.node);for(let a of zu(e.parentNodes)){if(r(a)<=i)D=a;else break;if(D===n)break}return{startNode:D,endNode:n}}function Xe(e,u,t,r,D=[],n){let{locStart:o,locEnd:i}=t,a=o(e),s=i(e);if(!(u>s||u<a||n==="rangeEnd"&&u===a||n==="rangeStart"&&u===s)){for(let l of cu(e,t)){let F=Xe(l,u,t,r,[e,...D],n);if(F)return F}if(!r||r(e,D[0]))return{node:e,parentNodes:D}}}function FD(e,u){return u!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var wt=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),pD=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Vu(e,u,t){if(!u)return!1;switch(e.parser){case"flow":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"__babel_estree":return FD(u.type,t==null?void 0:t.type);case"json":case"json5":case"jsonc":case"json-stringify":return wt.has(u.type);case"graphql":return pD.has(u.kind);case"vue":return u.tag!=="root"}return!1}function hD(e,u,t){let{rangeStart:r,rangeEnd:D,locStart:n,locEnd:o}=u;Ze.ok(D>r);let i=e.slice(r,D).search(/\S/u),a=i===-1;if(!a)for(r+=i;D>r&&!/\S/u.test(e[D-1]);--D);let s=Xe(t,r,u,(d,f)=>Vu(u,d,f),[],"rangeStart"),l=a?s:Xe(t,D,u,d=>Vu(u,d),[],"rangeEnd");if(!s||!l)return{rangeStart:0,rangeEnd:0};let F,c;if(cD(u)){let d=fD(s,l);F=d,c=d}else({startNode:F,endNode:c}=dD(s,l,u));return{rangeStart:Math.min(n(F),n(c)),rangeEnd:Math.max(o(F),o(c))}}var kt="\uFEFF",qu=Symbol("cursor");async function St(e,u,t=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:D}=await pe(e,u);u.cursorOffset>=0&&(u={...u,...oD(r,u)});let n=await Te(r,u);t>0&&(n=Dt([Y,n],t,u.tabWidth));let o=Oe(n,u);if(t>0){let a=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(a),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>a.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=a+nu(u.endOfLine)}let i=u[Symbol.for("comments")];if(u.cursorOffset>=0){let a,s,l,F;if((u.cursorNode||u.nodeBeforeCursor||u.nodeAfterCursor)&&o.cursorNodeText)if(l=o.cursorNodeStart,F=o.cursorNodeText,u.cursorNode)a=u.locStart(u.cursorNode),s=D.slice(a,u.locEnd(u.cursorNode));else{if(!u.nodeBeforeCursor&&!u.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");a=u.nodeBeforeCursor?u.locEnd(u.nodeBeforeCursor):0;let g=u.nodeAfterCursor?u.locStart(u.nodeAfterCursor):D.length;s=D.slice(a,g)}else a=0,s=D,l=0,F=o.formatted;let c=u.cursorOffset-a;if(s===F)return{formatted:o.formatted,cursorOffset:l+c,comments:i};let d=s.split("");d.splice(c,0,qu);let f=F.split(""),p=Xt(d,f),h=l;for(let g of p)if(g.removed){if(g.value.includes(qu))break}else h+=g.count;return{formatted:o.formatted,cursorOffset:h,comments:i}}return{formatted:o.formatted,cursorOffset:-1,comments:i}}async function CD(e,u){let{ast:t,text:r}=await pe(e,u),{rangeStart:D,rangeEnd:n}=hD(r,u,t),o=r.slice(D,n),i=Math.min(D,r.lastIndexOf(`
33
- `,D)+1),a=r.slice(i,D).match(/^\s*/u)[0],s=su(a,u.tabWidth),l=await St(o,{...u,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:u.cursorOffset>D&&u.cursorOffset<=n?u.cursorOffset-D:-1,endOfLine:"lf"},s),F=l.formatted.trimEnd(),{cursorOffset:c}=u;c>n?c+=F.length-o.length:l.cursorOffset>=0&&(c=l.cursorOffset+D);let d=r.slice(0,D)+F+r.slice(n);if(u.endOfLine!=="lf"){let f=nu(u.endOfLine);c>=0&&f===`\r
34
- `&&(c+=Zu(d.slice(0,c),`
35
- `)),d=ke(!1,d,`
36
- `,f)}return{formatted:d,cursorOffset:c,comments:l.comments}}function We(e,u,t){return typeof u!="number"||Number.isNaN(u)||u<0||u>e.length?t:u}function Ju(e,u){let{cursorOffset:t,rangeStart:r,rangeEnd:D}=u;return t=We(e,t,-1),r=We(e,r,0),D=We(e,D,e.length),{...u,cursorOffset:t,rangeStart:r,rangeEnd:D}}function xt(e,u){let{cursorOffset:t,rangeStart:r,rangeEnd:D,endOfLine:n}=Ju(e,u),o=e.charAt(0)===kt;if(o&&(e=e.slice(1),t--,r--,D--),n==="auto"&&(n=er(e)),e.includes("\r")){let i=a=>Zu(e.slice(0,Math.max(a,0)),`\r
37
- `);t-=i(t),r-=i(r),D-=i(D),e=ur(e)}return{hasBOM:o,text:e,options:Ju(e,{...u,cursorOffset:t,rangeStart:r,rangeEnd:D,endOfLine:n})}}async function Ku(e,u){let t=await Bt(u);return!t.hasPragma||t.hasPragma(e)}async function Nt(e,u){let{hasBOM:t,text:r,options:D}=xt(e,await se(u));if(D.rangeStart>=D.rangeEnd&&r!==""||D.requirePragma&&!await Ku(r,D))return{formatted:e,cursorOffset:u.cursorOffset,comments:[]};let n;return D.rangeStart>0||D.rangeEnd<r.length?n=await CD(r,D):(!D.requirePragma&&D.insertPragma&&D.printer.insertPragma&&!await Ku(r,D)&&(r=D.printer.insertPragma(r)),n=await St(r,D)),t&&(n.formatted=kt+n.formatted,n.cursorOffset>=0&&n.cursorOffset++),n}async function mD(e,u,t){let{text:r,options:D}=xt(e,await se(u)),n=await pe(r,D);return t&&(t.preprocessForPrint&&(n.ast=await At(n.ast,D)),t.massage&&(n.ast=aD(n.ast,D))),n}async function gD(e,u){u=await se(u);let t=await Te(e,u);return Oe(t,u)}async function ED(e,u){let t=Or(e),{formatted:r}=await Nt(t,{...u,parser:"__js_expression"});return r}async function yD(e,u){u=await se(u);let{ast:t}=await pe(e,u);return Te(t,u)}async function vD(e,u){return Oe(e,await se(u))}var Ot={};uu(Ot,{builders:()=>BD,printer:()=>bD,utils:()=>AD});var BD={join:nt,line:tt,softline:xr,hardline:Y,literalline:rt,group:et,conditionalGroup:Br,fill:br,lineSuffix:Ke,lineSuffixBoundary:kr,cursor:G,breakParent:Ne,ifBreak:Ar,trim:Sr,indent:Ae,indentIfBreak:wr,align:ae,addAlignmentToDoc:Dt,markAsRoot:yr,dedentToRoot:Er,dedent:vr,hardlineWithoutBreakParent:iu,literallineWithoutBreakParent:ut,label:Nr,concat:e=>e},bD={printDocToString:Oe},AD={willBreak:sr,traverseDoc:Du,findInDoc:ou,mapDoc:xe,removeLines:fr,stripTrailingHardline:Xu,replaceEndOfLine:pr,canBreak:Cr},wD="3.5.3",_t={};uu(_t,{addDanglingComment:()=>U,addLeadingComment:()=>re,addTrailingComment:()=>ne,getAlignmentSize:()=>su,getIndentSize:()=>_D,getMaxContinuousCount:()=>ID,getNextNonSpaceNonCommentCharacter:()=>$D,getNextNonSpaceNonCommentCharacterIndex:()=>UD,getPreferredQuote:()=>MD,getStringWidth:()=>au,hasNewline:()=>V,hasNewlineInRange:()=>WD,hasSpaces:()=>VD,isNextLineEmpty:()=>ZD,isNextLineEmptyAfterIndex:()=>hu,isPreviousLineEmpty:()=>GD,makeString:()=>JD,skip:()=>Fe,skipEverythingButNewLine:()=>st,skipInlineComment:()=>du,skipNewline:()=>Z,skipSpaces:()=>q,skipToLineEnd:()=>at,skipTrailingComment:()=>Fu,skipWhitespace:()=>Ur});function kD(e,u){if(u===!1)return!1;if(e.charAt(u)==="/"&&e.charAt(u+1)==="*"){for(let t=u+2;t<e.length;++t)if(e.charAt(t)==="*"&&e.charAt(t+1)==="/")return t+2}return u}var du=kD;function SD(e,u){return u===!1?!1:e.charAt(u)==="/"&&e.charAt(u+1)==="/"?st(e,u):u}var Fu=SD;function xD(e,u){let t=null,r=u;for(;r!==t;)t=r,r=q(e,r),r=du(e,r),r=Fu(e,r),r=Z(e,r);return r}var pu=xD;function ND(e,u){let t=null,r=u;for(;r!==t;)t=r,r=at(e,r),r=du(e,r),r=q(e,r);return r=Fu(e,r),r=Z(e,r),r!==!1&&V(e,r)}var hu=ND;function OD(e,u){let t=e.lastIndexOf(`
38
- `);return t===-1?0:su(e.slice(t+1).match(/^[\t ]*/u)[0],u)}var _D=OD;function jD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TD(e,u){let t=e.match(new RegExp(`(${jD(u)})+`,"gu"));return t===null?0:t.reduce((r,D)=>Math.max(r,D.length/u.length),0)}var ID=TD;function PD(e,u){let t=pu(e,u);return t===!1?"":e.charAt(t)}var $D=PD,ge="'",Uu='"';function LD(e,u){let t=u===!0||u===ge?ge:Uu,r=t===ge?Uu:ge,D=0,n=0;for(let o of e)o===t?D++:o===r&&n++;return D>n?r:t}var MD=LD;function RD(e,u,t){for(let r=u;r<t;++r)if(e.charAt(r)===`
39
- `)return!0;return!1}var WD=RD;function zD(e,u,t={}){return q(e,t.backwards?u-1:u,t)!==u}var VD=zD;function qD(e,u,t){let r=u==='"'?"'":'"',D=ke(!1,e,/\\(.)|(["'])/gsu,(n,o,i)=>o===r?o:i===u?"\\"+i:i||(t&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return u+D+u}var JD=qD;function KD(e,u,t){return pu(e,t(u))}function UD(e,u){return arguments.length===2||typeof u=="number"?pu(e,u):KD(...arguments)}function HD(e,u,t){return fu(e,t(u))}function GD(e,u){return arguments.length===2||typeof u=="number"?fu(e,u):HD(...arguments)}function YD(e,u,t){return hu(e,t(u))}function ZD(e,u){return arguments.length===2||typeof u=="number"?hu(e,u):YD(...arguments)}function H(e,u=1){return async(...t)=>{let r=t[u]??{},D=r.plugins??[];return t[u]={...r,plugins:Array.isArray(D)?D:Object.values(D)},e(...t)}}var jt=H(Nt);async function Tt(e,u){let{formatted:t}=await jt(e,{...u,cursorOffset:-1});return t}async function QD(e,u){return await Tt(e,u)===e}var XD=H(pt,0),eo={parse:H(mD),formatAST:H(gD),formatDoc:H(ED),printToDoc:H(yD),printDocToString:H(vD)},to=Yu;export{eo as __debug,QD as check,to as default,Ot as doc,Tt as format,jt as formatWithCursor,XD as getSupportInfo,_t as util,wD as version};
40
- //# sourceMappingURL=standalone-e79c0887.js.map