@mlightcad/cad-simple-viewer 1.8.0-preview.0 → 1.8.0-preview.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 (53) hide show
  1. package/README.md +14 -0
  2. package/dist/cad-simple-viewer-AcUiFileOpenSession-BCcqBAH9.js +2427 -0
  3. package/dist/cad-simple-viewer-AcUiFileOpenSession-drptdOYc.js +324 -0
  4. package/dist/cad-simple-viewer-file-open-panel.js +32 -0
  5. package/dist/cad-simple-viewer-file-open-panel.umd.cjs +1 -0
  6. package/dist/cad-simple-viewer.js +7637 -9757
  7. package/dist/cad-simple-viewer.umd.cjs +122 -444
  8. package/file-open-panel.ts +6 -0
  9. package/lib/app/AcApOpenDatabaseOptions.d.ts +1 -1
  10. package/lib/app/AcApOpenDatabaseOptions.d.ts.map +1 -1
  11. package/lib/app/dataSource/AcApDataSourceIds.d.ts +5 -0
  12. package/lib/app/dataSource/AcApDataSourceIds.d.ts.map +1 -0
  13. package/lib/app/dataSource/AcApDataSourceIds.js +5 -0
  14. package/lib/app/dataSource/AcApDataSourceIds.js.map +1 -0
  15. package/lib/app/dataSource/AcApLocalDataSource.d.ts +1 -2
  16. package/lib/app/dataSource/AcApLocalDataSource.d.ts.map +1 -1
  17. package/lib/app/dataSource/AcApLocalDataSource.js +2 -2
  18. package/lib/app/dataSource/AcApLocalDataSource.js.map +1 -1
  19. package/lib/app/dataSource/AcApUrlDataSource.d.ts +1 -2
  20. package/lib/app/dataSource/AcApUrlDataSource.d.ts.map +1 -1
  21. package/lib/app/dataSource/AcApUrlDataSource.js +2 -2
  22. package/lib/app/dataSource/AcApUrlDataSource.js.map +1 -1
  23. package/lib/app/dataSource/acapBuildDataSourceMenu.js +1 -1
  24. package/lib/app/dataSource/acapBuildDataSourceMenu.js.map +1 -1
  25. package/lib/app/dataSource/index.d.ts +3 -2
  26. package/lib/app/dataSource/index.d.ts.map +1 -1
  27. package/lib/app/dataSource/index.js +3 -2
  28. package/lib/app/dataSource/index.js.map +1 -1
  29. package/lib/file-open-panel.d.ts +15 -0
  30. package/lib/file-open-panel.d.ts.map +1 -0
  31. package/lib/file-open-panel.js +33 -0
  32. package/lib/file-open-panel.js.map +1 -0
  33. package/lib/i18n/AcApI18n.d.ts.map +1 -1
  34. package/lib/i18n/AcApI18n.js +18 -9
  35. package/lib/i18n/AcApI18n.js.map +1 -1
  36. package/lib/ui/AcUiFileOpenLanding.d.ts +131 -0
  37. package/lib/ui/AcUiFileOpenLanding.d.ts.map +1 -0
  38. package/lib/ui/AcUiFileOpenLanding.js +248 -0
  39. package/lib/ui/AcUiFileOpenLanding.js.map +1 -0
  40. package/lib/ui/AcUiFileOpenPanel.d.ts +25 -5
  41. package/lib/ui/AcUiFileOpenPanel.d.ts.map +1 -1
  42. package/lib/ui/AcUiFileOpenPanel.js +25 -13
  43. package/lib/ui/AcUiFileOpenPanel.js.map +1 -1
  44. package/lib/ui/AcUiFileOpenSession.d.ts +119 -0
  45. package/lib/ui/AcUiFileOpenSession.d.ts.map +1 -0
  46. package/lib/ui/AcUiFileOpenSession.js +294 -0
  47. package/lib/ui/AcUiFileOpenSession.js.map +1 -0
  48. package/lib/ui/index.d.ts +2 -0
  49. package/lib/ui/index.d.ts.map +1 -1
  50. package/lib/ui/index.js +2 -0
  51. package/lib/ui/index.js.map +1 -1
  52. package/package.json +13 -3
  53. package/src/file-open-panel.ts +89 -0
