dsh-office-kit 0.2.0 → 0.3.1

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 (197) hide show
  1. package/CAPABILITY.md +147 -68
  2. package/README.md +3 -1
  3. package/assets/skills/excel-live-control/SKILL.md +234 -0
  4. package/assets/skills/excel-live-control/container_tools/live_excel.py +1589 -0
  5. package/assets/skills/excel-live-control/domain_guidance/financial_models.md +86 -0
  6. package/assets/skills/excel-live-control/domain_guidance/healthcare.md +58 -0
  7. package/assets/skills/excel-live-control/domain_guidance/marketing_advertising.md +53 -0
  8. package/assets/skills/excel-live-control/domain_guidance/scientific_research.md +53 -0
  9. package/assets/skills/excel-live-control/references/office-automation.md +207 -0
  10. package/assets/skills/excel-live-control/references/read_only_qna.md +59 -0
  11. package/assets/skills/excel-live-control/style_guidelines.md +87 -0
  12. package/assets/skills/excel-live-control/workflows/create_workflows.md +78 -0
  13. package/assets/skills/excel-live-control/workflows/edit_workflows.md +72 -0
  14. package/assets/skills/office-documents/SKILL.md +90 -77
  15. package/assets/skills/office-documents/examples/end_to_end_smoke_test.md +86 -0
  16. package/assets/skills/office-documents/ooxml/comments.md +40 -0
  17. package/assets/skills/office-documents/ooxml/hyperlinks_and_fields.md +66 -0
  18. package/assets/skills/office-documents/ooxml/rels_and_content_types.md +62 -0
  19. package/assets/skills/office-documents/ooxml/tracked_changes.md +53 -0
  20. package/assets/skills/office-documents/references/docx-structure.md +83 -0
  21. package/assets/skills/office-documents/references/template-elicitation.md +49 -0
  22. package/assets/skills/office-documents/references/writing-quality.md +49 -0
  23. package/assets/skills/office-documents/render_docx.py +99 -0
  24. package/assets/skills/office-documents/scripts/a11y_audit.py +201 -0
  25. package/assets/skills/office-documents/scripts/accept_tracked_changes.py +158 -0
  26. package/assets/skills/office-documents/scripts/add_tracked_replacements.py +155 -0
  27. package/assets/skills/office-documents/scripts/append_blocks.py +115 -0
  28. package/assets/skills/office-documents/scripts/apply_template_styles.py +111 -0
  29. package/assets/skills/office-documents/scripts/captions_and_crossrefs.py +109 -0
  30. package/assets/skills/office-documents/scripts/comments_add.py +143 -0
  31. package/assets/skills/office-documents/scripts/comments_apply_patch.py +121 -0
  32. package/assets/skills/office-documents/scripts/comments_extract.py +92 -0
  33. package/assets/skills/office-documents/scripts/comments_strip.py +81 -0
  34. package/assets/skills/office-documents/scripts/content_controls.py +199 -0
  35. package/assets/skills/office-documents/scripts/core_properties.py +131 -0
  36. package/assets/skills/office-documents/scripts/docx_kit.py +594 -0
  37. package/assets/skills/office-documents/scripts/docx_ooxml_patch.py +232 -0
  38. package/assets/skills/office-documents/scripts/docx_table_to_csv.py +106 -0
  39. package/assets/skills/office-documents/scripts/fields_materialize.py +73 -0
  40. package/assets/skills/office-documents/scripts/fields_report.py +66 -0
  41. package/assets/skills/office-documents/scripts/flatten_ref_fields.py +69 -0
  42. package/assets/skills/office-documents/scripts/footnotes_report.py +84 -0
  43. package/assets/skills/office-documents/scripts/google_docs_title_sanitize.py +103 -0
  44. package/assets/skills/office-documents/scripts/heading_audit.py +88 -0
  45. package/assets/skills/office-documents/scripts/images_audit.py +87 -0
  46. package/assets/skills/office-documents/scripts/insert_note.py +133 -0
  47. package/assets/skills/office-documents/scripts/insert_ref_fields.py +97 -0
  48. package/assets/skills/office-documents/scripts/insert_toc.py +91 -0
  49. package/assets/skills/office-documents/scripts/internal_nav.py +153 -0
  50. package/assets/skills/office-documents/scripts/make_fixtures.py +176 -0
  51. package/assets/skills/office-documents/scripts/merge_docx_append.py +246 -0
  52. package/assets/skills/office-documents/scripts/privacy_scrub.py +138 -0
  53. package/assets/skills/office-documents/scripts/redact_docx.py +120 -0
  54. package/assets/skills/office-documents/scripts/render_and_diff.py +108 -0
  55. package/assets/skills/office-documents/scripts/replace_text.py +161 -0
  56. package/assets/skills/office-documents/scripts/section_audit.py +98 -0
  57. package/assets/skills/office-documents/scripts/set_protection.py +99 -0
  58. package/assets/skills/office-documents/scripts/style_lint.py +118 -0
  59. package/assets/skills/office-documents/scripts/style_normalize.py +110 -0
  60. package/assets/skills/office-documents/scripts/table_geometry.py +174 -0
  61. package/assets/skills/office-documents/scripts/watermark_add.py +55 -0
  62. package/assets/skills/office-documents/scripts/watermark_audit_remove.py +74 -0
  63. package/assets/skills/office-documents/scripts/xlsx_to_docx_table.py +124 -0
  64. package/assets/skills/office-documents/tasks/accessibility_a11y.md +45 -0
  65. package/assets/skills/office-documents/tasks/captions_crossrefs.md +49 -0
  66. package/assets/skills/office-documents/tasks/clean_tracked_changes.md +49 -0
  67. package/assets/skills/office-documents/tasks/comments_manage.md +59 -0
  68. package/assets/skills/office-documents/tasks/compare_diff.md +40 -0
  69. package/assets/skills/office-documents/tasks/create_edit.md +107 -0
  70. package/assets/skills/office-documents/tasks/equations.md +59 -0
  71. package/assets/skills/office-documents/tasks/fields_update.md +44 -0
  72. package/assets/skills/office-documents/tasks/fixtures_edge_cases.md +50 -0
  73. package/assets/skills/office-documents/tasks/footnotes_endnotes.md +38 -0
  74. package/assets/skills/office-documents/tasks/forms_content_controls.md +48 -0
  75. package/assets/skills/office-documents/tasks/headings_numbering.md +55 -0
  76. package/assets/skills/office-documents/tasks/images_figures.md +63 -0
  77. package/assets/skills/office-documents/tasks/multi_doc_merge.md +43 -0
  78. package/assets/skills/office-documents/tasks/navigation_internal_links.md +38 -0
  79. package/assets/skills/office-documents/tasks/privacy_scrub_metadata.md +45 -0
  80. package/assets/skills/office-documents/tasks/protection_restrict_editing.md +41 -0
  81. package/assets/skills/office-documents/tasks/read_review.md +50 -0
  82. package/assets/skills/office-documents/tasks/redaction_anonymization.md +42 -0
  83. package/assets/skills/office-documents/tasks/sections_layout.md +54 -0
  84. package/assets/skills/office-documents/tasks/style_lint_normalize.md +44 -0
  85. package/assets/skills/office-documents/tasks/tables_spreadsheets.md +64 -0
  86. package/assets/skills/office-documents/tasks/templates_style_packs.md +53 -0
  87. package/assets/skills/office-documents/tasks/toc_workflow.md +39 -0
  88. package/assets/skills/office-documents/tasks/verify_render.md +50 -0
  89. package/assets/skills/office-documents/tasks/watermarks_background.md +35 -0
  90. package/assets/skills/office-documents/troubleshooting/libreoffice_headless.md +47 -0
  91. package/assets/skills/office-documents/troubleshooting/run_splitting.md +36 -0
  92. package/assets/skills/office-pdf/SKILL.md +73 -56
  93. package/assets/skills/office-pdf/references/form-fields.md +56 -0
  94. package/assets/skills/office-pdf/references/geometry.md +44 -0
  95. package/assets/skills/office-pdf/references/layout-quality.md +41 -0
  96. package/assets/skills/office-pdf/references/limits.md +58 -0
  97. package/assets/skills/office-pdf/scripts/extract_text.py +172 -0
  98. package/assets/skills/office-pdf/scripts/forms.py +556 -0
  99. package/assets/skills/office-pdf/scripts/metadata.py +161 -0
  100. package/assets/skills/office-pdf/scripts/page_ops.py +198 -0
  101. package/assets/skills/office-pdf/scripts/redact_region.py +347 -0
  102. package/assets/skills/office-pdf/scripts/render_pages.py +207 -0
  103. package/assets/skills/office-pdf/scripts/split_pages.py +155 -0
  104. package/assets/skills/office-pdf/scripts/stamp_overlay.py +199 -0
  105. package/assets/skills/office-pdf/tasks/annotations.md +98 -0
  106. package/assets/skills/office-pdf/tasks/create.md +75 -0
  107. package/assets/skills/office-pdf/tasks/edit-pages.md +71 -0
  108. package/assets/skills/office-pdf/tasks/forms.md +67 -0
  109. package/assets/skills/office-pdf/tasks/read.md +62 -0
  110. package/assets/skills/office-pdf/tasks/redact.md +72 -0
  111. package/assets/skills/office-pdf/tasks/stamp.md +60 -0
  112. package/assets/skills/office-presentations/SKILL.md +141 -87
  113. package/assets/skills/office-presentations/container_tools/add_slides.py +143 -0
  114. package/assets/skills/office-presentations/container_tools/core_properties.py +127 -0
  115. package/assets/skills/office-presentations/container_tools/create_montage.py +133 -0
  116. package/assets/skills/office-presentations/container_tools/inspect_presentation_layout_geometry.py +292 -0
  117. package/assets/skills/office-presentations/container_tools/inspect_presentation_package_integrity.py +164 -0
  118. package/assets/skills/office-presentations/container_tools/native_chart_title_gate.py +151 -0
  119. package/assets/skills/office-presentations/container_tools/native_quantitative_chart_gate.py +206 -0
  120. package/assets/skills/office-presentations/container_tools/native_table_arithmetic_gate.py +219 -0
  121. package/assets/skills/office-presentations/container_tools/ooxml_helpers.py +352 -0
  122. package/assets/skills/office-presentations/container_tools/preview_render.py +382 -0
  123. package/assets/skills/office-presentations/container_tools/render_slides.py +146 -0
  124. package/assets/skills/office-presentations/container_tools/replace_text.py +175 -0
  125. package/assets/skills/office-presentations/container_tools/template_source_fidelity_gate.py +236 -0
  126. package/assets/skills/office-presentations/domain_guidance/finance.md +66 -0
  127. package/assets/skills/office-presentations/recipes/README.md +71 -0
  128. package/assets/skills/office-presentations/recipes/autolayout.md +88 -0
  129. package/assets/skills/office-presentations/recipes/connectors.md +83 -0
  130. package/assets/skills/office-presentations/recipes/images.md +80 -0
  131. package/assets/skills/office-presentations/recipes/master-and-layouts.md +127 -0
  132. package/assets/skills/office-presentations/recipes/native-charts.md +87 -0
  133. package/assets/skills/office-presentations/recipes/rich-text-runs.md +86 -0
  134. package/assets/skills/office-presentations/recipes/speaker-notes.md +65 -0
  135. package/assets/skills/office-presentations/recipes/tables.md +88 -0
  136. package/assets/skills/office-presentations/recipes/textbox-at-coordinate.md +71 -0
  137. package/assets/skills/office-presentations/recipes/theme-tokens.md +87 -0
  138. package/assets/skills/office-presentations/references/authoring-workflow.md +65 -0
  139. package/assets/skills/office-presentations/references/finalization.md +63 -0
  140. package/assets/skills/office-presentations/references/native-bullets.md +78 -0
  141. package/assets/skills/office-presentations/references/native-evidence.md +67 -0
  142. package/assets/skills/office-presentations/references/style-guidelines.md +66 -0
  143. package/assets/skills/office-presentations/references/templates.md +76 -0
  144. package/assets/skills/office-presentations/routing/google_slides.md +45 -0
  145. package/assets/skills/office-presentations/tasks/apply-annotations.md +83 -0
  146. package/assets/skills/office-presentations/tasks/charts-tables-notes.md +79 -0
  147. package/assets/skills/office-presentations/tasks/create-deck.md +106 -0
  148. package/assets/skills/office-presentations/tasks/edit-deck.md +93 -0
  149. package/assets/skills/office-presentations/tasks/inspect-and-verify.md +107 -0
  150. package/assets/skills/office-presentations/tasks/template-following.md +132 -0
  151. package/assets/skills/office-presentations/template_following_scripts/check_template_fidelity.py +183 -0
  152. package/assets/skills/office-presentations/template_following_scripts/inspect_template_deck.py +161 -0
  153. package/assets/skills/office-presentations/template_following_scripts/make_contact_sheet.py +118 -0
  154. package/assets/skills/office-presentations/template_following_scripts/prepare_template_starter_deck.py +246 -0
  155. package/assets/skills/office-presentations/template_following_scripts/validate_template_plan.py +192 -0
  156. package/assets/skills/office-spreadsheets/SKILL.md +105 -101
  157. package/assets/skills/office-spreadsheets/container_tools/add_chart.py +243 -0
  158. package/assets/skills/office-spreadsheets/container_tools/add_image.py +114 -0
  159. package/assets/skills/office-spreadsheets/container_tools/append_rows.py +129 -0
  160. package/assets/skills/office-spreadsheets/container_tools/diff_workbooks.py +313 -0
  161. package/assets/skills/office-spreadsheets/container_tools/inspect_workbook.py +405 -0
  162. package/assets/skills/office-spreadsheets/container_tools/recalc_gate.py +287 -0
  163. package/assets/skills/office-spreadsheets/container_tools/set_cells.py +142 -0
  164. package/assets/skills/office-spreadsheets/container_tools/sheet_ops.py +141 -0
  165. package/assets/skills/office-spreadsheets/container_tools/style_cells.py +140 -0
  166. package/assets/skills/office-spreadsheets/recipes/charts.md +66 -0
  167. package/assets/skills/office-spreadsheets/recipes/conditional-formats.md +69 -0
  168. package/assets/skills/office-spreadsheets/recipes/data-tables.md +58 -0
  169. package/assets/skills/office-spreadsheets/recipes/named-ranges.md +41 -0
  170. package/assets/skills/office-spreadsheets/recipes/number-formats.md +72 -0
  171. package/assets/skills/office-spreadsheets/recipes/sparklines.md +43 -0
  172. package/assets/skills/office-spreadsheets/references/charts.md +63 -0
  173. package/assets/skills/office-spreadsheets/references/domain/financial-models.md +40 -0
  174. package/assets/skills/office-spreadsheets/references/domain/healthcare.md +22 -0
  175. package/assets/skills/office-spreadsheets/references/domain/marketing.md +28 -0
  176. package/assets/skills/office-spreadsheets/references/domain/research.md +22 -0
  177. package/assets/skills/office-spreadsheets/references/formula-patterns.md +78 -0
  178. package/assets/skills/office-spreadsheets/references/style-guidelines.md +69 -0
  179. package/assets/skills/office-spreadsheets/references/workbook-structure.md +60 -0
  180. package/assets/skills/office-spreadsheets/routing/google-sheets.md +36 -0
  181. package/assets/skills/office-spreadsheets/tasks/analyze-workbook.md +37 -0
  182. package/assets/skills/office-spreadsheets/tasks/annotations.md +51 -0
  183. package/assets/skills/office-spreadsheets/tasks/create-workbook.md +66 -0
  184. package/assets/skills/office-spreadsheets/tasks/diff-workbooks.md +38 -0
  185. package/assets/skills/office-spreadsheets/tasks/edit-workbook.md +69 -0
  186. package/assets/skills/office-spreadsheets/tasks/inspect-workbook.md +38 -0
  187. package/assets/skills/office-spreadsheets/tasks/recalc-and-check.md +57 -0
  188. package/assets/skills/shared/annotation-recipes.md +252 -0
  189. package/assets/skills/shared/check_runtime.py +260 -0
  190. package/assets/skills/shared/common-workflow.md +139 -0
  191. package/assets/skills/shared/scripts/ensure_raster_image.py +187 -0
  192. package/dist/client.js +4 -4
  193. package/dist/client.js.map +1 -1
  194. package/dist/index.js +246 -89
  195. package/package.json +1 -1
  196. package/postinstall.mjs +92 -82
  197. package/python/office_cli.py +213 -254
