@fudanda/admin-antd 1.20261015.1-beta.1 → 2.20261024.1-beta.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.
- package/LICENSE +21 -21
- package/README.md +58 -42
- package/THIRD_PARTY_NOTICES.md +55 -55
- package/dist/automation.js +3 -3
- package/dist/chunks/App-DNjXLysb.js +79 -0
- package/dist/chunks/{AppModal-B_xvSaeq.js → AppModal-DJzQA6FR.js} +1 -1
- package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
- package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
- package/dist/chunks/{DashboardPage-BTLufKzi.js → DashboardPage-BohGodSl.js} +1 -1
- package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
- package/dist/chunks/{DateTimeText-rk9NeYgA.js → DateTimeText-CIt0Qy45.js} +1 -1
- package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
- package/dist/chunks/DictTag-2-adKbYg.js +1 -0
- package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
- package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
- package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
- package/dist/chunks/{EntityContextRuntime-BrAz-aCV.js → EntityContextRuntime-sslBZqYD.js} +1 -1
- package/dist/chunks/{EntityRelationButton-C8Cl8wyh.js → EntityRelationButton-DWn1rC2J.js} +2 -2
- package/dist/chunks/{ExportButton-D4IvZKHy.js → ExportButton-AzH4D0oW.js} +1 -1
- package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
- package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
- package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
- package/dist/chunks/{FileViewerPreviewPanel-wbXzgqxc.js → FileViewerPreviewPanel-CMqVtGCr.js} +2 -2
- package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
- package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
- package/dist/chunks/{JsonPreviewPanel-D8YpZD1A.js → JsonPreviewPanel-Dhbza-Uu.js} +1 -1
- package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
- package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
- package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
- package/dist/chunks/{MasterDetailLayout-DDVFodpX.js → MasterDetailLayout-sjPWw8BI.js} +2 -2
- package/dist/chunks/{MemberAssignmentSheet-NWm5vThg.js → MemberAssignmentSheet-Czbt6_zv.js} +1 -1
- package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
- package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
- package/dist/chunks/{ModalFooter-vXDpmYTM.js → ModalFooter-RMlvqrO9.js} +1 -1
- package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
- package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
- package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
- package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
- package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
- package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
- package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
- package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
- package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
- package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
- package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
- package/dist/chunks/{SearchToolbar-BAh56OAa.js → SearchToolbar-CvgYKUjr.js} +1 -1
- package/dist/chunks/{SessionClientTag-DafwXf-o.js → SessionClientTag-DIwnYodW.js} +2 -2
- package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
- package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
- package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
- package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
- package/dist/chunks/{UserDisplay-BYhcfa84.js → UserDisplay-J0Re8z-7.js} +1 -1
- package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
- package/dist/chunks/{UserLogsPanels-3ZlKQsCu.js → UserLogsPanels-BHeSxWrk.js} +2 -2
- package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
- package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
- package/dist/chunks/{archive-D0BSMQmn.js → archive-B_IKvysI.js} +4 -4
- package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
- package/dist/chunks/{chart-renderer-BWLqOvLF.js → chart-renderer-k-Rd8vdL.js} +1 -1
- package/dist/chunks/{user-cC0uCe3d.js → chevron-right-EBApfX6q.js} +2 -2
- package/dist/chunks/{clipboard-BKPNFY58.js → clipboard-ERcMSMRH.js} +1 -1
- package/dist/chunks/{confirm-CC2F8XXe.js → confirm-BtBBEqk8.js} +1 -1
- package/dist/chunks/{data-DPCozzrG.js → data-B05HzECj.js} +1 -1
- package/dist/chunks/{deleteAction-NGTDhZud.js → deleteAction-CCocr5uV.js} +1 -1
- package/dist/chunks/{diagram-vBbcsoK2.js → diagram-D9cwc7QH.js} +3 -3
- package/dist/chunks/dist-Bauqz5on.js +1 -0
- package/dist/chunks/{drawing-CUAfa3D5.js → drawing-D2Qrun-P.js} +2 -2
- package/dist/chunks/{email-U025DuXM.js → email-ByshRsFv.js} +2 -2
- package/dist/chunks/{export-CCaKk9VN.js → export-DlTz5dc2.js} +5 -5
- package/dist/chunks/{eye-DNBTmA6c.js → eye-off-BtJoIT5n.js} +1 -8
- package/dist/chunks/feedback-BnjMKZpz.js +1 -0
- package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
- package/dist/chunks/fit-CsnhEncA.js +1 -0
- package/dist/chunks/{form-DhQiOMvp.js → form-CQutQFiD.js} +1 -1
- package/dist/chunks/geo-DR0fL7r2.js +38 -0
- package/dist/chunks/{image-C52XMTxg.js → image-ez9hvzKT.js} +1 -1
- package/dist/chunks/{lib-DZsU27Fn.js → lib-BlRm3nk1.js} +4 -4
- package/dist/chunks/line-BV7qVRkM.js +1 -0
- package/dist/chunks/{msg-DNXH9mKo.js → msg-BzZbudMm.js} +1 -1
- package/dist/chunks/{ofd-B0_-rey2.js → ofd-C7DKqJ6Z.js} +1 -1
- package/dist/chunks/{openDocument-DW7w0HpR.js → openDocument-DGzqlyJg.js} +1 -1
- package/dist/chunks/parse-6ZQGx714.js +1 -0
- package/dist/chunks/{parser-BFNqF7wU.js → parser-DC3PvpL4.js} +1 -1
- package/dist/chunks/ppt-B0WY5Gks.js +30 -0
- package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
- package/dist/chunks/{print-mask-DTiml6Ox.js → print-mask-Dguzv0rv.js} +2 -2
- package/dist/chunks/{psd-yU36O76Y.js → psd-hjeNFQZ-.js} +1 -1
- package/dist/chunks/{search-filters-BoRMIesR.js → search-filters-CRIhZ0gL.js} +1 -1
- package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
- package/dist/chunks/{spreadsheet-DiZ31XlH.js → spreadsheet-LR3SOG-x.js} +3 -3
- package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
- package/dist/chunks/ui-BFsHoY7a.js +1 -0
- package/dist/chunks/{useCrudOperationColumn-PObQMk2y.js → useCrudOperationColumn-D935tixd.js} +1 -1
- package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
- package/dist/chunks/{useStatusToggle-B7KSIN75.js → useStatusToggle-B2qZaoc-.js} +1 -1
- package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
- package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
- package/dist/chunks/{xmind-B9BtGBNI.js → xmind-CF9YwkOD.js} +2 -2
- package/dist/file-viewer/flyfish-viewer-assets.json +5 -5
- package/dist/file-viewer/vendor/docx/jszip.min.js +0 -0
- package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
- package/dist/index.js +1 -1
- package/dist/{src-DVwjbBTf.js → src-LbWcrSWe.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -7
- package/dist/chunks/App-DX7JOOmP.js +0 -79
- package/dist/chunks/ArcBaseAdmin-CdB_roNY.js +0 -1
- package/dist/chunks/ConfigurableTable-CyfZLgG0.js +0 -55
- package/dist/chunks/DataScopePanel-CubtBhTT.js +0 -1
- package/dist/chunks/DepartmentsPage-ECexbzsK.js +0 -1
- package/dist/chunks/DictTag-BerYvaUM.js +0 -1
- package/dist/chunks/DictsPage-65kAxYFd.js +0 -15
- package/dist/chunks/DirectoryLoginModal-rRXvoqV7.js +0 -1
- package/dist/chunks/EditFormModal-D68dOnaj.js +0 -1
- package/dist/chunks/EntityContextRuntime-D9mWi5xC.js +0 -1
- package/dist/chunks/FileNameCell-C_V1k0q-.js +0 -1
- package/dist/chunks/FilePreviewModal-D7v5seXB.js +0 -1
- package/dist/chunks/FileStorageConfigsPage-D2UYESb5.js +0 -15
- package/dist/chunks/FileTypeIcon-C77EVWXZ.js +0 -1
- package/dist/chunks/FilesPage-By81A2i7.js +0 -43
- package/dist/chunks/ForgotPasswordModal-DTlunJpM.js +0 -1
- package/dist/chunks/IdentitySecurityPage-Dp5EP7aT.js +0 -1
- package/dist/chunks/LogStatsScaffold-BFwbN_MU.js +0 -1
- package/dist/chunks/LoginField-Bu4C0-Mk.js +0 -1
- package/dist/chunks/LoginLogsPage-BuMJ6U8I.js +0 -1
- package/dist/chunks/LoginLogsTable-DfAlWPZb.js +0 -1
- package/dist/chunks/MenuCommandPalette-BvW2kEU4.js +0 -8
- package/dist/chunks/MenusPage-DT3kxAfi.js +0 -1
- package/dist/chunks/NavListPanel-agMt2kc6.js +0 -1
- package/dist/chunks/OnlineSessionsPage-BJJAB2pV.js +0 -1
- package/dist/chunks/OperationLogsPage-CP-wUt_N.js +0 -1
- package/dist/chunks/OperationLogsTable-BX0vV3fT.js +0 -1
- package/dist/chunks/PDFPreviewPanel-D8-74Zqs.js +0 -30
- package/dist/chunks/PasswordInput--G8GKd5g.js +0 -1
- package/dist/chunks/PositionsPage-Cs7xq89s.js +0 -1
- package/dist/chunks/PreferencesSheetBody-CdA4Ig_g.js +0 -43
- package/dist/chunks/ProfilePage-Bt3yP6D-.js +0 -15
- package/dist/chunks/RelationPanel-B-KAfl9B.js +0 -36
- package/dist/chunks/RolesPage-DDNGkGAq.js +0 -1
- package/dist/chunks/SessionConflictModal-DgFNCU3j.js +0 -1
- package/dist/chunks/SettingRow-BIb1ruW2.js +0 -1
- package/dist/chunks/SettingsPage-rhqkPOJ9.js +0 -16
- package/dist/chunks/StatCard-BwhGDWpE.js +0 -4
- package/dist/chunks/UserGroupsPage-D3_aji58.js +0 -1
- package/dist/chunks/UserTransferSelect-S-GUw2Y9.js +0 -1
- package/dist/chunks/UsersPage-CLRJX-V9.js +0 -29
- package/dist/chunks/WorkflowPrintButton-BVa-xw-8.js +0 -1
- package/dist/chunks/chart-data-DOMSCLwj.js +0 -5
- package/dist/chunks/chevron-left-DnDEG_PI.js +0 -8
- package/dist/chunks/chevron-right-CzizTV5i.js +0 -8
- package/dist/chunks/dist-BqNhxPp5.js +0 -1
- package/dist/chunks/feedback-D4BIfDNd.js +0 -1
- package/dist/chunks/file-utils-DJ9ksj-g.js +0 -1
- package/dist/chunks/geo-Bf8ymo43.js +0 -38
- package/dist/chunks/line-DSFA8EqT.js +0 -1
- package/dist/chunks/mail-Cduf1OFr.js +0 -8
- package/dist/chunks/mono-icons-CxCoktev.js +0 -1
- package/dist/chunks/plus-Bvdn6bx1.js +0 -8
- package/dist/chunks/ppt-C9RgrmNU.js +0 -30
- package/dist/chunks/pptx-_T8ZPVQn.js +0 -109
- package/dist/chunks/printer-DL8WQci4.js +0 -8
- package/dist/chunks/shield-check-DZGK8n9u.js +0 -8
- package/dist/chunks/spreadsheet-CHFSQY8j.js +0 -1
- package/dist/chunks/table-columns-XaoxVUJN.js +0 -1
- package/dist/chunks/toolbar-controls-BFOuV86W.js +0 -8
- package/dist/chunks/ui-DoIHGuTR.js +0 -1
- package/dist/chunks/useDebouncedValue-DFoJN77o.js +0 -22
- package/dist/chunks/useListPage-1Upr_ala.js +0 -1
- package/dist/chunks/wordDoc-CtetBfzo.js +0 -152
- package/dist/chunks/wordDocx-8ak39HcF.js +0 -77
- package/dist/chunks/zoom-8Eo2fTNd.js +0 -1
- package/dist/public/monaco/vs/editor/editor.worker.js +0 -1
- package/dist/public/monaco/vs/language/css/css.worker.js +0 -66
- package/dist/public/monaco/vs/language/html/html.worker.js +0 -443
- package/dist/public/monaco/vs/language/json/json.worker.js +0 -17
- package/dist/public/monaco/vs/language/typescript/ts.worker.js +0 -67693
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-BKuNeK48.js";import{n,t as r}from"./preload-helper-C-73SErw.js";import{i,l as a}from"./export-BkwewH6Q.js";import{$ as o,ct as s,dt as c,et as l,st as u,t as d}from"./dist-BqNhxPp5.js";import{t as f}from"./messages-CFyOVxEM.js";import{S as p,d as m,t as h,y as ee}from"./zoom-8Eo2fTNd.js";import{t as g}from"./jszip.min-hNOoGCeG.js";import{i as te,n as ne,r as _,t as v}from"./printLayout-oeudvFkr.js";import{n as y}from"./options-B65xkxOY.js";function re(e){let t=e.ownerDocument.defaultView;if(!t)return;let n=e.getBoundingClientRect(),r=t.getComputedStyle(e),i=x(r.width)+(r.boxSizing===`border-box`?0:x(r.paddingLeft)+x(r.paddingRight)+x(r.borderLeftWidth)+x(r.borderRightWidth)),a=i?n.width/i:0;if(!(!Number.isFinite(a)||a<=0))for(let n of e.querySelectorAll(`[data-docx-anchor-horizontal="column"], [data-docx-anchor-horizontal="margin"]`)){let r=n.closest(`[data-docx-anchor-context="paragraph"]`);if(!r||n.offsetParent!==r||t.getComputedStyle(n).position!==`absolute`||!n.style.left||r.closest(`td, th`))continue;let i=n.dataset.docxAnchorHorizontal===`margin`?e:r.closest(`article, header, footer`);if(!i||!e.contains(i)&&i!==e)continue;let o=t.getComputedStyle(i),s=i.getBoundingClientRect().left+(x(o.borderLeftWidth)+x(o.paddingLeft))*a,c=t.getComputedStyle(r),l=r.getBoundingClientRect();if(i!==e){let e=x(o.columnCount),t=x(o.columnWidth);if(e>1||t>0){let n=o.columnGap===`normal`?x(o.fontSize):x(o.columnGap),r=i.clientWidth-x(o.paddingLeft)-x(o.paddingRight),u=e>0?e:Math.max(1,Math.floor((r+n)/(t+n))),d=(r+n)/u;if(d>0){let e=(l.left-s)/a-x(c.marginLeft);s+=Math.round(e/d)*d*a}}}let u=l.left+x(c.borderLeftWidth)*a,d=(s-u)/a;if(!Number.isFinite(d))continue;let f=b.get(n)??n.style.left;b.set(n,f),n.style.left=Math.abs(d)<.01?f:`calc(${f} + ${d.toFixed(4)}px)`}}var b,x;function S(){return(S=e((()=>{b=/* @__PURE__ */ new WeakMap,x=e=>Number.parseFloat(e)||0})))()}function ie(e){let t=e.ownerDocument.createElement(`style`);return t.textContent=be,e.prepend(t),t}function ae(e,t){let n=e.querySelector(`.docx-wrapper`);return n?Array.from(n.children).flatMap(n=>{if(!$(n,e)||!n.matches(`section.docx`))return[];let r=e.ownerDocument.createElement(`div`);return r.className=t?`docx-page-frame`:`docx-flow-frame`,n.before(r),r.appendChild(n),[r]}):[]}function oe(e,t){e.classList.add(`docx-fit-viewer`);let n=ie(e),r=t?.options?.docx?.visualPagination===!0,i=ae(e,r),a=W(e),o=a?.ResizeObserver,s=0,c=1,l=1,u=1,d=h(),f=e=>Math.min(O,Math.max(D,Number(e.toFixed(2)))),g=()=>{let t=l,n=u,a=!1;i.forEach(i=>{let o=i.firstElementChild;if(!$(o,e))return;o.style.transform=`translateX(-50%)`,re(o);let s=o.offsetWidth,l=r?o.offsetHeight:Math.max(o.scrollHeight,o.offsetHeight);if(!s||!l)return;let u=Math.max(e.clientWidth-28,120),d=Math.min(1,Math.max(D,u/s)),p=f(d*c);a||=(t=p,n=d,!0),o.style.transform=`translateX(-50%) scale(${p})`,i.style.width=`${Math.ceil(Math.max(s*p,e.clientWidth-28,120))}px`,i.style.maxWidth=`none`,i.style.height=`${Math.ceil(l*p)}px`}),a&&(l=t,u=n,d.emit())},ne=()=>{a?(a.cancelAnimationFrame(s),s=a.requestAnimationFrame(()=>{g()})):g()},_=()=>({scale:l,label:`${Math.round(l*100)}%`,canZoomIn:l<O,canZoomOut:l>D,canReset:c!==1,minScale:D,maxScale:O}),v=e=>(c=Math.min(6,Math.max(.2,Number(e.toFixed(2)))),a?.cancelAnimationFrame(s),g(),_()),y=e=>v(e/Math.max(u,.01)),b=()=>{for(let e of i){let t=C(e);if(!t)continue;let n=te(t,E);return{width:t.offsetWidth||n.width||E.width,height:w(e)?E.height:t.offsetHeight||n.height||E.height}}return null},x=t=>{let n=b();if(!n)return{applied:!1,mode:t.mode,resize:t.resize,source:t.source,reason:`unmeasurable`,provider:`zoom`};let r=t.mode===`auto`?`width`:t.mode,i=m({mode:r,viewportWidth:Math.max(1,t.viewportWidth||e.clientWidth||0),viewportHeight:Math.max(1,t.viewportHeight||e.clientHeight||0),contentWidth:n.width,contentHeight:n.height,currentScale:l,minScale:t.minScale??D,maxScale:t.maxScale??O});if(!i)return{applied:!1,mode:t.mode,resize:t.resize,source:t.source,reason:`unmeasurable`,provider:`zoom`};let a=y(i);return{applied:!0,mode:t.mode,resize:t.resize,scale:a.scale,source:t.source,provider:`zoom`}};e.dataset.viewerZoomProvider=`docx`,ee(e,{zoomIn:()=>v((l+k)/Math.max(u,.01)),zoomOut:()=>v((l-k)/Math.max(u,.01)),resetZoom:()=>v(1),setZoom:y,fit:x,getState:_,subscribe:d.subscribe});let S=o?new o(ne):null;return S?.observe(e),i.forEach(e=>{let t=C(e);t&&S?.observe(t)}),g(),()=>{a?.cancelAnimationFrame(s),S?.disconnect(),p(e),n.remove(),e.classList.remove(`docx-fit-viewer`)}}function C(e){let t=e.firstElementChild,n=e.ownerDocument.defaultView?.HTMLElement;return n&&t instanceof n?t:null}function w(e){return!!e?.classList.contains(`docx-flow-frame`)}function T(e){return!!e?.classList.contains(`docx-canvas-sheet`)}function se(e){let t=e?C(e):null;if(!t)return E;let n=te(t,E);return w(e)?{width:n.width,height:Math.max(t.scrollHeight||0,t.offsetHeight||0,E.height)}:n}function ce(e,t){var n;if(T(e)){v(e,t),(n=e.dataset).viewerPrintPageIndex||(n.viewerPrintPageIndex=`0`),e.classList.remove(`docx-canvas-sheet-pending`,`docx-canvas-sheet-virtualized`),e.style.position=`relative`,e.style.contain=`none`,e.style.margin=`0 auto 18px`,e.style.boxShadow=`none`;return}let r=w(e),i=_(t.width),a=_(t.height);v(e,t,{heightMode:r?`min`:`fixed`}),e.style.margin=`0 auto 18px`;let o=C(e);o&&(o.style.position=`relative`,o.style.top=`auto`,o.style.left=`auto`,o.style.width=i,o.style.maxWidth=`none`,o.style.minHeight=r?`0`:a,o.style.height=r?`auto`:a,o.style.margin=`0 auto`,o.style.transform=`none`,o.style.transformOrigin=`top left`,o.style.overflow=r?`visible`:`hidden`,o.style.boxShadow=`none`)}function le(e){let t=e.querySelector(`.docx-page-frame, .docx-flow-frame, .docx-canvas-sheet`),n=se(t||void 0),r=T(t||void 0)?`.viewer-export-content .docx-canvas-sheet`:t?.classList.contains(`docx-flow-frame`)?`.viewer-export-content .docx-flow-frame`:`.viewer-export-content .docx-page-frame`;return ne({selector:r,width:n.width,height:t?.classList.contains(`docx-flow-frame`)?E.height:n.height,heightMode:t?.classList.contains(`docx-flow-frame`)?`min`:`fixed`})}async function ue(e){let t=W(e),n=!!e.querySelector(`.docx-canvas-sheet`),r=t?.__docxCanvasMaterializeAllPages,o=!1;n&&typeof r==`function`&&(await r.call(t,`file-viewer-print-snapshot`),await a(t),o=!0);try{let t=`.docx-page-frame, .docx-flow-frame, .docx-canvas-sheet`,n=Array.from(e.querySelectorAll(t)),r=e.cloneNode(!0);i(e,r);let a=e.ownerDocument.createElement(`div`);a.className=`docx-print-document`;let o=Array.from(r.querySelectorAll(`style`)).filter(e=>!e.textContent?.includes(`.docx-fit-viewer`)).map(e=>e.outerHTML).join(``);return r.querySelectorAll(t).forEach((e,t)=>{e.dataset.viewerPrintPageIndex=String(t),ce(e,se(n[t])),a.appendChild(e.cloneNode(!0))}),a.childElementCount?`${o}${a.outerHTML}`:r.innerHTML}finally{if(o&&t){let n=e.ownerDocument.createEvent(`Event`);n.initEvent(`afterprint`,!1,!1),t.dispatchEvent(n)}}}async function de(e,t,n){var r,i;U(e,n),t.replaceChildren();let a=!1,o=()=>{var e;a||(a=!0,(e=n?.onProgressiveRender)==null||e.call(n))},s=Q(t,n,o),[{defaultOptions:c,renderAsync:l},u]=await Promise.all([B(),q(e,()=>me(t))]);t.dataset.docxWorker=s.useWorker?`self`:`false`,t.dataset.docxDarkMode=s.darkMode?`true`:`false`;let d=await H(l,e,t,{...c,...s});Z(t,s.externalLinkPolicy),t.dataset.docxHeaderFooterFallback=d?`true`:`false`,t.dataset.docxPageBackground=J(t,u)>0?`true`:`false`,o();let f=oe(t,n);return(r=n?.registerExportAdapter)==null||r.call(n,{includeDocumentStyles:!1,getPrintMaskPages:()=>Array.from(t.querySelectorAll(`.docx-page-frame, .docx-flow-frame, .docx-canvas-sheet`)),beforeSnapshot:()=>{let e=W(t);e&&e.dispatchEvent(new e.Event(`resize`))},printStyle:()=>le(t),toHtml:()=>ue(t)}),(i=n?.registerThumbnailAdapter)==null||i.call(n,{getTarget:()=>t.querySelector(`.docx-page-frame, .docx-flow-frame, .docx-canvas-sheet`)||t}),{$el:t,unmount(){var e,r;(e=n?.registerExportAdapter)==null||e.call(n,null),(r=n?.registerThumbnailAdapter)==null||r.call(n,null),f(),delete t.dataset.docxWorker,delete t.dataset.docxDarkMode,delete t.dataset.docxHeaderFooterFallback,delete t.dataset.docxPageBackground,t.replaceChildren()}}}var fe,E,pe,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,me,he,G,K,ge,_e,q,J,Y,ve,ye,X,Z,Q,$,be;function xe(){return(xe=e((()=>{fe=/* @__PURE__ */ t(g(),1),S(),o(),d(),n(),E={width:794,height:1123},pe=/* @__PURE__ */ new Set([`file:`,`about:`,`data:`]),D=.24,O=3,k=.15,A=20555,j=`http://schemas.openxmlformats.org/wordprocessingml/2006/main`,M=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,N=`http://schemas.openxmlformats.org/package/2006/relationships`,P=`urn:schemas-microsoft-com:vml`,F=`word/document.xml`,I=`word/_rels/document.xml.rels`,L=`docx-page-background`,R={bmp:`image/bmp`,gif:`image/gif`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,tif:`image/tiff`,tiff:`image/tiff`,webp:`image/webp`},z=e=>{let t=typeof e.renderAsync==`function`?e:e.default;if(!t||typeof t.renderAsync!=`function`)throw TypeError(`@file-viewer/docx did not expose a compatible renderAsync function.`);return t},B=(()=>{let e={module:null,async load(){return this.module||=r(()=>import(`./docx-preview-CPN81HCr.js`),[],import.meta.url),this.module}};return async()=>z(await e.load())})(),V=e=>e instanceof Error&&/(?:undefined|null).*children|children.*(?:undefined|null)/i.test(e.message)&&/renderHeaderFooter/i.test(e.stack||``),H=async(e,t,n,r)=>{try{return await e(t,n,void 0,r),!1}catch(i){if(!V(i))throw i;return n.replaceChildren(),await e(t,n,void 0,{...r,renderHeaders:!1,renderFooters:!1}),!0}},U=(e,t)=>{if((e.byteLength>=4?new DataView(e).getUint16(0,!1):0)!==A)throw Error(f(t?.options)(`word.error.invalidDocx`))},W=e=>e.ownerDocument.defaultView,me=e=>new((W(e)?.DOMParser)??globalThis.DOMParser),he=e=>{let t=[e.ownerDocument.URL,W(e)?.location?.href,globalThis.location?.href].filter(Boolean);for(let e of t)try{return new URL(e).protocol}catch{}return``},G=(e,t,n)=>{let r=Array.from(e.getElementsByTagNameNS(t,n));return r.length?r:Array.from(e.getElementsByTagName(`*`)).filter(e=>e.localName===n)},K=(e,t)=>{let n=t.parseFromString(e,`application/xml`);return G(n,`http://www.mozilla.org/newlayout/xml/parsererror.xml`,`parsererror`).length?null:n},ge=(e,t)=>{let n=t.startsWith(`/`)?[]:e.split(`/`).slice(0,-1);return t.replace(/^\/+/,``).split(`/`).forEach(e=>{e&&e!==`.`&&(e===`..`?n.pop():n.push(e))}),n.join(`/`)},_e=e=>{let t=e.split(`.`).pop()?.toLowerCase()||``;return R[t]},q=async(e,t=()=>new DOMParser)=>{try{let n=await fe.default.loadAsync(e),r=n.file(F),i=n.file(I);if(!r||!i)return;let a=t(),o=K(await r.async(`string`),a),s=K(await i.async(`string`),a);if(!o||!s)return;let c=G(o,j,`background`)[0],l=c&&G(c,P,`fill`)[0],u=l?.getAttributeNS(M,`id`)||l?.getAttribute(`r:id`);if(!u)return;let d=G(s,N,`Relationship`).find(e=>e.getAttribute(`Id`)===u),f=d?.getAttribute(`Target`);if(!f||d?.getAttribute(`TargetMode`)===`External`)return;let p=ge(F,f),m=_e(p),h=n.file(p)||n.file(decodeURIComponent(p));return!m||!h?void 0:`data:${m};base64,${await h.async(`base64`)}`}catch{return}},J=(e,t)=>{if(!t)return 0;let n=0;return e.querySelectorAll(`section.docx`).forEach(r=>{let i=Array.from(r.children).find(e=>e.classList.contains(L)),a=i||e.ownerDocument.createElement(`div`);a.className=L,a.setAttribute(`aria-hidden`,`true`),a.style.backgroundImage=`url("${t}")`,i||r.prepend(a),n+=1}),n},Y=(e,t)=>t?.worker===!1?!1:t?.worker===!0||!!((W(e)?.Worker??globalThis.Worker)&&t?.workerUrl&&!pe.has(he(e))),ve=e=>{let t=W(e)?.matchMedia??globalThis.matchMedia;return typeof t==`function`&&t(`(prefers-color-scheme: dark)`).matches},ye=(e,t,n)=>{if(n?.darkMode!==void 0)return n.darkMode;let r=y(t?.options?.theme);return r===`dark`||r!==`light`&&ve(e)},X=(e,t)=>!e||t?e:/[?&]file-viewer-docx=[^&#]*/.test(e)?e.replace(/([?&])file-viewer-docx=[^&#]*/,`$1file-viewer-docx=${l}`):`${e}${e.includes(`?`)?`&`:`?`}file-viewer-docx=${l}`,Z=(e,t)=>{if(t===`allow`)return 0;let n=0;return e.querySelectorAll(`a[href]`).forEach(e=>{let t=e.getAttribute(`href`);t&&!t.startsWith(`#`)&&(e.hasAttribute(`data-docx-external-href`)||e.setAttribute(`data-docx-external-href`,t),e.removeAttribute(`href`),e.setAttribute(`aria-disabled`,`true`),n+=1)}),n},Q=(e,t,n)=>{let r=t?.options?.docx,i=c(e.ownerDocument),a=Y(e,r),o=r?.visualPagination===!0,l=ye(e,t,r),d=e=>{(e.phase===`render`||e.phase===`layout`||e.phase===`done`)&&n()},f=r?.externalLinkPolicy??`block`,p=r?.externalResourcePolicy??`block`,m={useWorker:a,reviewMode:r?.reviewMode??`all`,breakPages:!0,fixedPageHeight:o,ignoreLastRenderedPageBreak:r?.ignoreLastRenderedPageBreak??!o,externalLinkPolicy:f,externalResourcePolicy:p,darkMode:l,progress:t=>{(t.phase===`render`||t.phase===`layout`||t.phase===`done`)&&Z(e,f),d(t)}};return a&&(m.workerUrl=X(s(r,i),!!r?.workerUrl),m.workerJsZipUrl=X(u(r,i),!!r?.workerJsZipUrl)),r?.workerTimeout!==void 0&&(m.workerTimeout=r.workerTimeout),r?.renderPageBatchSize===void 0?r?.progressive===!1&&(m.renderPageBatchSize=2**53-1):m.renderPageBatchSize=r.renderPageBatchSize,r?.renderYieldEveryMs!==void 0&&(m.renderYieldEveryMs=r.renderYieldEveryMs),r?.strictWordCompatibility!==void 0&&(m.strictWordCompatibility=r.strictWordCompatibility),r?.paginationTolerance!==void 0&&(m.paginationTolerance=r.paginationTolerance),r?.maxDynamicPaginationPasses!==void 0&&(m.maxDynamicPaginationPasses=r.maxDynamicPaginationPasses),r?.awaitLayout!==void 0&&(m.awaitLayout=r.awaitLayout),r?.preserveComplexFieldResults!==void 0&&(m.preserveComplexFieldResults=r.preserveComplexFieldResults),r?.updatePageReferences!==void 0&&(m.updatePageReferences=r.updatePageReferences),r?.hideWebHiddenContent!==void 0&&(m.hideWebHiddenContent=r.hideWebHiddenContent),m},$=(e,t)=>{let n=W(t)?.HTMLElement;return n?e instanceof n:e instanceof HTMLElement},be=`
|
|
2
|
-
/* This component has no review balloon rail, so keep all-markup deletions readable inline. */
|
|
3
|
-
.docx-fit-viewer [data-docx-review-enabled="true"][data-docx-review-mode="all"] del[data-docx-change-kind]{display:inline!important;width:auto!important;max-width:none!important;height:auto!important;overflow:visible!important;line-height:inherit!important;color:var(--docx-review-color,#c2410c);text-decoration:line-through;text-decoration-color:var(--docx-review-color,#c2410c)}
|
|
4
|
-
.docx-fit-viewer {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
height: 100%;
|
|
7
|
-
overflow: auto;
|
|
8
|
-
background: var(--file-viewer-render-surface-background, #ececec);
|
|
9
|
-
color-scheme: light;
|
|
10
|
-
}
|
|
11
|
-
.docx-fit-viewer[data-docx-dark-mode='true'] {
|
|
12
|
-
background: var(--file-viewer-render-surface-background, #242424);
|
|
13
|
-
color-scheme: dark;
|
|
14
|
-
}
|
|
15
|
-
.docx-fit-viewer .docx-wrapper {
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
min-width: 0 !important;
|
|
18
|
-
width: 100% !important;
|
|
19
|
-
padding: 24px 14px 40px !important;
|
|
20
|
-
background: var(--file-viewer-render-surface-background, #e7e9ec) !important;
|
|
21
|
-
}
|
|
22
|
-
.docx-fit-viewer[data-docx-dark-mode='true'] .docx-wrapper {
|
|
23
|
-
background: var(--file-viewer-render-surface-background, #242424) !important;
|
|
24
|
-
}
|
|
25
|
-
.docx-fit-viewer .docx-page-frame {
|
|
26
|
-
position: relative;
|
|
27
|
-
width: 100%;
|
|
28
|
-
min-width: 0;
|
|
29
|
-
margin: 0 auto 24px;
|
|
30
|
-
overflow: visible;
|
|
31
|
-
}
|
|
32
|
-
.docx-fit-viewer .docx-flow-frame {
|
|
33
|
-
position: relative;
|
|
34
|
-
width: 100%;
|
|
35
|
-
min-width: 0;
|
|
36
|
-
margin: 0 auto 28px;
|
|
37
|
-
overflow: visible;
|
|
38
|
-
}
|
|
39
|
-
.docx-fit-viewer .docx-page-frame > section.docx,
|
|
40
|
-
.docx-fit-viewer .docx-flow-frame > section.docx {
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
left: 50%;
|
|
44
|
-
margin: 0 !important;
|
|
45
|
-
background: #ffffff !important;
|
|
46
|
-
box-shadow: 0 2px 14px rgba(25, 35, 48, 0.18);
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
transform-origin: top center;
|
|
50
|
-
}
|
|
51
|
-
.docx-fit-viewer .docx-page-background {
|
|
52
|
-
position: absolute;
|
|
53
|
-
inset: 0;
|
|
54
|
-
z-index: 0;
|
|
55
|
-
pointer-events: none;
|
|
56
|
-
background-position: center;
|
|
57
|
-
background-repeat: no-repeat;
|
|
58
|
-
background-size: 100% 100%;
|
|
59
|
-
}
|
|
60
|
-
.docx-fit-viewer[data-docx-dark-mode='true'] .docx-page-frame > section.docx,
|
|
61
|
-
.docx-fit-viewer[data-docx-dark-mode='true'] .docx-flow-frame > section.docx {
|
|
62
|
-
background: rgb(51, 51, 51) !important;
|
|
63
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
|
|
64
|
-
outline: 1px solid rgba(255, 255, 255, 0.15);
|
|
65
|
-
outline-offset: -1px;
|
|
66
|
-
}
|
|
67
|
-
.docx-fit-viewer .docx-flow-frame > section.docx {
|
|
68
|
-
height: auto !important;
|
|
69
|
-
min-height: var(--docx-page-height, auto) !important;
|
|
70
|
-
overflow: visible !important;
|
|
71
|
-
}
|
|
72
|
-
.docx-fit-viewer .docx-page-frame > section.docx > article,
|
|
73
|
-
.docx-fit-viewer .docx-flow-frame > section.docx > article {
|
|
74
|
-
position: relative;
|
|
75
|
-
z-index: 1;
|
|
76
|
-
}
|
|
77
|
-
`})))()}xe();export{Z as applyDocxExternalLinkPolicy,J as applyDocxPageBackgroundImage,Q as createDocxOptions,de as default,V as isMissingDocxHeaderFooterRootError,H as renderDocxWithHeaderFooterFallback,q as resolveDocxPageBackgroundImage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{mt as t}from"./dist-BqNhxPp5.js";var n,r,i,a,o,s,c,l,u,d,f,p,m;function h(){return(h=e((()=>{n=(/* @__PURE__ */ `[data-viewer-anchor-id],.pdfViewer .page,.docx-wrapper section,.docx p,.docx li,.docx table,.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6,.markdown-body p,.markdown-body li,.markdown-body pre,.markdown-body table,article h1,article h2,article h3,article h4,article h5,article h6,article p,article li,article pre,article table,pre code,p,li,tr,h1,h2,h3,h4,h5,h6,pre,table`.split(`,`)).join(`,`),r=[`.viewer-actions`,`.viewer-watermark`,`.state-panel`,`.pdf-toolbar`,`.pdf-nav-pane`,`.flyfish-search-match`].join(`,`),i=e=>typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e.replace(/["\\]/g,`\\$&`),a=(e,t=160)=>{let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t-1)}…`:n},o=e=>{let t=e.getBoundingClientRect();return t.width>0||t.height>0},s=e=>!!e.closest(r),c=e=>{let t=e.closest(`[data-page-number], [data-page]`),n=t?.dataset.pageNumber||t?.dataset.page,r=n?Number.parseInt(n,10):NaN;return Number.isFinite(r)?r:void 0},l=e=>e.matches(`.pdfViewer .page, [data-page-number], [data-page]`)?`page`:e.matches(`p, li, tr, pre, code`)?`line`:`block`,u=(e,t)=>{let n=e.parentElement;for(;n;){if(t.has(n))return!0;n=n.parentElement}return!1},d=e=>{if(!e)return[];let t=e.getBoundingClientRect(),r=/* @__PURE__ */ new Set,i=[];return Array.from(e.querySelectorAll(n)).forEach(n=>{if(s(n)||!o(n))return;let d=a(n.textContent||``,1e3);if(!d||u(n,r)&&!n.matches(`p, li, tr, pre, code`))return;r.add(n);let f=n.dataset.viewerAnchorId||`viewer-anchor-${i.length+1}`;n.dataset.viewerAnchorId=f,n.dataset.viewerLine=String(i.length+1);let p=n.getBoundingClientRect();i.push({id:f,index:i.length,line:i.length+1,type:l(n),label:a(d,96),text:d,page:c(n),top:p.top-t.top+e.scrollTop,left:p.left-t.left+e.scrollLeft,width:p.width,height:p.height})}),i},f=(e,t,n)=>{if(!e)return null;let r=e.closest(`[data-viewer-anchor-id]`);if(r?.dataset.viewerAnchorId){let e=t.find(e=>e.id===r.dataset.viewerAnchorId);if(e)return e}if(!n)return null;let i=n.getBoundingClientRect(),a=e.getBoundingClientRect().top-i.top+n.scrollTop,o=null;for(let e of t)if(e.top<=a+1)o=e;else break;return o},p=(e,t)=>{if(!e||!t.length)return null;let n=e.scrollTop+e.clientHeight*.42,r=t[0];for(let e of t)if(e.top<=n)r=e;else break;return r},m=(e,t)=>{if(!e||t==null)return!1;let n=typeof t==`object`?`[data-viewer-anchor-id="${i(t.id)}"]`:typeof t==`number`?`[data-viewer-line="${t}"]`:`[data-viewer-anchor-id="${i(t)}"]`,r=e.querySelector(n);return r?(r.scrollIntoView({block:`center`,inline:`nearest`}),!0):typeof t==`object`&&(e.scrollTo({top:Math.max(0,t.top-e.clientHeight*.18),left:Math.max(0,Math.min(t.left,e.scrollWidth-e.clientWidth)),behavior:`smooth`}),!0)}})))()}var g,_,v,y,b,ee,x,S,C,te,w,T,E,D;function O(){return(O=e((()=>{g=/* @__PURE__ */ new WeakMap,_=/* @__PURE__ */ new WeakMap,v=/* @__PURE__ */ new WeakMap,y=e=>!!e&&e.nodeType===1,b=(e,t)=>{if(!e?.querySelectorAll)return[];let n=Array.from(e.querySelectorAll(t));y(e)&&e.shadowRoot&&n.push(...b(e.shadowRoot,t));let r=Array.from(e.querySelectorAll(`*`));for(let e of r)e.shadowRoot&&n.push(...b(e.shadowRoot,t));return n},ee=(e,t)=>{g.set(e,t),e.__flyfishViewerSearchProvider=t},x=e=>{e&&(g.delete(e),delete e.__flyfishViewerSearchProvider)},S=e=>{if(!e)return null;let t=y(e)?g.get(e)||e.__flyfishViewerSearchProvider:null;if(t)return t;let n=b(e,`[data-viewer-search-provider]`)[0];return n&&(g.get(n)||n.__flyfishViewerSearchProvider)||null},C=(e,t)=>{_.set(e,t),e.dataset.viewerZoomProvider=e.dataset.viewerZoomProvider||`custom`,e.__flyfishViewerZoomProvider=t},te=e=>{e&&(_.delete(e),delete e.dataset.viewerZoomProvider,delete e.__flyfishViewerZoomProvider)},w=e=>{if(!e)return null;let t=y(e)?_.get(e)||e.__flyfishViewerZoomProvider:null;if(t)return t;let n=b(e,`[data-viewer-zoom-provider]`)[0];return n&&(_.get(n)||n.__flyfishViewerZoomProvider)||null},T=(e,t)=>{v.set(e,t),e.dataset.viewerViewStateProvider=e.dataset.viewerViewStateProvider||`custom`,e.__flyfishViewerViewStateProvider=t},E=e=>{e&&(v.delete(e),delete e.dataset.viewerViewStateProvider,delete e.__flyfishViewerViewStateProvider)},D=e=>{if(!e)return null;let t=y(e)?v.get(e)||e.__flyfishViewerViewStateProvider:null;if(t&&(!y(e)||e.dataset.viewerViewStateProvider!==`generic`))return t;let n=b(e,`[data-viewer-view-state-provider]`),r=n.find(e=>e.dataset.viewerViewStateProvider!==`generic`),i=n.find(e=>e.dataset.viewerViewStateProvider===`generic`),a=r||i;return a?v.get(a)||a.__flyfishViewerViewStateProvider||null:t||null}})))()}function k(){return(k=e((()=>{h(),O(),t()})))()}var A,ne,j,M,re,N,P,F,I,L,R,z,B,V,H,U,W,G,K;function q(){return(q=e((()=>{k(),A=[`auto`,`contain`,`cover`,`width`,`height`,`actual`,`scale-down`],ne=[`until-interaction`,`always`,`initial`],j=`until-interaction`,M=0,re=8,N=e=>!!e&&typeof e==`object`&&!Array.isArray(e),P=e=>typeof e==`string`&&A.includes(e),F=e=>typeof e==`string`&&ne.includes(e),I=e=>{let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0},L=e=>{let t=Number(e);return Number.isFinite(t)&&t>0?t:M},R=e=>{if(e==null||e===!1)return null;if(P(e))return{mode:e,resize:j,padding:M};if(!N(e))return null;let t=I(e.minScale),n=I(e.maxScale),r=t!==void 0&&n!==void 0&&n<t?t:n;return{mode:P(e.mode)?e.mode:`auto`,resize:F(e.resize)?e.resize:j,padding:L(e.padding),minScale:t,maxScale:r}},z=(e,t,n)=>{let r=e;return Number.isFinite(t)&&(r=Math.max(Number(t),r)),Number.isFinite(n)&&(r=Math.min(Number(n),r)),r},B=({mode:e,viewportWidth:t,viewportHeight:n,contentWidth:r,contentHeight:i,minScale:a,maxScale:o})=>{if(t<=0||n<=0||r<=0||i<=0)return;let s=t/r,c=n/i,l=Math.min(s,c),u=Math.max(s,c),d=(()=>{switch(e){case`cover`:return u;case`width`:return s;case`height`:return c;case`actual`:return 1;case`scale-down`:return Math.min(1,l);default:return l}})();if(!(!Number.isFinite(d)||d<=0))return z(d,a,o)},V=e=>{if(!e)return!1;let t=Number(e.scale??e.zoom?.scale);if(Number.isFinite(t)&&t>0||Number.isFinite(e.page)||Number.isFinite(e.rotation)||e.navigation&&Object.keys(e.navigation).length>0||e.extra&&Object.keys(e.extra).length>0)return!0;let n=e.scroll||{};return[`top`,`left`,`topRatio`,`leftRatio`].some(e=>{let t=n[e];return Number.isFinite(t)})},H=(e,t,n=`viewer`,r=`none`)=>({applied:!1,mode:e.mode,resize:e.resize,source:n,reason:t,provider:r}),U=(e,t,n)=>({applied:!!e?.applied,mode:e?.mode||t.mode,resize:e?.resize||t.resize,scale:e?.scale,source:e?.source||t.source,reason:e?.reason,provider:e?.provider||n,state:e?.state}),W=e=>e===`pending`||e===`retry`||e===`image-not-ready`||e===`unmeasurable`,G=e=>{let t=e.getBoundingClientRect?.call(e);return{width:Math.max(0,t?.width||e.clientWidth||0),height:Math.max(0,t?.height||e.clientHeight||0)}},K=({root:e,enabled:t,getFit:n=()=>void 0,onFit:r})=>{let i=null,a=null,o=null,s=!1,c=0,l=()=>e()?.ownerDocument?.defaultView||(typeof window<`u`?window:void 0),u=()=>{if(a===null)return;let e=l();e?.cancelAnimationFrame&&e.cancelAnimationFrame(a),a=null},d=()=>{o&&clearTimeout(o),o=null},f=(e,t)=>{let r=e===void 0?n():e;return r==null?t===`api`?R(`auto`):null:R(r)},p=(e,t,n)=>{c>=re||(d(),c+=1,o=setTimeout(()=>{o=null,m(e,{source:t,reason:n===`api`?`api`:`retry`})},32*c))},m=async(n,i={})=>{let a=i.source||`api`,o=i.reason||`api`,s=f(n,o);if(!s)return{applied:!1,mode:`auto`,resize:j,source:a,reason:`not-configured`,provider:`none`};if(t?.()===!1)return H(s,`disabled`,a);let l=e();if(!l)return p(n,a,o),H(s,`no-root`,a);let u=G(l);if(u.width<=0||u.height<=0)return p(n,a,o),H(s,`zero-size`,a);let d={...s,source:a,reason:o,viewportWidth:Math.max(0,u.width-s.padding*2),viewportHeight:Math.max(0,u.height-s.padding*2),container:l},m=D(l),h=null;if(m?.fit){let e=U(await m.fit(d),d,`view-state`);if(e.applied)return c=0,r?.(e),e;h=e}let g=w(l);if(g?.fit){let e=U(await g.fit(d),d,`zoom`);if(e.applied)return c=0,r?.(e),e;h=e}let _=H(s,m||g?`unsupported`:`no-provider`,a);return(_.reason===`no-provider`||W(h?.reason))&&p(n,a,o),_},h=(e=`resize`)=>{let t=R(n());if(!t||t.resize===`initial`||t.resize===`until-interaction`&&s)return;u();let r=l(),i=()=>{a=null,m(void 0,{source:`viewer`,reason:e})};a=r?.requestAnimationFrame?r.requestAnimationFrame(i):setTimeout(i,16)},g=()=>{u(),i?.disconnect(),i=null};return{normalize:R,fit:async(e,t)=>(d(),s=!1,m(e,{source:t?.source||`api`,reason:t?.reason||`api`})),applyInitialFit:async(e={})=>{if(d(),c=0,s=!1,e.skip){let e=R(n())||R(`auto`);return H(e,`initial-view-state`,`initial`)}return m(void 0,{source:`initial`,reason:`initial`})},scheduleFit:h,observe(){g();let t=e(),n=t?.ownerDocument?.defaultView?.ResizeObserver||(typeof ResizeObserver<`u`?ResizeObserver:void 0);t&&n&&(i=new n(()=>h(`resize`)),i.observe(t))},markUserInteraction(){s=!0,d()},resetAutoFit(){s=!1,c=0},destroy(){g(),d(),c=0}}}})))()}var J,Y,ie,ae,oe;function X(){return(X=e((()=>{J=(e={})=>{let t=Number.isFinite(e.scale)&&e.scale?Number(e.scale):1;return{scale:t,label:e.label||`${Math.round(t*100)}%`,canZoomIn:e.canZoomIn??!1,canZoomOut:e.canZoomOut??!1,canReset:e.canReset??!1,minScale:e.minScale,maxScale:e.maxScale}},Y=e=>e===!1?{enabled:!1}:e===!0||e===void 0?{}:e,ie=(e=``)=>({query:e,total:0,currentIndex:-1,current:null,matches:[]}),ae=e=>e===!1?{enabled:!1,collectText:!1}:e===!0||e===void 0?{}:e,oe=(e,t)=>{let n=ae(t);if(n.enabled===!1||n.collectText===!1)return[];let r=Math.max(200,n.chunkSize||1200),i=Math.max(0,Math.min(r-1,n.chunkOverlap??160)),a=Math.max(0,n.maxTextLength||0),o=[];return e.forEach(e=>{let t=a?e.text.slice(0,a):e.text;if(!t)return;if(t.length<=r){o.push({id:`${e.id}-chunk-1`,text:t,anchor:e,startLine:e.line,endLine:e.line});return}let n=0,s=1;for(;n<t.length;){let a=t.slice(n,n+r);if(o.push({id:`${e.id}-chunk-${s}`,text:a,anchor:e,startLine:e.line,endLine:e.line}),n+r>=t.length)break;n+=r-i,s+=1}}),o}})))()}var Z,Q,$,se,ce;function le(){return(le=e((()=>{X(),k(),Z=e=>({scale:e.scale,label:e.label,canZoomIn:e.canZoomIn,canZoomOut:e.canZoomOut,canReset:e.canReset,minScale:e.minScale,maxScale:e.maxScale}),Q=(e,t)=>{let n=J(t||{});return e.scale=n.scale,e.label=n.label,e.canZoomIn=n.canZoomIn,e.canZoomOut=n.canZoomOut,e.canReset=n.canReset,e.minScale=n.minScale,e.maxScale=n.maxScale,e},$=()=>{let e=/* @__PURE__ */ new Set;return{emit(){e.forEach(e=>e())},subscribe(t){return e.add(t),()=>{e.delete(t)}},clear(){e.clear()}}},se=e=>e?.ownerDocument?.defaultView?.MutationObserver||(typeof MutationObserver<`u`?MutationObserver:void 0),ce=({root:e,enabled:t,beforeZoom:n,onChange:r})=>{let i=null,a=null,o=null,s=!1,c=J(),l=()=>{r?.(Z(c))},u=()=>{a?.(),a=null,i=null,Q(c,null)},d=()=>{if(t?.()===!1)return u(),null;let n=w(e());return n!==i&&(a?.(),i=n,a=(n?.subscribe)?.call(n,()=>{Q(c,n.getState()),s||l()})||null),Q(c,(n?.getState)?.call(n)||null),n},f=()=>{o?.disconnect(),o=null},p=async(e,t)=>{let r=d();if(!r||n&&await n(e)===!1)return Z(c);s=!0;try{let e=await t(r);return Q(c,e||r.getState()),Z(c)}finally{s=!1}};return{get provider(){return i},state:c,hasProvider(){return!!d()},refreshProvider:d,observe(){f();let t=e(),n=se(t);!t||!n||(o=new n(()=>{d()}),o.observe(t,{childList:!0,subtree:!0})),d()},clearProvider:u,getState(){return Z(c)},zoomIn:()=>p(`zoom-in`,e=>e.zoomIn()),zoomOut:()=>p(`zoom-out`,e=>e.zoomOut()),resetZoom:()=>p(`zoom-reset`,e=>e.resetZoom()),destroy(){f(),u()}}}})))()}export{d as C,m as D,h as E,te as S,p as T,ee as _,ie as a,x as b,K as c,B as d,k as f,O as g,w as h,oe as i,V as l,D as m,ce as n,X as o,S as p,le as r,Y as s,$ as t,q as u,T as v,f as w,E as x,C as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("vs/editor/editor.worker",["exports","../initialize-DL0l1TGY"],(function(i,e){"use strict";self.onmessage=()=>{e.isWorkerInitialized()||e.start(()=>({}))},i.initialize=e.initialize,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
|