@@ -0,0 +1,324 @@
1
+ "use strict";const ie=require("@mlightcad/data-model");function N(n){return{all:n=n||new Map,on:function(e,t){var i=n.get(e);i?i.push(t):n.set(e,[t])},off:function(e,t){var i=n.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var i=n.get(e);i&&i.slice().map(function(o){o(t)}),(i=n.get("*"))&&i.slice().map(function(o){o(e,t)})}}}var P=(n=>(n.Extents="extents",n.Saved="saved",n))(P||{}),I=(n=>(n[n.Read=0]="Read",n[n.Review=4]="Review",n[n.Write=8]="Write",n))(I||{});const ne={light:{"--ml-ui-text":"#303133","--ml-ui-text-muted":"#606266","--ml-ui-bg":"#ffffff","--ml-ui-border":"#dcdfe6","--ml-ui-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)","--ml-ui-overlay":"rgba(0, 0, 0, 0.18)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"},dark:{"--ml-ui-text":"#e5eaf3","--ml-ui-text-muted":"#cfd3dc","--ml-ui-bg":"#1d1e1f","--ml-ui-border":"#4c4d4f","--ml-ui-shadow":"0 6px 18px rgba(0, 0, 0, 0.35)","--ml-ui-overlay":"rgba(0, 0, 0, 0.5)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"}},oe={light:{"--ml-ui-text":"var(--el-text-color-primary, #303133)","--ml-ui-text-muted":"var(--el-text-color-regular, #606266)","--ml-ui-bg":"var(--el-bg-color-overlay, #ffffff)","--ml-ui-border":"var(--el-border-color, #dcdfe6)","--ml-ui-shadow":"var(--el-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.12))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.18))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"},dark:{"--ml-ui-text":"var(--el-text-color-primary, #e5eaf3)","--ml-ui-text-muted":"var(--el-text-color-regular, #cfd3dc)","--ml-ui-bg":"var(--el-bg-color-overlay, #1d1e1f)","--ml-ui-border":"var(--el-border-color, #4c4d4f)","--ml-ui-shadow":"var(--el-box-shadow, 0 6px 18px rgba(0, 0, 0, 0.35))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.5))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"}},O=new Set;let S=0;function _(n){return O.add(n),()=>{O.delete(n)}}function U(n,e=document.documentElement,t){const i=t!=null&&t.isolated?ne[n]:oe[n];if(Object.keys(i).forEach(a=>{e.style.setProperty(a,i[a])}),e.setAttribute("data-ml-ui-theme",n),e.style.colorScheme=n,!(!(e===document.documentElement||e.hasAttribute("data-ml-ui-theme-root"))||S>0)){S++;try{for(const a of[...O])try{a(n)}catch{}}finally{S--}}}function z(n){if(n.classList.contains("ml-theme-dark")||n.classList.contains("dark"))return"dark";if(n.classList.contains("ml-theme-light"))return"light"}function R(n){let e=n;for(;e;){const a=e.getAttribute("data-ml-ui-theme");if(a==="light"||a==="dark")return a;const s=z(e);if(s)return s;e=e.parentElement}const t=document.documentElement.getAttribute("data-ml-ui-theme");if(t==="light"||t==="dark")return t;const i=document.documentElement.getAttribute("data-mlcad-theme");if(i==="light"||i==="dark")return i;const o=z(document.documentElement);return o||"dark"}const B=600,L=`(max-width: ${B}px)`,re=440,W=24,ae=`calc(100vw - ${W}px)`,se=1,le=2,ce=45,de=46,ue=47,me=48;function E(){var n;return((n=window.matchMedia)==null?void 0:n.call(window,L).matches)??!1}const G=960,D=`(max-width: ${G}px)`;function j(){var n;return((n=window.matchMedia)==null?void 0:n.call(window,D).matches)??!1}const H="(pointer: coarse)",pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;function Y(){var e;if(typeof navigator>"u")return!1;const n=navigator;return pe.test(n.userAgent||"")||n.platform==="MacIntel"&&(n.maxTouchPoints??0)>1?!0:((e=window.matchMedia)==null?void 0:e.call(window,H).matches)??!1}function k(){return E()?"phone":j()?"pad":"desktop"}function V(){return k()!=="desktop"||Y()}function fe(n){return E()?!0:n&&V()}function he(n){if(typeof window.matchMedia!="function")return()=>{};const e=window.matchMedia(L),t=window.matchMedia(D);let i=k();const o=()=>{const a=k();a!==i&&(i=a,n(a))};return e.addEventListener("change",o),t.addEventListener("change",o),()=>{e.removeEventListener("change",o),t.removeEventListener("change",o)}}const y="ACAD",b="USER",m=class m{static get messages(){return this._messages}static getLocaleMessage(e){return this._messages[e]}static mergeLocaleMessage(e,t){Z(this._messages[e],t)}static registerMessage(e,t){this.mergeLocaleMessage(e,t)}static setCurrentLocale(e){if(this._currentLocale===e)return;const t=this._currentLocale;this._currentLocale=e,this.events.localeChanged.dispatch({old:t,new:this._currentLocale})}static get currentLocale(){return this._currentLocale}static t(e,t){const i=this._currentLocale,o=this._messages[i],a=e.split(".");let s=o;for(const r of a){if(!s||typeof s!="object")return(t==null?void 0:t.fallback)??e;s=s[r]}return typeof s=="string"?s:(t==null?void 0:t.fallback)??e}static cmdKey(e,t,i){return`command.${e}.${t.toLowerCase()}.${i}`}static cmd(e,t,i){return this.t(this.cmdKey(e,t,i))}static cmdDescription(e,t){return this.cmd(e,t,"description")}static cmdPrompt(e,t){return this.cmd(e,t,"prompt")}static sysCmd(e,t){return this.cmd(y,e,t)}static sysCmdKey(e,t){return this.cmdKey(y,e,t)}static userCmd(e,t){return this.cmd(b,e,t)}static userCmdKey(e,t){return this.cmdKey(b,e,t)}static sysCmdDescription(e){return this.cmdDescription(y,e)}static sysCmdPrompt(e){return this.cmdPrompt(y,e)}};m._messages={en:{},zh:{},tr:{},cs:{},ar:{}},m._currentLocale="en",m.events={localeChanged:new ie.AcCmEventManager},m.userCmdDescription=e=>m.cmdDescription(b,e),m.userCmdPrompt=e=>m.cmdPrompt(b,e);let d=m;function Z(n,e){for(const t of Object.keys(e)){const i=e[t],o=n[t];C(o)&&C(i)?Z(o,i):n[t]=i}}function C(n){return typeof n=="object"&&n!==null}const ge={document:{untitled:"بلا عنوان"},commandLine:{noLast:"(لا يوجد أمر سابق)",unknownCommand:"أمر غير معروف",executed:"تم تنفيذ الأمر",showHistory:"عرض سجل الأوامر",placeholder:"اكتب أمرًا",showMessages:"عرض سجل الرسائل",canceled:"*تم الإلغاء*",noHistory:"(لا يوجد سجل)",invalidInput:"إدخال غير صالح.",close:"إغلاق سطر الأوامر"},mobileCommand:{length:"الطول",angle:"الزاوية",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"تأكيد",cancel:"إلغاء",help:"مساعدة",back:"رجوع",collapse:"طي",expand:"توسيع"},inputManager:{firstCorner:"حدد الركن الأول أو",secondCorner:"حدد الركن الثاني أو"},message:{onLockedLayer:"على طبقة مقفلة.",fetchingDrawingFile:"جارٍ جلب ملف الرسم ...",exportingDxf:"جارٍ تصدير DXF ...",exportingPdf:"جارٍ تصدير PDF ...",exportingSvg:"جارٍ تصدير SVG ...",calculatingSmartExtents:"جارٍ حساب الملاءمة الذكية ...",importingPdf:"جارٍ استيراد PDF ...",exportingEntityPreview:"جارٍ تصدير الصورة ...",collectingMemoryProfile:"جارٍ تحليل الذاكرة ...",fontCached:"تم تخزين الخط بنجاح",fontCacheFailed:"فشل تخزين الخط",fontsNotFound:"خطوط غير موجودة في مستودع الخطوط: {fonts}.",fontsNotLoaded:"تعذر تحميل الخطوط: {fonts}.",fontMissedInDrawing:'الخط "{font}" مطلوب بواسطة {count} من كائنات النص ولكنه غير متاح. يتم العرض باستخدام "{replacementFont}".',fontMissedReplacement:'"{font}" (يُعرض بـ "{replacement}")',failedToGetAvaiableFonts:'تعذر الحصول على الخطوط من "{url}"!',failedToOpenFile:'فشل فتح الملف "{fileName}"!',failedToOpenFileToast:'فشل فتح "{fileName}". راجع مركز الإشعارات للتفاصيل.',failedToOpenFileWorkerOom:'فشل فتح "{fileName}". فشل التحليل بسبب نفاد الذاكرة المتاحة (محلل LibreDWG). يمكنك النقر على {dwgParserLink} لشراء محلل DWG التجاري وفتح الرسومات الكبيرة دون حدوث هذا الانهيار.',failedToOpenFileWorkerOomLink:"هذه الصفحة",failedToOpenFileWorkerTimeout:'فشل فتح "{fileName}". انتهت مهلة العملية أثناء تحليل الرسم.',failedToOpenFileFontLoadFailed:'فشل فتح "{fileName}". تعذر تحميل الخطوط المطلوبة.',failedToOpenFileLicenseExpired:'فشل فتح "{fileName}". انتهت صلاحية ترخيص محول DWG.',failedToOpenFileLicenseInvalid:'فشل فتح "{fileName}". ترخيص محول DWG مفقود أو غير صالح.',unknownEntities:"يحتوي هذا الرسم على {count} عنصر غير معروف أو غير مدعوم. لن يتم عرض هذه العناصر.",tianzhengEntities:"يحتوي هذا الرسم على كيانات مخصصة من TArch / Tianzheng (أو جهات خارجية مشابهة) (حوالي {count}). لا يمكن تحليلها بالكامل في هذه البيئة، لذلك قد لا يُعرض بعض المحتوى.",emptyProxyEntities:"يحتوي هذا الرسم على {count} كيان مخصص بدون رسومات وكيلة. لن يتم عرض هذه العناصر."},notification:{center:{title:"الإشعارات",clearAll:"مسح الكل",noNotifications:"لا توجد إشعارات"},group:{fontMissed:"خطوط مفقودة",fontMissedSummary:"{count} رسائل متعلقة بالخطوط. انقر للتفاصيل.",unsupportedEntities:"كيانات غير مدعومة",unsupportedEntitiesSummary:"{count} رسائل متعلقة بالتحليل. انقر للتفاصيل.",genericSummary:"{count} رسائل. انقر للتفاصيل."},title:{failedToOpenFile:"فشل فتح الملف",failedToOpenFileWorkerOom:"نفاد الذاكرة",failedToOpenFileWorkerTimeout:"انتهت مهلة فتح الرسم",failedToOpenFileFontLoadFailed:"فشل تحميل الخطوط",failedToOpenFileLicenseExpired:"انتهت صلاحية الترخيص",failedToOpenFileLicenseInvalid:"ترخيص غير صالح",fontNotFound:"الخط غير موجود",fontNotLoaded:"لم يتم تحميل الخط",parsingWarning:"مشكلات أثناء تحليل الرسم",systemMessage:"رسالة النظام",systemWarning:"تحذير النظام",systemError:"خطأ النظام",systemInfo:"معلومات النظام"}},progress:{start:"بدء تحليل الملف ...",parse:"جارٍ تحليل الملف ...",font:"جارٍ تنزيل الخطوط المطلوبة لهذا الرسم ...",ltype:"جارٍ تحليل أنواع الخطوط ...",style:"جارٍ تحليل أنماط النص ...",dimstyle:"جارٍ تحليل أنماط الأبعاد ...",layer:"جارٍ تحليل الطبقات ...",vport:"جارٍ تحليل منافذ العرض ...",blockrecord:"جارٍ تحليل سجلات الكتل ...",header:"جارٍ تحليل رأس الملف ...",block:"جارٍ تحليل الكتل ...",entity:"جارٍ تحليل العناصر ...",object:"جارٍ تحليل القواميس المسماة ...",rendering:"جارٍ عرض الرسم ...",end:"اكتمل!"},about:{title:"حول",close:"إغلاق",product:"عارض CAD",tagline:"عارض CAD عالي الأداء للويب لملفات DWG وDXF.",website:"الموقع الإلكتروني",docs:"التوثيق",repository:"GitHub",copyright:"© {year} mlightcad. جميع الحقوق محفوظة.",ok:"موافق"},drawStyle:{color:"اللون",fontSize:"ارتفاع النص"},shortCutToolbar:{more:"المزيد",undo:"تراجع",redo:"إعادة",erase:"حذف",collapse:"طي شريط الأدوات",expand:"توسيع شريط الأدوات"},textHeight:{title:"ارتفاع النص",close:"إغلاق",ok:"موافق",cancel:"إلغاء",adaptive:"ملاءمة الشاشة",custom:"ارتفاع نص مخصص",customPlaceholder:"ارتفاع العالم",fromScreen:"من حجم الشاشة",fromScreenHint:"أدخل حجم النص المطلوب على الشاشة عند التكبير الحالي. يُحوَّل إلى ارتفاع ثابت في إحداثيات الرسم ويبقى كما هو عند تغيير التكبير لاحقًا.",screenPxPlaceholder:"حجم الخط",screenUnit:"px",convert:"تحويل"},entityPick:{cancel:"إلغاء التحديد"},colorPicker:{title:"تحديد اللون",close:"إغلاق",ok:"موافق",cancel:"إلغاء",index:"فهرس اللون: ",rgb:"RGB: ",input:"اللون",inputPlaceholder:"1-255 أو #RRGGBB"},touchPointTutorial:{title:"كيف أختار النقاط بدقة؟",description:"اضغط مطولاً على الشاشة لمدة نصف ثانية تقريباً. يظهر صليب فوق إصبعك ويتبعه أثناء الحركة ويلتقط إلى الهندسة لاختيار أدق.",snoozeToday:"لا تذكرني اليوم",hideForever:"لا تذكرني مرة أخرى",ok:"فهمت"},dataSource:{open:"فتح",local:"ملف محلي",url:"من عنوان URL",openFrom:"فتح من {name}",signInTo:"تسجيل الدخول إلى {name}",signOutOf:"تسجيل الخروج من {name}",signOutOfAccount:"تسجيل الخروج من {name} ({account})",urlDialogTitle:"فتح من عنوان URL",urlDialogHint:"أدخل عنوان URL لملف .dwg أو .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"إلغاء",onedrive:"OneDrive",googledrive:"Google Drive",or:"أو",dropFile:"أسقط ملفًا هنا أو",browse:"تصفح",dropOrBrowse:"أسقط ملف DWG أو DXF هنا، أو تصفح",newDrawing:"رسم جديد",source:"المصدر",unavailable:"هذا المصدر غير متاح حاليًا.",selectFile:"اختيار ملف",signInRequired:"سجّل الدخول أولاً لاختيار ملف.",downloading:"جارٍ تنزيل الملف ..."}},ye={document:{untitled:"Bez názvu"},commandLine:{noLast:"(žádný předchozí příkaz)",unknownCommand:"Neznámý příkaz",executed:"Provedený příkaz",showHistory:"Zobrazit historii příkazů",placeholder:"Zadejte příkaz",showMessages:"Zobrazit historii zpráv",canceled:"*Zrušeno*",noHistory:"(žádná historie)",invalidInput:"Neplatný vstup.",close:"Zavřít příkazový řádek"},mobileCommand:{length:"Délka",angle:"Úhel",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Potvrdit",cancel:"Zrušit",help:"Nápověda",back:"Zpět",collapse:"Sbalit",expand:"Rozbalit"},inputManager:{firstCorner:"Zadejte první roh nebo",secondCorner:"Zadejte druhý roh nebo"},message:{onLockedLayer:"na uzamčené hladině.",fetchingDrawingFile:"Načítám soubor…",exportingDxf:"Exportuji DXF…",exportingPdf:"Exportuji PDF…",exportingSvg:"Exportuji SVG…",calculatingSmartExtents:"Počítám chytrý rozsah…",importingPdf:"Importuji PDF…",exportingEntityPreview:"Exportuji obrázek…",collectingMemoryProfile:"Analyzuji paměť…",fontCached:"Font úspěšně uložen do mezipaměti",fontCacheFailed:"Uložení fontu do mezipaměti selhalo",fontsNotFound:"Fonty nenalezené v úložišti: {fonts}.",fontsNotLoaded:"Nepodařilo se načíst fonty: {fonts}.",fontMissedInDrawing:"Font „{font}“ vyžaduje {count} textových objektů, ale není k dispozici. Zobrazuje se jako „{replacementFont}“.",fontMissedReplacement:"„{font}“ (zobrazeno fontem „{replacement}“)",failedToGetAvaiableFonts:"Nepodařilo se získat fonty z „{url}“!",failedToOpenFile:"Nepodařilo se otevřít soubor „{fileName}“!",failedToOpenFileToast:"Nepodařilo se otevřít „{fileName}“. Podrobnosti najdete v centru oznámení.",failedToOpenFileWorkerOom:"Nepodařilo se otevřít „{fileName}“. Analýza selhala kvůli nedostatku dostupné paměti (LibreDWG parser). Kliknutím na {dwgParserLink} můžete zakoupit komerční DWG parser a otevírat velké výkresy bez tohoto pádu.",failedToOpenFileWorkerOomLink:"tuto stránku",failedToOpenFileWorkerTimeout:"Nepodařilo se otevřít „{fileName}“. Při načítání výkresu vypršel časový limit.",failedToOpenFileFontLoadFailed:"Nepodařilo se otevřít „{fileName}“. Potřebné fonty se nepodařilo načíst.",failedToOpenFileLicenseExpired:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG vypršela.",failedToOpenFileLicenseInvalid:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG chybí nebo je neplatná.",unknownEntities:"Tento výkres obsahuje {count} neznámých nebo nepodporovaných objektů! Tyto objekty nebudou zobrazeny.",tianzhengEntities:"Tento výkres obsahuje vlastní objekty TArch / Tianzheng (nebo podobné třetí strany) (asi {count}). V tomto prostředí je nelze plně zpracovat, takže se část obsahu nemusí zobrazit.",emptyProxyEntities:"Tento výkres obsahuje {count} vlastních objektů bez proxy grafiky! Tyto objekty nebudou zobrazeny."},notification:{center:{title:"Oznámení",clearAll:"Vymazat vše",noNotifications:"Žádná oznámení"},group:{fontMissed:"Chybějící fonty",fontMissedSummary:"{count} zpráv o fontech. Kliknutím zobrazíte podrobnosti.",unsupportedEntities:"Nepodporované objekty",unsupportedEntitiesSummary:"{count} zpráv o načítání. Kliknutím zobrazíte podrobnosti.",genericSummary:"{count} zpráv. Kliknutím zobrazíte podrobnosti."},title:{failedToOpenFile:"Nepodařilo se otevřít soubor",failedToOpenFileWorkerOom:"Nedostatek paměti",failedToOpenFileWorkerTimeout:"Vypršel časový limit otevření",failedToOpenFileFontLoadFailed:"Načtení fontu selhalo",failedToOpenFileLicenseExpired:"Licence vypršela",failedToOpenFileLicenseInvalid:"Neplatná licence",fontNotFound:"Font nenalezen",fontNotLoaded:"Font nenačten",parsingWarning:"Problémy při načítání výkresu",systemMessage:"Systémová zpráva",systemWarning:"Systémové varování",systemError:"Systémová chyba",systemInfo:"Systémové informace"}},progress:{start:"Zahajuji načítání souboru…",parse:"Načítám soubor…",font:"Stahuji fonty potřebné pro tento výkres…",ltype:"Načítám typy čar…",style:"Načítám textové styly…",dimstyle:"Načítám kótovací styly…",layer:"Načítám hladiny…",vport:"Načítám výřezy…",blockrecord:"Načítám záznamy bloků…",header:"Načítám hlavičku…",block:"Načítám bloky…",entity:"Načítám objekty…",object:"Načítám pojmenované slovníky…",rendering:"Vykreslování výkresu ...",end:"Hotovo!"},about:{title:"O aplikaci",close:"Zavřít",product:"CAD Viewer",tagline:"Vysokovýkonný webový CAD prohlížeč pro výkresy DWG a DXF.",website:"Web",docs:"Dokumentace",repository:"GitHub",copyright:"© {year} mlightcad. Všechna práva vyhrazena.",ok:"OK"},drawStyle:{color:"Barva",fontSize:"Výška textu"},shortCutToolbar:{more:"Více",undo:"Zpět",redo:"Znovu",erase:"Smazat",collapse:"Sbalit panel nástrojů",expand:"Rozbalit panel nástrojů"},textHeight:{title:"Výška textu",close:"Zavřít",ok:"OK",cancel:"Zrušit",adaptive:"Přizpůsobit obrazovce",custom:"Vlastní výška textu",customPlaceholder:"Světová výška",fromScreen:"Ze velikosti na obrazovce",fromScreenHint:"Zadejte, jak velký má text vypadat na obrazovce při aktuálním zoomu. Přepočítá se na pevnou světovou výšku, která se při pozdějším zoomování nemění.",screenPxPlaceholder:"Velikost písma",screenUnit:"px",convert:"Přepočítat"},entityPick:{cancel:"Zrušit výběr"},colorPicker:{title:"Vybrat barvu",close:"Zavřít",ok:"OK",cancel:"Zrušit",index:"Index barvy: ",rgb:"RGB: ",input:"Barva",inputPlaceholder:"1-255 nebo #RRGGBB"},touchPointTutorial:{title:"Jak přesně vybrat bod?",description:"Podržte prst na obrazovce asi 0,5 sekundy. Nad prstem se objeví kříž, který při pohybu sleduje prst a přichytává se k geometrii pro přesnější výběr.",snoozeToday:"Dnes už nepřipomínat",hideForever:"Už nepřipomínat",ok:"Rozumím"},dataSource:{open:"Otevřít",local:"Místní soubor",url:"Z URL",openFrom:"Otevřít z {name}",signInTo:"Přihlásit se k {name}",signOutOf:"Odhlásit se z {name}",signOutOfAccount:"Odhlásit se z {name} ({account})",urlDialogTitle:"Otevřít z URL",urlDialogHint:"Zadejte URL souboru .dwg nebo .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Zrušit",onedrive:"OneDrive",googledrive:"Google Drive",or:"nebo",dropFile:"Přetáhněte soubor sem nebo",browse:"procházet",dropOrBrowse:"Přetáhněte soubor DWG nebo DXF sem, nebo procházejte",newDrawing:"Nový výkres",source:"Zdroj",unavailable:"Tento zdroj zatím není k dispozici.",selectFile:"Vybrat soubor",signInRequired:"Nejprve se přihlaste a pak vyberte soubor.",downloading:"Stahuji soubor ..."}},be={document:{untitled:"Untitled"},commandLine:{noLast:"(no last command)",unknownCommand:"Unknown command",executed:"Executed command",showHistory:"Show command history",placeholder:"Type command",showMessages:"Show message history",canceled:"*Canceled*",noHistory:"(no history)",invalidInput:"Invalid input.",close:"Close command line"},mobileCommand:{length:"Length",angle:"Angle",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Confirm",cancel:"Cancel",help:"Help",back:"Back",collapse:"Collapse",expand:"Expand"},inputManager:{firstCorner:"Specify the first corner or",secondCorner:"Specify the second corner or"},message:{onLockedLayer:"on a locked layer.",fetchingDrawingFile:"Fetching file ...",exportingDxf:"Exporting DXF ...",exportingPdf:"Exporting PDF ...",exportingSvg:"Exporting SVG ...",calculatingSmartExtents:"Calculating smart extents ...",importingPdf:"Importing PDF ...",exportingEntityPreview:"Exporting image ...",collectingMemoryProfile:"Analyzing memory ...",fontCached:"Font cached successfully",fontCacheFailed:"Failed to cache font",fontsNotFound:"Fonts not found in the font repository: {fonts}.",fontsNotLoaded:"Failed to load fonts: {fonts}.",fontMissedInDrawing:'Font "{font}" is required by {count} text object(s) but is not available. Displaying with "{replacementFont}".',fontMissedReplacement:'"{font}" (displaying with "{replacement}")',failedToGetAvaiableFonts:'Failed to get available fonts from "{url}"!',failedToOpenFile:'Failed to open file "{fileName}"!',failedToOpenFileToast:'Failed to open "{fileName}". Check the notification center for details.',failedToOpenFileWorkerOom:'Failed to open "{fileName}". Parsing failed because available memory was insufficient (LibreDWG parser). You can click {dwgParserLink} to purchase the commercial DWG parser and open large drawings without this crash.',failedToOpenFileWorkerOomLink:"this page",failedToOpenFileWorkerTimeout:'Failed to open "{fileName}". The operation timed out while parsing the drawing.',failedToOpenFileFontLoadFailed:'Failed to open "{fileName}". Required fonts could not be loaded.',failedToOpenFileLicenseExpired:'Failed to open "{fileName}". The DWG converter license has expired.',failedToOpenFileLicenseInvalid:'Failed to open "{fileName}". The DWG converter license is missing or invalid.',unknownEntities:"This drawing contains {count} unknown or unsupported entities! Those entities will not be shown.",tianzhengEntities:"This drawing contains TArch / Tianzheng (or similar third-party) custom entities (about {count}). They cannot be fully parsed in this environment, so some content may not display.",emptyProxyEntities:"This drawing contains {count} custom entities without proxy graphics! Those entities will not be shown."},notification:{center:{title:"Notifications",clearAll:"Clear All",noNotifications:"No notifications"},group:{fontMissed:"Missing Fonts",fontMissedSummary:"{count} font-related messages. Click to expand details.",unsupportedEntities:"Unsupported Entities",unsupportedEntitiesSummary:"{count} parsing-related messages. Click to expand details.",genericSummary:"{count} messages. Click to expand details."},title:{failedToOpenFile:"Failed to Open File",failedToOpenFileWorkerOom:"Insufficient Memory",failedToOpenFileWorkerTimeout:"Open Timed Out",failedToOpenFileFontLoadFailed:"Font Load Failed",failedToOpenFileLicenseExpired:"License Expired",failedToOpenFileLicenseInvalid:"Invalid License",fontNotFound:"Font Not Found",fontNotLoaded:"Font Not Loaded",parsingWarning:"Issues on Parsing Drawing",systemMessage:"System Message",systemWarning:"System Warning",systemError:"System Error",systemInfo:"System Info"}},progress:{start:"Start parsing file ...",parse:"Parsing file ...",font:"Downloading fonts needed by this drawing ...",ltype:"Parsing line types ...",style:"Parsing text syltes ...",dimstyle:"Parsing dimension styles ...",layer:"Parsing layers ...",vport:"Parsing viewports ...",blockrecord:"Parsing block record ...",header:"Parsing header ...",block:"Parsing blocks ...",entity:"Parsing entities ...",object:"Parsing named dictionaries ...",rendering:"Rendering drawing ...",end:"Finished!"},about:{title:"About",close:"Close",product:"CAD Viewer",tagline:"High-performance web CAD viewer for DWG and DXF drawings.",website:"Website",docs:"Documentation",repository:"GitHub",copyright:"© {year} mlightcad. All rights reserved.",ok:"OK"},drawStyle:{color:"Color",fontSize:"Text height"},shortCutToolbar:{more:"More",undo:"Undo",redo:"Redo",erase:"Delete",collapse:"Collapse toolbar",expand:"Expand toolbar"},textHeight:{title:"Text Height",close:"Close",ok:"OK",cancel:"Cancel",adaptive:"Fit to screen",custom:"Custom text height",customPlaceholder:"World height",fromScreen:"From screen size",fromScreenHint:"Enter how large the text should look on screen at the current zoom. It is converted to a fixed world-space height that stays constant when you zoom later.",screenPxPlaceholder:"Font size",screenUnit:"px",convert:"Convert"},entityPick:{cancel:"Cancel selection"},colorPicker:{title:"Select Color",close:"Close",ok:"OK",cancel:"Cancel",index:"Color Index: ",rgb:"RGB: ",input:"Color",inputPlaceholder:"1-255 or #RRGGBB"},touchPointTutorial:{title:"How to pick points precisely?",description:"Long-press on the screen for about 0.5 seconds. A cross appears above your finger and follows as you move, snapping to geometry for more accurate picks.",snoozeToday:"Don't remind me today",hideForever:"Don't remind me again",ok:"Got it"},dataSource:{open:"Open",local:"Local file",url:"From URL",openFrom:"Open from {name}",signInTo:"Sign in to {name}",signOutOf:"Sign out of {name}",signOutOfAccount:"Sign out of {name} ({account})",urlDialogTitle:"Open from URL",urlDialogHint:"Enter a URL to a .dwg or .dxf file.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Cancel",onedrive:"OneDrive",googledrive:"Google Drive",or:"or",dropFile:"Drop a file here or",browse:"browse",dropOrBrowse:"Drop a DWG or DXF file here, or browse",newDrawing:"New Drawing",source:"Source",unavailable:"This source is not available yet.",selectFile:"Select file",signInRequired:"Sign in first to select a file.",downloading:"Downloading file ..."}},ve={document:{untitled:"Adsız"},commandLine:{noLast:"(önceki komut yok)",unknownCommand:"Bilinmeyen komut",executed:"Komut çalıştırıldı",showHistory:"Komut geçmişini göster",placeholder:"Komut girin",showMessages:"Mesaj geçmişini göster",canceled:"*İptal edildi*",noHistory:"(geçmiş yok)",invalidInput:"Geçersiz giriş.",close:"Komut satırını kapat"},mobileCommand:{length:"Uzunluk",angle:"Açı",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Onayla",cancel:"İptal",help:"Yardım",back:"Geri",collapse:"Daralt",expand:"Genişlet"},inputManager:{firstCorner:"İlk köşeyi belirtin veya",secondCorner:"İkinci köşeyi belirtin veya"},message:{onLockedLayer:"kilitli katmandaydı.",fetchingDrawingFile:"Dosya alınıyor ...",exportingDxf:"DXF dışa aktarılıyor ...",exportingPdf:"PDF dışa aktarılıyor ...",exportingSvg:"SVG dışa aktarılıyor ...",calculatingSmartExtents:"Akıllı sınırlar hesaplanıyor ...",importingPdf:"PDF içe aktarılıyor ...",exportingEntityPreview:"Görüntü dışa aktarılıyor ...",collectingMemoryProfile:"Bellek analiz ediliyor ...",fontCached:"Yazı tipi başarıyla önbelleğe alındı",fontCacheFailed:"Yazı tipi önbelleğe alınamadı",fontsNotFound:"Yazı tipi deposunda bulunamadı: {fonts}.",fontsNotLoaded:"Yazı tipleri yüklenemedi: {fonts}.",fontMissedInDrawing:'"{font}" yazı tipi {count} metin nesnesi tarafından gerekli, ancak kullanılamıyor. "{replacementFont}" ile gösteriliyor.',fontMissedReplacement:'"{font}" ("{replacement}" ile gösteriliyor)',failedToGetAvaiableFonts:'"{url}" adresinden yazı tipleri alınamadı!',failedToOpenFile:'"{fileName}" dosyası açılamadı!',failedToOpenFileToast:'"{fileName}" açılamadı. Ayrıntılar için bildirim merkezine bakın.',failedToOpenFileWorkerOom:'"{fileName}" açılamadı. Ayrıştırma, yetersiz bellek nedeniyle başarısız oldu (LibreDWG parser). Büyük çizimleri çökmeden açmak için ticari DWG parser satın almak üzere {dwgParserLink} bağlantısına tıklayabilirsiniz.',failedToOpenFileWorkerOomLink:"bu sayfa",failedToOpenFileWorkerTimeout:'"{fileName}" açılamadı. Çizim ayrıştırılırken işlem zaman aşımına uğradı.',failedToOpenFileFontLoadFailed:'"{fileName}" açılamadı. Gerekli yazı tipleri yüklenemedi.',failedToOpenFileLicenseExpired:'"{fileName}" açılamadı. DWG dönüştürücü lisansı süresi dolmuş.',failedToOpenFileLicenseInvalid:'"{fileName}" açılamadı. DWG dönüştürücü lisansı eksik veya geçersiz.',unknownEntities:"Bu çizim {count} bilinmeyen veya desteklenmeyen varlık içeriyor! Bu varlıklar gösterilmeyecek.",tianzhengEntities:"Bu çizim TArch / Tianzheng (veya benzeri üçüncü taraf) özel varlıklar içeriyor (yaklaşık {count}). Bu ortamda tam olarak ayrıştırılamazlar, bu nedenle bazı içerikler görüntülenmeyebilir.",emptyProxyEntities:"Bu çizim proxy grafiği olmayan {count} özel varlık içeriyor! Bu varlıklar gösterilmeyecek."},notification:{center:{title:"Bildirimler",clearAll:"Tümünü Temizle",noNotifications:"Bildirim yok"},group:{fontMissed:"Eksik Yazı Tipleri",fontMissedSummary:"{count} yazı tipi ile ilgili mesaj. Ayrıntılar için tıklayın.",unsupportedEntities:"Desteklenmeyen Varlıklar",unsupportedEntitiesSummary:"{count} ayrıştırma ile ilgili mesaj. Ayrıntılar için tıklayın.",genericSummary:"{count} mesaj. Ayrıntılar için tıklayın."},title:{failedToOpenFile:"Dosya Açılamadı",failedToOpenFileWorkerOom:"Yetersiz Bellek",failedToOpenFileWorkerTimeout:"Açma Zaman Aşımı",failedToOpenFileFontLoadFailed:"Yazı Tipi Yüklenemedi",failedToOpenFileLicenseExpired:"Lisans Süresi Doldu",failedToOpenFileLicenseInvalid:"Geçersiz Lisans",fontNotFound:"Yazı Tipi Bulunamadı",fontNotLoaded:"Yazı Tipi Yüklenemedi",parsingWarning:"Çizim Ayrıştırma Sorunları",systemMessage:"Sistem Mesajı",systemWarning:"Sistem Uyarısı",systemError:"Sistem Hatası",systemInfo:"Sistem Bilgisi"}},progress:{start:"Dosya ayrıştırma başlatılıyor ...",parse:"Dosya ayrıştırılıyor ...",font:"Bu çizim için gerekli yazı tipleri indiriliyor ...",ltype:"Çizgi tipleri ayrıştırılıyor ...",style:"Metin stilleri ayrıştırılıyor ...",dimstyle:"Ölçülendirme stilleri ayrıştırılıyor ...",layer:"Katmanlar ayrıştırılıyor ...",vport:"Görüntü portları ayrıştırılıyor ...",blockrecord:"Blok kaydı ayrıştırılıyor ...",header:"Başlık ayrıştırılıyor ...",block:"Bloklar ayrıştırılıyor ...",entity:"Nesneler ayrıştırılıyor ...",object:"Adlandırılmış sözlükler ayrıştırılıyor ...",rendering:"Çizim render ediliyor ...",end:"Tamamlandı!"},about:{title:"Hakkında",close:"Kapat",product:"CAD Viewer",tagline:"DWG ve DXF çizimleri için yüksek performanslı web CAD görüntüleyici.",website:"Web sitesi",docs:"Belgeler",repository:"GitHub",copyright:"© {year} mlightcad. Tüm hakları saklıdır.",ok:"Tamam"},drawStyle:{color:"Renk",fontSize:"Yazı yüksekliği"},shortCutToolbar:{more:"Daha fazla",undo:"Geri al",redo:"Yinele",erase:"Sil",collapse:"Araç çubuğunu daralt",expand:"Araç çubuğunu genişlet"},textHeight:{title:"Yazı Yüksekliği",close:"Kapat",ok:"Tamam",cancel:"İptal",adaptive:"Ekrana uyarla",custom:"Özel yazı yüksekliği",customPlaceholder:"Dünya yüksekliği",fromScreen:"Ekran boyutundan",fromScreenHint:"Geçerli yakınlaştırmada ekranda istediğiniz yazı boyutunu girin. Sabit bir dünya yüksekliğine dönüştürülür; sonra yakınlaştırınca bu yükseklik değişmez.",screenPxPlaceholder:"Yazı boyutu",screenUnit:"px",convert:"Dönüştür"},entityPick:{cancel:"Seçimi iptal et"},colorPicker:{title:"Renk Seç",close:"Kapat",ok:"Tamam",cancel:"İptal",index:"Renk İndeksi: ",rgb:"RGB: ",input:"Renk",inputPlaceholder:"1-255 veya #RRGGBB"},touchPointTutorial:{title:"Noktalar nasıl hassas seçilir?",description:"Ekranda yaklaşık 0,5 saniye basılı tutun. Parmağınızın üstünde bir artı belirir ve hareket ederken geometriye yapışarak daha doğru seçim yapmanızı sağlar.",snoozeToday:"Bugün tekrar hatırlatma",hideForever:"Bir daha hatırlatma",ok:"Anladım"},dataSource:{open:"Aç",local:"Yerel dosya",url:"URL'den",openFrom:"{name} konumundan aç",signInTo:"{name} oturumu aç",signOutOf:"{name} oturumunu kapat",signOutOfAccount:"{name} oturumunu kapat ({account})",urlDialogTitle:"URL'den aç",urlDialogHint:".dwg veya .dxf dosyasının URL'sini girin.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"İptal",onedrive:"OneDrive",googledrive:"Google Drive",or:"veya",dropFile:"Dosyayı buraya bırakın veya",browse:"göz atın",dropOrBrowse:"DWG veya DXF dosyasını buraya bırakın veya göz atın",newDrawing:"Yeni çizim",source:"Kaynak",unavailable:"Bu kaynak henüz kullanılamıyor.",selectFile:"Dosya seç",signInRequired:"Dosya seçmek için önce oturum açın.",downloading:"Dosya indiriliyor ..."}},ke={document:{untitled:"未命名"},commandLine:{noLast:"(无上一次命令)",unknownCommand:"未知命令",executed:"已执行命令",showHistory:"显示命令历史",placeholder:"输入命令",showMessages:"显示消息历史",canceled:"*已取消*",noHistory:"(无历史记录)",invalidInput:"输入无效。",close:"关闭命令行"},mobileCommand:{length:"长度",angle:"角度",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"确定",cancel:"取消",help:"帮助",back:"返回",collapse:"收起",expand:"展开"},inputManager:{firstCorner:"指定第一个角点或",secondCorner:"指定第二个角点或"},message:{onLockedLayer:"个对象位于锁定的图层上。",fetchingDrawingFile:"正在加载图纸文件...",exportingDxf:"正在导出 DXF ...",exportingPdf:"正在导出 PDF ...",exportingSvg:"正在导出 SVG ...",calculatingSmartExtents:"正在计算智能范围 ...",importingPdf:"正在导入 PDF ...",exportingEntityPreview:"正在导出图片 ...",collectingMemoryProfile:"正在分析内存 ...",fontCached:"字体已成功缓存",fontCacheFailed:"缓存字体失败",fontsNotFound:"在字体库中找不到字体:{fonts}。",fontsNotLoaded:"无法加载字体:{fonts}。",fontMissedInDrawing:'字体 "{font}" 被 {count} 个文字对象使用,但不可用,已使用 "{replacementFont}" 显示。',fontMissedReplacement:'"{font}"(已用 "{replacement}" 显示)',failedToGetAvaiableFonts:'无法从"{url}"获取可用的字体信息!',failedToOpenFile:'无法打开文件"{fileName}"!',failedToOpenFileToast:'无法打开"{fileName}"。详情请查看通知中心。',failedToOpenFileWorkerOom:'无法打开"{fileName}"。使用 LibreDWG 解析器时内存不足,导致打开失败。可点击{dwgParserLink}购买商用 DWG Parser,以支持更大图纸并避免此问题。',failedToOpenFileWorkerOomLink:"此页面",failedToOpenFileWorkerTimeout:'无法打开"{fileName}"。解析图纸时操作超时。',failedToOpenFileFontLoadFailed:'无法打开"{fileName}"。无法加载图纸所需的字体。',failedToOpenFileLicenseExpired:'无法打开"{fileName}"。DWG 转换器许可证已过期。',failedToOpenFileLicenseInvalid:'无法打开"{fileName}"。DWG 转换器许可证缺失或无效。',unknownEntities:"这张图纸中包含了{count}个未知或不支持的实体,这些实体将无法显示!",tianzhengEntities:"检测到天正(或同类第三方)自定义图元(约 {count} 个)。当前环境无法完整解析这些图元,部分内容可能无法显示。",emptyProxyEntities:"这张图纸中包含了{count}个缺少代理图形的自定义实体,这些实体将无法显示!"},notification:{center:{title:"通知",clearAll:"清除全部",noNotifications:"暂无通知"},group:{fontMissed:"字体缺失",fontMissedSummary:"共 {count} 条字体相关消息,点击展开查看详情",unsupportedEntities:"不支持的图元",unsupportedEntitiesSummary:"共 {count} 条解析相关消息,点击展开查看详情",genericSummary:"共 {count} 条消息,点击展开查看详情"},title:{failedToOpenFile:"无法打开文件",failedToOpenFileWorkerOom:"内存不足",failedToOpenFileWorkerTimeout:"打开超时",failedToOpenFileFontLoadFailed:"字体加载失败",failedToOpenFileLicenseExpired:"许可证已过期",failedToOpenFileLicenseInvalid:"许可证无效",fontNotFound:"找不到字体",fontNotLoaded:"无法加载字体",parsingWarning:"解析图纸问题",systemMessage:"系统消息",systemWarning:"系统警告",systemError:"系统错误",systemInfo:"系统信息"}},progress:{start:"开始解析文件...",parse:"正在解析文件 ...",font:"正在下载图纸所需字体...",ltype:"正在解析线形...",style:"正在解析文字样式...",dimstyle:"正在解析标注样式...",layer:"正在解析图层...",vport:"正在解析视口...",blockrecord:"正在解析BTRs...",header:"正在解析文件头...",block:"正在解析块..",entity:"正在解析图元...",object:"正在解析NODs...",rendering:"正在渲染图纸 ...",end:"完成!"},about:{title:"关于",close:"关闭",product:"CAD 查看器",tagline:"面向 DWG/DXF 图纸的高性能 Web CAD 查看器。",website:"官网",docs:"文档",repository:"GitHub",copyright:"© {year} mlightcad。保留所有权利。",ok:"确定"},drawStyle:{color:"颜色",fontSize:"字高"},shortCutToolbar:{more:"更多",undo:"撤销",redo:"重做",erase:"删除",collapse:"收起工具栏",expand:"展开工具栏"},textHeight:{title:"字高设置",close:"关闭",ok:"确定",cancel:"取消",adaptive:"自适应屏幕",custom:"自定义字高",customPlaceholder:"世界坐标字高",fromScreen:"按屏幕字号换算",fromScreenHint:"按当前视图缩放,输入希望看到的屏幕字号(像素),换算为固定的世界坐标字高;之后缩放时字的世界高度不变。",screenPxPlaceholder:"屏幕字号",screenUnit:"px",convert:"换算"},entityPick:{cancel:"取消选择"},colorPicker:{title:"选择颜色",close:"关闭",ok:"确定",cancel:"取消",index:"颜色索引:",rgb:"RGB:",input:"颜色",inputPlaceholder:"1-255 或 #RRGGBB"},touchPointTutorial:{title:"怎样可以精确取点?",description:"手指在屏幕上长按0.5s左右,上方出现十字,手指移动时十字跟随移动并自动捕捉。取点更精准。",snoozeToday:"今日不再提醒",hideForever:"不再提醒",ok:"我知道了"},dataSource:{open:"打开",local:"本地文件",url:"从 URL 打开",openFrom:"从 {name} 打开",signInTo:"登录 {name}",signOutOf:"退出 {name}",signOutOfAccount:"退出 {name}({account})",urlDialogTitle:"从 URL 打开",urlDialogHint:"请输入 .dwg 或 .dxf 文件的网址。",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"取消",onedrive:"OneDrive",googledrive:"Google Drive",or:"或",dropFile:"将文件拖放到此处,或",browse:"浏览",dropOrBrowse:"将 DWG 或 DXF 文件拖放到此处,或浏览选择",newDrawing:"新建图纸",source:"数据源",unavailable:"该数据源暂不可用。",selectFile:"选择文件",signInRequired:"请先登录后再选择文件。",downloading:"正在下载文件 ..."}},F="local",K="url";class X{constructor(){this._sources=new Map,this._emitter=N()}register(e){this._sources.set(e.id,e),this.emitChanged()}unregister(e){this._sources.delete(e)&&this.emitChanged()}list(){return Array.from(this._sources.values())}get(e){return this._sources.get(e)}notifyAuthChanged(e){this._emitter.emit("auth-changed",{sourceId:e,sources:this.list()})}on(e,t){this._emitter.on(e,t)}off(e,t){this._emitter.off(e,t)}emitChanged(){this._emitter.emit("changed",{sources:this.list()})}}function xe(n,e){if(!e)return n;let t=n;for(const[i,o]of Object.entries(e))t=t.split(`{${i}}`).join(o);return t}function $(n){var t;const e=[];for(const i of n){const o=d.t(i.labelKey),a=i.getAuthState();if(!i.requiresAuth||a==="none"){e.push(v(i,"pick",i.labelKey,void 0,o));continue}if(a==="signed-out"){e.push(v(i,"sign-in","main.dataSource.signInTo",{name:o}));continue}e.push(v(i,"pick","main.dataSource.openFrom",{name:o}));const s=(t=i.getAccountLabel)==null?void 0:t.call(i);e.push(v(i,"sign-out",s?"main.dataSource.signOutOfAccount":"main.dataSource.signOutOf",s?{name:o,account:s}:{name:o}))}return e}function we(n){var e;return n.length===1&&((e=n[0])==null?void 0:e.id)===F&&!n[0].requiresAuth}function v(n,e,t,i,o){return{id:`${n.id}:${e}`,sourceId:n.id,action:e,labelKey:t,labelParams:i,label:o??xe(d.t(t),i)}}async function Q(n,e){if(n.id===e.sourceId){if(e.action==="sign-in"){await n.signIn();return}if(e.action==="sign-out"){await n.signOut();return}return n.pick()}}function Se(n,e=1080,t=680){const i=window.screenLeft!==void 0?window.screenLeft:window.screenX,o=window.screenTop!==void 0?window.screenTop:window.screenY,a=window.innerWidth||document.documentElement.clientWidth||screen.width,s=window.innerHeight||document.documentElement.clientHeight||screen.height,r=Math.max(0,Math.round(i+(a-e)/2)),l=Math.max(0,Math.round(o+(s-t)/2)),c=[`width=${e}`,`height=${t}`,`left=${r}`,`top=${l}`,"resizable=yes","scrollbars=yes"].join(",");return window.open("",n,c)}const M=[".dxf",".dwg"],h="local",T="url",Te="100%",Oe="150px";function A(n,e){return n==null?e:typeof n=="number"?`${n}px`:n}const f=class f{constructor(e){if(this.activeView=h,this.menuOpen=!1,this.disposed=!1,this.unsubManager=null,this.unsubTheme=null,this.onDocPointerDown=null,this.options={...e,cardSize:{...e.cardSize??{}}},f.ensureStyles(),this.root=document.createElement("div"),this.root.className="ml-ui-file-open",this.root.setAttribute("data-ml-ui-file-open","1"),this.applyTheme(),e.title||e.subtitle){const r=document.createElement("div");if(r.className="ml-ui-file-open-header",e.title){const l=document.createElement("h2");l.className="ml-ui-file-open-title",l.textContent=e.title,r.appendChild(l)}if(e.subtitle){const l=document.createElement("p");l.className="ml-ui-file-open-subtitle",l.textContent=e.subtitle,r.appendChild(l)}this.root.appendChild(r)}if(e.showNewDrawing){const r=document.createElement("button");r.type="button",r.className="ml-ui-file-open-primary",r.textContent=d.t("main.dataSource.newDrawing"),r.addEventListener("click",()=>this.emit({kind:"new-drawing"})),this.root.appendChild(r),this.root.appendChild(this.createDivider())}this.card=document.createElement("div"),this.card.className="ml-ui-file-open-card",this.applyCardSize(),this.root.appendChild(this.card),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=e.accept??M.join(","),this.fileInput.className="ml-ui-file-open-input-hidden",this.fileInput.addEventListener("change",()=>{var l;const r=(l=this.fileInput.files)==null?void 0:l[0];this.fileInput.value="",r&&this.isSupportedFileName(r.name)&&this.emitLocal(r)}),this.card.appendChild(this.fileInput),this.contentEl=document.createElement("div"),this.contentEl.className="ml-ui-file-open-body",this.card.appendChild(this.contentEl),this.dropzone=document.createElement("div"),this.dropzone.className="ml-ui-file-open-dropzone",this.dropzone.tabIndex=0,this.dropzone.setAttribute("role","button"),this.dropzone.setAttribute("aria-label",d.t("main.dataSource.dropOrBrowse"));const t=document.createElement("p");t.className="ml-ui-file-open-drop-title",t.append(document.createTextNode(`${d.t("main.dataSource.dropFile")} `));const i=document.createElement("span");i.className="ml-ui-file-open-drop-link",i.textContent=d.t("main.dataSource.browse"),t.appendChild(i);const o=document.createElement("div");o.className="ml-ui-file-open-tags";for(const r of["DWG","DXF"]){const l=document.createElement("span");l.className="ml-ui-file-open-tag",l.textContent=r,o.appendChild(l)}this.dropzone.appendChild(t),this.dropzone.appendChild(o),this.dropzone.addEventListener("click",()=>this.fileInput.click()),this.dropzone.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.fileInput.click())}),this.dropzone.addEventListener("dragenter",r=>this.onDrag(r,!0)),this.dropzone.addEventListener("dragover",r=>this.onDrag(r,!0)),this.dropzone.addEventListener("dragleave",r=>this.onDrag(r,!1)),this.dropzone.addEventListener("drop",r=>this.onDrop(r)),this.urlRow=document.createElement("div"),this.urlRow.className="ml-ui-file-open-url-row",this.urlInput=document.createElement("input"),this.urlInput.type="url",this.urlInput.className="ml-ui-file-open-url-input",this.urlInput.placeholder=d.t("main.dataSource.urlPlaceholder"),this.urlInput.autocomplete="off",this.urlInput.spellcheck=!1,this.urlInput.addEventListener("keydown",r=>{r.key==="Enter"&&(r.preventDefault(),this.submitUrl())});const a=document.createElement("button");a.type="button",a.className="ml-ui-file-open-secondary",a.textContent=d.t("main.dataSource.open"),a.addEventListener("click",()=>this.submitUrl()),this.urlRow.appendChild(this.urlInput),this.urlRow.appendChild(a),this.sourceActionsEl=document.createElement("div"),this.sourceActionsEl.className="ml-ui-file-open-sources";const s=document.createElement("div");s.className="ml-ui-file-open-footer",this.footerBtn=document.createElement("button"),this.footerBtn.type="button",this.footerBtn.className="ml-ui-file-open-footer-btn",this.footerBtn.setAttribute("aria-label",d.t("main.dataSource.source")),this.footerBtn.setAttribute("aria-haspopup","listbox"),this.footerBtn.setAttribute("aria-expanded","false"),this.footerLabel=document.createElement("span"),this.footerLabel.className="ml-ui-file-open-footer-label",this.footerChevron=document.createElement("span"),this.footerChevron.className="ml-ui-file-open-footer-chevron",this.footerChevron.setAttribute("aria-hidden","true"),this.footerChevron.textContent="▾",this.footerBtn.appendChild(this.footerLabel),this.footerBtn.appendChild(this.footerChevron),this.footerBtn.addEventListener("click",r=>{r.stopPropagation(),this.toggleMenu()}),s.appendChild(this.footerBtn),this.card.appendChild(s),this.menuEl=document.createElement("div"),this.menuEl.className="ml-ui-file-open-menu",this.menuEl.hidden=!0,this.menuEl.setAttribute("role","listbox"),this.card.appendChild(this.menuEl),this.onDocPointerDown=r=>{if(!this.menuOpen)return;const l=r.target;l instanceof Node&&(this.card.contains(l)||this.closeMenu())},document.addEventListener("pointerdown",this.onDocPointerDown),this.unsubTheme=_(()=>{this.options.theme||this.applyTheme()}),e.host.appendChild(this.root),this.bindManagerEvents(),this.refreshSourceButtons()}get element(){return this.root}refreshSourceButtons(){this.disposed||(this.bindManagerEvents(),this.applyTheme(),this.applyCardSize(),this.syncSourceChrome(),this.renderActiveView())}get theme(){return this.options.theme??R(this.options.host)}setTheme(e){this.disposed||(this.options.theme=e,this.applyTheme())}setCardSize(e){this.disposed||(this.options.cardSize={...this.options.cardSize,...e},this.applyCardSize())}dispose(){var e,t;this.disposed||(this.disposed=!0,(e=this.unsubManager)==null||e.call(this),this.unsubManager=null,(t=this.unsubTheme)==null||t.call(this),this.unsubTheme=null,this.onDocPointerDown&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.onDocPointerDown=null),this.root.remove())}applyTheme(){U(this.theme,this.root,{isolated:!0})}applyCardSize(){const e=this.options.cardSize;this.card.style.width=A(e==null?void 0:e.width,Te),this.card.style.height=A(e==null?void 0:e.height,Oe)}syncSourceChrome(){const e=this.resolveSourceOptions();new Set(e.map(a=>a.value)).has(this.activeView)||(this.activeView=h,this.closeMenu());const i=e.find(a=>a.value===this.activeView)??e[0];this.footerLabel.textContent=(i==null?void 0:i.label)??"";const o=e.length>1;this.footerBtn.disabled=!o,this.footerBtn.classList.toggle("is-single",!o),this.footerChevron.hidden=!o,o||this.closeMenu(),this.menuEl.replaceChildren();for(const a of e){const s=document.createElement("button");s.type="button",s.className="ml-ui-file-open-menu-item",s.setAttribute("role","option"),s.setAttribute("aria-selected",a.value===this.activeView?"true":"false"),a.value===this.activeView&&s.classList.add("is-active"),s.textContent=a.label,s.addEventListener("click",r=>{r.stopPropagation(),this.selectSource(a.value)}),this.menuEl.appendChild(s)}}selectSource(e){this.activeView=e,this.closeMenu(),this.syncSourceChrome(),this.renderActiveView(),this.maybeAutoSignIn(e)}maybeAutoSignIn(e){if(e===h||e===T)return;const t=this.resolveSources().find(o=>o.id===e);if(t){t.requiresAuth&&t.getAuthState()==="signed-out"&&t.signIn().catch(()=>{}).finally(()=>this.refreshSourceButtons());return}const i=this.resolveExtraMenuItems().find(o=>o.sourceId===e&&o.action==="sign-in");i&&this.emit({kind:"data-source",item:i})}toggleMenu(){this.footerBtn.disabled||(this.menuOpen?this.closeMenu():this.openMenu())}openMenu(){this.menuOpen=!0,this.menuEl.hidden=!1,this.footerBtn.setAttribute("aria-expanded","true"),this.footerBtn.classList.add("is-open"),this.footerChevron.textContent="▴"}closeMenu(){this.menuOpen=!1,this.menuEl.hidden=!0,this.footerBtn.setAttribute("aria-expanded","false"),this.footerBtn.classList.remove("is-open"),this.footerChevron.textContent="▾"}resolveSourceOptions(){const e=[{value:h,label:d.t("main.dataSource.local")}];this.options.showUrl!==!1&&e.push({value:T,label:d.t("main.dataSource.url")});const t=new Set;for(const i of this.resolveMenuItems())t.has(i.sourceId)||(t.add(i.sourceId),e.push({value:i.sourceId,label:this.resolveSourceLabel(i.sourceId)}));return e}resolveSourceLabel(e){var o;const t=this.resolveSources().find(a=>a.id===e);if(t)return d.t(t.labelKey);const i=this.resolveExtraMenuItems().find(a=>a.sourceId===e);return(o=i==null?void 0:i.labelParams)!=null&&o.name?i.labelParams.name:e}renderActiveView(){if(this.contentEl.replaceChildren(),this.activeView===h){this.contentEl.appendChild(this.dropzone);return}if(this.activeView===T){this.contentEl.appendChild(this.urlRow),requestAnimationFrame(()=>this.urlInput.focus());return}this.renderSourceActions(this.activeView),this.contentEl.appendChild(this.sourceActionsEl)}canPickSource(e){const t=this.resolveSources().find(i=>i.id===e);return t?t.requiresAuth?t.getAuthState()==="signed-in":!0:this.resolveExtraMenuItems().some(i=>i.sourceId===e&&i.action==="pick")}buildPickMenuItem(e){const t=this.resolveSourceLabel(e),i=d.t("main.dataSource.openFrom");return{id:`${e}:pick`,sourceId:e,action:"pick",labelKey:"main.dataSource.openFrom",labelParams:{name:t},label:i.includes("{name}")?i.split("{name}").join(t):d.t("main.dataSource.selectFile")}}resolveAccountProfile(e){var s,r,l,c;const t=(r=(s=this.options).getAccountProfile)==null?void 0:r.call(s,e);if(t!=null&&t.displayName)return t;const i=this.resolveSources().find(p=>p.id===e);if(!i||i.getAuthState()!=="signed-in")return;const o=(l=i.getAccountProfile)==null?void 0:l.call(i);if(o!=null&&o.displayName)return o;const a=(c=i.getAccountLabel)==null?void 0:c.call(i);if(a)return{displayName:a}}initialsFromName(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]??""}${t[1][0]??""}`.toUpperCase()}renderSourceActions(e){this.sourceActionsEl.replaceChildren();const t=this.resolveAccountProfile(e);if(t){const a=document.createElement("div");a.className="ml-ui-file-open-account";const s=document.createElement("div");if(s.className="ml-ui-file-open-avatar",t.avatarUrl){const c=document.createElement("img");c.className="ml-ui-file-open-avatar-img",c.src=t.avatarUrl,c.alt="",c.referrerPolicy="no-referrer",s.appendChild(c)}else{const c=document.createElement("span");c.className="ml-ui-file-open-avatar-initials",c.textContent=this.initialsFromName(t.displayName),s.appendChild(c)}const r=document.createElement("div");r.className="ml-ui-file-open-account-text";const l=document.createElement("div");if(l.className="ml-ui-file-open-account-name",l.textContent=t.displayName,r.appendChild(l),t.email&&t.email!==t.displayName){const c=document.createElement("div");c.className="ml-ui-file-open-account-email",c.textContent=t.email,r.appendChild(c)}a.appendChild(s),a.appendChild(r),this.sourceActionsEl.appendChild(a)}const i=document.createElement("button");i.type="button",i.className="ml-ui-file-open-source-btn ml-ui-file-open-source-btn--primary",i.textContent=d.t("main.dataSource.selectFile");const o=this.canPickSource(e);i.disabled=!o,o||(i.title=d.t("main.dataSource.signInRequired")),i.addEventListener("click",()=>{this.canPickSource(e)&&this.emit({kind:"data-source",item:this.buildPickMenuItem(e)})}),this.sourceActionsEl.appendChild(i)}resolveMenuItems(){const e=this.resolveSources().filter(s=>s.id!==F&&s.id!==K),t=$(e),i=this.resolveExtraMenuItems(),o=new Set(t.map(s=>s.sourceId)),a=i.filter(s=>!o.has(s.sourceId));return[...t,...a]}resolveManager(){const e=this.options.manager;return typeof e=="function"?e():e}resolveSources(){var e;return this.options.getSources?this.options.getSources():((e=this.resolveManager())==null?void 0:e.list())??[]}resolveExtraMenuItems(){const e=this.options.extraMenuItems;return e?typeof e=="function"?e():e:[]}bindManagerEvents(){if(this.unsubManager)return;const e=this.resolveManager();if(!e)return;const t=()=>this.refreshSourceButtons();e.on("changed",t),e.on("auth-changed",t),this.unsubManager=()=>{e.off("changed",t),e.off("auth-changed",t)}}submitUrl(){const e=this.urlInput.value.trim();if(!e){this.urlInput.focus();return}this.emit({kind:"url",url:e})}onDrag(e,t){e.preventDefault(),e.stopPropagation(),this.dropzone.classList.toggle("is-dragover",t)}onDrop(e){var i,o;this.onDrag(e,!1);const t=(o=(i=e.dataTransfer)==null?void 0:i.files)==null?void 0:o[0];t&&this.isSupportedFileName(t.name)&&this.emitLocal(t)}isSupportedFileName(e){const t=e.toLowerCase();return M.some(i=>t.endsWith(i))}emitLocal(e){this.emit({kind:"local",file:e})}emit(e){var t,i,o,a,s,r,l,c,p,u;switch((i=(t=this.options).onResult)==null||i.call(t,e),e.kind){case"local":(a=(o=this.options).onLocalFile)==null||a.call(o,e.file);break;case"url":(r=(s=this.options).onUrl)==null||r.call(s,e.url);break;case"data-source":(c=(l=this.options).onDataSourceAction)==null||c.call(l,e.item);break;case"new-drawing":(u=(p=this.options).onNewDrawing)==null||u.call(p);break}}createDivider(){const e=document.createElement("p");e.className="ml-ui-file-open-divider",e.setAttribute("aria-hidden","true");const t=document.createElement("span");return t.textContent=d.t("main.dataSource.or"),e.appendChild(t),e}static ensureStyles(){if(typeof document>"u"||document.getElementById(f.styleId))return;const e=document.createElement("style");e.id=f.styleId,e.textContent=`
2
+ .ml-ui-file-open {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 0;
6
+ width: 100%;
7
+ box-sizing: border-box;
8
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
9
+ color: var(--ml-ui-text, #303133);
10
+ }
11
+ .ml-ui-file-open-header { margin-bottom: 12px; }
12
+ .ml-ui-file-open-title {
13
+ margin: 0 0 4px;
14
+ font-size: 18px;
15
+ font-weight: 700;
16
+ line-height: 1.3;
17
+ }
18
+ .ml-ui-file-open-subtitle {
19
+ margin: 0;
20
+ font-size: 13px;
21
+ line-height: 1.4;
22
+ color: var(--ml-ui-text-muted, #606266);
23
+ }
24
+ .ml-ui-file-open-primary {
25
+ display: block;
26
+ width: 100%;
27
+ padding: 10px 14px;
28
+ border: none;
29
+ border-radius: 10px;
30
+ background: var(--ml-ui-accent, #409eff);
31
+ color: #fff;
32
+ font-size: 13px;
33
+ font-weight: 700;
34
+ cursor: pointer;
35
+ }
36
+ .ml-ui-file-open-primary:hover { filter: brightness(1.05); }
37
+ .ml-ui-file-open-secondary {
38
+ flex: 0 0 auto;
39
+ padding: 8px 14px;
40
+ border: none;
41
+ border-radius: 8px;
42
+ background: var(--ml-ui-accent, #409eff);
43
+ color: #fff;
44
+ font-size: 13px;
45
+ font-weight: 600;
46
+ cursor: pointer;
47
+ white-space: nowrap;
48
+ }
49
+ .ml-ui-file-open-divider {
50
+ display: flex;
51
+ align-items: center;
52
+ gap: 10px;
53
+ margin: 12px 0;
54
+ font-size: 11px;
55
+ font-weight: 600;
56
+ color: var(--ml-ui-text-muted, #94a3b8);
57
+ text-transform: uppercase;
58
+ letter-spacing: 0.06em;
59
+ }
60
+ .ml-ui-file-open-divider::before,
61
+ .ml-ui-file-open-divider::after {
62
+ content: '';
63
+ flex: 1;
64
+ height: 1px;
65
+ background: var(--ml-ui-border, #e2e8f0);
66
+ }
67
+ .ml-ui-file-open-card {
68
+ position: relative;
69
+ display: flex;
70
+ flex-direction: column;
71
+ width: 100%;
72
+ height: 150px;
73
+ max-width: 100%;
74
+ box-sizing: border-box;
75
+ border: 1px solid var(--ml-ui-border, #dcdfe6);
76
+ border-radius: 12px;
77
+ background: var(--ml-ui-bg, #fff);
78
+ box-shadow: var(--ml-ui-shadow, 0 2px 6px rgba(0, 0, 0, 0.12));
79
+ overflow: hidden;
80
+ }
81
+ .ml-ui-file-open-body {
82
+ flex: 1 1 auto;
83
+ min-height: 0;
84
+ display: flex;
85
+ flex-direction: column;
86
+ }
87
+ .ml-ui-file-open-input-hidden { display: none; }
88
+ .ml-ui-file-open-dropzone {
89
+ flex: 1;
90
+ display: flex;
91
+ flex-direction: column;
92
+ align-items: center;
93
+ justify-content: center;
94
+ gap: 10px;
95
+ padding: 16px;
96
+ box-sizing: border-box;
97
+ border: 1.5px dashed transparent;
98
+ /* Match the card's top corners so the hover dashed border isn't clipped. */
99
+ border-radius: 12px 12px 0 0;
100
+ background: transparent;
101
+ cursor: pointer;
102
+ outline: none;
103
+ transition: border-color 0.15s ease, background 0.15s ease;
104
+ }
105
+ .ml-ui-file-open-dropzone:hover,
106
+ .ml-ui-file-open-dropzone:focus-visible,
107
+ .ml-ui-file-open-dropzone.is-dragover {
108
+ border-color: var(--ml-ui-accent, #409eff);
109
+ background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 8%, transparent);
110
+ }
111
+ .ml-ui-file-open-drop-title {
112
+ margin: 0;
113
+ font-size: 14px;
114
+ text-align: center;
115
+ color: var(--ml-ui-text-muted, #606266);
116
+ }
117
+ .ml-ui-file-open-drop-link {
118
+ color: var(--ml-ui-accent, #409eff);
119
+ font-weight: 600;
120
+ }
121
+ .ml-ui-file-open-tags { display: flex; gap: 6px; }
122
+ .ml-ui-file-open-tag {
123
+ padding: 2px 8px;
124
+ border-radius: 999px;
125
+ border: 1px solid var(--ml-ui-border, #dcdfe6);
126
+ font-size: 11px;
127
+ font-weight: 600;
128
+ color: var(--ml-ui-text-muted, #606266);
129
+ }
130
+ .ml-ui-file-open-url-row {
131
+ flex: 1;
132
+ display: flex;
133
+ gap: 8px;
134
+ align-items: center;
135
+ padding: 16px;
136
+ box-sizing: border-box;
137
+ }
138
+ .ml-ui-file-open-url-input {
139
+ flex: 1;
140
+ min-width: 0;
141
+ padding: 8px 10px;
142
+ border: 1px solid var(--ml-ui-border, #c0c4cc);
143
+ border-radius: 8px;
144
+ background: var(--ml-ui-bg, #fff);
145
+ color: inherit;
146
+ font-size: 13px;
147
+ box-sizing: border-box;
148
+ }
149
+ .ml-ui-file-open-url-input:focus {
150
+ outline: 2px solid var(--ml-ui-accent, #409eff);
151
+ outline-offset: 1px;
152
+ }
153
+ .ml-ui-file-open-sources {
154
+ flex: 1;
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: 8px;
158
+ justify-content: center;
159
+ padding: 16px;
160
+ box-sizing: border-box;
161
+ }
162
+ .ml-ui-file-open-empty {
163
+ margin: 0;
164
+ text-align: center;
165
+ font-size: 13px;
166
+ color: var(--ml-ui-text-muted, #606266);
167
+ }
168
+ .ml-ui-file-open-account {
169
+ display: flex;
170
+ align-items: center;
171
+ gap: 10px;
172
+ width: 100%;
173
+ margin: 0 0 4px;
174
+ min-width: 0;
175
+ }
176
+ .ml-ui-file-open-avatar {
177
+ flex: 0 0 auto;
178
+ width: 36px;
179
+ height: 36px;
180
+ border-radius: 999px;
181
+ overflow: hidden;
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 22%, transparent);
186
+ border: 1px solid var(--ml-ui-border, #dcdfe6);
187
+ }
188
+ .ml-ui-file-open-avatar-img {
189
+ width: 100%;
190
+ height: 100%;
191
+ object-fit: cover;
192
+ display: block;
193
+ }
194
+ .ml-ui-file-open-avatar-initials {
195
+ font-size: 12px;
196
+ font-weight: 700;
197
+ color: var(--ml-ui-accent, #409eff);
198
+ line-height: 1;
199
+ }
200
+ .ml-ui-file-open-account-text {
201
+ flex: 1;
202
+ min-width: 0;
203
+ }
204
+ .ml-ui-file-open-account-name {
205
+ font-size: 13px;
206
+ font-weight: 600;
207
+ color: var(--ml-ui-text, #303133);
208
+ overflow: hidden;
209
+ text-overflow: ellipsis;
210
+ white-space: nowrap;
211
+ }
212
+ .ml-ui-file-open-account-email {
213
+ margin-top: 2px;
214
+ font-size: 11px;
215
+ color: var(--ml-ui-text-muted, #606266);
216
+ overflow: hidden;
217
+ text-overflow: ellipsis;
218
+ white-space: nowrap;
219
+ }
220
+ .ml-ui-file-open-source-btn {
221
+ width: 100%;
222
+ padding: 10px 14px;
223
+ border: 1px solid var(--ml-ui-border, #e2e8f0);
224
+ border-radius: 8px;
225
+ background: var(--ml-ui-bg, #fff);
226
+ color: var(--ml-ui-text, #334155);
227
+ font-size: 13px;
228
+ cursor: pointer;
229
+ text-align: center;
230
+ }
231
+ .ml-ui-file-open-source-btn:disabled {
232
+ opacity: 0.55;
233
+ cursor: not-allowed;
234
+ }
235
+ .ml-ui-file-open-source-btn--primary {
236
+ border: none;
237
+ background: var(--ml-ui-accent, #409eff);
238
+ color: #fff;
239
+ font-weight: 600;
240
+ }
241
+ .ml-ui-file-open-source-btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
242
+ .ml-ui-file-open-source-btn--muted:hover {
243
+ border-color: var(--ml-ui-accent, #409eff);
244
+ color: var(--ml-ui-accent, #409eff);
245
+ }
246
+ .ml-ui-file-open-footer {
247
+ flex: 0 0 auto;
248
+ border-top: 1px solid var(--ml-ui-border, #dcdfe6);
249
+ background: color-mix(in srgb, var(--ml-ui-bg, #fff) 92%, var(--ml-ui-text, #303133) 8%);
250
+ }
251
+ .ml-ui-file-open-footer-btn {
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: space-between;
255
+ gap: 8px;
256
+ width: 100%;
257
+ padding: 10px 14px;
258
+ border: none;
259
+ background: transparent;
260
+ color: var(--ml-ui-text, #303133);
261
+ font-size: 13px;
262
+ font-weight: 600;
263
+ cursor: pointer;
264
+ text-align: left;
265
+ box-sizing: border-box;
266
+ }
267
+ .ml-ui-file-open-footer-btn:hover:not(:disabled),
268
+ .ml-ui-file-open-footer-btn.is-open {
269
+ background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 10%, transparent);
270
+ }
271
+ .ml-ui-file-open-footer-btn:disabled,
272
+ .ml-ui-file-open-footer-btn.is-single {
273
+ cursor: default;
274
+ }
275
+ .ml-ui-file-open-footer-label {
276
+ flex: 1;
277
+ min-width: 0;
278
+ overflow: hidden;
279
+ text-overflow: ellipsis;
280
+ white-space: nowrap;
281
+ }
282
+ .ml-ui-file-open-footer-chevron {
283
+ flex: 0 0 auto;
284
+ color: var(--ml-ui-text-muted, #606266);
285
+ font-size: 12px;
286
+ line-height: 1;
287
+ }
288
+ .ml-ui-file-open-menu {
289
+ position: absolute;
290
+ left: 8px;
291
+ right: 8px;
292
+ bottom: 44px;
293
+ z-index: 5;
294
+ display: flex;
295
+ flex-direction: column;
296
+ padding: 4px;
297
+ border: 1px solid var(--ml-ui-border, #dcdfe6);
298
+ border-radius: 10px;
299
+ background: var(--ml-ui-bg, #fff);
300
+ box-shadow: var(--ml-ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.18));
301
+ max-height: 148px;
302
+ overflow: auto;
303
+ }
304
+ .ml-ui-file-open-menu[hidden] { display: none; }
305
+ .ml-ui-file-open-menu-item {
306
+ display: block;
307
+ width: 100%;
308
+ padding: 9px 12px;
309
+ border: none;
310
+ border-radius: 7px;
311
+ background: transparent;
312
+ color: var(--ml-ui-text, #303133);
313
+ font-size: 13px;
314
+ text-align: left;
315
+ cursor: pointer;
316
+ }
317
+ .ml-ui-file-open-menu-item:hover {
318
+ background: color-mix(in srgb, var(--ml-ui-accent, #409eff) 12%, transparent);
319
+ }
320
+ .ml-ui-file-open-menu-item.is-active {
321
+ color: var(--ml-ui-accent, #409eff);
322
+ font-weight: 600;
323
+ }
324
+ `,document.head.appendChild(e)}};f.styleId="ml-ui-file-open-panel-styles-v4";let x=f;function q(n,e){if(n!==e)for(const t of n.list())e.get(t.id)!==t&&e.register(t)}class J{constructor(e){this.disposed=!1,this.options=e,this.manager=e.manager??new X,this.panel=new x({host:e.host,accept:e.accept,title:e.title,subtitle:e.subtitle,theme:e.theme,cardSize:e.cardSize,showUrl:e.showUrl,showNewDrawing:e.showNewDrawing,extraMenuItems:e.extraMenuItems,getAccountProfile:e.getAccountProfile,manager:this.manager,onLocalFile:t=>{this.emitOpen({kind:"file",file:t})},onUrl:t=>{this.emitOpen({kind:"url",url:t})},onNewDrawing:()=>{this.emitOpen({kind:"new"})},onDataSourceAction:t=>{this.handleDataSourceAction(t)}})}get theme(){return this.panel.theme}get element(){return this.panel.element}registerSource(e){this.disposed||this.manager.register(e)}unregisterSource(e){this.disposed||this.manager.unregister(e)}attachSourcesTo(e){this.disposed||q(this.manager,e)}setTheme(e){this.disposed||this.panel.setTheme(e)}refreshSourceButtons(){this.disposed||this.panel.refreshSourceButtons()}dispose(){this.disposed||(this.disposed=!0,this.panel.dispose())}emitOpen(e){this.disposed||this.options.onOpen(e)}async handleDataSourceAction(e){if(this.disposed)return;const t=this.manager.get(e.sourceId);if(t)try{const i=await Q(t,e);if(this.disposed)return;if(e.action!=="pick"||!i){this.refreshSourceButtons();return}if(i.content){this.emitOpen({kind:"file",file:new File([i.content],i.name)});return}i.url&&this.emitOpen({kind:"url",url:i.url})}catch{this.refreshSourceButtons()}}}class ee{constructor(e){this.docManager=null,this.ensurePromise=null,this.ensureGeneration=0,this.openTail=Promise.resolve(),this.disposed=!1,this.options=e;const{createDocManager:t,getOpenOptions:i,onBeforeOpen:o,onPrepareOpen:a,onAfterOpen:s,...r}=e;this.landing=new J({...r,onOpen:l=>{this.open(l)}})}get manager(){return this.landing.manager}get theme(){return this.landing.theme}get docManagerInstance(){return this.docManager}registerSource(e){this.disposed||(this.landing.registerSource(e),this.docManager&&(this.landing.attachSourcesTo(this.docManager.dataSourceManager),this.landing.refreshSourceButtons()))}unregisterSource(e){var t;this.disposed||(this.landing.unregisterSource(e),(t=this.docManager)==null||t.dataSourceManager.unregister(e))}setTheme(e){this.landing.setTheme(e)}refreshSourceButtons(){this.landing.refreshSourceButtons()}async ensureDocManager(){if(this.disposed)throw new Error("AcUiFileOpenSession is disposed");if(this.docManager)return this.docManager;if(!this.ensurePromise){const e=this.ensureGeneration;this.ensurePromise=this.options.createDocManager().then(t=>{if(this.disposed||e!==this.ensureGeneration)throw new Error("AcUiFileOpenSession is disposed");return this.docManager=t,this.landing.attachSourcesTo(t.dataSourceManager),this.landing.refreshSourceButtons(),t}).catch(t=>{throw this.ensurePromise=null,t})}return this.ensurePromise}async open(e){const t=()=>this.openExclusive(e),i=this.openTail.then(t,t);return this.openTail=i.then(()=>{},()=>{}),i}async openExclusive(e){var i,o,a,s,r,l,c,p;if(this.disposed)return{ok:!1,error:new Error("AcUiFileOpenSession is disposed")};await((o=(i=this.options).onBeforeOpen)==null?void 0:o.call(i,e));let t;try{const u=await this.ensureDocManager();if(this.disposed)return{ok:!1,error:new Error("AcUiFileOpenSession is disposed")};await((s=(a=this.options).onPrepareOpen)==null?void 0:s.call(a,e,u));const w=(l=(r=this.options).getOpenOptions)==null?void 0:l.call(r);let g=!1;if(e.kind==="file"){const te=await e.file.arrayBuffer();g=await u.openDocument(e.file.name,te,w)}else e.kind==="url"?g=await u.openUrl(e.url,w):g=await u.newDocument(w);t=g?{ok:!0}:{ok:!1}}catch(u){t={ok:!1,error:u}}return await((p=(c=this.options).onAfterOpen)==null?void 0:p.call(c,e,t)),t}dispose(){this.disposed||(this.disposed=!0,this.ensureGeneration+=1,this.ensurePromise=null,this.landing.dispose())}}function Le(n){return new ee(n)}exports.ACAP_LOCAL_DATA_SOURCE_ID=F;exports.ACAP_URL_DATA_SOURCE_ID=K;exports.AcApDataSourceManager=X;exports.AcApI18n=d;exports.AcApOpenViewMode=P;exports.AcEdOpenMode=I;exports.AcUiFileOpenLanding=J;exports.AcUiFileOpenPanel=x;exports.AcUiFileOpenSession=ee;exports.ML_UI_COARSE_POINTER_MEDIA_QUERY=H;exports.ML_UI_COMPACT_MAX_WIDTH=G;exports.ML_UI_COMPACT_MEDIA_QUERY=D;exports.ML_UI_MOBILE_MAX_WIDTH=B;exports.ML_UI_MOBILE_MEDIA_QUERY=L;exports.ML_UI_SESSION_PANEL_INSET=W;exports.ML_UI_SESSION_PANEL_MAX_WIDTH=ae;exports.ML_UI_SESSION_PANEL_WIDTH=re;exports.ML_UI_Z_CANVAS_HTML_OVERLAY=le;exports.ML_UI_Z_CANVAS_HTML_STROKE=se;exports.ML_UI_Z_DRAW_STYLE_TOOLBAR=ce;exports.ML_UI_Z_ENTITY_PICK_CANCEL=ue;exports.ML_UI_Z_NOTIFICATION=me;exports.ML_UI_Z_SHORTCUT_TOOLBAR=de;exports.acapBuildDataSourceMenu=$;exports.acapInvokeDataSourceMenuAction=Q;exports.acapIsSingleLocalOpen=we;exports.acapOpenCenteredPopup=Se;exports.acedApplyUiTheme=U;exports.acedGetUiLayout=k;exports.acedIsCompactUiLayout=j;exports.acedIsHandheldDevice=Y;exports.acedIsMobileOrPadUi=V;exports.acedIsMobileUiLayout=E;exports.acedShouldHideDesktopCommandLine=fe;exports.acedSubscribeUiLayout=he;exports.acedSubscribeUiTheme=_;exports.acuiAttachDataSources=q;exports.acuiCreateFileOpenSession=Le;exports.arMain=ge;exports.csMain=ye;exports.enMain=be;exports.mitt=N;exports.resolveUiTheme=R;exports.trMain=ve;exports.zhMain=ke;
@@ -0,0 +1,32 @@
1
+ import { b as a, e, z as s, t as c, c as n, d as i } from "./cad-simple-viewer-AcUiFileOpenSession-BCcqBAH9.js";
2
+ import { q as r, s as _, y as p, B as L, A as m, D as t, E as I, F as O, H as U, I as l, j as g, J as u, L as D, u as C, N as S, O as d, f as E, P as T, o as P, R as h, S as R, r as F } from "./cad-simple-viewer-AcUiFileOpenSession-BCcqBAH9.js";
3
+ a.mergeLocaleMessage("en", { main: e });
4
+ a.mergeLocaleMessage("zh", { main: s });
5
+ a.mergeLocaleMessage("tr", { main: c });
6
+ a.mergeLocaleMessage("cs", { main: n });
7
+ a.mergeLocaleMessage("ar", { main: i });
8
+ export {
9
+ r as ACAP_LOCAL_DATA_SOURCE_ID,
10
+ _ as ACAP_URL_DATA_SOURCE_ID,
11
+ p as AcApDataSourceManager,
12
+ a as AcApI18n,
13
+ L as AcApOpenViewMode,
14
+ m as AcEdOpenMode,
15
+ t as AcUiFileOpenLanding,
16
+ I as AcUiFileOpenPanel,
17
+ O as AcUiFileOpenSession,
18
+ U as ML_UI_COMPACT_MAX_WIDTH,
19
+ l as ML_UI_COMPACT_MEDIA_QUERY,
20
+ g as ML_UI_MOBILE_MAX_WIDTH,
21
+ u as ML_UI_MOBILE_MEDIA_QUERY,
22
+ D as acapBuildDataSourceMenu,
23
+ C as acapInvokeDataSourceMenuAction,
24
+ S as acapIsSingleLocalOpen,
25
+ d as acapOpenCenteredPopup,
26
+ E as acedApplyUiTheme,
27
+ T as acedIsCompactUiLayout,
28
+ P as acedSubscribeUiTheme,
29
+ h as acuiAttachDataSources,
30
+ R as acuiCreateFileOpenSession,
31
+ F as resolveUiTheme
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cad-simple-viewer-AcUiFileOpenSession-drptdOYc.js");e.AcApI18n.mergeLocaleMessage("en",{main:e.enMain});e.AcApI18n.mergeLocaleMessage("zh",{main:e.zhMain});e.AcApI18n.mergeLocaleMessage("tr",{main:e.trMain});e.AcApI18n.mergeLocaleMessage("cs",{main:e.csMain});e.AcApI18n.mergeLocaleMessage("ar",{main:e.arMain});exports.ACAP_LOCAL_DATA_SOURCE_ID=e.ACAP_LOCAL_DATA_SOURCE_ID;exports.ACAP_URL_DATA_SOURCE_ID=e.ACAP_URL_DATA_SOURCE_ID;exports.AcApDataSourceManager=e.AcApDataSourceManager;exports.AcApI18n=e.AcApI18n;exports.AcApOpenViewMode=e.AcApOpenViewMode;exports.AcEdOpenMode=e.AcEdOpenMode;exports.AcUiFileOpenLanding=e.AcUiFileOpenLanding;exports.AcUiFileOpenPanel=e.AcUiFileOpenPanel;exports.AcUiFileOpenSession=e.AcUiFileOpenSession;exports.ML_UI_COMPACT_MAX_WIDTH=e.ML_UI_COMPACT_MAX_WIDTH;exports.ML_UI_COMPACT_MEDIA_QUERY=e.ML_UI_COMPACT_MEDIA_QUERY;exports.ML_UI_MOBILE_MAX_WIDTH=e.ML_UI_MOBILE_MAX_WIDTH;exports.ML_UI_MOBILE_MEDIA_QUERY=e.ML_UI_MOBILE_MEDIA_QUERY;exports.acapBuildDataSourceMenu=e.acapBuildDataSourceMenu;exports.acapInvokeDataSourceMenuAction=e.acapInvokeDataSourceMenuAction;exports.acapIsSingleLocalOpen=e.acapIsSingleLocalOpen;exports.acapOpenCenteredPopup=e.acapOpenCenteredPopup;exports.acedApplyUiTheme=e.acedApplyUiTheme;exports.acedIsCompactUiLayout=e.acedIsCompactUiLayout;exports.acedSubscribeUiTheme=e.acedSubscribeUiTheme;exports.acuiAttachDataSources=e.acuiAttachDataSources;exports.acuiCreateFileOpenSession=e.acuiCreateFileOpenSession;exports.resolveUiTheme=e.resolveUiTheme;