package/dist/client.js CHANGED
@@ -1,9 +1,9 @@
1
1
  window.__ModuleLoader__.load({id:"dsh-office-kit",factory:(require)=>{var module={exports:{}};var exports=module.exports;
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@deepseek-ai/dsh-client-ui-primitives"),t=require("react"),n=require("react/jsx-runtime");const r=[{id:`documents`,label:`Documents`,description:`Create, edit, render, and verify Word documents (.docx).`,hint:`DOCX`,skill:`office-documents`,command:`documents`,extensions:[`.docx`]},{id:`pdf`,label:`PDF`,description:`Create, read, edit, render, and verify PDF files.`,hint:`PDF`,skill:`office-pdf`,command:`pdf`,extensions:[`.pdf`]},{id:`presentations`,label:`Presentations`,description:`Create, edit, render, and verify slide decks (.pptx).`,hint:`PPTX`,skill:`office-presentations`,command:`presentations`,extensions:[`.pptx`]},{id:`spreadsheets`,label:`Spreadsheets`,description:`Create, edit, recalculate, render, and verify workbooks (.xlsx).`,hint:`XLSX`,skill:`office-spreadsheets`,command:`spreadsheets`,extensions:[`.xlsx`]}];function i(e){return r.find(t=>t.id===e)}function a(e){return r.find(t=>t.command===e)}const o=`dsh-office-kit`,s=`office`,c=`office`,l=`conversation.user.text.node`,u=`sidebar.right.tab.document.actions`,d=`officeAnnotation`,f=`<office-annotations>`,p=`</office-annotations>`,m=`canvas[role="img"][aria-label]`,h=2e4;function g(e,t){return e.replace(/\{(\w+)\}/gu,(e,n)=>t[n]??e)}function _(e){let t=[];for(let n of e.replace(/\r\n?/gu,`
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@deepseek-ai/dsh-client-ui-primitives"),t=require("react"),n=require("react/jsx-runtime");const r=[{id:`documents`,label:`Documents`,description:`Create, edit, render, and verify Word documents (.docx).`,hint:`DOCX`,skill:`office-documents`,command:`documents`,extensions:[`.docx`]},{id:`pdf`,label:`PDF`,description:`Create, read, edit, render, and verify PDF files.`,hint:`PDF`,skill:`office-pdf`,command:`pdf`,extensions:[`.pdf`]},{id:`presentations`,label:`Presentations`,description:`Create, edit, render, and verify slide decks (.pptx).`,hint:`PPTX`,skill:`office-presentations`,command:`presentations`,extensions:[`.pptx`]},{id:`spreadsheets`,label:`Spreadsheets`,description:`Create, edit, recalculate, render, and verify workbooks (.xlsx).`,hint:`XLSX`,skill:`office-spreadsheets`,command:`spreadsheets`,extensions:[`.xlsx`]}];function i(e){return r.find(t=>t.id===e)}function a(e){return r.find(t=>t.command===e)}const o=`dsh-office-kit`,s=`office`,c=`office`,l=`conversation.user.text.node`,u=`sidebar.right.tab.document.actions`,d=`officeAnnotation`,f=`<office-annotations>`,p=`</office-annotations>`,m=`canvas[role="img"][aria-label]`,h=`canvas.fortune-sheet-canvas`,g=2e4;function _(e,t){return e.replace(/\{(\w+)\}/gu,(e,n)=>t[n]??e)}function v(e){let t=[];for(let n of e.replace(/\r\n?/gu,`
3
3
  `).split(`
4
4
  `)){let e=n.replace(/\s+/gu,` `).trim();e.length>0&&t.push(e)}return t.join(`
5
- `)}function v(e,t){let n=Math.min(e.left,t.left),r=Math.min(e.top,t.top);return{left:n,top:r,width:Math.max(e.left+e.width,t.left+t.width)-n,height:Math.max(e.top+e.height,t.top+t.height)-r}}function y(e,t){let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.left+e.width,t.left+t.width)-n,a=Math.min(e.top+e.height,t.top+t.height)-r;return i>0&&a>0?{left:n,top:r,width:i,height:a}:void 0}function b(e,t){return y({left:e.left-3,top:e.top-3,width:e.width+6,height:e.height+6},t)}function x(e,t,n){return t>=e.left&&t<=e.left+e.width&&n>=e.top&&n<=e.top+e.height}function S(e,t,n){return{left:Math.max(8,Math.min(e.left,n.width-t.width-8)),top:Math.max(8,Math.min(e.top>=t.height+8?e.top-t.height:e.top+e.height,n.height-t.height-8))}}function ee(e,t,n){let r;for(let i of e){let e=i.box;(i.rects??[e]).some(e=>t>=e.left-8&&t<=e.left+e.width+8&&n>=e.top-4&&n<=e.top+e.height+4)&&(!r||e.width*e.height<r.box.width*r.box.height)&&(r=i)}return r}function C(e){let t=[];for(let n of[...e].sort((e,t)=>e.box.top-t.box.top||e.box.left-t.box.left)){if(!n.text.trim()||n.box.width<=0||n.box.height<=0)continue;let e=t.find(e=>Math.abs(e.box.top-n.box.top)<Math.min(e.box.height,n.box.height)*.45&&n.box.left>=e.box.left&&n.box.left-(e.box.left+e.box.width)<n.box.height*2);e?(e.text+=` ${n.text}`,e.box=v(e.box,n.box),e.rects.push(n.box)):t.push({text:n.text,box:n.box,rects:[n.box]})}let n=[];for(let e of t){let t=n.findLast(t=>{let n=e.box.top-(t.last.top+t.last.height),r=Math.min(t.last.left+t.last.width,e.box.left+e.box.width)-Math.max(t.last.left,e.box.left);return n>=-e.box.height*.2&&n<=Math.min(t.last.height,e.box.height)*.7&&r>0&&Math.abs(t.last.left-e.box.left)<e.box.height*2&&Math.max(t.last.height,e.box.height)/Math.min(t.last.height,e.box.height)<1.4});t?(t.text+=`\n${e.text}`,t.box=v(t.box,e.box),t.rects.push(...e.rects),t.last=e.box):n.push({...e,last:e.box})}return n.map(({text:e,box:t,rects:n})=>({text:_(e),box:t,rects:n}))}function w(e){let t=e.parentElement;if(!t)return[];let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),r=[];for(let e=n.nextNode();e;e=n.nextNode()){if(!e.textContent?.trim())continue;let t=document.createRange();t.selectNodeContents(e);let n=t.getBoundingClientRect();n.width>0&&n.height>0&&r.push({text:e.textContent,box:{left:n.left,top:n.top,width:n.width,height:n.height}})}return C(r)}function te(e){let t=e.parentElement;for(;t&&getComputedStyle(t).display===`contents`;)t=t.parentElement;return t?.parentElement?{header:t,root:t.parentElement}:void 0}function ne(e,t,n){let r=[...e.querySelectorAll(m)],i=r.findIndex(e=>x(e.getBoundingClientRect(),t,n)&&e.getBoundingClientRect().width>0);return i<0?void 0:{canvas:r[i],page:i+1}}function re(e,t){if(t.width<=0||t.height<=0)throw Error(`annotation.emptyPage`);let n=y(e,t);if(!n)throw Error(`annotation.emptyRegion`);return{left:(n.left-t.left)/t.width,top:(n.top-t.top)/t.height,width:n.width/t.width,height:n.height/t.height}}async function ie(e,t,n=4e6,r=1/0){let i=e.canvas;if(!i||i.width<=0||i.height<=0)throw Error(`annotation.captureFailed`);let a=i.getBoundingClientRect(),o=e.region??re(e.box,a),s=i.width*o.width,c=i.height*o.height,l=Math.min(1,Math.sqrt(n/(s*c)),r/s,r/c);if(!Number.isFinite(l)||l<=0)throw Error(`annotation.captureFailed`);let u=document.createElement(`canvas`);u.width=Math.max(1,Math.floor(s*l)),u.height=Math.max(1,Math.floor(c*l));let d=u.getContext(`2d`);if(!d)throw Error(`annotation.captureFailed`);d.drawImage(i,o.left*i.width,o.top*i.height,s,c,0,0,u.width,u.height);let f=await new Promise((e,t)=>u.toBlob(n=>n?e(n):t(Error(`annotation.captureFailed`)),`image/png`));return new File([f],t,{type:`image/png`})}function T(e){if(typeof e!=`object`||!e)return!1;let t=e,n=(e,t)=>typeof e==`string`&&e.length<=t;if(!n(t.target,2e4)||!n(t.fileName,1e3)||!n(t.text,2e4)||!n(t.requirement,2e4)||!t.requirement.trim()||t.page!==void 0&&(!Number.isSafeInteger(t.page)||t.page<1)||t.imageName!==void 0&&!n(t.imageName,1e3))return!1;if(t.region!==void 0){let e=t.region;if(!e||![`left`,`top`,`width`,`height`].every(t=>typeof e[t]==`number`&&Number.isFinite(e[t])&&e[t]>=0&&e[t]<=1)||e.width<=0||e.height<=0||e.left+e.width>1.000001||e.top+e.height>1.000001)return!1}return!0}function E(e){if(!e.length||e.length>50||!e.every(T))throw Error(`annotation.invalid`);let t=JSON.stringify(e).replace(/</gu,`\\u003c`);if(t.length>12e5)throw Error(`annotation.tooLarge`);return`${f}\n${t}\n${p}`}const D={id:d,order:10,match(e,t){for(let n=e.indexOf(f,t);n>=0;n=e.indexOf(f,n+20)){let t=e.indexOf(p,n+20);if(t<0)return;let r=e.slice(n+20,t).trim();if(!(r.length>12e5))try{let e=JSON.parse(r);if(Array.isArray(e)&&e.length>0&&e.length<=50&&e.every(T))return{id:d,start:n,end:t+21,data:{items:e}}}catch{}}}};function ae({items:e,inputActions:t,intake:n,limits:r,existingImages:i,deferSubmit:a}){let o=E(e.map(e=>e.annotation)),s=e.flatMap(e=>e.file?[e.file]:[]);if(s.length&&!n)throw Error(`annotation.intakeUnavailable`);if(s.length&&r&&(s.some(e=>!r.mediaTypes.includes(e.type)||e.size>r.maxImageBytes)||i.length+s.length>r.maxImagesPerMessage||[...i,...s].reduce((e,t)=>e+t.size,0)>r.maxMessageImageBytes))throw Error(`annotation.imageLimit`);let c=t.captureInsertion(),l=s.length?n.create(s):[];if(l.length&&!t.addAttachments(l.map(e=>e.id)))throw n.release(l),Error(`annotation.sendFailed`);if(!t.insertText(`\n${o}\n`,{...c,start:c.end})){for(let e of l)t.removeAttachment(e.id);throw n?.release(l),Error(`annotation.sendFailed`)}try{return t.persistDraft(),a?`draft`:(t.submit(),`sent`)}catch{return`draft`}}function O({node:e,interactive:r,openAnnotation:i,t:a}){let o=(0,t.useId)(),s=(0,t.useRef)(null),c=(0,t.useRef)(null),[l,u]=(0,t.useState)(!1),d=g(a(`annotation.count`),{count:String(e.data.items.length)});return(0,t.useLayoutEffect)(()=>{let e=c.current,t=s.current;if(!e||!t)return;if(!l){e.hidePopover?.();return}e.showPopover?.();let n=()=>{let n={width:document.documentElement.clientWidth,height:window.innerHeight},{left:r,top:i}=S(t.getBoundingClientRect(),e.getBoundingClientRect(),n);e.style.left=`${r}px`,e.style.top=`${i}px`},r=t=>{t.target instanceof Node&&e.contains(t.target)||u(!1)},i=new ResizeObserver(n);return i.observe(t),i.observe(e),window.addEventListener(`resize`,n),document.addEventListener(`scroll`,r,!0),n(),()=>{e.hidePopover?.(),i.disconnect(),window.removeEventListener(`resize`,n),document.removeEventListener(`scroll`,r,!0)}},[l]),(0,n.jsxs)(`span`,{ref:s,className:`dsh-office-annotation-reference`,onPointerEnter:()=>u(!0),onPointerLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&u(!1)},onFocus:()=>u(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||u(!1)},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c.current?.contains(e.target)&&s.current?.querySelector(`button`)?.focus(),u(!1))},children:[(0,n.jsx)(`button`,{type:`button`,id:`${o}-trigger`,"aria-haspopup":`dialog`,"aria-controls":o,"aria-expanded":l,children:d}),(0,n.jsx)(`span`,{ref:c,popover:`manual`,className:`dsh-office-annotation-popover`,"data-open":l,id:o,role:`dialog`,"aria-labelledby":`${o}-trigger`,children:(0,n.jsx)(`span`,{className:`dsh-office-annotation-list`,children:e.data.items.map((e,t)=>(0,n.jsxs)(`span`,{className:`dsh-office-annotation-item`,children:[(0,n.jsx)(`span`,{className:`dsh-office-annotation-source`,children:r?(0,n.jsx)(`button`,{type:`button`,onClick:()=>i(e.target),title:e.target,children:e.fileName}):(0,n.jsx)(`span`,{children:e.fileName})}),(0,n.jsx)(`span`,{className:`dsh-office-annotation-requirement`,children:e.requirement})]},t))})})]})}function k(e){return/\.(?:pdf|docx?)$/iu.test(e.absolutePath)?(0,n.jsx)(A,{...e},e.absolutePath):null}function A({absolutePath:e,pendingAnnotations:r,intake:i,inputActions:a,useInput:o,useProjection:s,t:c}){let l=(0,t.useRef)(null),u=(0,t.useRef)(null),d=(0,t.useRef)(null),f=(0,t.useRef)(),[p,_]=(0,t.useState)(),[v,x]=(0,t.useState)(!1),[S,C]=(0,t.useState)(),[T,E]=(0,t.useState)(),[D,O]=(0,t.useState)(``),[k,A]=(0,t.useState)(),[j,M]=(0,t.useState)(!1),[N,P]=(0,t.useState)(!1),[F,I]=(0,t.useState)(()=>r.get(e)??[]),[oe,L]=(0,t.useState)(!1),R=(0,t.useId)(),[z,B]=(0,t.useState)(``),V=o(e=>e),H=s(`imageLimits`),U=/\.pdf$/iu.test(e),W=e.replace(/\\/gu,`/`).split(`/`).pop()??e,G=(0,t.useRef)(0),K=(0,t.useRef)(),q=(0,t.useRef)(),J=(0,t.useRef)(),se=V.phase!==`plain`;(0,t.useEffect)(()=>{F.length?r.set(e,F):r.delete(e)},[e,F,r]);function Y(){G.current++,E(void 0),A(void 0),M(!1),O(``)}function X(){clearTimeout(K.current),q.current=void 0,P(!1),C(void 0)}(0,t.useEffect)(()=>{let e=l.current,t=e&&te(e);if(!t)return;let{header:n,root:r}=t;f.current=r;let i=0,a=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(()=>{J.current=void 0;let e=r.getBoundingClientRect(),t=Math.max(e.top,n.getBoundingClientRect().bottom,0),i=Math.min(e.bottom,window.innerHeight),a=Math.max(0,e.left),o=Math.min(e.right,window.innerWidth),s=[...r.querySelectorAll(m)].find(e=>e.getBoundingClientRect().width>0),c=r.isConnected&&!r.closest(`[hidden], [aria-hidden="true"]`)&&getComputedStyle(r).visibility===`visible`;_(c&&e.height>40&&s&&o>a&&i>t?{left:a,top:t,width:o-a,height:i-t}:void 0),E(e=>{if(!e?.canvas||!e.region)return e;let t=e.canvas.getBoundingClientRect(),n=e.region,r={left:t.left+n.left*t.width,top:t.top+n.top*t.height,width:n.width*t.width,height:n.height*t.height};return Object.keys(r).every(t=>r[t]===e.box[t])?e:{...e,box:r}})})},o=new ResizeObserver(a);o.observe(r);let s=new MutationObserver(t=>{t.some(t=>!e.contains(t.target))&&a()});s.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`hidden`,`aria-hidden`,`class`,`style`]});for(let e=r.parentElement;e;e=e.parentElement)s.observe(e,{attributes:!0});return window.addEventListener(`resize`,a),r.addEventListener(`transitionend`,a),r.addEventListener(`scroll`,a,!0),a(),()=>{G.current++,clearTimeout(K.current),cancelAnimationFrame(i),o.disconnect(),s.disconnect(),window.removeEventListener(`resize`,a),r.removeEventListener(`transitionend`,a),r.removeEventListener(`scroll`,a,!0),f.current=void 0}},[]),(0,t.useEffect)(()=>{if(!T)return;let e=e=>{e.target instanceof Node&&!u.current?.contains(e.target)&&Y()};return document.addEventListener(`pointerdown`,e,!0),u.current?.querySelector(`input`)?.focus(),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[T]),(0,t.useEffect)(()=>{v&&d.current?.focus()},[v]);function ce(e,t){let n=f.current;if(!n)return;let r=n.querySelector(m)?.parentElement;for(;r&&r!==n&&!/auto|scroll/u.test(getComputedStyle(r).overflowY);)r=r.parentElement;r?.scrollBy({left:e,top:t}),C(void 0)}(0,t.useEffect)(()=>{let e=d.current;if(!v||!e||!p)return;let t=e=>{e.preventDefault();let t=e.deltaMode===1?16:e.deltaMode===2?p.height:1;ce(e.deltaX*t,e.deltaY*t)};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[v,p]);function le(e,t){if(!f.current)return;let n=ne(f.current,e,t);if(!n)return;let r=n.canvas.getBoundingClientRect();(J.current?.canvas!==n.canvas||J.current.box.left!==r.left||J.current.box.top!==r.top||J.current.box.width!==r.width||J.current.box.height!==r.height)&&(J.current={canvas:n.canvas,box:r,paragraphs:w(n.canvas)});let i=ee(J.current.paragraphs,e,t);return i?{...i,...n}:void 0}function Z(e,t){let n=q.current;if(!n)return;let r=y({left:Math.min(n.x,e),top:Math.min(n.y,t),width:Math.abs(e-n.x),height:Math.abs(t-n.y)},n.canvas.getBoundingClientRect());if(!r)return;let i=J.current?.canvas===n.canvas?J.current.paragraphs:w(n.canvas);return{canvas:n.canvas,page:n.page,box:r,region:re(r,n.canvas.getBoundingClientRect()),text:i.filter(e=>(e.rects??[e.box]).some(e=>y(e,r))).map(e=>e.text).join(`
6
- `).slice(0,h)}}function ue(e){if(e.button!==0||!f.current||U&&!i)return;let t=ne(f.current,e.clientX,e.clientY);if(!t)return;e.preventDefault(),Y();let n={...t,x:e.clientX,y:e.clientY,lastX:e.clientX,lastY:e.clientY,region:!1};q.current=n,e.currentTarget.setPointerCapture(e.pointerId),K.current=setTimeout(()=>{q.current===n&&(n.region=!0,P(!0),C(Z(n.lastX,n.lastY)))},350)}function de(e){let t=q.current;t&&(t.lastX=e.clientX,t.lastY=e.clientY,!t.region&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>=6&&(clearTimeout(K.current),t.region=!0,P(!0))),C(t?.region?Z(e.clientX,e.clientY):le(e.clientX,e.clientY))}async function fe(e){Y();let t=G.current;B(``);let n=e.canvas?.getBoundingClientRect(),r=n?b(e.box,n):e.box;if(!r)return;let i=n?re(r,n):e.region,a={...e,box:r,region:i};if(E(a),U){M(!0);try{let n=await ie(a,`${W}-p${e.page}-${Date.now()}.png`,H?.maxImagePixels,H?.maxImageDimension);G.current===t&&A(n)}catch{G.current===t&&B(c(`annotation.captureFailed`))}finally{G.current===t&&M(!1)}}}function pe(e){let t=q.current;if(clearTimeout(K.current),!t)return;let n=t.region?Z(e.clientX,e.clientY):le(e.clientX,e.clientY),r=Math.hypot(e.clientX-t.x,e.clientY-t.y);X(),n&&(t.region?n.box.width>=6&&n.box.height>=6:r<6)&&fe(n)}function me(){if(!T||!D.trim()||U&&!k||F.length>=50)return;let t={target:e,fileName:W,page:T.page,text:T.text.slice(0,h),requirement:D.trim(),region:T.region,imageName:k?.name};I(e=>[...e,{annotation:t,file:k}]),Y()}function he(){if(!se)try{let e=ae({items:F,inputActions:a,intake:i,limits:H,existingImages:i?.images(V.attachmentIds)??[],deferSubmit:!!V.draft.trim()||V.attachmentIds.length>0});I([]),L(!1),x(!1),Y(),B(e===`draft`?c(`annotation.draftReady`):``)}catch(e){let t=e instanceof Error?e.message:`annotation.sendFailed`;B(c(t.startsWith(`annotation.`)?t:`annotation.sendFailed`))}}let Q=T??S,ge=Q&&!T&&!N&&Q.canvas?b(Q.box,Q.canvas.getBoundingClientRect()):Q?.box,$=ge&&p?y(ge,p):void 0,_e=p?Math.min(360,p.width-16):0,ve=p&&T?Math.max(p.left+8,Math.min(T.box.left,p.left+p.width-_e-8)):0,ye=p&&T?Math.max(p.top+4,Math.min(T.box.top+T.box.height+6,p.top+p.height-56)):0;return(0,n.jsxs)(`span`,{ref:l,className:`dsh-office-annotate`,onKeyDown:e=>{if(!v||e.key!==`Escape`)return;e.preventDefault(),e.stopPropagation();let t=!!T||!!q.current;Y(),X(),t?d.current?.focus():(x(!1),l.current?.querySelector(`button`)?.focus())},children:[(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-annotate-toggle`,"aria-pressed":v,disabled:!p||U&&!i,title:c(U&&!i?`annotation.intakeUnavailable`:p?`annotation.help`:`annotation.unavailable`),onClick:()=>{x(e=>!e),Y(),X()},children:c(`annotation.ask`)}),U&&!i&&(0,n.jsx)(`span`,{role:`status`,className:`dsh-office-annotate-unavailable`,children:c(`annotation.intakeUnavailable`)}),v&&p&&(0,n.jsx)(`div`,{ref:d,className:`dsh-office-annotate-surface`,tabIndex:0,style:{left:p.left,top:p.top,width:p.width,height:p.height},role:`region`,"aria-label":c(`annotation.help`),onPointerDown:ue,onPointerMove:de,onPointerUp:pe,onPointerCancel:X,onLostPointerCapture:X,onKeyDown:e=>{if(e.key===`PageDown`||e.key===`PageUp`)e.preventDefault(),ce(0,p.height*(e.key===`PageDown`?.8:-.8));else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=[...f.current.querySelectorAll(`canvas[role="img"][aria-label]`)].flatMap((e,t)=>w(e).filter(e=>y(e.box,p)).map(n=>({...n,canvas:e,page:t+1}))),n=t.findIndex(e=>e.canvas===S?.canvas&&e.text===S.text&&e.box.top===S.box.top),r=n<0?e.key===`ArrowDown`?0:t.length-1:Math.max(0,Math.min(t.length-1,n+(e.key===`ArrowDown`?1:-1)));C(t[r])}else(e.key===`Enter`||e.key===` `)&&S&&(e.preventDefault(),fe(S))},onPointerLeave:()=>{q.current||C(void 0)}}),v&&$&&(0,n.jsx)(`span`,{className:`dsh-office-annotate-highlight`,"data-selected":T||N?`true`:void 0,style:{left:$.left,top:$.top,width:$.width,height:$.height}}),v&&T&&p&&(0,n.jsxs)(`form`,{ref:u,className:`dsh-office-annotate-composer`,style:{left:ve,top:ye,width:_e},"aria-label":c(`annotation.ask`),"aria-busy":j,onSubmit:e=>{e.preventDefault(),me()},children:[(0,n.jsx)(`input`,{type:`text`,"aria-label":c(`annotation.placeholder`),placeholder:c(`annotation.placeholder`),value:D,maxLength:2e4,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Enter`&&e.nativeEvent.isComposing&&e.preventDefault()}}),(0,n.jsx)(`button`,{type:`submit`,"aria-label":c(j?`annotation.capturing`:`annotation.add`),title:c(j?`annotation.capturing`:`annotation.add`),disabled:!D.trim()||j||U&&!k||F.length>=50,children:(0,n.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`m5 12 4 4L19 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(v||F.length>0||z)&&p&&(0,n.jsx)(`div`,{className:`dsh-office-annotate-rail-position`,style:{left:p.left,width:p.width,bottom:Math.max(0,window.innerHeight-p.top-p.height)+12,"--dsh-office-annotation-width":`${p.width}px`,"--dsh-office-annotation-height":`${p.height}px`},children:(0,n.jsxs)(`div`,{className:`dsh-office-annotate-rail`,children:[z&&(0,n.jsx)(`p`,{role:`alert`,children:z}),(0,n.jsxs)(`div`,{className:`dsh-office-annotate-rail-actions`,children:[(0,n.jsxs)(`div`,{className:`dsh-office-annotate-summary`,"data-dismissed":oe?`true`:void 0,onPointerEnter:()=>L(!1),onFocus:()=>L(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),e.currentTarget.querySelector(`button`)?.focus(),L(!0))},children:[(0,n.jsx)(`button`,{type:`button`,"aria-haspopup":`dialog`,"aria-controls":R,disabled:!F.length,children:g(c(`annotation.count`),{count:String(F.length)})}),F.length>0&&(0,n.jsx)(`div`,{id:R,role:`dialog`,"aria-label":g(c(`annotation.count`),{count:String(F.length)}),className:`dsh-office-annotate-popover`,children:(0,n.jsx)(`ul`,{children:F.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`span`,{className:`dsh-office-annotation-source`,children:[(0,n.jsx)(`span`,{title:e.annotation.target,children:e.annotation.fileName}),e.annotation.page&&(0,n.jsx)(`span`,{children:g(c(`annotation.page`),{page:String(e.annotation.page)})})]}),e.annotation.text&&(0,n.jsx)(`span`,{className:`dsh-office-annotation-original`,children:e.annotation.text}),(0,n.jsx)(`span`,{className:`dsh-office-annotation-requirement`,title:e.annotation.requirement,children:e.annotation.requirement})]})},e.annotation.imageName??t))})})]}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>{I([]),x(!1),L(!1),B(``),Y(),X()},children:c(`annotation.cancel`)}),(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-annotate-primary`,disabled:!F.length||se,onClick:he,children:c(`annotation.send`)})]})]})})]})}function j(e){let{size:t=16,...n}=e;return{width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,...n}}function M(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 13.5h6a1.5 1.5 0 0 0 1.5-1.5V7.243a1.5 1.5 0 0 0-.44-1.061L8.819 2.939a1.5 1.5 0 0 0-1.06-.439H5A1.5 1.5 0 0 0 3.5 4v8A1.5 1.5 0 0 0 5 13.5m9-6.257a3 3 0 0 0-.879-2.122L9.88 1.88A3 3 0 0 0 7.757 1H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3zM5 8.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 5 8.25m.75 2.25a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5z`})})}function N(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M11 13.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06V12a1.5 1.5 0 0 1-1.5 1.5m2.121-8.379A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM6.5 6.5a.75.75 0 0 0-.75.75v4a.75.75 0 0 0 1.5 0v-.75H8.5a2 2 0 1 0 0-4zm2 2.5H7.25V8H8.5a.5.5 0 0 1 0 1`})})}function P(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3H4a1.5 1.5 0 0 0-1.5 1.5v4A1.5 1.5 0 0 0 4 10h8a1.5 1.5 0 0 0 1.5-1.5v-4A1.5 1.5 0 0 0 12 3M4 1.5a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h3.25V13h-2.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-2.5v-1.5H12a3 3 0 0 0 3-3v-4a3 3 0 0 0-3-3z`})})}function F(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.25 3.5h-2.5v2h2.5zM4 3.5h1.25v2H2.5V5A1.5 1.5 0 0 1 4 3.5M2.5 7h2.75v2H2.5zm0 3.5v.5A1.5 1.5 0 0 0 4 12.5h1.25v-2zm4.25 0v2h2.5v-2zm4 0v2H12a1.5 1.5 0 0 0 1.5-1.5v-.5zM13.5 9h-2.75V7h2.75zM9.25 9h-2.5V7h2.5zm1.5-5.5v2h2.75V5A1.5 1.5 0 0 0 12 3.5zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z`})})}const I={documents:M,pdf:N,presentations:P,spreadsheets:F};function oe({node:e,raw:t,interactive:r,openOffice:a,officeLabel:o}){let s=i(e.data.feature);if(s==null)return(0,n.jsx)(`span`,{children:t});let c=I[s.id],l=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c,{className:`dsh-office-ref-icon`,size:14}),(0,n.jsx)(`span`,{children:o(s.id)})]});return r?(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-ref`,title:t,"data-interactive":!0,onClick:()=>a(s.id),children:l}):(0,n.jsx)(`span`,{className:`dsh-office-ref`,title:t,children:l})}function L(){if(typeof document>`u`)return()=>{};let e=document.querySelector(`style[data-plugin-css="dsh-office-kit/reference.css"]`)??document.createElement(`style`);return e.dataset.plugin=o,e.dataset.pluginCss=`dsh-office-kit/reference.css`,e.textContent=`
5
+ `)}function y(e,t){let n=Math.min(e.left,t.left),r=Math.min(e.top,t.top);return{left:n,top:r,width:Math.max(e.left+e.width,t.left+t.width)-n,height:Math.max(e.top+e.height,t.top+t.height)-r}}function b(e,t){let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.left+e.width,t.left+t.width)-n,a=Math.min(e.top+e.height,t.top+t.height)-r;return i>0&&a>0?{left:n,top:r,width:i,height:a}:void 0}function ee(e,t){return b({left:e.left-3,top:e.top-3,width:e.width+6,height:e.height+6},t)}function x(e,t,n){return t>=e.left&&t<=e.left+e.width&&n>=e.top&&n<=e.top+e.height}function S(e,t,n){return{left:Math.max(8,Math.min(e.left,n.width-t.width-8)),top:Math.max(8,Math.min(e.top>=t.height+8?e.top-t.height:e.top+e.height,n.height-t.height-8))}}function te(e,t,n){let r;for(let i of e){let e=i.box;(i.rects??[e]).some(e=>t>=e.left-8&&t<=e.left+e.width+8&&n>=e.top-4&&n<=e.top+e.height+4)&&(!r||e.width*e.height<r.box.width*r.box.height)&&(r=i)}return r}function C(e){let t=[];for(let n of[...e].sort((e,t)=>e.box.top-t.box.top||e.box.left-t.box.left)){if(!n.text.trim()||n.box.width<=0||n.box.height<=0)continue;let e=t.find(e=>Math.abs(e.box.top-n.box.top)<Math.min(e.box.height,n.box.height)*.45&&n.box.left>=e.box.left&&n.box.left-(e.box.left+e.box.width)<n.box.height*2);e?(e.text+=` ${n.text}`,e.box=y(e.box,n.box),e.rects.push(n.box)):t.push({text:n.text,box:n.box,rects:[n.box]})}let n=[];for(let e of t){let t=n.findLast(t=>{let n=e.box.top-(t.last.top+t.last.height),r=Math.min(t.last.left+t.last.width,e.box.left+e.box.width)-Math.max(t.last.left,e.box.left);return n>=-e.box.height*.2&&n<=Math.min(t.last.height,e.box.height)*.7&&r>0&&Math.abs(t.last.left-e.box.left)<e.box.height*2&&Math.max(t.last.height,e.box.height)/Math.min(t.last.height,e.box.height)<1.4});t?(t.text+=`\n${e.text}`,t.box=y(t.box,e.box),t.rects.push(...e.rects),t.last=e.box):n.push({...e,last:e.box})}return n.map(({text:e,box:t,rects:n})=>({text:v(e),box:t,rects:n}))}function ne(e){let t=e.parentElement;if(!t)return[];let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),r=[];for(let e=n.nextNode();e;e=n.nextNode()){if(!e.textContent?.trim())continue;let t=document.createRange();t.selectNodeContents(e);let n=t.getBoundingClientRect();n.width>0&&n.height>0&&r.push({text:e.textContent,box:{left:n.left,top:n.top,width:n.width,height:n.height}})}return C(r)}function re(e){let t=e.parentElement;for(;t&&getComputedStyle(t).display===`contents`;)t=t.parentElement;return t?.parentElement?{header:t,root:t.parentElement}:void 0}function ie(e,t,n){let r=[...e.querySelectorAll(m)],i=r.findIndex(e=>x(e.getBoundingClientRect(),t,n)&&e.getBoundingClientRect().width>0);return i<0?void 0:{canvas:r[i],page:i+1}}function ae(e,t,n){let r=[...e.querySelectorAll(h)].find(e=>x(e.getBoundingClientRect(),t,n)&&e.getBoundingClientRect().width>0);return r?{canvas:r}:void 0}function w(e,t){if(t.width<=0||t.height<=0)throw Error(`annotation.emptyPage`);let n=b(e,t);if(!n)throw Error(`annotation.emptyRegion`);return{left:(n.left-t.left)/t.width,top:(n.top-t.top)/t.height,width:n.width/t.width,height:n.height/t.height}}async function oe(e,t,n=4e6,r=1/0){let i=e.canvas;if(!i||i.width<=0||i.height<=0)throw Error(`annotation.captureFailed`);let a=i.getBoundingClientRect(),o=e.region??w(e.box,a),s=i.width*o.width,c=i.height*o.height,l=Math.min(1,Math.sqrt(n/(s*c)),r/s,r/c);if(!Number.isFinite(l)||l<=0)throw Error(`annotation.captureFailed`);let u=document.createElement(`canvas`);u.width=Math.max(1,Math.floor(s*l)),u.height=Math.max(1,Math.floor(c*l));let d=u.getContext(`2d`);if(!d)throw Error(`annotation.captureFailed`);d.drawImage(i,o.left*i.width,o.top*i.height,s,c,0,0,u.width,u.height);let f=await new Promise((e,t)=>u.toBlob(n=>n?e(n):t(Error(`annotation.captureFailed`)),`image/png`));return new File([f],t,{type:`image/png`})}function T(e){if(typeof e!=`object`||!e)return!1;let t=e,n=(e,t)=>typeof e==`string`&&e.length<=t;if(!n(t.target,2e4)||!n(t.fileName,1e3)||!n(t.text,2e4)||!n(t.requirement,2e4)||!t.requirement.trim()||t.page!==void 0&&(!Number.isSafeInteger(t.page)||t.page<1)||t.imageName!==void 0&&!n(t.imageName,1e3)||t.sheet!==void 0&&(!n(t.sheet,1e3)||!t.sheet.trim())||t.range!==void 0&&(!n(t.range,100)||!t.range.trim())||t.unmapped!==void 0&&t.unmapped!==!0)return!1;if(t.region!==void 0){let e=t.region;if(!e||![`left`,`top`,`width`,`height`].every(t=>typeof e[t]==`number`&&Number.isFinite(e[t])&&e[t]>=0&&e[t]<=1)||e.width<=0||e.height<=0||e.left+e.width>1.000001||e.top+e.height>1.000001)return!1}return!0}function E(e){if(!e.length||e.length>50||!e.every(T))throw Error(`annotation.invalid`);let t=JSON.stringify(e).replace(/</gu,`\\u003c`);if(t.length>12e5)throw Error(`annotation.tooLarge`);return`${f}\n${t}\n${p}`}const D={id:d,order:10,match(e,t){for(let n=e.indexOf(f,t);n>=0;n=e.indexOf(f,n+20)){let t=e.indexOf(p,n+20);if(t<0)return;let r=e.slice(n+20,t).trim();if(!(r.length>12e5))try{let e=JSON.parse(r);if(Array.isArray(e)&&e.length>0&&e.length<=50&&e.every(T))return{id:d,start:n,end:t+21,data:{items:e}}}catch{}}}};function se({items:e,inputActions:t,intake:n,limits:r,existingImages:i,deferSubmit:a}){let o=E(e.map(e=>e.annotation)),s=e.flatMap(e=>e.file?[e.file]:[]);if(s.length&&!n)throw Error(`annotation.intakeUnavailable`);if(s.length&&r&&(s.some(e=>!r.mediaTypes.includes(e.type)||e.size>r.maxImageBytes)||i.length+s.length>r.maxImagesPerMessage||[...i,...s].reduce((e,t)=>e+t.size,0)>r.maxMessageImageBytes))throw Error(`annotation.imageLimit`);let c=t.captureInsertion(),l=s.length?n.create(s):[];if(l.length&&!t.addAttachments(l.map(e=>e.id)))throw n.release(l),Error(`annotation.sendFailed`);if(!t.insertText(`\n${o}\n`,{...c,start:c.end})){for(let e of l)t.removeAttachment(e.id);throw n?.release(l),Error(`annotation.sendFailed`)}try{return t.persistDraft(),a?`draft`:(t.submit(),`sent`)}catch{return`draft`}}function O({node:e,interactive:r,openAnnotation:i,t:a}){let o=(0,t.useId)(),s=(0,t.useRef)(null),c=(0,t.useRef)(null),[l,u]=(0,t.useState)(!1),d=_(a(`annotation.count`),{count:String(e.data.items.length)});return(0,t.useLayoutEffect)(()=>{let e=c.current,t=s.current;if(!e||!t)return;if(!l){e.hidePopover?.();return}e.showPopover?.();let n=()=>{let n={width:document.documentElement.clientWidth,height:window.innerHeight},{left:r,top:i}=S(t.getBoundingClientRect(),e.getBoundingClientRect(),n);e.style.left=`${r}px`,e.style.top=`${i}px`},r=t=>{t.target instanceof Node&&e.contains(t.target)||u(!1)},i=new ResizeObserver(n);return i.observe(t),i.observe(e),window.addEventListener(`resize`,n),document.addEventListener(`scroll`,r,!0),n(),()=>{e.hidePopover?.(),i.disconnect(),window.removeEventListener(`resize`,n),document.removeEventListener(`scroll`,r,!0)}},[l]),(0,n.jsxs)(`span`,{ref:s,className:`dsh-office-annotation-reference`,onPointerEnter:()=>u(!0),onPointerLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&u(!1)},onFocus:()=>u(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||u(!1)},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c.current?.contains(e.target)&&s.current?.querySelector(`button`)?.focus(),u(!1))},children:[(0,n.jsx)(`button`,{type:`button`,id:`${o}-trigger`,"aria-haspopup":`dialog`,"aria-controls":o,"aria-expanded":l,children:d}),(0,n.jsx)(`span`,{ref:c,popover:`manual`,className:`dsh-office-annotation-popover`,"data-open":l,id:o,role:`dialog`,"aria-labelledby":`${o}-trigger`,children:(0,n.jsx)(`span`,{className:`dsh-office-annotation-list`,children:e.data.items.map((e,t)=>(0,n.jsxs)(`span`,{className:`dsh-office-annotation-item`,children:[(0,n.jsx)(`span`,{className:`dsh-office-annotation-source`,children:r?(0,n.jsx)(`button`,{type:`button`,onClick:()=>i(e.target),title:e.target,children:e.fileName}):(0,n.jsx)(`span`,{children:e.fileName})}),(0,n.jsx)(`span`,{className:`dsh-office-annotation-requirement`,children:e.requirement})]},t))})})]})}function k(e){return/\.(?:pdf|docx?|pptx|xlsx)$/iu.test(e.absolutePath)?(0,n.jsx)(A,{...e},e.absolutePath):null}function A({absolutePath:e,pendingAnnotations:r,intake:i,inputActions:a,useInput:o,useProjection:s,t:c}){let l=(0,t.useRef)(null),u=(0,t.useRef)(null),d=(0,t.useRef)(null),f=(0,t.useRef)(),[p,v]=(0,t.useState)(),[y,x]=(0,t.useState)(!1),[S,C]=(0,t.useState)(),[T,E]=(0,t.useState)(),[D,O]=(0,t.useState)(``),[k,A]=(0,t.useState)(),[j,M]=(0,t.useState)(!1),[N,P]=(0,t.useState)(!1),[F,I]=(0,t.useState)(()=>r.get(e)??[]),[ce,L]=(0,t.useState)(!1),R=(0,t.useId)(),[z,B]=(0,t.useState)(``),V=o(e=>e),H=s(`imageLimits`),U=/\.pdf$/iu.test(e),W=/\.xlsx$/iu.test(e),G=U||W,le=W?h:m,ue=e.replace(/\\/gu,`/`).split(`/`).pop()??e,K=(0,t.useRef)(0),q=(0,t.useRef)(),J=(0,t.useRef)(),Y=(0,t.useRef)(),de=V.phase!==`plain`;(0,t.useEffect)(()=>{F.length?r.set(e,F):r.delete(e)},[e,F,r]);function X(){K.current++,E(void 0),A(void 0),M(!1),O(``)}function Z(){clearTimeout(q.current),J.current=void 0,P(!1),C(void 0)}(0,t.useEffect)(()=>{let e=l.current,t=e&&re(e);if(!t)return;let{header:n,root:r}=t;f.current=r;let i=0,a=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(()=>{Y.current=void 0;let e=r.getBoundingClientRect(),t=Math.max(e.top,n.getBoundingClientRect().bottom,0),i=Math.min(e.bottom,window.innerHeight),a=Math.max(0,e.left),o=Math.min(e.right,window.innerWidth),s=[...r.querySelectorAll(le)].find(e=>e.getBoundingClientRect().width>0),c=r.isConnected&&!r.closest(`[hidden], [aria-hidden="true"]`)&&getComputedStyle(r).visibility===`visible`;v(c&&e.height>40&&s&&o>a&&i>t?{left:a,top:t,width:o-a,height:i-t}:void 0),E(e=>{if(!e?.canvas||!e.region)return e;let t=e.canvas.getBoundingClientRect(),n=e.region,r={left:t.left+n.left*t.width,top:t.top+n.top*t.height,width:n.width*t.width,height:n.height*t.height};return Object.keys(r).every(t=>r[t]===e.box[t])?e:{...e,box:r}})})},o=new ResizeObserver(a);o.observe(r);let s=new MutationObserver(t=>{t.some(t=>!e.contains(t.target))&&a()});s.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`hidden`,`aria-hidden`,`class`,`style`]});for(let e=r.parentElement;e;e=e.parentElement)s.observe(e,{attributes:!0});return window.addEventListener(`resize`,a),r.addEventListener(`transitionend`,a),r.addEventListener(`scroll`,a,!0),a(),()=>{K.current++,clearTimeout(q.current),cancelAnimationFrame(i),o.disconnect(),s.disconnect(),window.removeEventListener(`resize`,a),r.removeEventListener(`transitionend`,a),r.removeEventListener(`scroll`,a,!0),f.current=void 0}},[]),(0,t.useEffect)(()=>{if(!T)return;let e=e=>{e.target instanceof Node&&!u.current?.contains(e.target)&&X()};return document.addEventListener(`pointerdown`,e,!0),u.current?.querySelector(`input`)?.focus(),()=>{document.removeEventListener(`pointerdown`,e,!0)}},[T]),(0,t.useEffect)(()=>{y&&d.current?.focus()},[y]);function fe(e,t){let n=f.current;if(!n)return;let r=n.querySelector(le)?.parentElement;for(;r&&r!==n&&!/auto|scroll/u.test(getComputedStyle(r).overflowY);)r=r.parentElement;r?.scrollBy({left:e,top:t}),C(void 0)}(0,t.useEffect)(()=>{let e=d.current;if(!y||!e||!p)return;let t=e=>{e.preventDefault();let t=e.deltaMode===1?16:e.deltaMode===2?p.height:1;fe(e.deltaX*t,e.deltaY*t)};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[y,p]);function pe(e,t){let n=f.current;if(n)return W?ae(n,e,t):ie(n,e,t)}function me(e,t){if(W||!f.current)return;let n=ie(f.current,e,t);if(!n)return;let r=n.canvas.getBoundingClientRect();(Y.current?.canvas!==n.canvas||Y.current.box.left!==r.left||Y.current.box.top!==r.top||Y.current.box.width!==r.width||Y.current.box.height!==r.height)&&(Y.current={canvas:n.canvas,box:r,paragraphs:ne(n.canvas)});let i=te(Y.current.paragraphs,e,t);return i?{...i,...n}:void 0}function he(e,t){let n=J.current;if(!n)return;let r=b({left:Math.min(n.x,e),top:Math.min(n.y,t),width:Math.abs(e-n.x),height:Math.abs(t-n.y)},n.canvas.getBoundingClientRect());if(!r)return;let i=Y.current?.canvas===n.canvas?Y.current.paragraphs:ne(n.canvas),a=W?``:i.filter(e=>(e.rects??[e.box]).some(e=>b(e,r))).map(e=>e.text).join(`
6
+ `).slice(0,g);return{canvas:n.canvas,page:n.page,box:r,region:w(r,n.canvas.getBoundingClientRect()),text:a}}function ge(e){if(e.button!==0||!f.current||G&&!i)return;let t=pe(e.clientX,e.clientY);if(!t)return;e.preventDefault(),X();let n={...t,x:e.clientX,y:e.clientY,lastX:e.clientX,lastY:e.clientY,region:!1};J.current=n,e.currentTarget.setPointerCapture(e.pointerId),q.current=setTimeout(()=>{J.current===n&&(n.region=!0,P(!0),C(he(n.lastX,n.lastY)))},350)}function _e(e){let t=J.current;t&&(t.lastX=e.clientX,t.lastY=e.clientY,!t.region&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>=6&&(clearTimeout(q.current),t.region=!0,P(!0))),C(t?.region?he(e.clientX,e.clientY):me(e.clientX,e.clientY))}async function ve(e){X();let t=K.current;B(``);let n=e.canvas?.getBoundingClientRect(),r=n?ee(e.box,n):e.box;if(!r)return;let i=n?w(r,n):e.region,a={...e,box:r,region:i};if(E(a),G){M(!0);try{let n=e.page===void 0?`region`:`p${e.page}`,r=await oe(a,`${ue}-${n}-${Date.now()}.png`,H?.maxImagePixels,H?.maxImageDimension);K.current===t&&A(r)}catch{K.current===t&&B(c(`annotation.captureFailed`))}finally{K.current===t&&M(!1)}}}function ye(e){let t=J.current;if(clearTimeout(q.current),!t)return;let n=t.region?he(e.clientX,e.clientY):me(e.clientX,e.clientY),r=Math.hypot(e.clientX-t.x,e.clientY-t.y);Z(),n&&(t.region?n.box.width>=6&&n.box.height>=6:r<6)&&ve(n)}function be(){if(!T||!D.trim()||G&&!k||F.length>=50)return;let t={target:e,fileName:ue,page:T.page,text:T.text.slice(0,g),requirement:D.trim(),region:T.region,imageName:k?.name,...W?{unmapped:!0}:{}};I(e=>[...e,{annotation:t,file:k}]),X()}function xe(){if(!de)try{let e=se({items:F,inputActions:a,intake:i,limits:H,existingImages:i?.images(V.attachmentIds)??[],deferSubmit:!!V.draft.trim()||V.attachmentIds.length>0});I([]),L(!1),x(!1),X(),B(e===`draft`?c(`annotation.draftReady`):``)}catch(e){let t=e instanceof Error?e.message:`annotation.sendFailed`;B(c(t.startsWith(`annotation.`)?t:`annotation.sendFailed`))}}let Q=T??S,Se=Q&&!T&&!N&&Q.canvas?ee(Q.box,Q.canvas.getBoundingClientRect()):Q?.box,$=Se&&p?b(Se,p):void 0,Ce=p?Math.min(360,p.width-16):0,we=p&&T?Math.max(p.left+8,Math.min(T.box.left,p.left+p.width-Ce-8)):0,Te=p&&T?Math.max(p.top+4,Math.min(T.box.top+T.box.height+6,p.top+p.height-56)):0;return(0,n.jsxs)(`span`,{ref:l,className:`dsh-office-annotate`,onKeyDown:e=>{if(!y||e.key!==`Escape`)return;e.preventDefault(),e.stopPropagation();let t=!!T||!!J.current;X(),Z(),t?d.current?.focus():(x(!1),l.current?.querySelector(`button`)?.focus())},children:[(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-annotate-toggle`,"aria-pressed":y,disabled:!p||G&&!i,title:c(G&&!i?`annotation.intakeUnavailable`:p?`annotation.help`:`annotation.unavailable`),onClick:()=>{x(e=>!e),X(),Z()},children:c(`annotation.ask`)}),G&&!i&&(0,n.jsx)(`span`,{role:`status`,className:`dsh-office-annotate-unavailable`,children:c(`annotation.intakeUnavailable`)}),y&&p&&(0,n.jsx)(`div`,{ref:d,className:`dsh-office-annotate-surface`,tabIndex:0,style:{left:p.left,top:p.top,width:p.width,height:p.height},role:`region`,"aria-label":c(`annotation.help`),onPointerDown:ge,onPointerMove:_e,onPointerUp:ye,onPointerCancel:Z,onLostPointerCapture:Z,onKeyDown:e=>{if(e.key===`PageDown`||e.key===`PageUp`)e.preventDefault(),fe(0,p.height*(e.key===`PageDown`?.8:-.8));else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=[...f.current.querySelectorAll(`canvas[role="img"][aria-label]`)].flatMap((e,t)=>ne(e).filter(e=>b(e.box,p)).map(n=>({...n,canvas:e,page:t+1}))),n=t.findIndex(e=>e.canvas===S?.canvas&&e.text===S.text&&e.box.top===S.box.top),r=n<0?e.key===`ArrowDown`?0:t.length-1:Math.max(0,Math.min(t.length-1,n+(e.key===`ArrowDown`?1:-1)));C(t[r])}else(e.key===`Enter`||e.key===` `)&&S&&(e.preventDefault(),ve(S))},onPointerLeave:()=>{J.current||C(void 0)}}),y&&$&&(0,n.jsx)(`span`,{className:`dsh-office-annotate-highlight`,"data-selected":T||N?`true`:void 0,style:{left:$.left,top:$.top,width:$.width,height:$.height}}),y&&T&&p&&(0,n.jsxs)(`form`,{ref:u,className:`dsh-office-annotate-composer`,style:{left:we,top:Te,width:Ce},"aria-label":c(`annotation.ask`),"aria-busy":j,onSubmit:e=>{e.preventDefault(),be()},children:[(0,n.jsx)(`input`,{type:`text`,"aria-label":c(`annotation.placeholder`),placeholder:c(`annotation.placeholder`),value:D,maxLength:2e4,onChange:e=>O(e.target.value),onKeyDown:e=>{e.key===`Enter`&&e.nativeEvent.isComposing&&e.preventDefault()}}),(0,n.jsx)(`button`,{type:`submit`,"aria-label":c(j?`annotation.capturing`:`annotation.add`),title:c(j?`annotation.capturing`:`annotation.add`),disabled:!D.trim()||j||G&&!k||F.length>=50,children:(0,n.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`m5 12 4 4L19 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(y||F.length>0||z)&&p&&(0,n.jsx)(`div`,{className:`dsh-office-annotate-rail-position`,style:{left:p.left,width:p.width,bottom:Math.max(0,window.innerHeight-p.top-p.height)+12,"--dsh-office-annotation-width":`${p.width}px`,"--dsh-office-annotation-height":`${p.height}px`},children:(0,n.jsxs)(`div`,{className:`dsh-office-annotate-rail`,children:[z&&(0,n.jsx)(`p`,{role:`alert`,children:z}),(0,n.jsxs)(`div`,{className:`dsh-office-annotate-rail-actions`,children:[(0,n.jsxs)(`div`,{className:`dsh-office-annotate-summary`,"data-dismissed":ce?`true`:void 0,onPointerEnter:()=>L(!1),onFocus:()=>L(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),e.currentTarget.querySelector(`button`)?.focus(),L(!0))},children:[(0,n.jsx)(`button`,{type:`button`,"aria-haspopup":`dialog`,"aria-controls":R,disabled:!F.length,children:_(c(`annotation.count`),{count:String(F.length)})}),F.length>0&&(0,n.jsx)(`div`,{id:R,role:`dialog`,"aria-label":_(c(`annotation.count`),{count:String(F.length)}),className:`dsh-office-annotate-popover`,children:(0,n.jsx)(`ul`,{children:F.map((e,t)=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`span`,{className:`dsh-office-annotation-source`,children:[(0,n.jsx)(`span`,{title:e.annotation.target,children:e.annotation.fileName}),e.annotation.page&&(0,n.jsx)(`span`,{children:_(c(`annotation.page`),{page:String(e.annotation.page)})})]}),e.annotation.text&&(0,n.jsx)(`span`,{className:`dsh-office-annotation-original`,children:e.annotation.text}),(0,n.jsx)(`span`,{className:`dsh-office-annotation-requirement`,title:e.annotation.requirement,children:e.annotation.requirement})]})},e.annotation.imageName??t))})})]}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>{I([]),x(!1),L(!1),B(``),X(),Z()},children:c(`annotation.cancel`)}),(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-annotate-primary`,disabled:!F.length||de,onClick:xe,children:c(`annotation.send`)})]})]})})]})}function j(e){let{size:t=16,...n}=e;return{width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,...n}}function M(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 13.5h6a1.5 1.5 0 0 0 1.5-1.5V7.243a1.5 1.5 0 0 0-.44-1.061L8.819 2.939a1.5 1.5 0 0 0-1.06-.439H5A1.5 1.5 0 0 0 3.5 4v8A1.5 1.5 0 0 0 5 13.5m9-6.257a3 3 0 0 0-.879-2.122L9.88 1.88A3 3 0 0 0 7.757 1H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3zM5 8.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 5 8.25m.75 2.25a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5z`})})}function N(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M11 13.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06V12a1.5 1.5 0 0 1-1.5 1.5m2.121-8.379A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM6.5 6.5a.75.75 0 0 0-.75.75v4a.75.75 0 0 0 1.5 0v-.75H8.5a2 2 0 1 0 0-4zm2 2.5H7.25V8H8.5a.5.5 0 0 1 0 1`})})}function P(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3H4a1.5 1.5 0 0 0-1.5 1.5v4A1.5 1.5 0 0 0 4 10h8a1.5 1.5 0 0 0 1.5-1.5v-4A1.5 1.5 0 0 0 12 3M4 1.5a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h3.25V13h-2.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-2.5v-1.5H12a3 3 0 0 0 3-3v-4a3 3 0 0 0-3-3z`})})}function F(e){return(0,n.jsx)(`svg`,{...j(e),children:(0,n.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.25 3.5h-2.5v2h2.5zM4 3.5h1.25v2H2.5V5A1.5 1.5 0 0 1 4 3.5M2.5 7h2.75v2H2.5zm0 3.5v.5A1.5 1.5 0 0 0 4 12.5h1.25v-2zm4.25 0v2h2.5v-2zm4 0v2H12a1.5 1.5 0 0 0 1.5-1.5v-.5zM13.5 9h-2.75V7h2.75zM9.25 9h-2.5V7h2.5zm1.5-5.5v2h2.75V5A1.5 1.5 0 0 0 12 3.5zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z`})})}const I={documents:M,pdf:N,presentations:P,spreadsheets:F};function ce({node:e,raw:t,interactive:r,openOffice:a,officeLabel:o}){let s=i(e.data.feature);if(s==null)return(0,n.jsx)(`span`,{children:t});let c=I[s.id],l=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c,{className:`dsh-office-ref-icon`,size:14}),(0,n.jsx)(`span`,{children:o(s.id)})]});return r?(0,n.jsx)(`button`,{type:`button`,className:`dsh-office-ref`,title:t,"data-interactive":!0,onClick:()=>a(s.id),children:l}):(0,n.jsx)(`span`,{className:`dsh-office-ref`,title:t,children:l})}function L(){if(typeof document>`u`)return()=>{};let e=document.querySelector(`style[data-plugin-css="dsh-office-kit/reference.css"]`)??document.createElement(`style`);return e.dataset.plugin=o,e.dataset.pluginCss=`dsh-office-kit/reference.css`,e.textContent=`
7
7
  .dsh-office-ref {
8
8
  display: inline-flex;
9
9
  align-items: center;
@@ -262,6 +262,6 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require
262
262
  .dsh-office-annotation-reference .dsh-office-annotation-original { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-tertiary); font-size: 12px; }
263
263
  .dsh-office-annotate .dsh-office-annotation-requirement,
264
264
  .dsh-office-annotation-reference .dsh-office-annotation-requirement { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
265
- `,document.head.appendChild(e),()=>e.remove()}const R=[`inputTriggers`,`sessions`,`slots`,`locale`,`remote`,`remote.skills`,`sidebarRight`,`uiConversation`,`conversation`],z={"menu.group":`办公`,"menu.documents.label":`文档`,"menu.documents.description":`创建、读取、编辑和渲染 DOCX 文档`,"menu.pdf.label":`PDF 文档`,"menu.pdf.description":`读取、创建、检查、渲染和验证 PDF`,"menu.presentations.label":`演示文稿`,"menu.presentations.description":`创建、编辑、渲染和导出 PPTX 演示文稿`,"menu.spreadsheets.label":`电子表格`,"menu.spreadsheets.description":`创建、编辑、计算和导出 XLSX 电子表格`,"annotation.ask":`请求修改`,"annotation.cancel":`取消`,"annotation.send":`发送`,"annotation.add":`添加标注`,"annotation.placeholder":`说明要怎么改…`,"annotation.page":`第 {page} 页`,"annotation.count":`{count} 条注释`,"annotation.remove":`删除第 {index} 条注释`,"annotation.image":`位置截图:{name}`,"annotation.help":`悬停吸附段落,点击输入要求;长按拖动框选区域,松开添加标注。方向键选择,Enter 确认,Esc 退出。`,"annotation.unavailable":`等待文档页面渲染;当前预览不支持标注`,"annotation.capturing":`正在截图…`,"annotation.captureFailed":`截图失败,请重新选择区域`,"annotation.intakeUnavailable":`当前 DSH 版本不支持从侧栏添加截图附件,PDF 标注已禁用`,"annotation.imageLimit":`截图超过当前模型的数量或大小限制,请减少标注后重试`,"annotation.sendFailed":`未能加入会话,请重试;标注仍保留`,"annotation.draftReady":`标注和截图已保留在会话输入框,请在那里确认发送`,"annotation.invalid":`标注内容无效,请重新添加`,"annotation.tooLarge":`标注内容过长,请减少后重试`,"annotation.emptyPage":`页面尚未渲染,请重试`,"annotation.emptyRegion":`请选择页面内的区域`},B={"menu.group":`Office`,"menu.documents.label":`Documents`,"menu.documents.description":`Create, read, edit, and render DOCX documents`,"menu.pdf.label":`PDF documents`,"menu.pdf.description":`Read, create, inspect, render, and verify PDFs`,"menu.presentations.label":`Presentations`,"menu.presentations.description":`Create, edit, render, and export PPTX decks`,"menu.spreadsheets.label":`Spreadsheets`,"menu.spreadsheets.description":`Create, edit, calculate, and export XLSX workbooks`,"annotation.ask":`Request changes`,"annotation.cancel":`Cancel`,"annotation.send":`Send`,"annotation.add":`Add annotation`,"annotation.placeholder":`Describe the change…`,"annotation.page":`page {page}`,"annotation.count":`{count} annotations`,"annotation.remove":`Remove annotation {index}`,"annotation.image":`Location screenshot: {name}`,"annotation.help":`Hover to select a paragraph; click to comment. Hold and drag to select a region. Arrow keys select, Enter confirms, Esc exits.`,"annotation.unavailable":`Waiting for rendered pages; this preview cannot be annotated yet`,"annotation.capturing":`Capturing…`,"annotation.captureFailed":`Screenshot failed; please select the region again`,"annotation.intakeUnavailable":`This DSH version cannot add screenshots from the sidebar; PDF annotation is disabled`,"annotation.imageLimit":`Screenshots exceed the current model’s count or size limits; remove some annotations and retry`,"annotation.sendFailed":`Could not add annotations to the conversation; your annotations are retained`,"annotation.draftReady":`Annotations and screenshots are kept in the conversation input; confirm sending there`,"annotation.invalid":`Invalid annotation; please add it again`,"annotation.tooLarge":`Annotations are too long; remove some and retry`,"annotation.emptyPage":`The page has not rendered yet; please retry`,"annotation.emptyRegion":`Select a region inside the page`};function V(e){return encodeURIComponent(e).replace(/%3A/gi,`:`)}function H(e){return e.split(`/`).map(V).join(`/`)}function U(e,t){let n=t.replace(/\\/g,`/`).replace(/^(?:\.\/)+/u,``);return`dsh-resource://file/session/${V(e)}/${H(n)}`}function W(e,t,n){let r=n.replace(/\\/g,`/`),i=t?.replace(/\\/g,`/`).replace(/\/+$/u,``)??``;return/^(?:\/|[A-Za-z]:\/|\\\\)/u.test(r)&&i!==``&&r.startsWith(`${i}/`)?U(e,r.slice(i.length+1)):U(e,r)}function G(t){let n=t.sessions,f=t.remote.skills,p=t.locale.bind(o),m=new Map,h=new Map;t.effect(()=>L(),`office-suite: styles`),t.effect(()=>t.locale.register(o,{zh:z,en:B}),`office-suite: dictionaries`);function g(e){let t=m.get(e);if(t!==void 0)return t;let r=new AbortController,i=(async()=>{if(n.binding(e)===void 0)throw Error(`office catalog requires a retained session "${e}"`);return n.using(e,{source:`officeCatalog`,signal:r.signal},async t=>{r.signal.throwIfAborted();let n=t.binding.session.getSnapshot();if(n.openState!==`open`)throw n.openError??Error(`session "${e}" is not open`);let i=await f.list({sessionId:e},r.signal);if(r.signal.throwIfAborted(),!i.ok)throw Error(`skills/list failed: ${i.error.code}: ${i.error.message}`);return i.value.skills})})(),a={abort:r,promise:i};return m.set(e,a),i.then(e=>{a.settled=e},()=>{m.get(e)===a&&m.delete(e)}),a}function _(e,r,a){let o=i(r);if(o===void 0)return!1;let s=a.find(e=>e.name===o.skill);if(s?.path===void 0)return!1;let c=n.list.getSnapshot().byId[e]?.cwd;try{return t.sidebarRight.openResource(W(e,c,s.path)),!0}catch(e){return console.error(`[dsh-office-kit] reference preview failed:`,e),!1}}let v={trigger:`/`,name:s,order:1,async candidates(t,{query:n,signal:i}){if(i.aborted)return[];let a=r.map(e=>{let t=I[e.id];return{name:e.command,label:p(`menu.${e.id}.label`),description:p(`menu.${e.id}.description`),section:p(`menu.group`),icon:t}});return n.length===0?a:(0,e.rankByName)(a,n)},lexicon(){return r.map(e=>e.command)},openReference(e,{ref:t}){let n=i(t);if(n===void 0)return!1;let r=m.get(e.sessionId)?.settled;if(r!==void 0)return _(e.sessionId,n.id,r);let a=g(e.sessionId);return a.promise.then(t=>{a.abort.signal.aborted||_(e.sessionId,n.id,t)}).catch(e=>{a.abort.signal.aborted||console.error(`[dsh-office-kit] reference preview failed:`,e)}),!0},onPick({candidate:e}){let t=a(e.name);if(t!==void 0)return{insert:{source:s,ref:t.id,label:p(`menu.${t.id}.label`),appearance:`file`,clipboardText:`/${t.command}`}}},codec:{clipboardText(e){let t=i(e);return t===void 0?`/${e}`:`/${t.command}`},async serialize(e){let t=i(e);return t===void 0?`/documents`:`/${t.command}\n\nUse the "${t.skill}" skill for this request and follow its instructions before creating, editing, or rendering files.`}}},y={id:c,order:20,match(e,t){let n=/(?<!\S)\/([\w-]+)(?!\S)/gu;n.lastIndex=t;for(let t=n.exec(e);t!==null;t=n.exec(e)){let e=a(t[1]??``);if(e!==void 0)return{id:c,start:t.index,end:t.index+t[0].length,data:{feature:e.id}}}}};t.effect(()=>t.uiConversation.userText.register(y),`office-suite: transcript chip`),t.effect(()=>t.slots.inject(l,()=>t.slots.register({name:l,key:c,priority:100,inject:e=>({openOffice:t=>{v.openReference?.({sessionId:e},{ref:t,appearance:`file`})},officeLabel:e=>p(`menu.${e}.label`)})},oe)),`office-suite: transcript chip slot`);function b(e){let r=t.conversation,i=typeof r.createDrafts==`function`&&typeof r.releaseDraftAttachments==`function`&&typeof r.resolveDraftAttachments==`function`,a=h.get(e);return a||(a=new Map,h.set(e,a)),{pendingAnnotations:a,intake:i?{create:t=>r.createDrafts(e,t),release:e=>r.releaseDraftAttachments(e),images:e=>r.resolveDraftAttachments(e).filter(e=>e.kind===`image`).map(e=>e.file)}:void 0,openAnnotation:r=>{try{let i=n.list.getSnapshot().byId[e]?.cwd;t.sidebarRight.openResource(W(e,i,r))}catch(e){console.error(`[dsh-office-kit] annotation preview failed:`,e)}}}}t.effect(()=>t.uiConversation.userText.register(D),`office-suite: annotations`),t.effect(()=>t.slots.inject(l,()=>t.slots.register({name:l,key:d,priority:100,locale:o,inject:b},O)),`office-suite: annotation references`),t.effect(()=>t.slots.inject(u,()=>t.slots.register({name:u,id:`office-annotations`,order:20,locale:o,inject:b},k)),`office-suite: annotation tool`);let x=t.inputTriggers;t.effect(()=>{let e=x.registerSource(v);return()=>{e();for(let e of m.values())e.abort.abort();m.clear(),h.clear()}},`office-suite: slash source`)}exports.apply=G,exports.inject=R;
265
+ `,document.head.appendChild(e),()=>e.remove()}const R=[`inputTriggers`,`sessions`,`slots`,`locale`,`remote`,`remote.skills`,`sidebarRight`,`uiConversation`,`conversation`],z={"menu.group":`办公`,"menu.documents.label":`文档`,"menu.documents.description":`创建、读取、编辑和渲染 DOCX 文档`,"menu.pdf.label":`PDF 文档`,"menu.pdf.description":`读取、创建、检查、渲染和验证 PDF`,"menu.presentations.label":`演示文稿`,"menu.presentations.description":`创建、编辑、渲染和导出 PPTX 演示文稿`,"menu.spreadsheets.label":`电子表格`,"menu.spreadsheets.description":`创建、编辑、计算和导出 XLSX 电子表格`,"annotation.ask":`请求修改`,"annotation.cancel":`取消`,"annotation.send":`发送`,"annotation.add":`添加标注`,"annotation.placeholder":`说明要怎么改…`,"annotation.page":`第 {page} 页`,"annotation.count":`{count} 条注释`,"annotation.remove":`删除第 {index} 条注释`,"annotation.image":`位置截图:{name}`,"annotation.help":`悬停吸附段落,点击输入要求;长按拖动框选区域,松开添加标注。方向键选择,Enter 确认,Esc 退出。`,"annotation.unavailable":`等待文档页面渲染;当前预览不支持标注`,"annotation.capturing":`正在截图…`,"annotation.captureFailed":`截图失败,请重新选择区域`,"annotation.intakeUnavailable":`当前 DSH 版本不支持从侧栏添加截图附件,PDF 与表格标注已禁用`,"annotation.imageLimit":`截图超过当前模型的数量或大小限制,请减少标注后重试`,"annotation.sendFailed":`未能加入会话,请重试;标注仍保留`,"annotation.draftReady":`标注和截图已保留在会话输入框,请在那里确认发送`,"annotation.invalid":`标注内容无效,请重新添加`,"annotation.tooLarge":`标注内容过长,请减少后重试`,"annotation.emptyPage":`页面尚未渲染,请重试`,"annotation.emptyRegion":`请选择页面内的区域`},B={"menu.group":`Office`,"menu.documents.label":`Documents`,"menu.documents.description":`Create, read, edit, and render DOCX documents`,"menu.pdf.label":`PDF documents`,"menu.pdf.description":`Read, create, inspect, render, and verify PDFs`,"menu.presentations.label":`Presentations`,"menu.presentations.description":`Create, edit, render, and export PPTX decks`,"menu.spreadsheets.label":`Spreadsheets`,"menu.spreadsheets.description":`Create, edit, calculate, and export XLSX workbooks`,"annotation.ask":`Request changes`,"annotation.cancel":`Cancel`,"annotation.send":`Send`,"annotation.add":`Add annotation`,"annotation.placeholder":`Describe the change…`,"annotation.page":`page {page}`,"annotation.count":`{count} annotations`,"annotation.remove":`Remove annotation {index}`,"annotation.image":`Location screenshot: {name}`,"annotation.help":`Hover to select a paragraph; click to comment. Hold and drag to select a region. Arrow keys select, Enter confirms, Esc exits.`,"annotation.unavailable":`Waiting for rendered pages; this preview cannot be annotated yet`,"annotation.capturing":`Capturing…`,"annotation.captureFailed":`Screenshot failed; please select the region again`,"annotation.intakeUnavailable":`This DSH version cannot add screenshots from the sidebar; PDF and spreadsheet annotation is disabled`,"annotation.imageLimit":`Screenshots exceed the current model’s count or size limits; remove some annotations and retry`,"annotation.sendFailed":`Could not add annotations to the conversation; your annotations are retained`,"annotation.draftReady":`Annotations and screenshots are kept in the conversation input; confirm sending there`,"annotation.invalid":`Invalid annotation; please add it again`,"annotation.tooLarge":`Annotations are too long; remove some and retry`,"annotation.emptyPage":`The page has not rendered yet; please retry`,"annotation.emptyRegion":`Select a region inside the page`};function V(e){return encodeURIComponent(e).replace(/%3A/gi,`:`)}function H(e){return e.split(`/`).map(V).join(`/`)}function U(e,t){let n=t.replace(/\\/g,`/`).replace(/^(?:\.\/)+/u,``);return`dsh-resource://file/session/${V(e)}/${H(n)}`}function W(e,t,n){let r=n.replace(/\\/g,`/`),i=t?.replace(/\\/g,`/`).replace(/\/+$/u,``)??``;return/^(?:\/|[A-Za-z]:\/|\\\\)/u.test(r)&&i!==``&&r.startsWith(`${i}/`)?U(e,r.slice(i.length+1)):U(e,r)}function G(t){let n=t.sessions,f=t.remote.skills,p=t.locale.bind(o),m=new Map,h=new Map;t.effect(()=>L(),`office-suite: styles`),t.effect(()=>t.locale.register(o,{zh:z,en:B}),`office-suite: dictionaries`);function g(e){let t=m.get(e);if(t!==void 0)return t;let r=new AbortController,i=(async()=>{if(n.binding(e)===void 0)throw Error(`office catalog requires a retained session "${e}"`);return n.using(e,{source:`officeCatalog`,signal:r.signal},async t=>{r.signal.throwIfAborted();let n=t.binding.session.getSnapshot();if(n.openState!==`open`)throw n.openError??Error(`session "${e}" is not open`);let i=await f.list({sessionId:e},r.signal);if(r.signal.throwIfAborted(),!i.ok)throw Error(`skills/list failed: ${i.error.code}: ${i.error.message}`);return i.value.skills})})(),a={abort:r,promise:i};return m.set(e,a),i.then(e=>{a.settled=e},()=>{m.get(e)===a&&m.delete(e)}),a}function _(e,r,a){let o=i(r);if(o===void 0)return!1;let s=a.find(e=>e.name===o.skill);if(s?.path===void 0)return!1;let c=n.list.getSnapshot().byId[e]?.cwd;try{return t.sidebarRight.openResource(W(e,c,s.path)),!0}catch(e){return console.error(`[dsh-office-kit] reference preview failed:`,e),!1}}let v={trigger:`/`,name:s,order:1,async candidates(t,{query:n,signal:i}){if(i.aborted)return[];let a=r.map(e=>{let t=I[e.id];return{name:e.command,label:p(`menu.${e.id}.label`),description:p(`menu.${e.id}.description`),section:p(`menu.group`),icon:t}});return n.length===0?a:(0,e.rankByName)(a,n)},lexicon(){return r.map(e=>e.command)},openReference(e,{ref:t}){let n=i(t);if(n===void 0)return!1;let r=m.get(e.sessionId)?.settled;if(r!==void 0)return _(e.sessionId,n.id,r);let a=g(e.sessionId);return a.promise.then(t=>{a.abort.signal.aborted||_(e.sessionId,n.id,t)}).catch(e=>{a.abort.signal.aborted||console.error(`[dsh-office-kit] reference preview failed:`,e)}),!0},onPick({candidate:e}){let t=a(e.name);if(t!==void 0)return{insert:{source:s,ref:t.id,label:p(`menu.${t.id}.label`),appearance:`file`,clipboardText:`/${t.command}`}}},codec:{clipboardText(e){let t=i(e);return t===void 0?`/${e}`:`/${t.command}`},async serialize(e){let t=i(e);return t===void 0?`/documents`:`/${t.command}\n\nUse the "${t.skill}" skill for this request and follow its instructions before creating, editing, or rendering files.`}}},y={id:c,order:20,match(e,t){let n=/(?<!\S)\/([\w-]+)(?!\S)/gu;n.lastIndex=t;for(let t=n.exec(e);t!==null;t=n.exec(e)){let e=a(t[1]??``);if(e!==void 0)return{id:c,start:t.index,end:t.index+t[0].length,data:{feature:e.id}}}}};t.effect(()=>t.uiConversation.userText.register(y),`office-suite: transcript chip`),t.effect(()=>t.slots.inject(l,()=>t.slots.register({name:l,key:c,priority:100,inject:e=>({openOffice:t=>{v.openReference?.({sessionId:e},{ref:t,appearance:`file`})},officeLabel:e=>p(`menu.${e}.label`)})},ce)),`office-suite: transcript chip slot`);function b(e){let r=t.conversation,i=typeof r.createDrafts==`function`&&typeof r.releaseDraftAttachments==`function`&&typeof r.resolveDraftAttachments==`function`,a=h.get(e);return a||(a=new Map,h.set(e,a)),{pendingAnnotations:a,intake:i?{create:t=>r.createDrafts(e,t),release:e=>r.releaseDraftAttachments(e),images:e=>r.resolveDraftAttachments(e).filter(e=>e.kind===`image`).map(e=>e.file)}:void 0,openAnnotation:r=>{try{let i=n.list.getSnapshot().byId[e]?.cwd;t.sidebarRight.openResource(W(e,i,r))}catch(e){console.error(`[dsh-office-kit] annotation preview failed:`,e)}}}}t.effect(()=>t.uiConversation.userText.register(D),`office-suite: annotations`),t.effect(()=>t.slots.inject(l,()=>t.slots.register({name:l,key:d,priority:100,locale:o,inject:b},O)),`office-suite: annotation references`),t.effect(()=>t.slots.inject(u,()=>t.slots.register({name:u,id:`office-annotations`,order:20,locale:o,inject:b},k)),`office-suite: annotation tool`);let ee=t.inputTriggers;t.effect(()=>{let e=ee.registerSource(v);return()=>{e();for(let e of m.values())e.abort.abort();m.clear(),h.clear()}},`office-suite: slash source`)}exports.apply=G,exports.inject=R;
266
266
  return module.exports;}});
267
267
  //# sourceMappingURL=client.js.map