texlite 0.7.5 → 0.7.6

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 (68) hide show
  1. package/README.md +19 -3
  2. package/README.zh-CN.md +8 -3
  3. package/dist/client/assets/{GitDialog-pn8n5Afm.js → GitDialog-W3hLOWrF.js} +2 -2
  4. package/dist/client/assets/HistoryDialog-7ADYJcGi.js +5 -0
  5. package/dist/client/assets/LatexEditor-ChHQwJXZ.js +59 -0
  6. package/dist/client/assets/PdfPreview-CuvWphzY.js +1 -0
  7. package/dist/client/assets/{ProjectNavigationDialogs-CaovMu4V.js → ProjectNavigationDialogs-CzFhIw6B.js} +1 -1
  8. package/dist/client/assets/SystemMetricsDialog-C0m9JUDy.js +1 -0
  9. package/dist/client/assets/index-DRShM2ob.js +64 -0
  10. package/dist/client/assets/index-DzcH7hBu.css +1 -0
  11. package/dist/client/assets/latexFormatterWorker-DYkYtcFy.js +6 -0
  12. package/dist/client/assets/minus-BfqMIeUg.js +1 -0
  13. package/dist/client/assets/{react-CsO_xvbl.js → react-BoEjKzFZ.js} +1 -1
  14. package/dist/client/assets/spellCheck-BBnCnxmQ.js +4 -0
  15. package/dist/client/index.html +3 -3
  16. package/dist/server/anchors.js +22 -1
  17. package/dist/server/app.js +103 -2335
  18. package/dist/server/auth.js +3 -2
  19. package/dist/server/cli.js +8 -2
  20. package/dist/server/collaboration.js +250 -2
  21. package/dist/server/compileArtifacts.js +10 -7
  22. package/dist/server/compiler.js +9 -4
  23. package/dist/server/config.js +25 -1
  24. package/dist/server/environment.js +5 -1
  25. package/dist/server/files.js +7 -6
  26. package/dist/server/git.js +28 -39
  27. package/dist/server/harper.js +144 -0
  28. package/dist/server/harperRuntime.js +38 -0
  29. package/dist/server/harperWorker.js +15 -0
  30. package/dist/server/history.js +11 -9
  31. package/dist/server/http.js +33 -13
  32. package/dist/server/i18n.js +276 -0
  33. package/dist/server/latexRoot.js +78 -0
  34. package/dist/server/limits.js +9 -0
  35. package/dist/server/projectSearch.js +3 -4
  36. package/dist/server/routes/auth.js +77 -0
  37. package/dist/server/routes/citations.js +331 -0
  38. package/dist/server/routes/collaboration.js +17 -0
  39. package/dist/server/routes/comments.js +176 -0
  40. package/dist/server/routes/compile.js +71 -50
  41. package/dist/server/routes/projectFiles.js +572 -0
  42. package/dist/server/routes/projectGit.js +145 -0
  43. package/dist/server/routes/projectHistory.js +150 -0
  44. package/dist/server/routes/projectMembers.js +112 -0
  45. package/dist/server/routes/projectShared.js +238 -0
  46. package/dist/server/routes/projects.js +473 -0
  47. package/dist/server/routes/system.js +37 -0
  48. package/dist/server/routes/users.js +163 -0
  49. package/dist/server/security.js +2 -4
  50. package/dist/server/synctex.js +7 -4
  51. package/dist/server/zip.js +29 -13
  52. package/package.json +3 -3
  53. package/texlite.config.example.json +5 -1
  54. package/dist/client/assets/BinaryModule-Aj1vLnwf-CKY6Y_Pt.js +0 -4
  55. package/dist/client/assets/HistoryDialog-BpWEZrYf.js +0 -1
  56. package/dist/client/assets/LatexEditor-DNAmNvHu.js +0 -59
  57. package/dist/client/assets/PdfPreview-BVaG7TtG.js +0 -1
  58. package/dist/client/assets/SystemMetricsDialog-D8jj7epG.js +0 -1
  59. package/dist/client/assets/__vite-browser-external-BIHI7g3E.js +0 -1
  60. package/dist/client/assets/binary-BoldOm0z.js +0 -1
  61. package/dist/client/assets/harper_wasm_bg-LWXDb7Ll.wasm +0 -0
  62. package/dist/client/assets/index-BQCB3z5H.js +0 -64
  63. package/dist/client/assets/index-BnvpaWsa.css +0 -1
  64. package/dist/client/assets/index-Byn2Miy9.js +0 -3456
  65. package/dist/client/assets/index-rBWMBTI-.js +0 -5
  66. package/dist/client/assets/minus-K-5IK4nL.js +0 -1
  67. package/dist/client/assets/spellCheck-C32VQVUE.js +0 -5
  68. package/dist/client/assets/texFmtRuntime-EYyQNUnJ.js +0 -2
@@ -0,0 +1 @@
1
+ :root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#202421;background:#f3f4f1;font-synthesis:none}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}.muted{color:#737a75}.error{color:#b3261e;font-size:14px}.dialog-error{margin:0;padding:8px 10px;border:1px solid #e9b6b0;border-radius:6px;background:#fff3f1}.field-hint{color:#778179;font-size:11px;font-weight:400}.primary,.compile{border:0;border-radius:8px;background:#176b44;color:#fff;padding:10px 18px;font-weight:650}.icon-button{display:inline-flex;align-items:center;gap:6px}.ghost{border:0;background:transparent;color:inherit}.page{min-height:100vh;display:flex;flex-direction:column}.login-page{min-height:100vh;display:grid;grid-template-rows:1fr auto;place-items:center;padding-top:44px;background:radial-gradient(circle at 50% 0,#d8e8dd,#f5f5f1 45%)}.login-card{width:min(390px,calc(100vw - 32px));padding:38px;display:flex;flex-direction:column;gap:16px;background:#ffffffeb;border:1px solid #dfe4df;border-radius:16px;box-shadow:0 24px 70px #1d31241f}.login-card h1{text-align:center;margin:0;letter-spacing:-.04em}.login-card>p{text-align:center;margin:-8px 0 8px}.login-card label,.settings label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:650}.login-card input,.settings input,.settings select,.settings textarea{width:100%;border:1px solid #cbd2cc;border-radius:8px;padding:10px 11px;background:#fff;outline:none}.login-card input:focus,.settings input:focus{border-color:#176b44;box-shadow:0 0 0 3px #176b4420}.site-logo{width:40px;height:40px;flex:none;display:inline-flex;align-items:center;justify-content:center}.site-logo img{display:block;width:100%;height:100%}.site-logo.compact{width:34px;height:34px;margin:0 16px 0 10px}.site-logo.auth-logo{width:76px;height:76px;margin:0 auto 2px;filter:drop-shadow(0 10px 18px #1e2a4a25)}.brand-link{display:inline-flex;align-items:center;color:inherit;text-decoration:none}.brand-link:hover .site-title{color:#d9f0df}.compact-brand-link{flex:none}.site-title{margin-right:11px;font-size:20px;font-weight:800;letter-spacing:-.04em}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.support{color:#737a75;text-align:center}.topbar,.editor-topbar{height:62px;display:flex;align-items:center;padding:0 26px;background:#123c2a;color:#fff}.top-actions{margin-left:auto;display:flex;align-items:center;gap:18px;font-size:14px}.top-actions .ghost{display:inline-flex;align-items:center;gap:5px;border:1px solid transparent;border-radius:6px;padding:6px 8px;background:transparent;color:inherit;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,transform .08s ease}.top-actions .ghost:hover,.top-actions .ghost:focus-visible{border-color:#ffffff20;background:#ffffff16;color:#d9f0df;box-shadow:0 4px 12px #061c1130;outline:none}.top-actions .ghost:active{transform:translateY(1px);box-shadow:0 1px 4px #061c1126}.top-actions .ghost.top-return-action,.top-actions .ghost.top-return-action:hover,.top-actions .ghost.top-return-action:focus-visible,.top-actions .ghost.top-return-action:active{transform:none;box-shadow:none}.top-user-identity{min-width:0;display:flex;flex-direction:column;line-height:1.15}.top-user-identity strong{overflow:hidden;max-width:180px;font-size:13px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.top-user-identity small{overflow:hidden;max-width:180px;margin-top:3px;color:#b9d0c2;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.language-switcher{position:fixed;top:18px;right:20px;z-index:5;display:flex;align-items:center;gap:6px;color:#536059;font-size:12px}.language-switcher select{border:1px solid #c9d0ca;border-radius:6px;padding:5px 7px;background:#fff;color:#26342b}.language-switcher.compact{position:static;color:inherit}.language-switcher.compact select{border-color:#ffffff35;background:#ffffff10;color:inherit}.language-switcher.compact option{color:#202421}.dashboard{width:100%;max-width:1180px;flex:1;margin:0 auto;padding:52px 34px}.citation-library-page-shell{padding-top:34px}.citation-library-page{display:flex;flex-direction:column;gap:18px}.citation-library-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.citation-library-page-header>div{min-width:0}.citation-library-page-header h1{display:flex;align-items:center;gap:9px;margin:0;color:#202421;font-size:30px;letter-spacing:-.04em}.citation-library-page-header h1 svg{flex:none;color:#315b43}.citation-library-page-header p{max-width:720px;margin:8px 0 0;color:#737a75;font-size:12px;line-height:1.5}.citation-library-page-header>button{display:inline-flex;align-items:center;gap:5px;flex:none;border:1px solid #bfc8c1;border-radius:8px;padding:9px 12px;background:#fff;color:#52685a;font-size:11px}.citation-library-page-header>button:hover{border-color:#8eaa98;background:#edf4ef;color:#176b44}.citation-library-page .citation-library-dialog{padding:18px;border:1px solid #dfe4df;border-radius:12px;background:#fff;box-shadow:0 8px 26px #25352a0f}.citation-library-page .citation-entry-list{max-height:none}.citation-library-pagination{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:6px;color:#66736b;font-size:10px}.citation-library-pagination button{display:inline-flex;align-items:center;gap:4px;border:1px solid #cbd5ce;border-radius:6px;padding:6px 9px;background:#fff;color:#52685a;font-size:10px}.citation-library-pagination button:hover:not(:disabled){border-color:#8eaa98;background:#edf4ef;color:#176b44}.site-footer{width:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px 16px;padding:18px 24px;border-top:1px solid #dfe3df;background:#eef0ed;color:#737b75;font-size:11px;text-align:center}.site-footer a{color:#176b44;text-decoration:none}.site-footer a:hover{text-decoration:underline}.login-page>.site-footer{align-self:end;background:#ffffff50}.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:28px}.section-title h1{display:flex;align-items:center;gap:9px;margin:0;font-size:30px;letter-spacing:-.04em}.section-title h1 svg{flex:none;color:#315b43}.section-title p{margin:7px 0 0}.section-actions{display:flex;gap:9px}.section-actions>button{display:inline-flex;align-items:center;gap:6px;border:1px solid #bfc8c1;border-radius:8px;background:#fff;padding:10px 16px}.section-actions>.primary{border-color:#176b44;background:#176b44;color:#fff}.project-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:18px;padding:10px;background:#e9ece8;border-radius:10px}.project-toolbar>input{width:220px;border:1px solid #cbd2cc;border-radius:7px;padding:8px 10px;background:#fff}.project-scope{display:flex;flex:none;gap:2px}.project-scope button{display:flex;align-items:center;gap:5px;flex:none;border:1px solid transparent;border-radius:7px;padding:7px 9px;background:transparent;color:#536059;font-size:12px}.project-scope button.active{border-color:#b8c4ba;background:#fff;color:#174b33}.tag-filters{min-width:0;flex:1;display:flex;gap:6px;overflow-x:auto}.tag-filters button,.view-toggle button{display:flex;align-items:center;gap:5px;flex:none;border:1px solid transparent;border-radius:7px;padding:7px 9px;background:transparent;color:#536059;font-size:12px}.tag-filters button.active,.view-toggle button.active{border-color:#b8c4ba;background:#fff;color:#174b33}.project-sort{flex:none;display:flex;align-items:center;gap:5px;color:#536059;font-size:11px}.project-sort>span{white-space:nowrap}.project-sort select{max-width:150px;border:1px solid #c4ccc6;border-radius:7px;padding:7px 25px 7px 8px;background:#fff;color:#34433a;font-size:12px}.view-toggle{display:flex;gap:2px}.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}.project-card{position:relative;min-height:250px;display:flex;flex-direction:column;text-align:left;background:#fff;border:1px solid #dfe2de;border-radius:12px;overflow:hidden;transition:.15s ease}.project-card:hover{border-color:#8bae9a;transform:translateY(-2px);box-shadow:0 10px 30px #25352a10}.project-card-open{all:unset;box-sizing:border-box;min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:20px 20px 14px;cursor:pointer}.project-card-open:focus-visible{outline:3px solid #176b4455;outline-offset:-3px}.project-card strong{font-size:17px}.project-card-main{min-width:0;display:flex;flex-direction:column;gap:7px}.project-tags,.settings-tags{display:flex;flex-wrap:wrap;gap:5px}.owner-badge{max-width:100%;overflow:hidden;padding:6px 9px;border-radius:7px;background:#e2f0e7;color:#176b44;font-size:11px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.project-grid:not(.list-view) .owned-project .owner-badge{max-width:calc(100% - 94px)}.project-transfer-action{position:absolute;z-index:2;top:17px;right:16px;display:inline-flex;align-items:center;gap:4px;border:1px solid #cbd7cf;border-radius:6px;padding:5px 7px;background:#f7faf8;color:#315c43;font-size:10px}.project-transfer-action:hover{border-color:#8caf99;background:#e8f1eb;color:#176b44}.project-meta{width:100%;display:grid;grid-template-columns:1fr;gap:8px;margin:auto 0 0}.project-meta div{min-width:0}.project-meta dt{display:flex;align-items:center;gap:4px;color:#8a918c;font-size:10px;text-transform:uppercase}.project-meta dt svg{flex:none;color:#6f8e7a}.project-meta dd{overflow:hidden;margin:2px 0 0;color:#555e58;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.project-grid:not(.list-view) .project-meta dd{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.project-modified-by{color:#68716b}.project-card-actions{display:flex;flex-wrap:wrap;gap:5px;padding:9px 12px;border-top:1px solid #eceeeb;background:#fafbf9}.project-card-actions button,.project-card-actions a{display:inline-flex;align-items:center;gap:5px;border:0;border-radius:5px;padding:5px 7px;background:transparent;color:#4f5b53;font-size:11px;text-decoration:none}.project-card-actions button:hover,.project-card-actions a:hover{background:#e8eeea;color:#176b44}.project-card-actions .danger-text{margin-left:auto;color:#b3261e}.project-grid:not(.list-view) .project-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.project-grid:not(.list-view) .project-card-actions button,.project-grid:not(.list-view) .project-card-actions a{width:100%;min-width:0;justify-content:flex-start;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.project-grid:not(.list-view) .project-card-actions .danger-text{margin-left:0}.project-grid.list-view{display:flex;flex-direction:column;gap:7px}.project-grid.list-view .project-card{min-height:88px;flex-direction:row;align-items:stretch}.project-grid.list-view .project-card-open{display:grid;grid-template-columns:minmax(90px,140px) minmax(170px,1fr) minmax(390px,2fr);align-items:center;gap:14px;padding:12px 15px}.project-grid.list-view .project-card-main{min-width:170px}.project-grid.list-view .project-meta{grid-template-columns:minmax(145px,.75fr) minmax(0,1.25fr);gap:8px 12px;margin:0}.project-grid.list-view .project-meta>div:last-child dd{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.project-grid.list-view .project-card-actions{width:190px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:4px;border-top:0;border-left:1px solid #eceeeb}.project-grid.list-view .project-card-actions button,.project-grid.list-view .project-card-actions a{width:100%;justify-content:flex-start}.project-grid.list-view .project-card-actions .danger-text{margin-left:0}.project-comments-badge{display:inline-flex;align-items:center;gap:3px;width:fit-content;border-radius:999px;padding:1px 6px;font-size:10px;font-weight:650;line-height:1.4}.project-comments-badge.unresolved{background:#fde8e7;color:#b3261e;border:1px solid #f8c8c5}.tag{display:inline-flex;align-items:center;gap:4px;width:fit-content;border-radius:999px;padding:2px 7px;background:#eef0ee;color:#4a524c;font-size:10px;font-weight:650}.tag-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:currentColor}.tag-red{--tag-color: #e04b45}.tag-orange{--tag-color: #ef9135}.tag-yellow{--tag-color: #dbb62f}.tag-green{--tag-color: #49a563}.tag-blue{--tag-color: #4c83db}.tag-purple{--tag-color: #9566ce}.tag-gray{--tag-color: #929994}.tag-dot[class*=tag-]{color:var(--tag-color)}.tag[class*=tag-]{border:1px solid color-mix(in srgb,var(--tag-color) 35%,transparent);background:color-mix(in srgb,var(--tag-color) 12%,white)}.empty,.center-card{padding:50px;color:#737a75;text-align:center}.project-empty{grid-column:1 / -1;width:100%;min-height:320px;display:flex;align-items:center;justify-content:center;flex-direction:column;box-sizing:border-box;padding:64px 24px;border:1px dashed #cbd7ce;border-radius:14px;background:linear-gradient(145deg,#fbfcfa,#f2f7f3);text-align:center}.project-empty-icon{width:58px;height:58px;display:grid;place-items:center;margin-bottom:18px;border-radius:18px;background:#dfeee4;color:#176b44}.project-empty h2{margin:0;color:#203f2e;font-size:clamp(27px,3vw,38px);line-height:1.15;letter-spacing:-.035em}.project-empty p{max-width:520px;margin:13px 0 0;color:#6e7b72;font-size:15px;line-height:1.6}.project-pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin:22px 0 4px;color:#66726a;font-size:12px}.project-pagination button{display:inline-flex;align-items:center;gap:5px;border:1px solid #cbd4ce;border-radius:7px;padding:7px 10px;background:#fff;color:#405248;font-size:12px}.project-pagination button:hover:not(:disabled){border-color:#8bae9a;background:#f2f7f3;color:#176b44}.table-card{overflow:hidden;background:#fff;border:1px solid #dfe2de;border-radius:12px}table{width:100%;border-collapse:collapse}th,td{padding:14px 18px;border-bottom:1px solid #eceeeb;text-align:left;font-size:14px}th{background:#f8f9f7;color:#667069;font-size:12px;text-transform:uppercase}td small{display:block;color:#7d837f;margin-top:3px}td button{margin-right:8px;border:1px solid #cdd2ce;background:#fff;border-radius:5px;padding:5px 9px}.danger-text{color:#b3261e}.workspace{height:100vh;display:flex;flex-direction:column;overflow:hidden}.editor-topbar{height:56px;padding:0 14px;flex:none}.back{color:#fff;border:0;background:#ffffff10;width:32px;height:32px;display:grid;place-items:center;border-radius:6px}.project-heading{display:flex;flex-direction:column;min-width:0;margin-right:auto}.project-heading small{color:#b9d0c2;font-size:11px;margin-top:2px}.vim-status-badge{display:inline-flex;align-items:center;gap:5px;margin-right:8px;border:1px solid #7fd39e80;border-radius:999px;padding:5px 9px;background:#1d6b4638;color:#d7ffe3;font-size:10px;font-weight:750;letter-spacing:.04em;white-space:nowrap}.vim-status-badge svg{color:#9df0b5}.collaboration-presence{min-width:0;display:flex;align-items:center;gap:7px;padding-left:8px}.collaboration-status-dot{width:7px;height:7px;flex:none;border-radius:50%;background:#efb84b;box-shadow:0 0 0 2px #efb84b2e}.collaboration-connected .collaboration-status-dot{background:#69d391;box-shadow:0 0 0 2px #69d3912e}.collaboration-disconnected .collaboration-status-dot{background:#e07167;box-shadow:0 0 0 2px #e071672e}.collaboration-avatars{display:flex;align-items:center;padding-left:8px}.collaboration-avatar{--session-color: #1677c8;position:relative;width:28px;height:28px;display:grid;place-items:center;margin-left:-8px;border:2px solid #214d35;border-radius:50%;background:var(--session-color);color:#fff;font-size:11px;font-weight:750;cursor:default;box-shadow:0 1px 4px #061c1145}.collaboration-avatar.editing:after{content:"";position:absolute;right:-2px;bottom:-2px;width:7px;height:7px;border:2px solid #214d35;border-radius:50%;background:#8ff0af}.collaboration-avatar.local{outline:1px solid #ffffff8a;outline-offset:-4px}.collaboration-avatar-overflow{appearance:none;padding:0;border-color:#72877b;background:#f4f7f5;color:#284536;font-family:inherit;font-size:10px;cursor:pointer}.collaboration-avatar-overflow:hover,.collaboration-avatar-overflow:focus-visible{background:#dfe9e3;outline:2px solid #9bc6aa;outline-offset:1px}.collaboration-avatar-tooltip{position:absolute;z-index:80;top:calc(100% + 9px);right:-8px;width:max-content;max-width:280px;display:none;gap:2px;padding:9px 11px;border:1px solid #d7ded9;border-radius:7px;background:#fff;color:#20352a;font-size:12px;font-weight:400;line-height:1.35;text-align:left;box-shadow:0 8px 24px #061c1130}.collaboration-avatar-tooltip:before{content:"";position:absolute;top:-5px;right:15px;width:8px;height:8px;transform:rotate(45deg);border-left:1px solid #d7ded9;border-top:1px solid #d7ded9;background:#fff}.collaboration-avatar-tooltip strong,.collaboration-avatar-tooltip span,.collaboration-avatar-tooltip small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collaboration-avatar-tooltip strong{font-size:13px}.collaboration-avatar-tooltip span{color:#526158}.collaboration-avatar-tooltip small{margin-top:3px;color:#77837b;font-size:11px}.collaboration-avatar:hover .collaboration-avatar-tooltip,.collaboration-avatar:focus-visible .collaboration-avatar-tooltip{display:block}.collaboration-recovery{min-width:0;display:inline-flex;align-items:center;gap:7px;margin:0 8px;border:1px solid #e0716780;border-radius:999px;padding:4px 6px 4px 9px;background:#6f2b2b66;color:#ffe0dd;font-size:10px;white-space:nowrap}.collaboration-recovery button{border:1px solid #ffffff55;border-radius:999px;padding:3px 7px;background:#ffffff18;color:inherit;font-size:10px}.collaboration-recovery button:hover{background:#ffffff2c}.compile-status-strip{min-height:31px;display:flex;align-items:center;justify-content:center;gap:7px;padding:6px 14px;background:#fff6dc;color:#72530d;border-bottom:1px solid #e8cd7d;font-size:11px}.compile-status-strip.failed{background:#fff0ee;color:#9a3028;border-bottom-color:#e8aaa4}.client-tool-recoveries{flex:none;display:flex;flex-direction:column}.client-tool-recovery{min-height:34px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:6px 14px;border-bottom:1px solid #e4bf78;background:#fff8e8;color:#6f4d10;font-size:11px}.client-tool-recovery>svg{flex:none;color:#b97817}.client-tool-recovery>span{min-width:0;flex:0 1 auto;line-height:1.35}.client-tool-recovery>span strong{margin-right:3px}.client-tool-recovery-actions{flex:none;display:inline-flex;align-items:center;gap:5px}.client-tool-recovery-actions button{border:1px solid #d5a553;border-radius:5px;padding:4px 8px;background:#fff;color:#6f4d10;font:inherit;cursor:pointer}.client-tool-recovery-actions button:hover:not(:disabled){border-color:#a86b0f;background:#fff1cd}.client-tool-recovery-actions button:disabled{cursor:not-allowed;opacity:.5}.formatter-diagnostics details{min-width:110px;max-width:min(760px,80vw)}.formatter-diagnostics summary{cursor:pointer;color:#8f5b0d;font-weight:650}.formatter-diagnostics details[open]{flex-basis:100%;order:3}.formatter-diagnostics pre{max-height:150px;margin:7px auto 2px;overflow:auto;border:1px solid #e4c88f;border-radius:5px;padding:8px 10px;background:#fffdf7;color:#57451f;font:11px/1.45 SFMono-Regular,Consolas,monospace;white-space:pre-wrap}.formatter-diagnostics-dismiss{width:25px;height:25px;display:grid;place-items:center;flex:none;border:1px solid transparent;border-radius:5px;padding:0;background:transparent;color:#8f5b0d;cursor:pointer}.formatter-diagnostics-dismiss:hover{border-color:#d5a553;background:#fff1cd}.editor-actions{display:flex;align-items:center;gap:8px}.editor-actions button{padding:8px 10px;display:inline-flex;align-items:center;gap:6px;border-radius:6px;border:1px solid #ffffff28;color:#fff;background:#ffffff0d;font-size:12px;white-space:nowrap}.editor-actions .compile{background:#f3b943;border-color:#f3b943;color:#193023;font-weight:700}.editor-actions button.active{background:#d9eadf;color:#164c33}.format-action,.comments-action,.version-action{min-width:112px;display:flex;flex-direction:column;align-self:center;gap:2px}.format-action-label,.comments-action-label,.version-action-label{height:12px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 5px;color:#b9d0c2;font-size:9px;font-weight:750;letter-spacing:.08em;line-height:1;text-transform:uppercase}.format-action-options,.comments-action-options,.version-action-options{height:27px;display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border:1px solid #ffffff35;border-radius:6px;background:#ffffff0d}.editor-actions .format-action button,.editor-actions .comments-action button,.editor-actions .version-action button{min-width:0;height:25px;justify-content:center;border:0;border-radius:0;padding:0 7px;font-size:11px}.editor-actions .format-action button+button,.editor-actions .comments-action button+button,.editor-actions .version-action button+button{border-left:1px solid #ffffff35}.editor-actions .format-action-file{background:#2f7a58;color:#fff}.editor-actions .format-action-selected{background:#326b91;color:#fff}.editor-actions .format-action-file:hover:not(:disabled){background:#3a946c}.editor-actions .format-action-selected:hover:not(:disabled){background:#3d82ae}.editor-actions .comments-action-add{background:#2f7a58;color:#fff}.editor-actions .comments-action-all{background:#5b648e;color:#fff}.editor-actions .comments-action-add:hover:not(:disabled){background:#3a946c}.editor-actions .comments-action-all:hover:not(:disabled){background:#6e79a8}.editor-actions .comments-action-all.active{border-color:transparent;background:#6e79a8;color:#fff}.editor-actions .version-action-history{background:#5b648e;color:#fff}.editor-actions .version-action-git{background:#765493;color:#fff}.editor-actions .version-action-history:hover:not(:disabled){background:#6e79a8}.editor-actions .version-action-git:hover:not(:disabled){background:#8a65ad}.editor-actions .format-action button:disabled,.editor-actions .comments-action button:disabled,.editor-actions .version-action button:disabled{cursor:not-allowed;opacity:.45}.layout-menu{position:relative}.editor-actions .layout-trigger{min-width:138px;justify-content:flex-start;padding-block:5px}.layout-trigger>span{min-width:0;display:flex;flex:1;flex-direction:column;align-items:flex-start;line-height:1.15}.layout-trigger>span small{color:#b9d0c2;font-size:9px;font-weight:500;letter-spacing:.025em;text-transform:uppercase}.layout-trigger.active>span small{color:#52715f}.layout-popover{position:absolute;z-index:100;top:calc(100% + 8px);right:0;width:290px;padding:7px;border:1px solid #d4dcd6;border-radius:9px;background:#fff;color:#25362c;box-shadow:0 14px 38px #061c1138}.layout-popover-title{padding:6px 8px 8px;color:#768178;font-size:10px;font-weight:700;letter-spacing:.055em;text-transform:uppercase}.editor-actions .layout-option{width:100%;min-height:52px;display:grid;grid-template-columns:25px minmax(0,1fr) 18px;gap:9px;padding:8px 9px;border:0;color:#25362c;background:transparent;text-align:left}.editor-actions .layout-option:hover,.editor-actions .layout-option.selected{background:#edf5ef;color:#185d3d}.layout-option>span{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}.layout-option strong{font-size:12px}.layout-option small{color:#748078;font-size:10px;line-height:1.35;white-space:normal}.toast{position:fixed;z-index:10;top:66px;left:50%;transform:translate(-50%);background:#8f271f;color:#fff;padding:9px 16px;border-radius:7px;font-size:13px;box-shadow:0 8px 30px #0003}.toast.success{background:#1d6b46}.work-grid{min-height:0;flex:1;background:#fff}.resize-handle{position:relative;width:6px;flex:0 0 6px;display:grid;place-items:center;background:#e4e7e4;color:#98a09a;outline:none;transition:background .12s ease}.resize-handle:hover,.resize-handle[data-resize-handle-active]{background:#89ad98;color:#fff}.resize-handle svg{pointer-events:none}.sync-resize-handle{z-index:20!important;overflow:visible}.sync-direction-buttons{position:absolute;z-index:21;top:50%;left:50%;display:flex;flex-direction:row;gap:2px;padding:3px;transform:translate(-50%,-50%);border:1px solid #aebdb3;border-radius:7px;background:#fff;box-shadow:0 4px 16px #15251b38}.sync-direction-buttons button{width:27px;height:27px;display:grid;place-items:center;border:0;border-radius:4px;padding:0;background:transparent;color:#214d35;font-size:17px;font-weight:750;line-height:1}.sync-direction-buttons button:hover:not(:disabled){background:#deebe2;color:#176b44}.sync-direction-buttons button:disabled{cursor:not-allowed;opacity:.35}.sync-resize-handle .resize-grip{opacity:0}.cm-ySelectionInfo{opacity:1!important;padding:2px 5px!important;border-radius:4px 4px 4px 0;font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;font-size:10px!important;transform:translateY(-2px);box-shadow:0 2px 5px #0002}.left-panel,.context-panel,.source-panel,.preview-panel{min-width:0;min-height:0;border-right:1px solid #dfe2de}.left-panel,.source-panel,.preview-panel,.context-panel{height:100%}.left-panel{display:flex;flex-direction:column;overflow:hidden}.files-panel{position:relative;min-height:180px;flex:3;overflow:auto;border-bottom:1px solid #dfe2de}.files-panel.drop-active{outline:2px solid #2c9564;outline-offset:-2px}.file-drop-overlay{position:absolute;z-index:8;inset:42px 0 0;min-height:130px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;padding:16px;background:#e8f4edee;color:#185d3c;text-align:center;pointer-events:none;backdrop-filter:blur(2px)}.file-drop-overlay strong{font-size:13px}.file-drop-overlay span{max-width:90%;overflow:hidden;color:#5e7668;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.outline-panel{min-height:150px;flex:2;overflow:auto}.panel-title{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid #e6e8e5;color:#647069;text-transform:uppercase;font-size:11px;font-weight:700}.panel-title>span{min-width:0;display:flex;align-items:center;gap:6px}.panel-title button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:#5d6961}.panel-title button:hover{background:#e8eeea;color:#176b44}.file-tools{flex:none;display:flex;align-items:center;gap:4px;margin-left:8px}.file-tools button{box-sizing:border-box}.file-list{padding:6px 7px 10px}.file-entry{min-width:0;height:calc(1em + 18px);min-height:30px;display:flex;align-items:center;border-radius:5px;color:#4f5952}.file-entry:hover{background:#f0f3f0}.file-entry.active,.file-entry.selected{background:#e2efe7;color:#15583a;font-weight:650}.file-entry-main{min-width:0;height:100%;flex:1;overflow:hidden;display:flex;align-items:center;gap:5px;border:0;padding:0 4px;background:transparent;color:inherit;text-align:left;font-size:inherit}.file-entry-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-entry-main svg{flex:none;color:#28724e}.file-entry.root-document .file-entry-main>svg{color:#2d6f9f}.file-entry.compile-target{background:#e9f2ec;box-shadow:inset 2px 0 #28724e}.file-entry-main small{flex:none;padding:1px 4px;border-radius:999px;background:#d9eadf;color:#1d5b3e;font-size:8px;line-height:1.35}.folder-entry .file-entry-main svg:first-child{color:#78837b}.folder-entry .file-entry-main svg:nth-child(2){color:#d49b2d}.root-entry{padding-left:5px}.root-entry .file-entry-main svg{color:#d49b2d}.file-entry-action{width:26px;height:26px;flex:none;display:none;place-items:center;border:0;border-radius:4px;background:transparent;color:#657069}.file-entry:hover .file-entry-action,.file-entry:focus-within .file-entry-action{display:grid}.file-entry-action:hover{background:#dfe7e1;color:#176b44}.resource-download{display:inline-flex;align-items:center;gap:6px;text-decoration:none}.resource-preview-message{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#536158;text-align:center}.resource-preview-message strong{color:#263d2e;font-size:15px}.resource-preview-message span{max-width:440px;color:#748078;font-size:12px}.resource-image-wrap{display:flex;max-height:min(620px,65vh);align-items:center;justify-content:center;overflow:auto;padding:8px;background:#e9ecea;border-radius:7px}.resource-image{display:block;max-width:100%;max-height:min(590px,62vh);object-fit:contain}.resource-pdf{width:100%;height:min(650px,68vh);border:1px solid #d9dfda;border-radius:6px;background:#69706c}.resource-text{max-height:min(650px,68vh);overflow:auto;margin:0;padding:14px;border:1px solid #d9dfda;border-radius:6px;background:#f7f9f7;color:#26352c;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.source-panel{position:relative;overflow:hidden;display:flex;flex-direction:column;height:100%;min-height:0}.editor-tabs-bar{flex:none;min-height:35px;background:#eaefe9;border-bottom:1px solid #d4ded7;display:flex;align-items:stretch;padding:4px 6px 0;overflow:hidden}.editor-tabs-scroll{display:flex;align-items:stretch;gap:3px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.editor-tabs-scroll::-webkit-scrollbar{display:none}.editor-tab-item{display:inline-flex;align-items:center;max-width:220px;border:1px solid #ccd6ce;border-bottom:0;border-radius:6px 6px 0 0;background:#dce4de;color:#55665c}.editor-tab-item:hover{background:#e6eee8;color:#1e3628}.editor-tab-item.active{background:#fff;border-color:#cad7ce;box-shadow:0 -1px 3px #0000000a}.editor-tab{display:inline-flex;align-items:center;gap:5px;min-width:0;flex:1 1 auto;padding:4px 7px 4px 10px;border:0;border-radius:6px 0 0;background:transparent;color:inherit;font:inherit;font-size:12px;text-align:left;cursor:pointer;user-select:none;white-space:nowrap}.editor-tab:hover{color:#1e3628}.editor-tab.active{color:#184f36;font-weight:600}.editor-tab:focus-visible{position:relative;z-index:1;outline:2px solid #4c9a6d;outline-offset:-2px}.editor-tab-icon{display:inline-flex;align-items:center;color:#697a70}.editor-tab.active .editor-tab-icon{color:#184f36}.editor-tab-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-tab-badge{font-size:9px;padding:1px 4px;border-radius:4px;background:#e3eee6;color:#1a6442;font-weight:600;flex-shrink:0}.editor-tab-close{display:inline-flex;align-items:center;justify-content:center;width:22px;height:24px;border:0;border-radius:0 5px 0 0;background:transparent;color:#76887e;padding:0;cursor:pointer;flex-shrink:0}.editor-tab-close:hover{background:#cbd7cf;color:#153123}.editor-tab-item.active .editor-tab-close:hover{background:#e3ece5;color:#184f36}.editor-tab-close:focus-visible{position:relative;z-index:1;outline:2px solid #4c9a6d;outline-offset:-2px}.editor-content-container{position:relative;flex:1 1 auto;min-height:0;height:100%;overflow:hidden}.editor-centered-notice{position:absolute;z-index:8;top:50%;left:50%;max-width:calc(100% - 32px);transform:translate(-50%,-50%);pointer-events:none;border:1px solid #69a780;border-radius:8px;padding:9px 15px;background:#1d6b46ed;color:#fff;font:600 12px/1.4 inherit;text-align:center;box-shadow:0 8px 26px #071d1238}.editor-shell{height:100%;min-height:0;display:flex;flex-direction:column}.editor-shell .editor-host{height:auto;min-height:0;flex:1 1 auto}.editor-host,.cm-editor{height:100%;min-height:0}.editor-host .cm-editor{font-family:inherit;font-size:inherit;line-height:inherit}.editor-host .cm-editor{font-variant-ligatures:contextual;font-feature-settings:"liga" 1,"calt" 1}.editor-host .cm-scroller{min-height:0;height:auto;flex:1 1 auto;overflow:auto;font-family:inherit;line-height:inherit}.editor-host .cm-panels{flex:none}.editor-host .cm-vim-panel{min-height:25px;display:flex;align-items:center;box-sizing:border-box;width:100%;border-top:1px solid #cbd8ce;padding:3px 10px;background:#f1f6f2;color:#31523e;font:11px/1.3 SFMono-Regular,Consolas,monospace}.vim-editor-status{min-height:25px;flex:0 0 25px;display:flex;align-items:center;box-sizing:border-box;border-top:1px solid #cbd8ce;padding:3px 10px;background:#f1f6f2;color:#31523e;font:11px/1.3 SFMono-Regular,Consolas,monospace}.editor-host .cm-content,.editor-host .cm-gutters{font-family:inherit;font-size:inherit}.cm-editor.cm-focused{outline:none}.editor-host .cm-spell-error-active{border-radius:2px;background:#f6d66f;box-shadow:0 0 0 1px #c99324;color:#3f3010;text-decoration:underline wavy #9b6715 1.5px;text-decoration-skip-ink:none}.editor-host .cm-panel.cm-search{padding:8px 38px 8px 10px;border-top:1px solid #ccd5cf;background:#f7f9f7;color:#35443a;box-shadow:0 -3px 10px #1f382710;font-family:Inter,ui-sans-serif,system-ui,sans-serif;font-size:12px;line-height:1.4}.editor-host .cm-panel.cm-search .cm-textfield{min-width:170px;height:29px;margin:2px 6px 2px 0;border:1px solid #bcc8c0;border-radius:5px;padding:4px 8px;background:#fff;color:#202b24;outline:none;font-family:inherit;font-size:12px}.editor-host .cm-panel.cm-search .cm-textfield:focus{border-color:#3d8a60;box-shadow:0 0 0 2px #3d8a6025}.editor-host .cm-panel.cm-search .cm-button{height:29px;margin:2px 5px 2px 0;border:1px solid #bdc8c0;border-radius:5px;padding:3px 9px;background:#fff;background-image:none;color:#31513d;font-family:inherit;font-size:12px;text-transform:none}.editor-host .cm-panel.cm-search .cm-button:hover{border-color:#7c9f89;background:#e9f1ec}.editor-host .cm-panel.cm-search label{display:inline-flex;align-items:center;gap:3px;margin:3px 9px 3px 0;color:#59665d;font-family:inherit;font-size:12px}.editor-host .cm-panel.cm-search input[type=checkbox]{accent-color:#176b44}.editor-host .cm-panel.cm-search [name=close]{top:8px;right:10px;width:25px;height:25px;border-radius:5px;color:#647069;font-size:19px;line-height:1}.editor-host .cm-panel.cm-search [name=close]:hover{background:#e3e9e5;color:#244d36}.editor-host .cm-search-count{display:inline-flex;align-items:center;min-height:29px;margin:2px 5px 2px 4px;color:#506057;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.editor-host .cm-searchMatch{background:#f5d76e99;outline:1px solid #d9a91c88}.editor-host .cm-searchMatch.cm-searchMatch-selected{background:#f0a94a99;outline-color:#cc7720}.editor-host .cm-spell-error{text-decoration:underline wavy #c53b32 1.5px;text-decoration-skip-ink:none;text-decoration-thickness:1.5px}.editor-host .cm-grammar-warning{text-decoration:underline wavy #d19a26 1.5px;text-decoration-skip-ink:none;text-decoration-thickness:1.5px}.spell-suggestions-menu{position:fixed;z-index:1200;display:flex;min-width:190px;max-width:250px;flex-direction:column;gap:3px;padding:7px;border:1px solid #b9c8bd;border-radius:7px;background:#fff;box-shadow:0 10px 28px #1930222e;color:#26352c;font-size:12px}.spell-suggestions-title{padding:3px 6px 5px;color:#607067;font-size:10px;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.spell-suggestions-message{padding:3px 6px 6px;border-bottom:1px solid #e2e8e3;color:#58685e;font-size:11px;line-height:1.4}.spell-suggestions-menu button{min-height:29px;border:1px solid transparent;border-radius:5px;padding:4px 8px;background:transparent;color:#214f37;font:inherit;text-align:left;cursor:pointer}.spell-suggestions-menu button:hover:not(:disabled),.spell-suggestions-menu button:focus-visible:not(:disabled){border-color:#a9c9b3;background:#edf6ef;outline:none}.spell-suggestions-menu button:disabled{color:#78847d;cursor:not-allowed;opacity:.7}.spell-suggestions-empty,.spell-suggestions-readonly{display:block;padding:4px 6px;color:#78847d;font-size:10px;line-height:1.35}.spell-suggestions-readonly{border-top:1px solid #e2e8e3;margin-top:3px;padding-top:7px}.cm-source-comment{background:#ffe49b99;border-bottom:2px solid #d68b00;cursor:text}.cm-source-comment-resolved{background:#dce5de99;border-bottom-color:#829087}.cm-comment-pin{color:#d68b00;font-size:9px;padding:0 2px;cursor:pointer}.preview-panel{display:flex;flex-direction:column;background:#6f7471}.preview-tabs{min-height:48px;flex:none;display:flex;align-items:stretch;padding:5px 6px 0;background:#4d544f}.preview-tab-list{min-width:0;flex:1;display:grid;grid-template-columns:minmax(0,1.8fr) minmax(120px,1fr);gap:3px}.preview-tabs button{min-width:0;display:flex;align-items:center;justify-content:center;gap:5px;border:0;border-radius:6px 6px 0 0;background:transparent;color:#d7dcd8;font-size:11px}.preview-tabs button.active{background:#f3f4f1;color:#184f36;font-weight:700}.preview-tabs button span{min-width:17px;padding:1px 4px;border-radius:999px;background:#ffffff20;font-size:9px}.preview-tabs button.active span{background:#dfe8e2}.preview-tabs .pdf-tab{justify-content:flex-start;padding:0 12px;font-size:12px}.preview-tabs button .pdf-tab-label{min-width:0;overflow:hidden;padding:0;border-radius:0;background:transparent;display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:12px;line-height:1;text-overflow:ellipsis;white-space:nowrap}.preview-tabs button.active .pdf-tab-label{background:transparent}.preview-tabs .pdf-tab small{max-width:100%;overflow:hidden;color:#bcc4bf;font-size:8px;font-weight:400;line-height:1;text-overflow:ellipsis;white-space:nowrap}.preview-tabs .pdf-tab.active small{color:#65756c}.pdf-download-top{flex:none;display:inline-flex;align-items:center;gap:5px;margin-left:4px;padding:0 11px;border:0;border-radius:6px 6px 0 0;color:#d7dcd8;font-size:10px;text-decoration:none;white-space:nowrap}.pdf-download-top:hover{background:#ffffff1b;color:#fff}.preview-subtabs{height:36px;flex:none;display:flex;align-items:center;gap:3px;padding:4px 7px;border-bottom:1px solid #cfd6d1;background:#e4e9e5}.preview-subtabs button{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:#58665d;font-size:10px}.preview-subtabs button:hover{background:#d8e3db;color:#205c40}.preview-subtabs button.active{background:#fff;color:#184f36;font-weight:700;box-shadow:0 1px 3px #26312b22}.preview-subtabs button span{min-width:16px;padding:1px 4px;border-radius:999px;background:#d5ded7;font-size:9px;text-align:center}.preview-subtabs button.active span{background:#dfe8e2}.preview-content{min-height:0;flex:1}.preview-pdf{overflow:hidden}.pdf-viewer{position:relative;width:100%;height:100%;min-height:0;display:flex;flex-direction:column}.pdf-toolbar{height:36px;flex:none;display:flex;align-items:center;justify-content:flex-end;gap:3px;padding:4px 8px;border-bottom:1px solid #343a36;background:#414843;color:#e4e8e5;font:11px/1 Inter,ui-sans-serif,system-ui,sans-serif}.pdf-toolbar button{height:27px;min-width:27px;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #ffffff24;border-radius:5px;padding:0 6px;background:#ffffff0b;color:inherit}.pdf-toolbar button:hover:not(:disabled){border-color:#ffffff48;background:#ffffff1b}.pdf-toolbar button:disabled{opacity:.3}.pdf-zoom-value{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}.pdf-toolbar .pdf-fit-width{margin-left:3px;padding:0 8px}.pdf-compiling-overlay{position:absolute;z-index:4;inset:36px 0 0;display:flex;align-items:flex-start;justify-content:center;gap:8px;padding-top:24px;background:#26312bb8;color:#fff;font-size:13px;pointer-events:none}.pdf-compiling-overlay span{padding:3px 8px;border-radius:5px;background:#17231cdd}.pdf-loading-state{width:100%;height:100%;min-height:220px;display:grid;place-items:center;align-content:center;gap:10px;background:#6f7471;color:#eef2ef;font-size:12px}.pdf-document{position:relative;width:100%;min-width:0;min-height:0;flex:1;overflow-x:scroll;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#aeb8b1 #4f5652;scrollbar-width:auto;scrollbar-gutter:stable;padding:14px 14px 20px;background:#6f7471}.pdf-document::-webkit-scrollbar{width:12px;height:12px}.pdf-document::-webkit-scrollbar-track{background:#4f5652}.pdf-document::-webkit-scrollbar-thumb{min-width:38px;border:2px solid #4f5652;border-radius:999px;background:#aeb8b1}.pdf-document::-webkit-scrollbar-thumb:hover{background:#d5dcd7}.pdf-document::-webkit-scrollbar-corner{background:#4f5652}.pdf-pages{min-width:100%}.pdf-loading{min-height:220px;display:grid;place-items:center;align-content:center;gap:10px;color:#eef2ef;font-size:12px}.pdf-page{position:relative;flex:none;max-width:none;overflow:hidden;margin:0 auto 16px;background:#fff;box-shadow:0 3px 14px #0004}.pdf-page.loading{background:#f7f8f7}.pdf-page canvas{display:block;width:100%!important;max-width:100%;height:auto!important}.pdf-annotation-layer{position:absolute;inset:0;z-index:3;pointer-events:none}.pdf-annotation-link{position:absolute;display:block;pointer-events:auto;border-radius:2px;background:transparent;cursor:pointer}.pdf-annotation-link:hover{background:#3f9b6426;box-shadow:inset 0 0 0 1px #3f9b6440}.pdf-page figcaption{position:absolute;right:7px;bottom:5px;padding:2px 5px;border-radius:4px;background:#26312bb5;color:#fff;font-size:9px;pointer-events:none}.pdf-sync-marker{position:absolute;z-index:2;width:14px;height:14px;border:3px solid #ef9c24;border-radius:50%;transform:translate(-50%,-50%);background:#ffe0a580;box-shadow:0 0 0 4px #ef9c2435;pointer-events:none;animation:sync-pulse 1.2s ease-out}@keyframes sync-pulse{0%{box-shadow:0 0 0 14px #ef9c2460}to{box-shadow:0 0 0 4px #ef9c2435}}.preview-empty{height:100%;display:grid;place-content:center;gap:8px;color:#e7e9e7;text-align:center}.preview-empty span{font-size:12px;color:#c2c7c4}.preview-log,.preview-warnings,.preview-errors{overflow:auto;background:#202522}.preview-clean{overflow:auto;background:#f4f6f4}.preview-artifacts{overflow:hidden;background:#f4f6f4}.artifact-browser{width:100%;height:100%;min-height:0;display:grid;grid-template-columns:minmax(135px,38%) minmax(0,1fr)}.artifact-list{min-width:0;overflow:auto;border-right:1px solid #d9dedb;background:#fff}.artifact-row{min-width:0;display:flex;align-items:stretch;border-bottom:1px solid #edf0ee}.artifact-row.active{background:#e5f0e9}.artifact-row>button{min-width:0;flex:1;display:flex;align-items:center;gap:7px;padding:8px 6px 8px 9px;border:0;background:transparent;color:#33463b;text-align:left}.artifact-row>button:disabled{cursor:default;opacity:.7}.artifact-row>button>span{min-width:0;display:flex;flex-direction:column;gap:2px}.artifact-row strong{overflow:hidden;font-size:11px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.artifact-row small{color:#89928c;font-size:9px}.artifact-row>a{width:30px;flex:none;display:grid;place-items:center;color:#52705f}.artifact-row>a:hover{background:#dce8e0;color:#176641}.artifact-preview{min-width:0;min-height:0;display:flex;flex-direction:column;background:#202522;color:#dbe2dd}.artifact-preview>header{height:36px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border-bottom:1px solid #39413c;background:#303732;font-size:11px}.artifact-preview>header strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.artifact-preview>header a{flex:none;display:inline-flex;align-items:center;gap:4px;color:#c9ddd1}.artifact-preview>pre{min-height:0;flex:1;margin:0;overflow:auto;padding:13px;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.55 SFMono-Regular,Consolas,monospace}.compile-output{min-height:100%;margin:0;padding:16px;color:#dbe2dd;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.55 SFMono-Regular,Consolas,monospace}.compile-output.compile-warning{color:#ffdfa0;background:#2d281c}.compile-output.compile-error{color:#ffc2bd;background:#301e1d}.compile-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#bfc7c1;font-size:12px}.compile-empty.compile-warning{color:#e8c46d;background:#2d281c}.compile-empty.compile-error{color:#e99b94;background:#301e1d}.compile-clean-panel{max-width:820px;margin:0 auto;padding:24px;color:#30453a}.compile-clean-intro{display:flex;align-items:flex-start;gap:12px;padding:15px;border:1px solid #e3d1a7;border-radius:9px;background:#fffaf0;color:#80631f;box-shadow:0 3px 12px #5c48100d}.compile-clean-intro>div{min-width:0}.compile-clean-intro strong{display:block;font-size:14px}.compile-clean-intro p,.compile-clean-actions p{margin:5px 0 0;color:#718078;font-size:11px;line-height:1.5}.compile-clean-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.compile-clean-actions article{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;min-width:0;padding:14px;border:1px solid #d4dfd7;border-radius:8px;background:#fff}.compile-clean-actions article.danger{border-color:#e3c9c5}.compile-clean-action-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:7px;background:#e7f2ea;color:#28714a}.compile-clean-actions article.danger .compile-clean-action-icon{background:#f8e8e6;color:#a6433a}.compile-clean-actions strong{color:#2d4638;font-size:12px}.compile-clean-actions article.danger strong{color:#874039}.compile-clean-actions button{display:inline-flex;align-items:center;gap:5px;margin-top:12px;padding:6px 10px;border:1px solid #b8d1bd;border-radius:5px;background:#f0f8f1;color:#21633d;font-size:11px}.compile-clean-actions button:hover:not(:disabled){border-color:#79aa86;background:#e3f2e6}.compile-clean-actions button.danger{border-color:#e2b9b4;background:#fff4f2;color:#a23d35}.compile-clean-actions button.danger:hover:not(:disabled){border-color:#c8837a;background:#fce7e4}.compile-clean-actions button:disabled{cursor:not-allowed;opacity:.45}.compile-diagnostic-list{min-height:100%;padding:8px;background:#202522;overflow:auto}.compile-diagnostic-list.compile-warning{background:#2d281c}.compile-diagnostic-list.compile-error{background:#301e1d}.compile-diagnostic-row{display:grid;grid-template-columns:20px minmax(0,1fr);gap:7px;width:100%;padding:9px 10px;border:0;border-bottom:1px solid #ffffff12;border-radius:4px;background:transparent;color:#eef2ef;text-align:left}.compile-diagnostic-row:not(:disabled):hover{background:#ffffff10;box-shadow:inset 2px 0 #63b889}.compile-diagnostic-row:disabled{opacity:.78;cursor:default}.compile-diagnostic-row>span{min-width:0;display:grid;gap:4px}.compile-diagnostic-row strong{font-size:11px;font-weight:500;white-space:normal}.compile-diagnostic-row small{color:#aeb8b1;font:10px/1.4 SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}.compile-warning .compile-diagnostic-row>svg{color:#e8c46d}.compile-error .compile-diagnostic-row>svg{color:#e99b94}.context-panel{border-right:0;overflow:auto}.drawer-title{position:sticky;top:0;z-index:2;height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid #e3e6e3;background:#fff;font-size:13px}.drawer-title button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:#737a75}.drawer-title button:hover{background:#edf1ee}.tabs{height:42px;display:flex;border-bottom:1px solid #e3e6e3}.tabs button{flex:1;border:0;background:#fff;color:#707872;font-size:12px}.tabs button.active{color:#176b44;border-bottom:2px solid #176b44;font-weight:700}.outline{padding:10px 8px}.outline-item{width:100%;min-width:0;display:flex;align-items:stretch;border:0;padding:6px 0;background:transparent;font-size:12px;text-align:left}.outline-item:hover,.outline-item:focus-visible{background:#edf3ef;color:#176b44;outline:none}.outline-item.current{background:#e2efe7;color:#176b44;font-weight:700}.outline-guides{flex:none;background:repeating-linear-gradient(to right,#dfe5e0 0,#dfe5e0 1px,transparent 1px,transparent 12px)}.outline small{flex:none;min-width:22px;margin-left:8px;color:#a1a7a2}.outline-title{min-width:0;overflow:hidden;color:#3f4942;text-overflow:ellipsis;white-space:nowrap}.padded{padding:14px}.comments{padding:9px}.comments article{margin-bottom:9px;padding:10px;border:1px solid #dde2de;border-radius:7px;font-size:12px;cursor:pointer;user-select:text;-webkit-user-select:text}.comments article.resolved{opacity:.55;background:#f3f5f3}.comments article.orphaned{border-color:#d8847d;background:#fff4f2}.comments header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.comments header small{color:#858b87}.comments time{flex:none;color:#8b928d;font-size:9px;white-space:nowrap}.comment-times{flex:none;display:flex;align-items:flex-end;flex-direction:column;gap:2px}.comment-times small{font-size:8px;white-space:nowrap}.comment-author{min-width:0;display:flex;flex-direction:column;gap:1px}.comment-author strong,.comment-author small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-location{margin-top:5px;color:#768079;font-size:10px}.comments blockquote{margin:8px 0;padding:6px 8px;border-left:2px solid #85ad96;background:#f2f6f3;color:#657069;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.comments p{white-space:pre-wrap;user-select:text;-webkit-user-select:text;cursor:text}.comments blockquote,.comments .comment-content{user-select:text;-webkit-user-select:text;cursor:text}.comments .resolve{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:#176b44;padding:0;font-size:11px}.comment-replies{display:flex;flex-direction:column;gap:7px;margin:10px 0 8px;padding-left:9px;border-left:2px solid #d6dfd9}.comment-reply{position:relative;padding:7px 8px;border-radius:6px;background:#f5f7f5}.comment-reply p{margin:7px 0 1px}.comment-actions{display:flex;align-items:center;gap:12px}.comments .reply-action{display:inline-flex;align-items:center;gap:4px;border:0;padding:0;background:transparent;color:#526c5d;font-size:11px}.comment-owner-actions{display:inline-flex;align-items:center;gap:2px;margin-left:auto}.comment-reply>.comment-owner-actions{position:absolute;right:5px;bottom:4px}.comments .comment-owner-actions button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:5px;background:transparent;color:#66716a}.comments .comment-owner-actions button:hover{background:#e2e8e3;color:#244c35}.comments .comment-owner-actions button.danger-text:hover{background:#f8e4e2;color:#a7312a}.comment-reply-form{display:flex;flex-direction:column;gap:7px;margin-top:9px}.comment-edit-form{margin:7px 0}.comment-reply-form textarea{width:100%;resize:vertical;border:1px solid #cbd2cc;border-radius:6px;padding:7px 8px;outline:none;font-size:11px}.comment-reply-form textarea:focus{border-color:#176b44;box-shadow:0 0 0 2px #176b4420}.comment-reply-form>div{display:flex;justify-content:flex-end;gap:5px}.comment-reply-form button{display:inline-flex;align-items:center;gap:4px;border:1px solid #cbd2cc;border-radius:5px;padding:5px 7px;background:#fff;font-size:10px}.comment-reply-form button.primary{border-color:#176b44;background:#176b44;color:#fff}.settings{display:flex;flex-direction:column;gap:14px}.settings>section{display:flex;flex-direction:column;gap:14px}.settings button{border:1px solid #c9d0ca;background:#fff;border-radius:6px;padding:7px 9px;font-size:12px}.settings-tabs{display:flex;gap:4px;padding:3px;border:1px solid #d7ded8;border-radius:9px;background:#f4f7f4}.settings-tab{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:6px;min-height:34px;border:1px solid transparent!important;border-radius:7px!important;background:transparent!important;color:#66716a;font-weight:650}.settings-tab:hover{background:#eaf1eb!important;color:#31523e}.settings-tab.active{border-color:#c8d9cb!important;background:#fff!important;color:#176b44;box-shadow:0 1px 2px #233c2a12}.settings-tab:focus-visible{outline:2px solid #176b44;outline-offset:1px}.settings-actions{display:flex;width:100%;justify-content:flex-end;padding-top:2px}.settings-section-title{display:flex;align-items:center;gap:7px;color:#31523e;font-size:13px}.settings-description{margin:0;color:#7b837e;font-size:11px;line-height:1.45}.browser-tool-statuses{display:flex;flex-wrap:wrap;gap:7px}.browser-tool-status{min-width:116px;flex:1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;padding:8px 9px;border:1px solid #d9ded9;border-radius:7px;background:#f7f9f7;color:#6d776f;font-size:10px}.browser-tool-status strong{min-width:0;overflow:hidden;color:#344d3c;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.browser-tool-status span{font-weight:700;white-space:nowrap}.browser-tool-status.loading{border-color:#e4d7ad;background:#fffaf0;color:#9a6b18}.browser-tool-status.working{border-color:#bddbc7;background:#f0f8f2;color:#187348}.browser-tool-status.error{border-color:#e7beb9;background:#fff3f1;color:#a3342c}.tex-fmt-status{margin-top:8px;max-width:360px}.browser-tool-reload{grid-column:1 / -1;display:inline-flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:26px;margin-top:2px;border:1px solid #dca9a3;border-radius:5px;background:#fff;color:#922d27;font-size:10px;font-weight:700}.browser-tool-reload:hover{border-color:#bf7770;background:#fff8f7}.settings .editor-preference{display:flex;flex-direction:column;gap:4px}.settings .editor-preference .field-hint{margin:0 9px;line-height:1.4}.settings .editor-checkbox{flex-direction:row;align-items:center;gap:7px;padding:8px 9px;border:1px solid #d9ded9;border-radius:7px;font-weight:500}.settings .editor-checkbox input{width:auto;margin:0;accent-color:#176b44}.spell-check-result{display:inline-flex;align-items:center;gap:6px;color:#66716a;font-size:11px}.spell-check-result.has-issues{color:#a3342c;font-weight:650}.spell-check-controls{display:inline-flex;align-items:center;gap:2px;margin-left:3px;color:#6f4a45;font-weight:500}.spell-check-controls button{width:24px;height:24px;display:inline-grid;place-items:center;border:1px solid #d7b8b4;border-radius:4px;padding:0;background:#fff8f7;color:#8e4a42}.spell-check-controls button:hover:not(:disabled){border-color:#b98279;background:#fce9e6}.spell-check-controls button:disabled{cursor:not-allowed;opacity:.35}.spell-check-position{min-width:34px;text-align:center;color:#825850;font-variant-numeric:tabular-nums;white-space:nowrap}.password-generator{display:flex;align-items:stretch;gap:7px}.password-generator input{min-width:0;flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.password-generator button{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 10px;border:1px solid #c9d0ca;border-radius:6px;background:#f6f8f6;color:#31523e;font-size:11px;white-space:nowrap}.password-generator button:hover{border-color:#8eaa98;background:#edf3ef}.settings-save{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:6px}.latexmkrc-editor,.tex-fmt-options-editor{resize:vertical;font:12px/1.5 SFMono-Regular,Consolas,monospace!important}.tex-fmt-options-editor{min-height:100px}.dictionary-add{display:flex;align-items:stretch;gap:7px}.dictionary-add input{min-width:0;flex:1}.dictionary-add button{flex:none;color:#176b44}.dictionary-words{display:flex;flex-wrap:wrap;gap:6px}.dictionary-word{display:inline-flex;align-items:center;gap:3px;min-height:27px;padding:3px 5px 3px 8px;border:1px solid #d5ded7;border-radius:999px;background:#f1f6f2;color:#31523e;font-size:11px}.dictionary-word code{font:11px/1.2 SFMono-Regular,Consolas,monospace}.dictionary-word button{width:20px;height:20px;display:grid;place-items:center;padding:0;border:0;background:transparent;color:#748078}.dictionary-word button:hover{color:#a7312a}.dictionary-empty{color:#7b837e;font-size:11px}.dictionary-error{margin:-6px 0 0;font-size:11px}.share-dialog{display:flex;flex-direction:column;gap:16px}.share-owner{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:8px;background:#edf4ef;color:#18583a}.share-owner>span{display:flex;flex-direction:column;gap:2px}.share-owner small{color:#6f7d74;font-size:10px;text-transform:uppercase}.share-add{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;align-items:end;gap:9px;padding-bottom:16px;border-bottom:1px solid #e4e7e4}.share-add .icon-button{height:39px;display:inline-flex;align-items:center;gap:6px;padding:0 13px;font-size:12px}.shared-members-heading{display:flex;align-items:center;justify-content:space-between;color:#48524b;font-size:13px}.shared-members-heading span{min-width:22px;padding:2px 6px;border-radius:999px;background:#e8ece9;color:#6a746d;font-size:10px;text-align:center}.shared-members{display:flex;flex-direction:column;gap:7px}.shared-member{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px;border:1px solid #dfe3df;border-radius:8px}.member-identity{min-width:0;display:flex;align-items:center;gap:9px}.member-identity>span:last-child{min-width:0;display:flex;flex-direction:column}.member-identity strong,.member-identity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-identity small{color:#7c857e;font-size:10px}.member-avatar{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:50%;background:#dfece4;color:#176b44;font-size:12px;font-weight:750}.member-controls{display:flex;align-items:center;gap:5px}.member-controls select{border:1px solid #cbd2cc;border-radius:6px;padding:6px 8px;background:#fff;font-size:11px}.icon-only{width:31px;height:31px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent}.icon-only:hover{background:#f8e9e7}.share-empty{min-height:90px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#89928c;font-size:12px}.spin{animation:spin .8s linear infinite}.dialog-overlay{position:fixed;z-index:100;inset:0;background:#101b15aa;backdrop-filter:blur(2px);animation:fade-in .12s ease-out}.dialog-content{position:fixed;z-index:101;top:50%;left:50%;width:min(460px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 40px));overflow:auto;transform:translate(-50%,-50%);background:#fff;border-radius:12px;box-shadow:0 25px 80px #0004;animation:dialog-in .15s ease-out}.dialog-wide{width:min(660px,calc(100vw - 32px))}.dialog-extra-wide{width:min(900px,calc(100vw - 32px))}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 14px;border-bottom:1px solid #e5e8e5}.dialog-header h2{margin:0;font-size:19px}.dialog-header p{margin:6px 0 0;color:#737a75;font-size:12px;line-height:1.5}.dialog-close{border:0;background:transparent;color:#6d746f;font-size:22px}.dialog-body{padding:20px 22px}.dialog-body .warning{display:flex;align-items:flex-start;gap:8px;margin:0;padding:10px 11px;border:1px solid #e4cf91;border-radius:7px;background:#fff8df;color:#735a18;font-size:11px;line-height:1.5}.dialog-body .warning svg{flex:none;margin-top:1px}.system-metrics{display:grid;gap:20px}.metric-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.metric-card{min-width:0;padding:14px 16px;border:1px solid #dfe4df;border-radius:10px;background:#f7f8f6;display:grid;gap:4px}.metric-card>span,.metric-card small{color:var(--muted);font-size:12px}.metric-card strong{font-size:20px;font-weight:650}.metric-section{display:grid;gap:10px}.metric-section h3{margin:0;display:flex;align-items:center;gap:7px;font-size:14px}.metric-section p{margin:0;font-size:13px}.metric-table-wrap{overflow-x:auto;border:1px solid #dfe4df;border-radius:9px}.metric-table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}.metric-table th,.metric-table td{padding:8px 10px;border-bottom:1px solid #e4e8e4;text-align:right}.metric-table th:first-child,.metric-table td:first-child{text-align:left}.metric-table tbody tr:last-child td{border-bottom:0}@media(max-width:640px){.metric-summary-grid{grid-template-columns:1fr}}.dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid #e5e8e5;background:#f8f9f7}.dialog-footer button{border:1px solid #cbd2cc;border-radius:7px;padding:8px 14px;background:#fff}.dialog-footer .primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-color:#176b44;background:#176b44;color:#fff}.dialog-footer .danger,button.danger{border-color:#b3261e;background:#b3261e;color:#fff}.citation-library-dialog{display:flex;flex-direction:column;gap:12px}.citation-library-tabs{display:flex;gap:4px;padding:3px;border:1px solid #d7ded8;border-radius:9px;background:#f4f7f4}.citation-library-tabs button{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:6px;min-height:34px;border:1px solid transparent;border-radius:7px;background:transparent;color:#66716a;font-size:12px}.citation-library-tabs button:hover{background:#eaf1eb;color:#31523e}.citation-library-tabs button.active{border-color:#c8d9cb;background:#fff;color:#176b44;box-shadow:0 1px 2px #233c2a12}.citation-library-tabs button span{min-width:18px;padding:1px 5px;border-radius:999px;background:#e7eee8;font-size:10px}.citation-library-search{display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid #ccd6ce;border-radius:7px;background:#fff;color:#68766d}.citation-library-search-row{display:flex;align-items:stretch;gap:8px}.citation-library-search-row .citation-library-search{min-width:0;flex:1}.citation-add-entry-button{display:inline-flex;align-items:center;gap:5px;flex:none;border:1px solid #176b44;border-radius:7px;padding:0 11px;background:#176b44;color:#fff;font-size:11px}.citation-add-entry-button:hover{background:#125937}.citation-library-search input{min-width:0;flex:1;border:0;padding:9px 0;outline:0;font-size:12px}.citation-library-search span{flex:none;color:#8a958d;font-size:10px}.citation-tag-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.citation-tag-filters{min-width:0;display:flex;flex:1;flex-wrap:wrap;gap:5px}.citation-tag-filters button{display:inline-flex;align-items:center;gap:5px;border:1px solid transparent;border-radius:999px;padding:5px 8px;background:#f1f4f1;color:#5f6e64;font-size:10px}.citation-tag-filters button:hover{background:#e6eee8}.citation-tag-filters button.active{border-color:#9cbea6;background:#e8f2eb;color:#176b44}.citation-tag-create{display:flex;flex:none;gap:5px}.citation-tag-create input,.citation-tag-create select{min-width:0;border:1px solid #cbd4cd;border-radius:6px;padding:6px 7px;background:#fff;font-size:10px}.citation-tag-create input{width:120px}.citation-tag-create select{width:76px}.citation-tag-create button{display:inline-flex;align-items:center;gap:4px;border:1px solid #bdc9c0;border-radius:6px;padding:6px 8px;background:#fff;color:#31523e;font-size:10px;white-space:nowrap}.citation-tag-create button:hover:not(:disabled){border-color:#8eaa98;background:#edf4ef}.citation-entry-list{display:flex;flex-direction:column;gap:8px;max-height:46vh;overflow:auto;padding:1px}.citation-entry-item{display:flex;flex-direction:column;gap:6px}.citation-entry-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid #dce3de;border-radius:8px;background:#fbfcfb}.citation-entry-card.already-in-file{border-color:#d7ddd8;background:#f0f2f0;filter:grayscale(.35)}.citation-entry-card.already-in-file .citation-entry-heading code,.citation-entry-card.already-in-file .citation-entry-main>strong,.citation-entry-card.already-in-file .citation-entry-main>p{color:#7c867f}.citation-entry-card.selected{position:relative;z-index:1;border-color:#70a982;background:#f0f8f2;box-shadow:0 0 0 2px #2f7a5824,0 6px 16px #244c3520}.citation-entry-card.selected .citation-entry-heading code{color:#0f633d}.citation-entry-main{min-width:0;display:flex;flex:1;flex-direction:column;gap:3px}.citation-entry-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.citation-entry-heading code{color:#176b44;font:650 11px/1.3 SFMono-Regular,Consolas,monospace}.citation-entry-heading>span{color:#859189;font-size:10px}.citation-entry-heading>.citation-entry-venue{max-width:22rem;overflow:hidden;border-radius:999px;padding:2px 6px;background:#edf0ff;color:#4b5ca8;font-size:9px;font-style:italic;font-synthesis:style;text-overflow:ellipsis;white-space:nowrap}.citation-entry-heading em{display:inline-flex;align-items:center;gap:3px;border-radius:999px;padding:2px 6px;background:#e8f2eb;color:#26704a;font-size:9px;font-style:normal}.citation-entry-heading em.private{background:#edf0ee;color:#69756d}.citation-entry-main>strong{overflow:hidden;color:#2b3b31;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.citation-entry-main>p{margin:0;overflow:hidden;color:#718078;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.citation-entry-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.citation-tag-pill{display:inline-flex;align-items:center;gap:4px;border:1px solid color-mix(in srgb,var(--tag-color) 35%,transparent);border-radius:999px;padding:2px 6px;background:color-mix(in srgb,var(--tag-color) 12%,white);color:#526158;font-size:9px}.citation-tag-dot{width:7px;height:7px;flex:none;display:inline-block;border-radius:50%;background:var(--tag-color)}.citation-tag-filters .citation-tag-dot{background:var(--tag-color)}.citation-entry-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:flex-end;gap:5px}.citation-entry-actions button{display:inline-flex;align-items:center;gap:4px;border:1px solid #cbd5ce;border-radius:6px;padding:6px 8px;background:#fff;color:#52685a;font-size:10px;white-space:nowrap}.citation-entry-actions button:hover:not(:disabled){border-color:#8eaa98;background:#edf4ef;color:#176b44}.citation-entry-actions button.primary{border-color:#176b44;background:#176b44;color:#fff}.citation-entry-actions button.saved{border-color:#acd0b8;background:#edf7f0;color:#17623d}.citation-library-empty{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#7b887f;text-align:center}.citation-library-empty strong{color:#526158;font-size:13px}.citation-library-empty span{max-width:360px;font-size:11px;line-height:1.45}.citation-library-notice{display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;border:1px solid #acd0b8;border-radius:7px;background:#edf7f0;color:#17623d;font-size:11px}.citation-library-notice button{display:grid;place-items:center;width:21px;height:21px;margin-left:auto;border:0;border-radius:4px;background:transparent;color:inherit}.citation-current-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.citation-current-heading>div{min-width:0;display:flex;flex-direction:column;gap:3px}.citation-current-heading strong{color:#31523e;font-size:13px}.citation-current-heading span{color:#78857c;font-size:10px}.citation-current-heading button{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:#176b44;font-size:10px;white-space:nowrap}.citation-edit-panel,.citation-tag-editor{display:flex;flex-direction:column;gap:9px;padding:10px 11px;border:1px solid #cbd9ce;border-radius:8px;background:#f5f9f6}.citation-edit-header{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#31523e;font-size:11px}.citation-edit-header>div{min-width:0;display:flex;flex-direction:column;gap:3px}.citation-edit-header small{color:#78857c;font-size:10px;font-weight:400;line-height:1.4}.citation-edit-header button{display:grid;place-items:center;width:22px;height:22px;border:0;border-radius:4px;background:transparent;color:#68766d}.citation-edit-header button:hover{background:#e2ece4}.citation-edit-panel textarea{width:100%;resize:vertical;border:1px solid #cbd5ce;border-radius:6px;padding:8px;outline:0;font:11px/1.5 SFMono-Regular,Consolas,monospace}.citation-edit-panel textarea:focus{border-color:#176b44;box-shadow:0 0 0 2px #176b4420}.citation-modal-form{display:flex;flex-direction:column;gap:12px}.citation-modal-form.citation-edit-panel{padding:0;border:0;background:transparent}.citation-entry-item>.citation-edit-panel,.citation-entry-item>.citation-tag-editor{margin:0 7px 0 12px;border-left:3px solid #70a982}.citation-edit-actions{display:flex;justify-content:flex-end;gap:6px}.citation-edit-actions button{display:inline-flex;align-items:center;gap:4px;border:1px solid #bdc9c0;border-radius:6px;padding:6px 9px;background:#fff;color:#52685a;font-size:10px}.citation-edit-actions button.primary{border-color:#176b44;background:#176b44;color:#fff}.citation-tag-choice-list{display:flex;flex-wrap:wrap;gap:7px}.citation-tag-choice-list label{display:inline-flex;align-items:center;gap:5px;border:1px solid #d4ded6;border-radius:999px;padding:5px 7px;background:#fff;color:#526158;font-size:10px}.citation-tag-choice-list input{width:auto;accent-color:#176b44}.form-stack{display:flex;flex-direction:column;gap:14px}.import-error{margin:0;padding:10px 12px;border:1px solid #e3b5b1;border-radius:8px;background:#fff3f2;line-height:1.45}.form-field{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:650}.form-field input,.form-field select,.form-field textarea{width:100%;border:1px solid #cbd2cc;border-radius:8px;padding:10px 11px;background:#fff;outline:none}.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-color:#176b44;box-shadow:0 0 0 3px #176b4420}.upload-picker{position:relative;min-height:116px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:20px;border:1.5px dashed #aebbb2;border-radius:10px;background:#f6f8f6;color:#5f6b63;transition:border-color .15s ease,background .15s ease}.upload-picker:hover,.upload-picker:focus-within{border-color:#4f8a68;background:#f0f6f2}.upload-picker.has-file{border-style:solid;border-color:#83aa91;background:#edf5ef;color:#276044}.upload-picker>svg{flex:none;color:#176b44}.upload-picker-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.upload-picker-copy strong,.upload-picker-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-picker-copy strong{color:#29382f;font-size:13px}.upload-picker-copy span{color:#758078;font-size:11px}.upload-picker>button{display:inline-flex;align-items:center;gap:6px;border:1px solid #9fb0a4;border-radius:7px;padding:8px 11px;background:#fff;color:#235c3d;font-size:12px;font-weight:650}.upload-picker>button:hover{border-color:#176b44;background:#e4efe8}.upload-picker>.upload-clear{position:absolute;top:7px;right:7px;width:26px;height:26px;display:grid;place-items:center;border:0;padding:0;background:transparent;color:#6c776f}.upload-picker>.upload-clear:hover{background:#dce9e0;color:#9d2f27}.choice-group{display:flex;flex-direction:column;gap:10px;border:1px solid #dfe3df;border-radius:8px;padding:14px}.choice-group legend{padding:0 5px;font-size:12px;color:#69716b}.choice-group label{font-size:13px}.color-picker{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;border:0;padding:0}.color-picker legend{margin-bottom:8px;font-size:13px;font-weight:650}.color-picker label{display:flex;align-items:center;gap:7px;border:1px solid #dce1dd;border-radius:7px;padding:8px;font-size:12px}.color-picker label.active{border-color:#176b44;background:#edf5f0}.color-picker input{position:absolute;opacity:0;pointer-events:none}.tag-assignment-list{display:flex;flex-direction:column;gap:7px}.tag-assignment-list label,.tag-assignment-list button{display:flex;align-items:center;gap:9px;min-height:38px;border:1px solid #dce1dd;border-radius:7px;padding:8px 10px;background:#fff;color:#38423b;font-size:13px;text-align:left}.tag-assignment-list label:hover,.tag-assignment-list button:hover{border-color:#8bae9a;background:#f4f8f5}.tag-assignment-list input{width:auto;accent-color:#176b44}.checkbox-field{display:flex;align-items:center;gap:8px;font-size:13px}.checkbox-field input{width:auto}.selection-preview{max-height:130px;overflow:auto;margin:14px 0 0;padding:10px 12px;border-left:3px solid #d6a128;background:#fff8e5;white-space:pre-wrap;font:12px/1.5 SFMono-Regular,Consolas,monospace}.git-dialog{display:flex;flex-direction:column;gap:14px}.git-dialog-modal-fullscreen{top:0;left:0;width:100vw;height:100vh;max-height:100vh;transform:none;overflow:hidden;border-radius:0}.git-loading{min-height:120px;display:flex;align-items:center;justify-content:center;gap:8px;color:#6e7871;font-size:13px}.git-message{margin:0;display:flex;align-items:center;gap:7px;padding:9px 11px;border:1px solid;border-radius:7px;font-size:12px}.git-message.error{border-color:#e2b4b0;background:#fff2f1}.git-message.success{border-color:#acd0b8;background:#edf7f0;color:#17623d}.git-section{display:flex;flex-direction:column;gap:11px;padding:14px;border:1px solid #dfe4e0;border-radius:9px;background:#fbfcfb}.git-section-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;padding:0;background:transparent;color:#607068;text-align:left}.git-section-toggle:hover{color:#176b44}.git-section-heading{min-width:0;display:flex;align-items:flex-start;gap:8px;color:#27533a}.git-section-heading>svg{flex:none;margin-top:1px}.git-section-heading>div,.git-section-heading>span{min-width:0;display:flex;flex-direction:column;gap:3px}.git-section-heading strong{font-size:13px}.git-section-heading small{max-width:650px;overflow:hidden;color:#78817b;font-size:10px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.git-section-content{display:flex;flex-direction:column;gap:11px;padding-top:2px}.git-token-guidance{display:flex;flex-direction:column;gap:4px;padding:10px 11px;border:1px solid #c6d9cb;border-left:3px solid #28714b;border-radius:7px;background:#f0f7f2}.git-token-guidance strong{color:#225d3c;font-size:11px}.git-token-guidance span{color:#66756b;font-size:10px;line-height:1.5}.git-account,.git-repository-card{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:7px;background:#eaf3ed;color:#23563a;font-size:12px}.git-account>span{min-width:0;flex:1}.git-account button{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:#a3342c;font-size:10px}.git-inline-actions,.git-action-row{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.git-inline-actions{justify-content:space-between}.git-inline-actions a,.git-repository-card a{display:inline-flex;align-items:center;gap:4px;color:#176b44;font-size:11px;text-decoration:none}.git-inline-actions button,.git-action-row button,.git-primary-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #bdc9c0;border-radius:6px;padding:7px 9px;background:#fff;color:#31523e;font-size:11px}.git-action-row .git-discard-button:not(:disabled){border-color:#d9aaa5;color:#9b332b}.git-action-row .git-discard-button:not(:disabled):hover{background:#fff0ee}.git-primary-action{align-self:flex-start;border-color:#176b44;background:#176b44;color:#fff}.git-repository-card{justify-content:space-between}.git-repository-card>div{min-width:0;display:flex;flex-direction:column;gap:3px}.git-repository-card strong,.git-repository-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.git-repository-card small{color:#6e7c73;font-size:10px}.git-count{min-width:17px;padding:1px 5px;border-radius:999px;background:#d9e9df;font-size:9px}.git-diff-section{padding-bottom:0;overflow:hidden}.git-diff-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.git-diff-controls{display:flex;align-items:center;gap:7px;flex:none}.git-diff-font-controls{display:inline-flex;align-items:center;gap:2px;border:1px solid #cbd5ce;border-radius:6px;padding:2px;background:#fff;color:#52685a}.git-diff-font-button{width:25px;height:25px;display:grid;place-items:center;border:0;border-radius:4px;padding:0;background:transparent;color:inherit}.git-diff-font-button:hover:not(:disabled){background:#edf4ef;color:#176b44}.git-diff-font-value{min-width:34px;color:#52685a;font-size:10px;font-variant-numeric:tabular-nums;text-align:center}.git-diff-fullscreen{width:29px;height:29px;flex:none;display:grid;place-items:center;padding:0!important;border:1px solid #cbd5ce!important;border-radius:6px!important;background:#fff!important;color:#52685a}.git-diff-fullscreen:hover{border-color:#8eaa98!important;background:#edf4ef!important;color:#176b44}.git-diff-section.is-fullscreen,.git-diff-section:fullscreen{position:fixed;z-index:1000;inset:0;width:100vw;height:100vh;max-height:none;box-sizing:border-box;margin:0;padding:20px!important;border:0;border-radius:0;overflow:hidden;background:#fbfcfb}.git-diff-section.is-fullscreen .git-diff,.git-diff-section:fullscreen .git-diff{flex:1;min-height:0;max-height:none;margin:0}.git-diff-section.is-fullscreen .git-diff-empty,.git-diff-section:fullscreen .git-diff-empty{flex:1;min-height:0;margin:0}.git-diff{max-height:360px;margin:0 -14px;overflow:auto;padding:11px 0;background:#202522;color:#d9e1dc;font:10px/1.5 SFMono-Regular,Consolas,monospace;tab-size:4}.git-diff span{display:block;min-width:max-content;padding:0 12px;white-space:pre}.git-diff span.addition{background:#173b28;color:#bfe8cb}.git-diff span.deletion{background:#442421;color:#f1c1bc}.git-diff span.hunk{background:#283a48;color:#b8daf4}.git-diff span.header{color:#e8cf8b;font-weight:650}.git-diff-empty{margin:0 -14px;padding:28px;background:#252a27;color:#b9c0bc;font-size:12px;text-align:center}.git-history{max-height:300px;display:flex;flex-direction:column;gap:5px;overflow:auto}.git-history article{min-width:0;display:grid;grid-template-columns:66px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid #e2e6e3;border-radius:6px;background:#fff}.git-history code{color:#176b44;font-size:10px}.git-history article>div{min-width:0;display:flex;flex-direction:column;gap:2px}.git-history article strong,.git-history article small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.git-history article strong{font-size:11px}.git-history article small{color:#7b847e;font-size:9px}.git-history article>span{display:flex;gap:3px}.git-history button{width:27px;height:27px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:#52685a}.git-history button:hover{background:#e8f0eb;color:#176b44}.git-force-checkout{display:flex;align-items:flex-start;gap:9px;padding:11px;border:1px solid #e4b9b5;border-radius:8px;background:#fff6f5}.git-force-checkout input{margin-top:2px;accent-color:#b3261e}.git-force-checkout span{display:flex;flex-direction:column;gap:3px}.git-force-checkout strong{color:#932c25;font-size:12px}.git-force-checkout small{color:#7d6562;font-size:10px;line-height:1.45}.quick-open-dialog>label,.project-search-query{display:flex;align-items:center;gap:8px;border:1px solid #bfcac2;border-radius:7px;padding:0 10px;background:#fff}.quick-open-dialog>label:focus-within,.project-search-query:focus-within{border-color:#418060;box-shadow:0 0 0 2px #41806020}.quick-open-dialog input,.project-search-query input{width:100%;border:0;outline:0;padding:10px 0;background:transparent}.quick-open-results{max-height:420px;overflow:auto;margin-top:8px;border:1px solid #d9e0db;border-radius:7px}.quick-open-results button{display:grid;grid-template-columns:20px minmax(0,1fr) 18px;align-items:center;gap:6px;width:100%;padding:8px 10px;border:0;border-radius:0;background:#fff;text-align:left}.quick-open-results button+button{border-top:1px solid #eef1ef}.quick-open-results button.active{background:#e4efe8;color:#195f3d}.quick-open-results span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:11px/1.4 JetBrains Mono,monospace}.project-search-dialog{display:grid;gap:9px}.project-search-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}.project-search-options{grid-column:1 / -1;display:flex;align-items:center;gap:14px}.project-search-options label{display:inline-flex;align-items:center;gap:5px;color:#55645a;font-size:11px}.project-search-options label input{accent-color:#28734b}.project-search-options button{margin-left:auto;display:inline-flex;align-items:center;gap:5px}.project-search-summary{display:flex;align-items:center;justify-content:space-between;min-height:22px;color:#5e6c63;font-size:11px}.project-search-summary span{display:inline-flex;align-items:center;gap:5px}.project-search-results{max-height:480px;overflow:auto;border:1px solid #d9e0db;border-radius:7px;background:#fff}.project-search-results>button{display:grid;grid-template-columns:20px minmax(0,1fr);gap:7px;width:100%;padding:9px 10px;border:0;border-radius:0;background:#fff;text-align:left}.project-search-results>button+button{border-top:1px solid #e8ece9}.project-search-results>button:hover{background:#edf4ef}.project-search-results>button>span{min-width:0;display:grid;gap:4px}.project-search-results strong{color:#31503d;font-size:11px}.project-search-results strong small{color:#7c877f;font-weight:400}.project-search-results code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4e5952;font:10px/1.45 JetBrains Mono,monospace}.project-search-results mark{border-radius:2px;padding:1px;background:#f2d36e;color:#4b3b0b}.history-dialog-modal{width:min(1120px,calc(100vw - 32px))}.history-dialog{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:560px;max-height:min(72vh,760px);border:1px solid #d9e0db;border-radius:8px;overflow:hidden;background:#fff}.history-loading{grid-column:1 / -1;display:flex;align-items:center;justify-content:center;gap:8px;min-height:420px;color:#68736b}.history-message{grid-column:1 / -1;margin:10px}.history-timeline{overflow:auto;border-right:1px solid #d9e0db;background:#f5f7f5}.history-stats{position:sticky;top:0;z-index:2;display:grid;gap:5px;padding:10px 12px;border-bottom:1px solid #d8dfda;background:#edf3ef;color:#33483b}.history-stats header{display:flex;align-items:center;justify-content:space-between;gap:8px}.history-stats header span{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700}.history-stats header button{width:26px;height:26px;display:grid;place-items:center;border:0;padding:0;background:transparent;color:#9d332b}.history-stats header button:hover:not(:disabled){background:#f5deda}.history-stats strong{font-size:11px}.history-stats small{color:#68766d;font-size:9px;line-height:1.4}.history-stats progress{width:100%;height:6px;border:0;border-radius:999px;overflow:hidden;accent-color:#34845a}.history-stats.exceeded progress{accent-color:#bd483e}.history-stats .history-storage-warning{color:#9d332b}.history-timeline>button{display:grid;grid-template-columns:20px minmax(0,1fr);gap:7px;width:100%;padding:11px 12px;border:0;border-bottom:1px solid #e1e6e2;border-radius:0;background:transparent;text-align:left;color:#34443a}.history-timeline>button:hover{background:#eaf0ec}.history-timeline>button.active{background:#dfece4;box-shadow:inset 3px 0 #28734b}.history-timeline>button span{min-width:0;display:grid;gap:2px}.history-timeline>button strong,.history-timeline>button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-timeline>button small{color:#68736b;font-size:10px}.history-detail{min-width:0;overflow:auto;padding:14px}.history-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.history-detail-header>div{display:grid;gap:4px}.history-detail-header small{display:flex;align-items:center;gap:4px;color:#68736b}.history-detail-actions{display:flex;align-items:center;gap:6px}.history-detail-actions button{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.history-label{display:flex;gap:8px;margin-bottom:12px}.history-label label{flex:1;display:flex;align-items:center;gap:7px;padding:0 9px;border:1px solid #cdd6cf;border-radius:6px;background:#fff}.history-label input{width:100%;border:0;padding:8px 0;outline:0}.history-files{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.history-file-list{display:flex;gap:5px;overflow-x:auto;padding-bottom:5px}.history-file-list button{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;max-width:230px}.history-file-list button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-file-list button small{padding:1px 4px;border-radius:8px;background:#f2d675;color:#695414;font-size:9px}.history-file-list button.active{border-color:#418060;background:#e7f0ea}.history-file-actions{display:flex;gap:5px}.history-file-actions button{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.history-comparison{min-height:360px;margin-top:10px;border:1px solid #d8dfda;border-radius:7px;overflow:hidden;background:#fbfcfb}.history-comparison>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #d8dfda;background:#f1f4f2}.history-comparison>header small{color:#68736b}.history-comparison pre{min-height:330px;max-height:430px;margin:0;overflow:auto;padding:11px;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.5 JetBrains Mono,Source Code Pro,monospace;color:#26342b}.history-comparison pre .history-removed{background:#f8c9c9;color:#7b2525;text-decoration:line-through}.history-comparison pre .history-added{background:#ccebd5;color:#15552c}.history-comparison-empty{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#78827b}@keyframes fade-in{0%{opacity:0}}@keyframes dialog-in{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1100px){.project-grid.list-view .project-card-open{grid-template-columns:110px minmax(160px,1fr)}.project-grid.list-view .project-meta{grid-column:1 / -1}.editor-actions button{padding:8px}.editor-actions button svg+*{display:none}.editor-actions .format-action button,.editor-actions .comments-action button,.editor-actions .version-action button{padding:7px 6px}.editor-actions .format-action button svg+*,.editor-actions .comments-action button svg+*,.editor-actions .version-action button svg+*{display:inline}}@media(max-width:720px){.citation-library-page-shell{padding-top:24px}.citation-library-page-header{flex-direction:column}.citation-library-page-header h1{font-size:25px}.citation-library-page-header>button{align-self:flex-start}.citation-library-page .citation-library-dialog{padding:12px}.citation-library-search-row{flex-direction:column}.citation-add-entry-button{min-height:34px;justify-content:center}.citation-entry-card{flex-direction:column}.citation-entry-actions{width:100%;justify-content:flex-start}.upload-picker{grid-template-columns:auto 1fr}.upload-picker>button{grid-column:1 / -1;justify-content:center}.share-add{grid-template-columns:1fr}.shared-member{align-items:flex-start}.member-controls{flex:none}.history-dialog{grid-template-columns:1fr;max-height:none}.history-timeline{max-height:180px;border-right:0;border-bottom:1px solid #d9e0db}.history-files,.project-search-form{grid-template-columns:1fr}}
@@ -0,0 +1,6 @@
1
+ function q(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var V={exports:{}},X;function x(){return X||(X=1,(function(o){var l=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},u=-1,b=1,_=0;l.Diff=function(e,n){return[e,n]},l.prototype.diff_main=function(e,n,r,i){typeof i>"u"&&(this.Diff_Timeout<=0?i=Number.MAX_VALUE:i=new Date().getTime()+this.Diff_Timeout*1e3);var a=i;if(e==null||n==null)throw new Error("Null input. (diff_main)");if(e==n)return e?[new l.Diff(_,e)]:[];typeof r>"u"&&(r=!0);var t=r,s=this.diff_commonPrefix(e,n),f=e.substring(0,s);e=e.substring(s),n=n.substring(s),s=this.diff_commonSuffix(e,n);var h=e.substring(e.length-s);e=e.substring(0,e.length-s),n=n.substring(0,n.length-s);var g=this.diff_compute_(e,n,t,a);return f&&g.unshift(new l.Diff(_,f)),h&&g.push(new l.Diff(_,h)),this.diff_cleanupMerge(g),g},l.prototype.diff_compute_=function(e,n,r,i){var a;if(!e)return[new l.Diff(b,n)];if(!n)return[new l.Diff(u,e)];var t=e.length>n.length?e:n,s=e.length>n.length?n:e,f=t.indexOf(s);if(f!=-1)return a=[new l.Diff(b,t.substring(0,f)),new l.Diff(_,s),new l.Diff(b,t.substring(f+s.length))],e.length>n.length&&(a[0][0]=a[2][0]=u),a;if(s.length==1)return[new l.Diff(u,e),new l.Diff(b,n)];var h=this.diff_halfMatch_(e,n);if(h){var g=h[0],c=h[1],v=h[2],w=h[3],m=h[4],d=this.diff_main(g,v,r,i),M=this.diff_main(c,w,r,i);return d.concat([new l.Diff(_,m)],M)}return r&&e.length>100&&n.length>100?this.diff_lineMode_(e,n,i):this.diff_bisect_(e,n,i)},l.prototype.diff_lineMode_=function(e,n,r){var i=this.diff_linesToChars_(e,n);e=i.chars1,n=i.chars2;var a=i.lineArray,t=this.diff_main(e,n,!1,r);this.diff_charsToLines_(t,a),this.diff_cleanupSemantic(t),t.push(new l.Diff(_,""));for(var s=0,f=0,h=0,g="",c="";s<t.length;){switch(t[s][0]){case b:h++,c+=t[s][1];break;case u:f++,g+=t[s][1];break;case _:if(f>=1&&h>=1){t.splice(s-f-h,f+h),s=s-f-h;for(var v=this.diff_main(g,c,!1,r),w=v.length-1;w>=0;w--)t.splice(s,0,v[w]);s=s+v.length}h=0,f=0,g="",c="";break}s++}return t.pop(),t},l.prototype.diff_bisect_=function(e,n,r){for(var i=e.length,a=n.length,t=Math.ceil((i+a)/2),s=t,f=2*t,h=new Array(f),g=new Array(f),c=0;c<f;c++)h[c]=-1,g[c]=-1;h[s+1]=0,g[s+1]=0;for(var v=i-a,w=v%2!=0,m=0,d=0,M=0,E=0,p=0;p<t&&!(new Date().getTime()>r);p++){for(var D=-p+m;D<=p-d;D+=2){var y=s+D,A;D==-p||D!=p&&h[y-1]<h[y+1]?A=h[y+1]:A=h[y-1]+1;for(var S=A-D;A<i&&S<a&&e.charAt(A)==n.charAt(S);)A++,S++;if(h[y]=A,A>i)d+=2;else if(S>a)m+=2;else if(w){var T=s+v-D;if(T>=0&&T<f&&g[T]!=-1){var k=i-g[T];if(A>=k)return this.diff_bisectSplit_(e,n,A,S,r)}}}for(var L=-p+M;L<=p-E;L+=2){var T=s+L,k;L==-p||L!=p&&g[T-1]<g[T+1]?k=g[T+1]:k=g[T-1]+1;for(var P=k-L;k<i&&P<a&&e.charAt(i-k-1)==n.charAt(a-P-1);)k++,P++;if(g[T]=k,k>i)E+=2;else if(P>a)M+=2;else if(!w){var y=s+v-L;if(y>=0&&y<f&&h[y]!=-1){var A=h[y],S=s+A-y;if(k=i-k,A>=k)return this.diff_bisectSplit_(e,n,A,S,r)}}}}return[new l.Diff(u,e),new l.Diff(b,n)]},l.prototype.diff_bisectSplit_=function(e,n,r,i,a){var t=e.substring(0,r),s=n.substring(0,i),f=e.substring(r),h=n.substring(i),g=this.diff_main(t,s,!1,a),c=this.diff_main(f,h,!1,a);return g.concat(c)},l.prototype.diff_linesToChars_=function(e,n){var r=[],i={};r[0]="";function a(h){for(var g="",c=0,v=-1,w=r.length;v<h.length-1;){v=h.indexOf(`
2
+ `,c),v==-1&&(v=h.length-1);var m=h.substring(c,v+1);(i.hasOwnProperty?i.hasOwnProperty(m):i[m]!==void 0)?g+=String.fromCharCode(i[m]):(w==t&&(m=h.substring(c),v=h.length),g+=String.fromCharCode(w),i[m]=w,r[w++]=m),c=v+1}return g}var t=4e4,s=a(e);t=65535;var f=a(n);return{chars1:s,chars2:f,lineArray:r}},l.prototype.diff_charsToLines_=function(e,n){for(var r=0;r<e.length;r++){for(var i=e[r][1],a=[],t=0;t<i.length;t++)a[t]=n[i.charCodeAt(t)];e[r][1]=a.join("")}},l.prototype.diff_commonPrefix=function(e,n){if(!e||!n||e.charAt(0)!=n.charAt(0))return 0;for(var r=0,i=Math.min(e.length,n.length),a=i,t=0;r<a;)e.substring(t,a)==n.substring(t,a)?(r=a,t=r):i=a,a=Math.floor((i-r)/2+r);return a},l.prototype.diff_commonSuffix=function(e,n){if(!e||!n||e.charAt(e.length-1)!=n.charAt(n.length-1))return 0;for(var r=0,i=Math.min(e.length,n.length),a=i,t=0;r<a;)e.substring(e.length-a,e.length-t)==n.substring(n.length-a,n.length-t)?(r=a,t=r):i=a,a=Math.floor((i-r)/2+r);return a},l.prototype.diff_commonOverlap_=function(e,n){var r=e.length,i=n.length;if(r==0||i==0)return 0;r>i?e=e.substring(r-i):r<i&&(n=n.substring(0,r));var a=Math.min(r,i);if(e==n)return a;for(var t=0,s=1;;){var f=e.substring(a-s),h=n.indexOf(f);if(h==-1)return t;s+=h,(h==0||e.substring(a-s)==n.substring(0,s))&&(t=s,s++)}},l.prototype.diff_halfMatch_=function(e,n){if(this.Diff_Timeout<=0)return null;var r=e.length>n.length?e:n,i=e.length>n.length?n:e;if(r.length<4||i.length*2<r.length)return null;var a=this;function t(d,M,E){for(var p=d.substring(E,E+Math.floor(d.length/4)),D=-1,y="",A,S,T,k;(D=M.indexOf(p,D+1))!=-1;){var L=a.diff_commonPrefix(d.substring(E),M.substring(D)),P=a.diff_commonSuffix(d.substring(0,E),M.substring(0,D));y.length<P+L&&(y=M.substring(D-P,D)+M.substring(D,D+L),A=d.substring(0,E-P),S=d.substring(E+L),T=M.substring(0,D-P),k=M.substring(D+L))}return y.length*2>=d.length?[A,S,T,k,y]:null}var s=t(r,i,Math.ceil(r.length/4)),f=t(r,i,Math.ceil(r.length/2)),h;if(!s&&!f)return null;f?s?h=s[4].length>f[4].length?s:f:h=f:h=s;var g,c,v,w;e.length>n.length?(g=h[0],c=h[1],v=h[2],w=h[3]):(v=h[0],w=h[1],g=h[2],c=h[3]);var m=h[4];return[g,c,v,w,m]},l.prototype.diff_cleanupSemantic=function(e){for(var n=!1,r=[],i=0,a=null,t=0,s=0,f=0,h=0,g=0;t<e.length;)e[t][0]==_?(r[i++]=t,s=h,f=g,h=0,g=0,a=e[t][1]):(e[t][0]==b?h+=e[t][1].length:g+=e[t][1].length,a&&a.length<=Math.max(s,f)&&a.length<=Math.max(h,g)&&(e.splice(r[i-1],0,new l.Diff(u,a)),e[r[i-1]+1][0]=b,i--,i--,t=i>0?r[i-1]:-1,s=0,f=0,h=0,g=0,a=null,n=!0)),t++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),t=1;t<e.length;){if(e[t-1][0]==u&&e[t][0]==b){var c=e[t-1][1],v=e[t][1],w=this.diff_commonOverlap_(c,v),m=this.diff_commonOverlap_(v,c);w>=m?(w>=c.length/2||w>=v.length/2)&&(e.splice(t,0,new l.Diff(_,v.substring(0,w))),e[t-1][1]=c.substring(0,c.length-w),e[t+1][1]=v.substring(w),t++):(m>=c.length/2||m>=v.length/2)&&(e.splice(t,0,new l.Diff(_,c.substring(0,m))),e[t-1][0]=b,e[t-1][1]=v.substring(0,v.length-m),e[t+1][0]=u,e[t+1][1]=c.substring(m),t++),t++}t++}},l.prototype.diff_cleanupSemanticLossless=function(e){function n(m,d){if(!m||!d)return 6;var M=m.charAt(m.length-1),E=d.charAt(0),p=M.match(l.nonAlphaNumericRegex_),D=E.match(l.nonAlphaNumericRegex_),y=p&&M.match(l.whitespaceRegex_),A=D&&E.match(l.whitespaceRegex_),S=y&&M.match(l.linebreakRegex_),T=A&&E.match(l.linebreakRegex_),k=S&&m.match(l.blanklineEndRegex_),L=T&&d.match(l.blanklineStartRegex_);return k||L?5:S||T?4:p&&!y&&A?3:y||A?2:p||D?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==_&&e[r+1][0]==_){var i=e[r-1][1],a=e[r][1],t=e[r+1][1],s=this.diff_commonSuffix(i,a);if(s){var f=a.substring(a.length-s);i=i.substring(0,i.length-s),a=f+a.substring(0,a.length-s),t=f+t}for(var h=i,g=a,c=t,v=n(i,a)+n(a,t);a.charAt(0)===t.charAt(0);){i+=a.charAt(0),a=a.substring(1)+t.charAt(0),t=t.substring(1);var w=n(i,a)+n(a,t);w>=v&&(v=w,h=i,g=a,c=t)}e[r-1][1]!=h&&(h?e[r-1][1]=h:(e.splice(r-1,1),r--),e[r][1]=g,c?e[r+1][1]=c:(e.splice(r+1,1),r--))}r++}},l.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,l.whitespaceRegex_=/\s/,l.linebreakRegex_=/[\r\n]/,l.blanklineEndRegex_=/\n\r?\n$/,l.blanklineStartRegex_=/^\r?\n\r?\n/,l.prototype.diff_cleanupEfficiency=function(e){for(var n=!1,r=[],i=0,a=null,t=0,s=!1,f=!1,h=!1,g=!1;t<e.length;)e[t][0]==_?(e[t][1].length<this.Diff_EditCost&&(h||g)?(r[i++]=t,s=h,f=g,a=e[t][1]):(i=0,a=null),h=g=!1):(e[t][0]==u?g=!0:h=!0,a&&(s&&f&&h&&g||a.length<this.Diff_EditCost/2&&s+f+h+g==3)&&(e.splice(r[i-1],0,new l.Diff(u,a)),e[r[i-1]+1][0]=b,i--,a=null,s&&f?(h=g=!0,i=0):(i--,t=i>0?r[i-1]:-1,h=g=!1),n=!0)),t++;n&&this.diff_cleanupMerge(e)},l.prototype.diff_cleanupMerge=function(e){e.push(new l.Diff(_,""));for(var n=0,r=0,i=0,a="",t="",s;n<e.length;)switch(e[n][0]){case b:i++,t+=e[n][1],n++;break;case u:r++,a+=e[n][1],n++;break;case _:r+i>1?(r!==0&&i!==0&&(s=this.diff_commonPrefix(t,a),s!==0&&(n-r-i>0&&e[n-r-i-1][0]==_?e[n-r-i-1][1]+=t.substring(0,s):(e.splice(0,0,new l.Diff(_,t.substring(0,s))),n++),t=t.substring(s),a=a.substring(s)),s=this.diff_commonSuffix(t,a),s!==0&&(e[n][1]=t.substring(t.length-s)+e[n][1],t=t.substring(0,t.length-s),a=a.substring(0,a.length-s))),n-=r+i,e.splice(n,r+i),a.length&&(e.splice(n,0,new l.Diff(u,a)),n++),t.length&&(e.splice(n,0,new l.Diff(b,t)),n++),n++):n!==0&&e[n-1][0]==_?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,a="",t="";break}e[e.length-1][1]===""&&e.pop();var f=!1;for(n=1;n<e.length-1;)e[n-1][0]==_&&e[n+1][0]==_&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),f=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),f=!0)),n++;f&&this.diff_cleanupMerge(e)},l.prototype.diff_xIndex=function(e,n){var r=0,i=0,a=0,t=0,s;for(s=0;s<e.length&&(e[s][0]!==b&&(r+=e[s][1].length),e[s][0]!==u&&(i+=e[s][1].length),!(r>n));s++)a=r,t=i;return e.length!=s&&e[s][0]===u?t:t+(n-a)},l.prototype.diff_prettyHtml=function(e){for(var n=[],r=/&/g,i=/</g,a=/>/g,t=/\n/g,s=0;s<e.length;s++){var f=e[s][0],h=e[s][1],g=h.replace(r,"&amp;").replace(i,"&lt;").replace(a,"&gt;").replace(t,"&para;<br>");switch(f){case b:n[s]='<ins style="background:#e6ffe6;">'+g+"</ins>";break;case u:n[s]='<del style="background:#ffe6e6;">'+g+"</del>";break;case _:n[s]="<span>"+g+"</span>";break}}return n.join("")},l.prototype.diff_text1=function(e){for(var n=[],r=0;r<e.length;r++)e[r][0]!==b&&(n[r]=e[r][1]);return n.join("")},l.prototype.diff_text2=function(e){for(var n=[],r=0;r<e.length;r++)e[r][0]!==u&&(n[r]=e[r][1]);return n.join("")},l.prototype.diff_levenshtein=function(e){for(var n=0,r=0,i=0,a=0;a<e.length;a++){var t=e[a][0],s=e[a][1];switch(t){case b:r+=s.length;break;case u:i+=s.length;break;case _:n+=Math.max(r,i),r=0,i=0;break}}return n+=Math.max(r,i),n},l.prototype.diff_toDelta=function(e){for(var n=[],r=0;r<e.length;r++)switch(e[r][0]){case b:n[r]="+"+encodeURI(e[r][1]);break;case u:n[r]="-"+e[r][1].length;break;case _:n[r]="="+e[r][1].length;break}return n.join(" ").replace(/%20/g," ")},l.prototype.diff_fromDelta=function(e,n){for(var r=[],i=0,a=0,t=n.split(/\t/g),s=0;s<t.length;s++){var f=t[s].substring(1);switch(t[s].charAt(0)){case"+":try{r[i++]=new l.Diff(b,decodeURI(f))}catch{throw new Error("Illegal escape in diff_fromDelta: "+f)}break;case"-":case"=":var h=parseInt(f,10);if(isNaN(h)||h<0)throw new Error("Invalid number in diff_fromDelta: "+f);var g=e.substring(a,a+=h);t[s].charAt(0)=="="?r[i++]=new l.Diff(_,g):r[i++]=new l.Diff(u,g);break;default:if(t[s])throw new Error("Invalid diff operation in diff_fromDelta: "+t[s])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return r},l.prototype.match_main=function(e,n,r){if(e==null||n==null||r==null)throw new Error("Null input. (match_main)");return r=Math.max(0,Math.min(r,e.length)),e==n?0:e.length?e.substring(r,r+n.length)==n?r:this.match_bitap_(e,n,r):-1},l.prototype.match_bitap_=function(e,n,r){if(n.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(n),a=this;function t(A,S){var T=A/n.length,k=Math.abs(r-S);return a.Match_Distance?T+k/a.Match_Distance:k?1:T}var s=this.Match_Threshold,f=e.indexOf(n,r);f!=-1&&(s=Math.min(t(0,f),s),f=e.lastIndexOf(n,r+n.length),f!=-1&&(s=Math.min(t(0,f),s)));var h=1<<n.length-1;f=-1;for(var g,c,v=n.length+e.length,w,m=0;m<n.length;m++){for(g=0,c=v;g<c;)t(m,r+c)<=s?g=c:v=c,c=Math.floor((v-g)/2+g);v=c;var d=Math.max(1,r-c+1),M=Math.min(r+c,e.length)+n.length,E=Array(M+2);E[M+1]=(1<<m)-1;for(var p=M;p>=d;p--){var D=i[e.charAt(p-1)];if(m===0?E[p]=(E[p+1]<<1|1)&D:E[p]=(E[p+1]<<1|1)&D|((w[p+1]|w[p])<<1|1)|w[p+1],E[p]&h){var y=t(m,p-1);if(y<=s)if(s=y,f=p-1,f>r)d=Math.max(1,2*r-f);else break}}if(t(m+1,r)>s)break;w=E}return f},l.prototype.match_alphabet_=function(e){for(var n={},r=0;r<e.length;r++)n[e.charAt(r)]=0;for(var r=0;r<e.length;r++)n[e.charAt(r)]|=1<<e.length-r-1;return n},l.prototype.patch_addContext_=function(e,n){if(n.length!=0){if(e.start2===null)throw Error("patch not initialized");for(var r=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var a=n.substring(e.start2-i,e.start2);a&&e.diffs.unshift(new l.Diff(_,a));var t=n.substring(e.start2+e.length1,e.start2+e.length1+i);t&&e.diffs.push(new l.Diff(_,t)),e.start1-=a.length,e.start2-=a.length,e.length1+=a.length+t.length,e.length2+=a.length+t.length}},l.prototype.patch_make=function(e,n,r){var i,a;if(typeof e=="string"&&typeof n=="string"&&typeof r>"u")i=e,a=this.diff_main(i,n,!0),a.length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&typeof e=="object"&&typeof n>"u"&&typeof r>"u")a=e,i=this.diff_text1(a);else if(typeof e=="string"&&n&&typeof n=="object"&&typeof r>"u")i=e,a=n;else if(typeof e=="string"&&typeof n=="string"&&r&&typeof r=="object")i=e,a=r;else throw new Error("Unknown call format to patch_make.");if(a.length===0)return[];for(var t=[],s=new l.patch_obj,f=0,h=0,g=0,c=i,v=i,w=0;w<a.length;w++){var m=a[w][0],d=a[w][1];switch(!f&&m!==_&&(s.start1=h,s.start2=g),m){case b:s.diffs[f++]=a[w],s.length2+=d.length,v=v.substring(0,g)+d+v.substring(g);break;case u:s.length1+=d.length,s.diffs[f++]=a[w],v=v.substring(0,g)+v.substring(g+d.length);break;case _:d.length<=2*this.Patch_Margin&&f&&a.length!=w+1?(s.diffs[f++]=a[w],s.length1+=d.length,s.length2+=d.length):d.length>=2*this.Patch_Margin&&f&&(this.patch_addContext_(s,c),t.push(s),s=new l.patch_obj,f=0,c=v,h=g);break}m!==b&&(h+=d.length),m!==u&&(g+=d.length)}return f&&(this.patch_addContext_(s,c),t.push(s)),t},l.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],a=new l.patch_obj;a.diffs=[];for(var t=0;t<i.diffs.length;t++)a.diffs[t]=new l.Diff(i.diffs[t][0],i.diffs[t][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,n[r]=a}return n},l.prototype.patch_apply=function(e,n){if(e.length==0)return[n,[]];e=this.patch_deepCopy(e);var r=this.patch_addPadding(e);n=r+n+r,this.patch_splitMax(e);for(var i=0,a=[],t=0;t<e.length;t++){var s=e[t].start2+i,f=this.diff_text1(e[t].diffs),h,g=-1;if(f.length>this.Match_MaxBits?(h=this.match_main(n,f.substring(0,this.Match_MaxBits),s),h!=-1&&(g=this.match_main(n,f.substring(f.length-this.Match_MaxBits),s+f.length-this.Match_MaxBits),(g==-1||h>=g)&&(h=-1))):h=this.match_main(n,f,s),h==-1)a[t]=!1,i-=e[t].length2-e[t].length1;else{a[t]=!0,i=h-s;var c;if(g==-1?c=n.substring(h,h+f.length):c=n.substring(h,g+this.Match_MaxBits),f==c)n=n.substring(0,h)+this.diff_text2(e[t].diffs)+n.substring(h+f.length);else{var v=this.diff_main(f,c,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(v)/f.length>this.Patch_DeleteThreshold)a[t]=!1;else{this.diff_cleanupSemanticLossless(v);for(var w=0,m,d=0;d<e[t].diffs.length;d++){var M=e[t].diffs[d];M[0]!==_&&(m=this.diff_xIndex(v,w)),M[0]===b?n=n.substring(0,h+m)+M[1]+n.substring(h+m):M[0]===u&&(n=n.substring(0,h+m)+n.substring(h+this.diff_xIndex(v,w+M[1].length))),M[0]!==u&&(w+=M[1].length)}}}}}return n=n.substring(r.length,n.length-r.length),[n,a]},l.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r="",i=1;i<=n;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var a=e[0],t=a.diffs;if(t.length==0||t[0][0]!=_)t.unshift(new l.Diff(_,r)),a.start1-=n,a.start2-=n,a.length1+=n,a.length2+=n;else if(n>t[0][1].length){var s=n-t[0][1].length;t[0][1]=r.substring(t[0][1].length)+t[0][1],a.start1-=s,a.start2-=s,a.length1+=s,a.length2+=s}if(a=e[e.length-1],t=a.diffs,t.length==0||t[t.length-1][0]!=_)t.push(new l.Diff(_,r)),a.length1+=n,a.length2+=n;else if(n>t[t.length-1][1].length){var s=n-t[t.length-1][1].length;t[t.length-1][1]+=r.substring(0,s),a.length1+=s,a.length2+=s}return r},l.prototype.patch_splitMax=function(e){for(var n=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=n)){var i=e[r];e.splice(r--,1);for(var a=i.start1,t=i.start2,s="";i.diffs.length!==0;){var f=new l.patch_obj,h=!0;for(f.start1=a-s.length,f.start2=t-s.length,s!==""&&(f.length1=f.length2=s.length,f.diffs.push(new l.Diff(_,s)));i.diffs.length!==0&&f.length1<n-this.Patch_Margin;){var g=i.diffs[0][0],c=i.diffs[0][1];g===b?(f.length2+=c.length,t+=c.length,f.diffs.push(i.diffs.shift()),h=!1):g===u&&f.diffs.length==1&&f.diffs[0][0]==_&&c.length>2*n?(f.length1+=c.length,a+=c.length,h=!1,f.diffs.push(new l.Diff(g,c)),i.diffs.shift()):(c=c.substring(0,n-f.length1-this.Patch_Margin),f.length1+=c.length,a+=c.length,g===_?(f.length2+=c.length,t+=c.length):h=!1,f.diffs.push(new l.Diff(g,c)),c==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(c.length))}s=this.diff_text2(f.diffs),s=s.substring(s.length-this.Patch_Margin);var v=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);v!==""&&(f.length1+=v.length,f.length2+=v.length,f.diffs.length!==0&&f.diffs[f.diffs.length-1][0]===_?f.diffs[f.diffs.length-1][1]+=v:f.diffs.push(new l.Diff(_,v))),h||e.splice(++r,0,f)}}},l.prototype.patch_toText=function(e){for(var n=[],r=0;r<e.length;r++)n[r]=e[r];return n.join("")},l.prototype.patch_fromText=function(e){var n=[];if(!e)return n;for(var r=e.split(`
3
+ `),i=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<r.length;){var t=r[i].match(a);if(!t)throw new Error("Invalid patch string: "+r[i]);var s=new l.patch_obj;for(n.push(s),s.start1=parseInt(t[1],10),t[2]===""?(s.start1--,s.length1=1):t[2]=="0"?s.length1=0:(s.start1--,s.length1=parseInt(t[2],10)),s.start2=parseInt(t[3],10),t[4]===""?(s.start2--,s.length2=1):t[4]=="0"?s.length2=0:(s.start2--,s.length2=parseInt(t[4],10)),i++;i<r.length;){var f=r[i].charAt(0);try{var h=decodeURI(r[i].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(f=="-")s.diffs.push(new l.Diff(u,h));else if(f=="+")s.diffs.push(new l.Diff(b,h));else if(f==" ")s.diffs.push(new l.Diff(_,h));else{if(f=="@")break;if(f!=="")throw new Error('Invalid patch mode "'+f+'" in: '+h)}i++}}return n},l.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},l.patch_obj.prototype.toString=function(){var e,n;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?n=this.start2+",0":this.length2==1?n=this.start2+1:n=this.start2+1+","+this.length2;for(var r=["@@ -"+e+" +"+n+` @@
4
+ `],i,a=0;a<this.diffs.length;a++){switch(this.diffs[a][0]){case b:i="+";break;case u:i="-";break;case _:i=" ";break}r[a+1]=i+encodeURI(this.diffs[a][1])+`
5
+ `}return r.join("").replace(/%20/g," ")},o.exports=l,o.exports.diff_match_patch=l,o.exports.DIFF_DELETE=u,o.exports.DIFF_INSERT=b,o.exports.DIFF_EQUAL=_})(V)),V.exports}var ee=x(),z=q(ee),ne="/assets/tex_fmt_bg-VEAUIuFz.wasm",re=async(o={},l)=>{let u;if(l.startsWith("data:")){const b=l.replace(/^data:.*?base64,/,"");let _;if(typeof Buffer=="function"&&typeof Buffer.from=="function")_=Buffer.from(b,"base64");else if(typeof atob=="function"){const e=atob(b);_=new Uint8Array(e.length);for(let n=0;n<e.length;n++)_[n]=e.charCodeAt(n)}else throw new Error("Cannot decode base64-encoded data URL");u=await WebAssembly.instantiate(_,o)}else{const b=await fetch(l),_=b.headers.get("Content-Type")||"";if("instantiateStreaming"in WebAssembly&&_.startsWith("application/wasm"))u=await WebAssembly.instantiateStreaming(b,o);else{const e=await b.arrayBuffer();u=await WebAssembly.instantiate(e,o)}}return u.instance.exports};function te(o,l){const u=Q(o,I.__wbindgen_malloc,I.__wbindgen_realloc),b=R,_=Q(l,I.__wbindgen_malloc,I.__wbindgen_realloc),e=R;return I.main(u,b,_,e)}function ie(o,l){const u=G(l),b=Q(u,I.__wbindgen_malloc,I.__wbindgen_realloc),_=R;J().setInt32(o+4,_,!0),J().setInt32(o+0,b,!0)}function ae(o){return o===void 0}function se(o,l){throw new Error(Z(o,l))}function le(){return new Object}function fe(o){return o.now()}function he(o){return o.performance}function oe(){return we(function(o,l,u){return Reflect.set(o,l,u)},arguments)}function ge(){const o=typeof global>"u"?null:global;return $(o)?0:B(o)}function ue(){const o=typeof globalThis>"u"?null:globalThis;return $(o)?0:B(o)}function _e(){const o=typeof self>"u"?null:self;return $(o)?0:B(o)}function ce(){const o=typeof window>"u"?null:window;return $(o)?0:B(o)}function be(o,l){return Z(o,l)}function ve(){const o=I.__wbindgen_externrefs,l=o.grow(4);o.set(0,void 0),o.set(l+0,void 0),o.set(l+1,null),o.set(l+2,!0),o.set(l+3,!1)}function B(o){const l=I.__externref_table_alloc();return I.__wbindgen_externrefs.set(l,o),l}function G(o){const l=typeof o;if(l=="number"||l=="boolean"||o==null)return`${o}`;if(l=="string")return`"${o}"`;if(l=="symbol"){const _=o.description;return _==null?"Symbol":`Symbol(${_})`}if(l=="function"){const _=o.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(o)){const _=o.length;let e="[";_>0&&(e+=G(o[0]));for(let n=1;n<_;n++)e+=", "+G(o[n]);return e+="]",e}const u=/\[object ([^\]]+)\]/.exec(toString.call(o));let b;if(u&&u.length>1)b=u[1];else return toString.call(o);if(b=="Object")try{return"Object("+JSON.stringify(o)+")"}catch{return"Object"}return o instanceof Error?`${o.name}: ${o.message}
6
+ ${o.stack}`:b}let O=null;function J(){return(O===null||O.buffer.detached===!0||O.buffer.detached===void 0&&O.buffer!==I.memory.buffer)&&(O=new DataView(I.memory.buffer)),O}function Z(o,l){return o=o>>>0,de(o,l)}let C=null;function N(){return(C===null||C.byteLength===0)&&(C=new Uint8Array(I.memory.buffer)),C}function we(o,l){try{return o.apply(this,l)}catch(u){const b=B(u);I.__wbindgen_exn_store(b)}}function $(o){return o==null}function Q(o,l,u){if(u===void 0){const r=F.encode(o),i=l(r.length,1)>>>0;return N().subarray(i,i+r.length).set(r),R=r.length,i}let b=o.length,_=l(b,1)>>>0;const e=N();let n=0;for(;n<b;n++){const r=o.charCodeAt(n);if(r>127)break;e[_+n]=r}if(n!==b){n!==0&&(o=o.slice(n)),_=u(_,b,b=n+o.length*3,1)>>>0;const r=N().subarray(_+n,_+b),i=F.encodeInto(o,r);n+=i.written,_=u(_,b,n,1)>>>0}return R=n,_}let U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});U.decode();const me=2146435072;let H=0;function de(o,l){return H+=l,H>=me&&(U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),U.decode(),H=l),U.decode(N().subarray(o,o+l))}const F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(o,l){const u=F.encode(o);return l.set(u),{read:o.length,written:u.length}});let R=0,I;function pe(o){I=o}URL=globalThis.URL;const Me=await re({"./tex_fmt_bg.js":{__wbg_performance_3fcf6e32a7e1ed0a:he,__wbg_now_e7c6795a7f81e10f:fe,__wbg_new_ab79df5bd7c26067:le,__wbg_set_7eaa4f96924fd6b3:oe,__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:ue,__wbg_static_accessor_SELF_f207c857566db248:_e,__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:ge,__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:ce,__wbg___wbindgen_throw_6ddd609b62940d55:se,__wbg___wbindgen_is_undefined_52709e72fb9f179c:ae,__wbg___wbindgen_debug_string_5398f5bb970e0daa:ie,__wbindgen_init_externref_table:ve,__wbindgen_cast_0000000000000001:be}},ne),{memory:De,main:ye,__wbindgen_malloc:Ae,__wbindgen_realloc:Ee,__wbindgen_exn_store:ke,__externref_table_alloc:Te,__wbindgen_externrefs:Se,__wbindgen_start:K}=Me;var Ie=Object.freeze({__proto__:null,__externref_table_alloc:Te,__wbindgen_exn_store:ke,__wbindgen_externrefs:Se,__wbindgen_malloc:Ae,__wbindgen_realloc:Ee,__wbindgen_start:K,main:ye,memory:De});pe(Ie);K();class j extends Error{constructor(l,u){super(u),this.kind=l,this.name="LatexFormatterWorkerError"}kind}function Y(o,l){let u;try{u=te(o,l)}catch{throw new j("format","tex-fmt could not format this source. Check the TOML formatter options.")}if(!u||typeof u!="object"||!("output"in u)||typeof u.output!="string")throw new j("result","tex-fmt returned an invalid formatting result.");const b="logs"in u&&typeof u.logs=="string"?u.logs:"";return{output:u.output,logs:b}}function Le(o,l,u=0){if(o===l)return[];const b=new z,_=b.diff_main(o,l,!0);b.diff_cleanupEfficiency(_);const e=[];let n=u,r=null;const i=()=>{r&&e.push(r),r=null};for(const[a,t]of _)a===z.DIFF_EQUAL?(i(),n+=t.length):a===z.DIFF_DELETE?(r??={from:n,to:n,replacement:""},r.to+=t.length,n+=t.length):(r??={from:n,to:n,replacement:""},r.replacement+=t);return i(),e}const W=self;W.onmessage=o=>{const l=o.data;try{let u;l.action==="probe"?(Y("",""),u={id:l.id,ok:!0,action:"probe",result:!0}):l.action==="format"?u={id:l.id,ok:!0,action:"format",result:Y(l.source,l.config)}:u={id:l.id,ok:!0,action:"diff",result:Le(l.source,l.formatted,l.baseOffset)},W.postMessage(u)}catch(u){const b=u instanceof j?u:new j("result",u instanceof Error?u.message:"The formatter worker failed.");W.postMessage({id:l.id,ok:!1,kind:b.kind,message:b.message})}};W.postMessage({type:"ready"});
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-DRShM2ob.js";const n=e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const a=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);export{a as M,n as a};
@@ -46,4 +46,4 @@ Error generating stack: `+a.message+`
46
46
  `)},Dv=function(){var i=parseInt(document.body.getAttribute(Fa)||"0",10);return isFinite(i)?i:0},Ch=function(){x.useEffect(function(){return document.body.setAttribute(Fa,(Dv()+1).toString()),function(){var i=Dv()-1;i<=0?document.body.removeAttribute(Fa):document.body.setAttribute(Fa,i.toString())}},[])},Rh=function(i){var o=i.noRelative,s=i.noImportant,f=i.gapMode,h=f===void 0?"margin":f;Ch();var v=x.useMemo(function(){return Mh(h)},[h]);return x.createElement(Oh,{styles:Dh(v,!o,h,s?"":"!important")})},fo=!1;if(typeof window<"u")try{var Si=Object.defineProperty({},"passive",{get:function(){return fo=!0,!0}});window.addEventListener("test",Si,Si),window.removeEventListener("test",Si,Si)}catch{fo=!1}var Ja=fo?{passive:!1}:!1,Nh=function(i){return i.tagName==="TEXTAREA"},$v=function(i,o){if(!(i instanceof Element))return!1;var s=window.getComputedStyle(i);return s[o]!=="hidden"&&!(s.overflowY===s.overflowX&&!Nh(i)&&s[o]==="visible")},Uh=function(i){return $v(i,"overflowY")},Hh=function(i){return $v(i,"overflowX")},Cv=function(i,o){var s=o.ownerDocument,f=o;do{typeof ShadowRoot<"u"&&f instanceof ShadowRoot&&(f=f.host);var h=Wv(i,f);if(h){var v=kv(i,f),_=v[1],A=v[2];if(_>A)return!0}f=f.parentNode}while(f&&f!==s.body);return!1},xh=function(i){var o=i.scrollTop,s=i.scrollHeight,f=i.clientHeight;return[o,s,f]},Bh=function(i){var o=i.scrollLeft,s=i.scrollWidth,f=i.clientWidth;return[o,s,f]},Wv=function(i,o){return i==="v"?Uh(o):Hh(o)},kv=function(i,o){return i==="v"?xh(o):Bh(o)},qh=function(i,o){return i==="h"&&o==="rtl"?-1:1},Yh=function(i,o,s,f,h){var v=qh(i,window.getComputedStyle(o).direction),_=v*f,A=s.target,E=o.contains(A),S=!1,G=_>0,U=0,B=0;do{if(!A)break;var J=kv(i,A),V=J[0],Y=J[1],Z=J[2],K=Y-Z-v*V;(V||K)&&Wv(i,A)&&(U+=K,B+=V);var k=A.parentNode;A=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!E&&A!==document.body||E&&(o.contains(A)||o===A));return(G&&Math.abs(U)<1||!G&&Math.abs(B)<1)&&(S=!0),S},bi=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},Rv=function(i){return[i.deltaX,i.deltaY]},Nv=function(i){return i&&"current"in i?i.current:i},Gh=function(i,o){return i[0]===o[0]&&i[1]===o[1]},Lh=function(i){return`
47
47
  .block-interactivity-`.concat(i,` {pointer-events: none;}
48
48
  .allow-interactivity-`).concat(i,` {pointer-events: all;}
49
- `)},Xh=0,wa=[];function jh(i){var o=x.useRef([]),s=x.useRef([0,0]),f=x.useRef(),h=x.useState(Xh++)[0],v=x.useState(wv)[0],_=x.useRef(i);x.useEffect(function(){_.current=i},[i]),x.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(h));var Y=fh([i.lockRef.current],(i.shards||[]).map(Nv),!0).filter(Boolean);return Y.forEach(function(Z){return Z.classList.add("allow-interactivity-".concat(h))}),function(){document.body.classList.remove("block-interactivity-".concat(h)),Y.forEach(function(Z){return Z.classList.remove("allow-interactivity-".concat(h))})}}},[i.inert,i.lockRef.current,i.shards]);var A=x.useCallback(function(Y,Z){if("touches"in Y&&Y.touches.length===2||Y.type==="wheel"&&Y.ctrlKey)return!_.current.allowPinchZoom;var K=bi(Y),k=s.current,I="deltaX"in Y?Y.deltaX:k[0]-K[0],tt="deltaY"in Y?Y.deltaY:k[1]-K[1],nt,W=Y.target,q=Math.abs(I)>Math.abs(tt)?"h":"v";if("touches"in Y&&q==="h"&&W.type==="range")return!1;var Et=window.getSelection(),xt=Et&&Et.anchorNode,qt=xt?xt===W||xt.contains(W):!1;if(qt)return!1;var bt=Cv(q,W);if(!bt)return!0;if(bt?nt=q:(nt=q==="v"?"h":"v",bt=Cv(q,W)),!bt)return!1;if(!f.current&&"changedTouches"in Y&&(I||tt)&&(f.current=nt),!nt)return!0;var ot=f.current||nt;return Yh(ot,Z,Y,ot==="h"?I:tt)},[]),E=x.useCallback(function(Y){var Z=Y;if(!(!wa.length||wa[wa.length-1]!==v)){var K="deltaY"in Z?Rv(Z):bi(Z),k=o.current.filter(function(nt){return nt.name===Z.type&&(nt.target===Z.target||Z.target===nt.shadowParent)&&Gh(nt.delta,K)})[0];if(k&&k.should){Z.cancelable&&Z.preventDefault();return}if(!k){var I=(_.current.shards||[]).map(Nv).filter(Boolean).filter(function(nt){return nt.contains(Z.target)}),tt=I.length>0?A(Z,I[0]):!_.current.noIsolation;tt&&Z.cancelable&&Z.preventDefault()}}},[]),S=x.useCallback(function(Y,Z,K,k){var I={name:Y,delta:Z,target:K,should:k,shadowParent:Qh(K)};o.current.push(I),setTimeout(function(){o.current=o.current.filter(function(tt){return tt!==I})},1)},[]),G=x.useCallback(function(Y){s.current=bi(Y),f.current=void 0},[]),U=x.useCallback(function(Y){S(Y.type,Rv(Y),Y.target,A(Y,i.lockRef.current))},[]),B=x.useCallback(function(Y){S(Y.type,bi(Y),Y.target,A(Y,i.lockRef.current))},[]);x.useEffect(function(){return wa.push(v),i.setCallbacks({onScrollCapture:U,onWheelCapture:U,onTouchMoveCapture:B}),document.addEventListener("wheel",E,Ja),document.addEventListener("touchmove",E,Ja),document.addEventListener("touchstart",G,Ja),function(){wa=wa.filter(function(Y){return Y!==v}),document.removeEventListener("wheel",E,Ja),document.removeEventListener("touchmove",E,Ja),document.removeEventListener("touchstart",G,Ja)}},[]);var J=i.removeScrollBar,V=i.inert;return x.createElement(x.Fragment,null,V?x.createElement(v,{styles:Lh(h)}):null,J?x.createElement(Rh,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function Qh(i){for(var o=null;i!==null;)i instanceof ShadowRoot&&(o=i.host,i=i.host),i=i.parentNode;return o}const Zh=gh(Jv,jh);var Vh=x.forwardRef(function(i,o){return x.createElement(Mi,Zl({},i,{ref:o,sideCar:Zh}))});Vh.classNames=Mi.classNames;const Oi=x.createContext(null);Oi.displayName="PanelGroupContext";const Lt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},so=10,ua=x.useLayoutEffect,Uv=jm.useId,Kh=typeof Uv=="function"?Uv:()=>null;let Jh=0;function vo(i=null){const o=Kh(),s=x.useRef(i||o||null);return s.current===null&&(s.current=""+Jh++),i??s.current}function Fv({children:i,className:o="",collapsedSize:s,collapsible:f,defaultSize:h,forwardedRef:v,id:_,maxSize:A,minSize:E,onCollapse:S,onExpand:G,onResize:U,order:B,style:J,tagName:V="div",...Y}){const Z=x.useContext(Oi);if(Z===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:K,expandPanel:k,getPanelSize:I,getPanelStyle:tt,groupId:nt,isPanelCollapsed:W,reevaluatePanelConstraints:q,registerPanel:Et,resizePanel:xt,unregisterPanel:qt}=Z,bt=vo(_),ot=x.useRef({callbacks:{onCollapse:S,onExpand:G,onResize:U},constraints:{collapsedSize:s,collapsible:f,defaultSize:h,maxSize:A,minSize:E},id:bt,idIsFromProps:_!==void 0,order:B});x.useRef({didLogMissingDefaultSizeWarning:!1}),ua(()=>{const{callbacks:Ct,constraints:pt}=ot.current,M={...pt};ot.current.id=bt,ot.current.idIsFromProps=_!==void 0,ot.current.order=B,Ct.onCollapse=S,Ct.onExpand=G,Ct.onResize=U,pt.collapsedSize=s,pt.collapsible=f,pt.defaultSize=h,pt.maxSize=A,pt.minSize=E,(M.collapsedSize!==pt.collapsedSize||M.collapsible!==pt.collapsible||M.maxSize!==pt.maxSize||M.minSize!==pt.minSize)&&q(ot.current,M)}),ua(()=>{const Ct=ot.current;return Et(Ct),()=>{qt(Ct)}},[B,bt,Et,qt]),x.useImperativeHandle(v,()=>({collapse:()=>{K(ot.current)},expand:Ct=>{k(ot.current,Ct)},getId(){return bt},getSize(){return I(ot.current)},isCollapsed(){return W(ot.current)},isExpanded(){return!W(ot.current)},resize:Ct=>{xt(ot.current,Ct)}}),[K,k,I,W,bt,xt]);const al=tt(ot.current,h);return x.createElement(V,{...Y,children:i,className:o,id:bt,style:{...al,...J},[Lt.groupId]:nt,[Lt.panel]:"",[Lt.panelCollapsible]:f||void 0,[Lt.panelId]:bt,[Lt.panelSize]:parseFloat(""+al.flexGrow).toFixed(1)})}const wh=x.forwardRef((i,o)=>x.createElement(Fv,{...i,forwardedRef:o}));Fv.displayName="Panel";wh.displayName="forwardRef(Panel)";let oo=null,Ai=-1,Ye=null;function $h(i,o){if(o){const s=(o&e0)!==0,f=(o&a0)!==0,h=(o&n0)!==0,v=(o&u0)!==0;if(s)return h?"se-resize":v?"ne-resize":"e-resize";if(f)return h?"sw-resize":v?"nw-resize":"w-resize";if(h)return"s-resize";if(v)return"n-resize"}switch(i){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Wh(){Ye!==null&&(document.head.removeChild(Ye),oo=null,Ye=null,Ai=-1)}function to(i,o){var s,f;const h=$h(i,o);if(oo!==h){if(oo=h,Ye===null&&(Ye=document.createElement("style"),document.head.appendChild(Ye)),Ai>=0){var v;(v=Ye.sheet)===null||v===void 0||v.removeRule(Ai)}Ai=(s=(f=Ye.sheet)===null||f===void 0?void 0:f.insertRule(`*{cursor: ${h} !important;}`))!==null&&s!==void 0?s:-1}}function Iv(i){return i.type==="keydown"}function Pv(i){return i.type.startsWith("pointer")}function t0(i){return i.type.startsWith("mouse")}function Di(i){if(Pv(i)){if(i.isPrimary)return{x:i.clientX,y:i.clientY}}else if(t0(i))return{x:i.clientX,y:i.clientY};return{x:1/0,y:1/0}}function kh(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Fh(i,o,s){return i.x<o.x+o.width&&i.x+i.width>o.x&&i.y<o.y+o.height&&i.y+i.height>o.y}function Ih(i,o){if(i===o)throw new Error("Cannot compare node with itself");const s={a:Bv(i),b:Bv(o)};let f;for(;s.a.at(-1)===s.b.at(-1);)i=s.a.pop(),o=s.b.pop(),f=i;ft(f,"Stacking order can only be calculated for elements with a common ancestor");const h={a:xv(Hv(s.a)),b:xv(Hv(s.b))};if(h.a===h.b){const v=f.childNodes,_={a:s.a.at(-1),b:s.b.at(-1)};let A=v.length;for(;A--;){const E=v[A];if(E===_.a)return 1;if(E===_.b)return-1}}return Math.sign(h.a-h.b)}const Ph=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function tg(i){var o;const s=getComputedStyle((o=l0(i))!==null&&o!==void 0?o:i).display;return s==="flex"||s==="inline-flex"}function lg(i){const o=getComputedStyle(i);return!!(o.position==="fixed"||o.zIndex!=="auto"&&(o.position!=="static"||tg(i))||+o.opacity<1||"transform"in o&&o.transform!=="none"||"webkitTransform"in o&&o.webkitTransform!=="none"||"mixBlendMode"in o&&o.mixBlendMode!=="normal"||"filter"in o&&o.filter!=="none"||"webkitFilter"in o&&o.webkitFilter!=="none"||"isolation"in o&&o.isolation==="isolate"||Ph.test(o.willChange)||o.webkitOverflowScrolling==="touch")}function Hv(i){let o=i.length;for(;o--;){const s=i[o];if(ft(s,"Missing node"),lg(s))return s}return null}function xv(i){return i&&Number(getComputedStyle(i).zIndex)||0}function Bv(i){const o=[];for(;i;)o.push(i),i=l0(i);return o}function l0(i){const{parentNode:o}=i;return o&&o instanceof ShadowRoot?o.host:o}const e0=1,a0=2,n0=4,u0=8,eg=kh()==="coarse";let Gl=[],Ia=!1,aa=new Map,Ci=new Map;const In=new Set;function ag(i,o,s,f,h){var v;const{ownerDocument:_}=o,A={direction:s,element:o,hitAreaMargins:f,setResizeHandlerState:h},E=(v=aa.get(_))!==null&&v!==void 0?v:0;return aa.set(_,E+1),In.add(A),Ti(),function(){var G;Ci.delete(i),In.delete(A);const U=(G=aa.get(_))!==null&&G!==void 0?G:1;if(aa.set(_,U-1),Ti(),U===1&&aa.delete(_),Gl.includes(A)){const B=Gl.indexOf(A);B>=0&&Gl.splice(B,1),mo(),h("up",!0,null)}}}function ng(i){const{target:o}=i,{x:s,y:f}=Di(i);Ia=!0,yo({target:o,x:s,y:f}),Ti(),Gl.length>0&&(_i("down",i),i.preventDefault(),i0(o)||i.stopImmediatePropagation())}function lo(i){const{x:o,y:s}=Di(i);if(Ia&&i.buttons===0&&(Ia=!1,_i("up",i)),!Ia){const{target:f}=i;yo({target:f,x:o,y:s})}_i("move",i),mo(),Gl.length>0&&i.preventDefault()}function eo(i){const{target:o}=i,{x:s,y:f}=Di(i);Ci.clear(),Ia=!1,Gl.length>0&&(i.preventDefault(),i0(o)||i.stopImmediatePropagation()),_i("up",i),yo({target:o,x:s,y:f}),mo(),Ti()}function i0(i){let o=i;for(;o;){if(o.hasAttribute(Lt.resizeHandle))return!0;o=o.parentElement}return!1}function yo({target:i,x:o,y:s}){Gl.splice(0);let f=null;(i instanceof HTMLElement||i instanceof SVGElement)&&(f=i),In.forEach(h=>{const{element:v,hitAreaMargins:_}=h,A=v.getBoundingClientRect(),{bottom:E,left:S,right:G,top:U}=A,B=eg?_.coarse:_.fine;if(o>=S-B&&o<=G+B&&s>=U-B&&s<=E+B){if(f!==null&&document.contains(f)&&v!==f&&!v.contains(f)&&!f.contains(v)&&Ih(f,v)>0){let V=f,Y=!1;for(;V&&!V.contains(v);){if(Fh(V.getBoundingClientRect(),A)){Y=!0;break}V=V.parentElement}if(Y)return}Gl.push(h)}})}function ao(i,o){Ci.set(i,o)}function mo(){let i=!1,o=!1;Gl.forEach(f=>{const{direction:h}=f;h==="horizontal"?i=!0:o=!0});let s=0;Ci.forEach(f=>{s|=f}),i&&o?to("intersection",s):i?to("horizontal",s):o?to("vertical",s):Wh()}let no=new AbortController;function Ti(){no.abort(),no=new AbortController;const i={capture:!0,signal:no.signal};In.size&&(Ia?(Gl.length>0&&aa.forEach((o,s)=>{const{body:f}=s;o>0&&(f.addEventListener("contextmenu",eo,i),f.addEventListener("pointerleave",lo,i),f.addEventListener("pointermove",lo,i))}),window.addEventListener("pointerup",eo,i),window.addEventListener("pointercancel",eo,i)):aa.forEach((o,s)=>{const{body:f}=s;o>0&&(f.addEventListener("pointerdown",ng,i),f.addEventListener("pointermove",lo,i))}))}function _i(i,o){In.forEach(s=>{const{setResizeHandlerState:f}=s,h=Gl.includes(s);f(i,h,o)})}function ug(){const[i,o]=x.useState(0);return x.useCallback(()=>o(s=>s+1),[])}function ft(i,o){if(!i)throw console.error(o),Error(o)}function ia(i,o,s=so){return i.toFixed(s)===o.toFixed(s)?0:i>o?1:-1}function re(i,o,s=so){return ia(i,o,s)===0}function Tl(i,o,s){return ia(i,o,s)===0}function ig(i,o,s){if(i.length!==o.length)return!1;for(let f=0;f<i.length;f++){const h=i[f],v=o[f];if(!Tl(h,v,s))return!1}return!0}function ka({panelConstraints:i,panelIndex:o,size:s}){const f=i[o];ft(f!=null,`Panel constraints not found for index ${o}`);let{collapsedSize:h=0,collapsible:v,maxSize:_=100,minSize:A=0}=f;if(ia(s,A)<0)if(v){const E=(h+A)/2;ia(s,E)<0?s=h:s=A}else s=A;return s=Math.min(_,s),s=parseFloat(s.toFixed(so)),s}function kn({delta:i,initialLayout:o,panelConstraints:s,pivotIndices:f,prevLayout:h,trigger:v}){if(Tl(i,0))return o;const _=[...o],[A,E]=f;ft(A!=null,"Invalid first pivot index"),ft(E!=null,"Invalid second pivot index");let S=0;if(v==="keyboard"){{const U=i<0?E:A,B=s[U];ft(B,`Panel constraints not found for index ${U}`);const{collapsedSize:J=0,collapsible:V,minSize:Y=0}=B;if(V){const Z=o[U];if(ft(Z!=null,`Previous layout not found for panel index ${U}`),Tl(Z,J)){const K=Y-Z;ia(K,Math.abs(i))>0&&(i=i<0?0-K:K)}}}{const U=i<0?A:E,B=s[U];ft(B,`No panel constraints found for index ${U}`);const{collapsedSize:J=0,collapsible:V,minSize:Y=0}=B;if(V){const Z=o[U];if(ft(Z!=null,`Previous layout not found for panel index ${U}`),Tl(Z,Y)){const K=Z-J;ia(K,Math.abs(i))>0&&(i=i<0?0-K:K)}}}}{const U=i<0?1:-1;let B=i<0?E:A,J=0;for(;;){const Y=o[B];ft(Y!=null,`Previous layout not found for panel index ${B}`);const K=ka({panelConstraints:s,panelIndex:B,size:100})-Y;if(J+=K,B+=U,B<0||B>=s.length)break}const V=Math.min(Math.abs(i),Math.abs(J));i=i<0?0-V:V}{let B=i<0?A:E;for(;B>=0&&B<s.length;){const J=Math.abs(i)-Math.abs(S),V=o[B];ft(V!=null,`Previous layout not found for panel index ${B}`);const Y=V-J,Z=ka({panelConstraints:s,panelIndex:B,size:Y});if(!Tl(V,Z)&&(S+=V-Z,_[B]=Z,S.toPrecision(3).localeCompare(Math.abs(i).toPrecision(3),void 0,{numeric:!0})>=0))break;i<0?B--:B++}}if(ig(h,_))return h;{const U=i<0?E:A,B=o[U];ft(B!=null,`Previous layout not found for panel index ${U}`);const J=B+S,V=ka({panelConstraints:s,panelIndex:U,size:J});if(_[U]=V,!Tl(V,J)){let Y=J-V,K=i<0?E:A;for(;K>=0&&K<s.length;){const k=_[K];ft(k!=null,`Previous layout not found for panel index ${K}`);const I=k+Y,tt=ka({panelConstraints:s,panelIndex:K,size:I});if(Tl(k,tt)||(Y-=tt-k,_[K]=tt),Tl(Y,0))break;i>0?K--:K++}}}const G=_.reduce((U,B)=>B+U,0);return Tl(G,100)?_:h}function cg({layout:i,panelsArray:o,pivotIndices:s}){let f=0,h=100,v=0,_=0;const A=s[0];ft(A!=null,"No pivot index found"),o.forEach((U,B)=>{const{constraints:J}=U,{maxSize:V=100,minSize:Y=0}=J;B===A?(f=Y,h=V):(v+=Y,_+=V)});const E=Math.min(h,100-v),S=Math.max(f,100-_),G=i[A];return{valueMax:E,valueMin:S,valueNow:G}}function Pn(i,o=document){return Array.from(o.querySelectorAll(`[${Lt.resizeHandleId}][data-panel-group-id="${i}"]`))}function c0(i,o,s=document){const h=Pn(i,s).findIndex(v=>v.getAttribute(Lt.resizeHandleId)===o);return h??null}function f0(i,o,s){const f=c0(i,o,s);return f!=null?[f,f+1]:[-1,-1]}function o0(i,o=document){var s;if(o instanceof HTMLElement&&(o==null||(s=o.dataset)===null||s===void 0?void 0:s.panelGroupId)==i)return o;const f=o.querySelector(`[data-panel-group][data-panel-group-id="${i}"]`);return f||null}function Ri(i,o=document){const s=o.querySelector(`[${Lt.resizeHandleId}="${i}"]`);return s||null}function fg(i,o,s,f=document){var h,v,_,A;const E=Ri(o,f),S=Pn(i,f),G=E?S.indexOf(E):-1,U=(h=(v=s[G])===null||v===void 0?void 0:v.id)!==null&&h!==void 0?h:null,B=(_=(A=s[G+1])===null||A===void 0?void 0:A.id)!==null&&_!==void 0?_:null;return[U,B]}function og({committedValuesRef:i,eagerValuesRef:o,groupId:s,layout:f,panelDataArray:h,panelGroupElement:v,setLayout:_}){x.useRef({didWarnAboutMissingResizeHandle:!1}),ua(()=>{if(!v)return;const A=Pn(s,v);for(let E=0;E<h.length-1;E++){const{valueMax:S,valueMin:G,valueNow:U}=cg({layout:f,panelsArray:h,pivotIndices:[E,E+1]}),B=A[E];if(B!=null){const J=h[E];ft(J,`No panel data found for index "${E}"`),B.setAttribute("aria-controls",J.id),B.setAttribute("aria-valuemax",""+Math.round(S)),B.setAttribute("aria-valuemin",""+Math.round(G)),B.setAttribute("aria-valuenow",U!=null?""+Math.round(U):"")}}return()=>{A.forEach((E,S)=>{E.removeAttribute("aria-controls"),E.removeAttribute("aria-valuemax"),E.removeAttribute("aria-valuemin"),E.removeAttribute("aria-valuenow")})}},[s,f,h,v]),x.useEffect(()=>{if(!v)return;const A=o.current;ft(A,"Eager values not found");const{panelDataArray:E}=A,S=o0(s,v);ft(S!=null,`No group found for id "${s}"`);const G=Pn(s,v);ft(G,`No resize handles found for group id "${s}"`);const U=G.map(B=>{const J=B.getAttribute(Lt.resizeHandleId);ft(J,"Resize handle element has no handle id attribute");const[V,Y]=fg(s,J,E,v);if(V==null||Y==null)return()=>{};const Z=K=>{if(!K.defaultPrevented)switch(K.key){case"Enter":{K.preventDefault();const k=E.findIndex(I=>I.id===V);if(k>=0){const I=E[k];ft(I,`No panel data found for index ${k}`);const tt=f[k],{collapsedSize:nt=0,collapsible:W,minSize:q=0}=I.constraints;if(tt!=null&&W){const Et=kn({delta:Tl(tt,nt)?q-nt:nt-tt,initialLayout:f,panelConstraints:E.map(xt=>xt.constraints),pivotIndices:f0(s,J,v),prevLayout:f,trigger:"keyboard"});f!==Et&&_(Et)}}break}}};return B.addEventListener("keydown",Z),()=>{B.removeEventListener("keydown",Z)}});return()=>{U.forEach(B=>B())}},[v,i,o,s,f,h,_])}function qv(i,o){if(i.length!==o.length)return!1;for(let s=0;s<i.length;s++)if(i[s]!==o[s])return!1;return!0}function r0(i,o){const s=i==="horizontal",{x:f,y:h}=Di(o);return s?f:h}function rg(i,o,s,f,h){const v=s==="horizontal",_=Ri(o,h);ft(_,`No resize handle element found for id "${o}"`);const A=_.getAttribute(Lt.groupId);ft(A,"Resize handle element has no group id attribute");let{initialCursorPosition:E}=f;const S=r0(s,i),G=o0(A,h);ft(G,`No group element found for id "${A}"`);const U=G.getBoundingClientRect(),B=v?U.width:U.height;return(S-E)/B*100}function sg(i,o,s,f,h,v){if(Iv(i)){const _=s==="horizontal";let A=0;i.shiftKey?A=100:h!=null?A=h:A=10;let E=0;switch(i.key){case"ArrowDown":E=_?0:A;break;case"ArrowLeft":E=_?-A:0;break;case"ArrowRight":E=_?A:0;break;case"ArrowUp":E=_?0:-A;break;case"End":E=100;break;case"Home":E=-100;break}return E}else return f==null?0:rg(i,o,s,f,v)}function dg({panelDataArray:i}){const o=Array(i.length),s=i.map(v=>v.constraints);let f=0,h=100;for(let v=0;v<i.length;v++){const _=s[v];ft(_,`Panel constraints not found for index ${v}`);const{defaultSize:A}=_;A!=null&&(f++,o[v]=A,h-=A)}for(let v=0;v<i.length;v++){const _=s[v];ft(_,`Panel constraints not found for index ${v}`);const{defaultSize:A}=_;if(A!=null)continue;const E=i.length-f,S=h/E;f++,o[v]=S,h-=S}return o}function $a(i,o,s){o.forEach((f,h)=>{const v=i[h];ft(v,`Panel data not found for index ${h}`);const{callbacks:_,constraints:A,id:E}=v,{collapsedSize:S=0,collapsible:G}=A,U=s[E];if(U==null||f!==U){s[E]=f;const{onCollapse:B,onExpand:J,onResize:V}=_;V&&V(f,U),G&&(B||J)&&(J&&(U==null||re(U,S))&&!re(f,S)&&J(),B&&(U==null||!re(U,S))&&re(f,S)&&B())}})}function zi(i,o){if(i.length!==o.length)return!1;for(let s=0;s<i.length;s++)if(i[s]!=o[s])return!1;return!0}function vg({defaultSize:i,dragState:o,layout:s,panelData:f,panelIndex:h,precision:v=3}){const _=s[h];let A;return _==null?A=i!=null?i.toPrecision(v):"1":f.length===1?A="1":A=_.toPrecision(v),{flexBasis:0,flexGrow:A,flexShrink:1,overflow:"hidden",pointerEvents:o!==null?"none":void 0}}function yg(i,o=10){let s=null;return(...h)=>{s!==null&&clearTimeout(s),s=setTimeout(()=>{i(...h)},o)}}function Yv(i){try{if(typeof localStorage<"u")i.getItem=o=>localStorage.getItem(o),i.setItem=(o,s)=>{localStorage.setItem(o,s)};else throw new Error("localStorage not supported in this environment")}catch(o){console.error(o),i.getItem=()=>null,i.setItem=()=>{}}}function s0(i){return`react-resizable-panels:${i}`}function d0(i){return i.map(o=>{const{constraints:s,id:f,idIsFromProps:h,order:v}=o;return h?f:v?`${v}:${JSON.stringify(s)}`:JSON.stringify(s)}).sort((o,s)=>o.localeCompare(s)).join(",")}function v0(i,o){try{const s=s0(i),f=o.getItem(s);if(f){const h=JSON.parse(f);if(typeof h=="object"&&h!=null)return h}}catch{}return null}function mg(i,o,s){var f,h;const v=(f=v0(i,s))!==null&&f!==void 0?f:{},_=d0(o);return(h=v[_])!==null&&h!==void 0?h:null}function hg(i,o,s,f,h){var v;const _=s0(i),A=d0(o),E=(v=v0(i,h))!==null&&v!==void 0?v:{};E[A]={expandToSizes:Object.fromEntries(s.entries()),layout:f};try{h.setItem(_,JSON.stringify(E))}catch(S){console.error(S)}}function Gv({layout:i,panelConstraints:o}){const s=[...i],f=s.reduce((v,_)=>v+_,0);if(s.length!==o.length)throw Error(`Invalid ${o.length} panel layout: ${s.map(v=>`${v}%`).join(", ")}`);if(!Tl(f,100)&&s.length>0)for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=100/f*_;s[v]=A}let h=0;for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=ka({panelConstraints:o,panelIndex:v,size:_});_!=A&&(h+=_-A,s[v]=A)}if(!Tl(h,0))for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=_+h,E=ka({panelConstraints:o,panelIndex:v,size:A});if(_!==E&&(h-=E-_,s[v]=E,Tl(h,0)))break}return s}const gg=100,Fn={getItem:i=>(Yv(Fn),Fn.getItem(i)),setItem:(i,o)=>{Yv(Fn),Fn.setItem(i,o)}},Lv={};function y0({autoSaveId:i=null,children:o,className:s="",direction:f,forwardedRef:h,id:v=null,onLayout:_=null,keyboardResizeBy:A=null,storage:E=Fn,style:S,tagName:G="div",...U}){const B=vo(v),J=x.useRef(null),[V,Y]=x.useState(null),[Z,K]=x.useState([]),k=ug(),I=x.useRef({}),tt=x.useRef(new Map),nt=x.useRef(0),W=x.useRef({autoSaveId:i,direction:f,dragState:V,id:B,keyboardResizeBy:A,onLayout:_,storage:E}),q=x.useRef({layout:Z,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(h,()=>({getId:()=>W.current.id,getLayout:()=>{const{layout:O}=q.current;return O},setLayout:O=>{const{onLayout:H}=W.current,{layout:X,panelDataArray:j}=q.current,L=Gv({layout:O,panelConstraints:j.map(F=>F.constraints)});qv(X,L)||(K(L),q.current.layout=L,H&&H(L),$a(j,L,I.current))}}),[]),ua(()=>{W.current.autoSaveId=i,W.current.direction=f,W.current.dragState=V,W.current.id=B,W.current.onLayout=_,W.current.storage=E}),og({committedValuesRef:W,eagerValuesRef:q,groupId:B,layout:Z,panelDataArray:q.current.panelDataArray,setLayout:K,panelGroupElement:J.current}),x.useEffect(()=>{const{panelDataArray:O}=q.current;if(i){if(Z.length===0||Z.length!==O.length)return;let H=Lv[i];H==null&&(H=yg(hg,gg),Lv[i]=H);const X=[...O],j=new Map(tt.current);H(i,X,j,Z,E)}},[i,Z,E]),x.useEffect(()=>{});const Et=x.useCallback(O=>{const{onLayout:H}=W.current,{layout:X,panelDataArray:j}=q.current;if(O.constraints.collapsible){const L=j.map(nl=>nl.constraints),{collapsedSize:F=0,panelSize:at,pivotIndices:Rt}=ea(j,O,X);if(ft(at!=null,`Panel size not found for panel "${O.id}"`),!re(at,F)){tt.current.set(O.id,at);const il=Wa(j,O)===j.length-1?at-F:F-at,Nt=kn({delta:il,initialLayout:X,panelConstraints:L,pivotIndices:Rt,prevLayout:X,trigger:"imperative-api"});zi(X,Nt)||(K(Nt),q.current.layout=Nt,H&&H(Nt),$a(j,Nt,I.current))}}},[]),xt=x.useCallback((O,H)=>{const{onLayout:X}=W.current,{layout:j,panelDataArray:L}=q.current;if(O.constraints.collapsible){const F=L.map(Jt=>Jt.constraints),{collapsedSize:at=0,panelSize:Rt=0,minSize:nl=0,pivotIndices:il}=ea(L,O,j),Nt=H??nl;if(re(Rt,at)){const Jt=tt.current.get(O.id),Vl=Jt!=null&&Jt>=Nt?Jt:Nt,Pa=Wa(L,O)===L.length-1?Rt-Vl:Vl-Rt,kt=kn({delta:Pa,initialLayout:j,panelConstraints:F,pivotIndices:il,prevLayout:j,trigger:"imperative-api"});zi(j,kt)||(K(kt),q.current.layout=kt,X&&X(kt),$a(L,kt,I.current))}}},[]),qt=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{panelSize:j}=ea(X,O,H);return ft(j!=null,`Panel size not found for panel "${O.id}"`),j},[]),bt=x.useCallback((O,H)=>{const{panelDataArray:X}=q.current,j=Wa(X,O);return vg({defaultSize:H,dragState:V,layout:Z,panelData:X,panelIndex:j})},[V,Z]),ot=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{collapsedSize:j=0,collapsible:L,panelSize:F}=ea(X,O,H);return ft(F!=null,`Panel size not found for panel "${O.id}"`),L===!0&&re(F,j)},[]),al=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{collapsedSize:j=0,collapsible:L,panelSize:F}=ea(X,O,H);return ft(F!=null,`Panel size not found for panel "${O.id}"`),!L||ia(F,j)>0},[]),Ct=x.useCallback(O=>{const{panelDataArray:H}=q.current;H.push(O),H.sort((X,j)=>{const L=X.order,F=j.order;return L==null&&F==null?0:L==null?-1:F==null?1:L-F}),q.current.panelDataArrayChanged=!0,k()},[k]);ua(()=>{if(q.current.panelDataArrayChanged){q.current.panelDataArrayChanged=!1;const{autoSaveId:O,onLayout:H,storage:X}=W.current,{layout:j,panelDataArray:L}=q.current;let F=null;if(O){const Rt=mg(O,L,X);Rt&&(tt.current=new Map(Object.entries(Rt.expandToSizes)),F=Rt.layout)}F==null&&(F=dg({panelDataArray:L}));const at=Gv({layout:F,panelConstraints:L.map(Rt=>Rt.constraints)});qv(j,at)||(K(at),q.current.layout=at,H&&H(at),$a(L,at,I.current))}}),ua(()=>{const O=q.current;return()=>{O.layout=[]}},[]);const pt=x.useCallback(O=>{let H=!1;const X=J.current;return X&&window.getComputedStyle(X,null).getPropertyValue("direction")==="rtl"&&(H=!0),function(L){L.preventDefault();const F=J.current;if(!F)return()=>null;const{direction:at,dragState:Rt,id:nl,keyboardResizeBy:il,onLayout:Nt}=W.current,{layout:Jt,panelDataArray:Vl}=q.current,{initialLayout:se}=Rt??{},Pa=f0(nl,O,F);let kt=sg(L,O,at,Rt,il,F);const ca=at==="horizontal";ca&&H&&(kt=-kt);const tn=Vl.map(Ni=>Ni.constraints),Kl=kn({delta:kt,initialLayout:se??Jt,panelConstraints:tn,pivotIndices:Pa,prevLayout:Jt,trigger:Iv(L)?"keyboard":"mouse-or-touch"}),tu=!zi(Jt,Kl);(Pv(L)||t0(L))&&nt.current!=kt&&(nt.current=kt,!tu&&kt!==0?ca?ao(O,kt<0?e0:a0):ao(O,kt<0?n0:u0):ao(O,0)),tu&&(K(Kl),q.current.layout=Kl,Nt&&Nt(Kl),$a(Vl,Kl,I.current))}},[]),M=x.useCallback((O,H)=>{const{onLayout:X}=W.current,{layout:j,panelDataArray:L}=q.current,F=L.map(Jt=>Jt.constraints),{panelSize:at,pivotIndices:Rt}=ea(L,O,j);ft(at!=null,`Panel size not found for panel "${O.id}"`);const il=Wa(L,O)===L.length-1?at-H:H-at,Nt=kn({delta:il,initialLayout:j,panelConstraints:F,pivotIndices:Rt,prevLayout:j,trigger:"imperative-api"});zi(j,Nt)||(K(Nt),q.current.layout=Nt,X&&X(Nt),$a(L,Nt,I.current))},[]),Q=x.useCallback((O,H)=>{const{layout:X,panelDataArray:j}=q.current,{collapsedSize:L=0,collapsible:F}=H,{collapsedSize:at=0,collapsible:Rt,maxSize:nl=100,minSize:il=0}=O.constraints,{panelSize:Nt}=ea(j,O,X);Nt!=null&&(F&&Rt&&re(Nt,L)?re(L,at)||M(O,at):Nt<il?M(O,il):Nt>nl&&M(O,nl))},[M]),lt=x.useCallback((O,H)=>{const{direction:X}=W.current,{layout:j}=q.current;if(!J.current)return;const L=Ri(O,J.current);ft(L,`Drag handle element not found for id "${O}"`);const F=r0(X,H);Y({dragHandleId:O,dragHandleRect:L.getBoundingClientRect(),initialCursorPosition:F,initialLayout:j})},[]),mt=x.useCallback(()=>{Y(null)},[]),ht=x.useCallback(O=>{const{panelDataArray:H}=q.current,X=Wa(H,O);X>=0&&(H.splice(X,1),delete I.current[O.id],q.current.panelDataArrayChanged=!0,k())},[k]),m=x.useMemo(()=>({collapsePanel:Et,direction:f,dragState:V,expandPanel:xt,getPanelSize:qt,getPanelStyle:bt,groupId:B,isPanelCollapsed:ot,isPanelExpanded:al,reevaluatePanelConstraints:Q,registerPanel:Ct,registerResizeHandle:pt,resizePanel:M,startDragging:lt,stopDragging:mt,unregisterPanel:ht,panelGroupElement:J.current}),[Et,V,f,xt,qt,bt,B,ot,al,Q,Ct,pt,M,lt,mt,ht]),R={display:"flex",flexDirection:f==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(Oi.Provider,{value:m},x.createElement(G,{...U,children:o,className:s,id:v,ref:J,style:{...R,...S},[Lt.group]:"",[Lt.groupDirection]:f,[Lt.groupId]:B}))}const Sg=x.forwardRef((i,o)=>x.createElement(y0,{...i,forwardedRef:o}));y0.displayName="PanelGroup";Sg.displayName="forwardRef(PanelGroup)";function Wa(i,o){return i.findIndex(s=>s===o||s.id===o.id)}function ea(i,o,s){const f=Wa(i,o),v=f===i.length-1?[f-1,f]:[f,f+1],_=s[f];return{...o.constraints,panelSize:_,pivotIndices:v}}function bg({disabled:i,handleId:o,resizeHandler:s,panelGroupElement:f}){x.useEffect(()=>{if(i||s==null||f==null)return;const h=Ri(o,f);if(h==null)return;const v=_=>{if(!_.defaultPrevented)switch(_.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{_.preventDefault(),s(_);break}case"F6":{_.preventDefault();const A=h.getAttribute(Lt.groupId);ft(A,`No group element found for id "${A}"`);const E=Pn(A,f),S=c0(A,o,f);ft(S!==null,`No resize element found for id "${o}"`);const G=_.shiftKey?S>0?S-1:E.length-1:S+1<E.length?S+1:0;E[G].focus();break}}};return h.addEventListener("keydown",v),()=>{h.removeEventListener("keydown",v)}},[f,i,o,s])}function zg({children:i=null,className:o="",disabled:s=!1,hitAreaMargins:f,id:h,onBlur:v,onClick:_,onDragging:A,onFocus:E,onPointerDown:S,onPointerUp:G,style:U={},tabIndex:B=0,tagName:J="div",...V}){var Y,Z;const K=x.useRef(null),k=x.useRef({onClick:_,onDragging:A,onPointerDown:S,onPointerUp:G});x.useEffect(()=>{k.current.onClick=_,k.current.onDragging=A,k.current.onPointerDown=S,k.current.onPointerUp=G});const I=x.useContext(Oi);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:tt,groupId:nt,registerResizeHandle:W,startDragging:q,stopDragging:Et,panelGroupElement:xt}=I,qt=vo(h),[bt,ot]=x.useState("inactive"),[al,Ct]=x.useState(!1),[pt,M]=x.useState(null),Q=x.useRef({state:bt});ua(()=>{Q.current.state=bt}),x.useEffect(()=>{if(s)M(null);else{const m=W(qt);M(()=>m)}},[s,qt,W]);const lt=(Y=f?.coarse)!==null&&Y!==void 0?Y:15,mt=(Z=f?.fine)!==null&&Z!==void 0?Z:5;x.useEffect(()=>{if(s||pt==null)return;const m=K.current;ft(m,"Element ref not attached");let R=!1;return ag(qt,m,tt,{coarse:lt,fine:mt},(H,X,j)=>{if(!X){ot("inactive");return}switch(H){case"down":{ot("drag"),R=!1,ft(j,'Expected event to be defined for "down" action'),q(qt,j);const{onDragging:L,onPointerDown:F}=k.current;L?.(!0),F?.();break}case"move":{const{state:L}=Q.current;R=!0,L!=="drag"&&ot("hover"),ft(j,'Expected event to be defined for "move" action'),pt(j);break}case"up":{ot("hover"),Et();const{onClick:L,onDragging:F,onPointerUp:at}=k.current;F?.(!1),at?.(),R||L?.();break}}})},[lt,tt,s,mt,W,qt,pt,q,Et]),bg({disabled:s,handleId:qt,resizeHandler:pt,panelGroupElement:xt});const ht={touchAction:"none",userSelect:"none"};return x.createElement(J,{...V,children:i,className:o,id:h,onBlur:()=>{Ct(!1),v?.()},onFocus:()=>{Ct(!0),E?.()},ref:K,role:"separator",style:{...ht,...U},tabIndex:B,[Lt.groupDirection]:tt,[Lt.groupId]:nt,[Lt.resizeHandle]:"",[Lt.resizeHandleActive]:bt==="drag"?"pointer":al?"keyboard":void 0,[Lt.resizeHandleEnabled]:!s,[Lt.resizeHandleId]:qt,[Lt.resizeHandleState]:bt})}zg.displayName="PanelResizeHandle";export{Sg as P,jm as R,_g as a,Vh as b,wh as c,zg as d,Eg as e,qm as g,Ag as i,pg as j,x as r,Tg as u};
49
+ `)},Xh=0,wa=[];function jh(i){var o=x.useRef([]),s=x.useRef([0,0]),f=x.useRef(),h=x.useState(Xh++)[0],v=x.useState(wv)[0],_=x.useRef(i);x.useEffect(function(){_.current=i},[i]),x.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(h));var Y=fh([i.lockRef.current],(i.shards||[]).map(Nv),!0).filter(Boolean);return Y.forEach(function(Z){return Z.classList.add("allow-interactivity-".concat(h))}),function(){document.body.classList.remove("block-interactivity-".concat(h)),Y.forEach(function(Z){return Z.classList.remove("allow-interactivity-".concat(h))})}}},[i.inert,i.lockRef.current,i.shards]);var A=x.useCallback(function(Y,Z){if("touches"in Y&&Y.touches.length===2||Y.type==="wheel"&&Y.ctrlKey)return!_.current.allowPinchZoom;var K=bi(Y),k=s.current,I="deltaX"in Y?Y.deltaX:k[0]-K[0],tt="deltaY"in Y?Y.deltaY:k[1]-K[1],nt,W=Y.target,q=Math.abs(I)>Math.abs(tt)?"h":"v";if("touches"in Y&&q==="h"&&W.type==="range")return!1;var Et=window.getSelection(),xt=Et&&Et.anchorNode,qt=xt?xt===W||xt.contains(W):!1;if(qt)return!1;var bt=Cv(q,W);if(!bt)return!0;if(bt?nt=q:(nt=q==="v"?"h":"v",bt=Cv(q,W)),!bt)return!1;if(!f.current&&"changedTouches"in Y&&(I||tt)&&(f.current=nt),!nt)return!0;var ot=f.current||nt;return Yh(ot,Z,Y,ot==="h"?I:tt)},[]),E=x.useCallback(function(Y){var Z=Y;if(!(!wa.length||wa[wa.length-1]!==v)){var K="deltaY"in Z?Rv(Z):bi(Z),k=o.current.filter(function(nt){return nt.name===Z.type&&(nt.target===Z.target||Z.target===nt.shadowParent)&&Gh(nt.delta,K)})[0];if(k&&k.should){Z.cancelable&&Z.preventDefault();return}if(!k){var I=(_.current.shards||[]).map(Nv).filter(Boolean).filter(function(nt){return nt.contains(Z.target)}),tt=I.length>0?A(Z,I[0]):!_.current.noIsolation;tt&&Z.cancelable&&Z.preventDefault()}}},[]),S=x.useCallback(function(Y,Z,K,k){var I={name:Y,delta:Z,target:K,should:k,shadowParent:Qh(K)};o.current.push(I),setTimeout(function(){o.current=o.current.filter(function(tt){return tt!==I})},1)},[]),G=x.useCallback(function(Y){s.current=bi(Y),f.current=void 0},[]),U=x.useCallback(function(Y){S(Y.type,Rv(Y),Y.target,A(Y,i.lockRef.current))},[]),B=x.useCallback(function(Y){S(Y.type,bi(Y),Y.target,A(Y,i.lockRef.current))},[]);x.useEffect(function(){return wa.push(v),i.setCallbacks({onScrollCapture:U,onWheelCapture:U,onTouchMoveCapture:B}),document.addEventListener("wheel",E,Ja),document.addEventListener("touchmove",E,Ja),document.addEventListener("touchstart",G,Ja),function(){wa=wa.filter(function(Y){return Y!==v}),document.removeEventListener("wheel",E,Ja),document.removeEventListener("touchmove",E,Ja),document.removeEventListener("touchstart",G,Ja)}},[]);var J=i.removeScrollBar,V=i.inert;return x.createElement(x.Fragment,null,V?x.createElement(v,{styles:Lh(h)}):null,J?x.createElement(Rh,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function Qh(i){for(var o=null;i!==null;)i instanceof ShadowRoot&&(o=i.host,i=i.host),i=i.parentNode;return o}const Zh=gh(Jv,jh);var Vh=x.forwardRef(function(i,o){return x.createElement(Mi,Zl({},i,{ref:o,sideCar:Zh}))});Vh.classNames=Mi.classNames;const Oi=x.createContext(null);Oi.displayName="PanelGroupContext";const Lt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},so=10,ua=x.useLayoutEffect,Uv=jm.useId,Kh=typeof Uv=="function"?Uv:()=>null;let Jh=0;function vo(i=null){const o=Kh(),s=x.useRef(i||o||null);return s.current===null&&(s.current=""+Jh++),i??s.current}function Fv({children:i,className:o="",collapsedSize:s,collapsible:f,defaultSize:h,forwardedRef:v,id:_,maxSize:A,minSize:E,onCollapse:S,onExpand:G,onResize:U,order:B,style:J,tagName:V="div",...Y}){const Z=x.useContext(Oi);if(Z===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:K,expandPanel:k,getPanelSize:I,getPanelStyle:tt,groupId:nt,isPanelCollapsed:W,reevaluatePanelConstraints:q,registerPanel:Et,resizePanel:xt,unregisterPanel:qt}=Z,bt=vo(_),ot=x.useRef({callbacks:{onCollapse:S,onExpand:G,onResize:U},constraints:{collapsedSize:s,collapsible:f,defaultSize:h,maxSize:A,minSize:E},id:bt,idIsFromProps:_!==void 0,order:B});x.useRef({didLogMissingDefaultSizeWarning:!1}),ua(()=>{const{callbacks:Ct,constraints:pt}=ot.current,M={...pt};ot.current.id=bt,ot.current.idIsFromProps=_!==void 0,ot.current.order=B,Ct.onCollapse=S,Ct.onExpand=G,Ct.onResize=U,pt.collapsedSize=s,pt.collapsible=f,pt.defaultSize=h,pt.maxSize=A,pt.minSize=E,(M.collapsedSize!==pt.collapsedSize||M.collapsible!==pt.collapsible||M.maxSize!==pt.maxSize||M.minSize!==pt.minSize)&&q(ot.current,M)}),ua(()=>{const Ct=ot.current;return Et(Ct),()=>{qt(Ct)}},[B,bt,Et,qt]),x.useImperativeHandle(v,()=>({collapse:()=>{K(ot.current)},expand:Ct=>{k(ot.current,Ct)},getId(){return bt},getSize(){return I(ot.current)},isCollapsed(){return W(ot.current)},isExpanded(){return!W(ot.current)},resize:Ct=>{xt(ot.current,Ct)}}),[K,k,I,W,bt,xt]);const al=tt(ot.current,h);return x.createElement(V,{...Y,children:i,className:o,id:bt,style:{...al,...J},[Lt.groupId]:nt,[Lt.panel]:"",[Lt.panelCollapsible]:f||void 0,[Lt.panelId]:bt,[Lt.panelSize]:parseFloat(""+al.flexGrow).toFixed(1)})}const wh=x.forwardRef((i,o)=>x.createElement(Fv,{...i,forwardedRef:o}));Fv.displayName="Panel";wh.displayName="forwardRef(Panel)";let oo=null,Ai=-1,Ye=null;function $h(i,o){if(o){const s=(o&e0)!==0,f=(o&a0)!==0,h=(o&n0)!==0,v=(o&u0)!==0;if(s)return h?"se-resize":v?"ne-resize":"e-resize";if(f)return h?"sw-resize":v?"nw-resize":"w-resize";if(h)return"s-resize";if(v)return"n-resize"}switch(i){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Wh(){Ye!==null&&(document.head.removeChild(Ye),oo=null,Ye=null,Ai=-1)}function to(i,o){var s,f;const h=$h(i,o);if(oo!==h){if(oo=h,Ye===null&&(Ye=document.createElement("style"),document.head.appendChild(Ye)),Ai>=0){var v;(v=Ye.sheet)===null||v===void 0||v.removeRule(Ai)}Ai=(s=(f=Ye.sheet)===null||f===void 0?void 0:f.insertRule(`*{cursor: ${h} !important;}`))!==null&&s!==void 0?s:-1}}function Iv(i){return i.type==="keydown"}function Pv(i){return i.type.startsWith("pointer")}function t0(i){return i.type.startsWith("mouse")}function Di(i){if(Pv(i)){if(i.isPrimary)return{x:i.clientX,y:i.clientY}}else if(t0(i))return{x:i.clientX,y:i.clientY};return{x:1/0,y:1/0}}function kh(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Fh(i,o,s){return i.x<o.x+o.width&&i.x+i.width>o.x&&i.y<o.y+o.height&&i.y+i.height>o.y}function Ih(i,o){if(i===o)throw new Error("Cannot compare node with itself");const s={a:Bv(i),b:Bv(o)};let f;for(;s.a.at(-1)===s.b.at(-1);)i=s.a.pop(),o=s.b.pop(),f=i;ft(f,"Stacking order can only be calculated for elements with a common ancestor");const h={a:xv(Hv(s.a)),b:xv(Hv(s.b))};if(h.a===h.b){const v=f.childNodes,_={a:s.a.at(-1),b:s.b.at(-1)};let A=v.length;for(;A--;){const E=v[A];if(E===_.a)return 1;if(E===_.b)return-1}}return Math.sign(h.a-h.b)}const Ph=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function tg(i){var o;const s=getComputedStyle((o=l0(i))!==null&&o!==void 0?o:i).display;return s==="flex"||s==="inline-flex"}function lg(i){const o=getComputedStyle(i);return!!(o.position==="fixed"||o.zIndex!=="auto"&&(o.position!=="static"||tg(i))||+o.opacity<1||"transform"in o&&o.transform!=="none"||"webkitTransform"in o&&o.webkitTransform!=="none"||"mixBlendMode"in o&&o.mixBlendMode!=="normal"||"filter"in o&&o.filter!=="none"||"webkitFilter"in o&&o.webkitFilter!=="none"||"isolation"in o&&o.isolation==="isolate"||Ph.test(o.willChange)||o.webkitOverflowScrolling==="touch")}function Hv(i){let o=i.length;for(;o--;){const s=i[o];if(ft(s,"Missing node"),lg(s))return s}return null}function xv(i){return i&&Number(getComputedStyle(i).zIndex)||0}function Bv(i){const o=[];for(;i;)o.push(i),i=l0(i);return o}function l0(i){const{parentNode:o}=i;return o&&o instanceof ShadowRoot?o.host:o}const e0=1,a0=2,n0=4,u0=8,eg=kh()==="coarse";let Gl=[],Ia=!1,aa=new Map,Ci=new Map;const In=new Set;function ag(i,o,s,f,h){var v;const{ownerDocument:_}=o,A={direction:s,element:o,hitAreaMargins:f,setResizeHandlerState:h},E=(v=aa.get(_))!==null&&v!==void 0?v:0;return aa.set(_,E+1),In.add(A),Ti(),function(){var G;Ci.delete(i),In.delete(A);const U=(G=aa.get(_))!==null&&G!==void 0?G:1;if(aa.set(_,U-1),Ti(),U===1&&aa.delete(_),Gl.includes(A)){const B=Gl.indexOf(A);B>=0&&Gl.splice(B,1),mo(),h("up",!0,null)}}}function ng(i){const{target:o}=i,{x:s,y:f}=Di(i);Ia=!0,yo({target:o,x:s,y:f}),Ti(),Gl.length>0&&(_i("down",i),i.preventDefault(),i0(o)||i.stopImmediatePropagation())}function lo(i){const{x:o,y:s}=Di(i);if(Ia&&i.buttons===0&&(Ia=!1,_i("up",i)),!Ia){const{target:f}=i;yo({target:f,x:o,y:s})}_i("move",i),mo(),Gl.length>0&&i.preventDefault()}function eo(i){const{target:o}=i,{x:s,y:f}=Di(i);Ci.clear(),Ia=!1,Gl.length>0&&(i.preventDefault(),i0(o)||i.stopImmediatePropagation()),_i("up",i),yo({target:o,x:s,y:f}),mo(),Ti()}function i0(i){let o=i;for(;o;){if(o.hasAttribute(Lt.resizeHandle))return!0;o=o.parentElement}return!1}function yo({target:i,x:o,y:s}){Gl.splice(0);let f=null;(i instanceof HTMLElement||i instanceof SVGElement)&&(f=i),In.forEach(h=>{const{element:v,hitAreaMargins:_}=h,A=v.getBoundingClientRect(),{bottom:E,left:S,right:G,top:U}=A,B=eg?_.coarse:_.fine;if(o>=S-B&&o<=G+B&&s>=U-B&&s<=E+B){if(f!==null&&document.contains(f)&&v!==f&&!v.contains(f)&&!f.contains(v)&&Ih(f,v)>0){let V=f,Y=!1;for(;V&&!V.contains(v);){if(Fh(V.getBoundingClientRect(),A)){Y=!0;break}V=V.parentElement}if(Y)return}Gl.push(h)}})}function ao(i,o){Ci.set(i,o)}function mo(){let i=!1,o=!1;Gl.forEach(f=>{const{direction:h}=f;h==="horizontal"?i=!0:o=!0});let s=0;Ci.forEach(f=>{s|=f}),i&&o?to("intersection",s):i?to("horizontal",s):o?to("vertical",s):Wh()}let no=new AbortController;function Ti(){no.abort(),no=new AbortController;const i={capture:!0,signal:no.signal};In.size&&(Ia?(Gl.length>0&&aa.forEach((o,s)=>{const{body:f}=s;o>0&&(f.addEventListener("contextmenu",eo,i),f.addEventListener("pointerleave",lo,i),f.addEventListener("pointermove",lo,i))}),window.addEventListener("pointerup",eo,i),window.addEventListener("pointercancel",eo,i)):aa.forEach((o,s)=>{const{body:f}=s;o>0&&(f.addEventListener("pointerdown",ng,i),f.addEventListener("pointermove",lo,i))}))}function _i(i,o){In.forEach(s=>{const{setResizeHandlerState:f}=s,h=Gl.includes(s);f(i,h,o)})}function ug(){const[i,o]=x.useState(0);return x.useCallback(()=>o(s=>s+1),[])}function ft(i,o){if(!i)throw console.error(o),Error(o)}function ia(i,o,s=so){return i.toFixed(s)===o.toFixed(s)?0:i>o?1:-1}function re(i,o,s=so){return ia(i,o,s)===0}function Tl(i,o,s){return ia(i,o,s)===0}function ig(i,o,s){if(i.length!==o.length)return!1;for(let f=0;f<i.length;f++){const h=i[f],v=o[f];if(!Tl(h,v,s))return!1}return!0}function ka({panelConstraints:i,panelIndex:o,size:s}){const f=i[o];ft(f!=null,`Panel constraints not found for index ${o}`);let{collapsedSize:h=0,collapsible:v,maxSize:_=100,minSize:A=0}=f;if(ia(s,A)<0)if(v){const E=(h+A)/2;ia(s,E)<0?s=h:s=A}else s=A;return s=Math.min(_,s),s=parseFloat(s.toFixed(so)),s}function kn({delta:i,initialLayout:o,panelConstraints:s,pivotIndices:f,prevLayout:h,trigger:v}){if(Tl(i,0))return o;const _=[...o],[A,E]=f;ft(A!=null,"Invalid first pivot index"),ft(E!=null,"Invalid second pivot index");let S=0;if(v==="keyboard"){{const U=i<0?E:A,B=s[U];ft(B,`Panel constraints not found for index ${U}`);const{collapsedSize:J=0,collapsible:V,minSize:Y=0}=B;if(V){const Z=o[U];if(ft(Z!=null,`Previous layout not found for panel index ${U}`),Tl(Z,J)){const K=Y-Z;ia(K,Math.abs(i))>0&&(i=i<0?0-K:K)}}}{const U=i<0?A:E,B=s[U];ft(B,`No panel constraints found for index ${U}`);const{collapsedSize:J=0,collapsible:V,minSize:Y=0}=B;if(V){const Z=o[U];if(ft(Z!=null,`Previous layout not found for panel index ${U}`),Tl(Z,Y)){const K=Z-J;ia(K,Math.abs(i))>0&&(i=i<0?0-K:K)}}}}{const U=i<0?1:-1;let B=i<0?E:A,J=0;for(;;){const Y=o[B];ft(Y!=null,`Previous layout not found for panel index ${B}`);const K=ka({panelConstraints:s,panelIndex:B,size:100})-Y;if(J+=K,B+=U,B<0||B>=s.length)break}const V=Math.min(Math.abs(i),Math.abs(J));i=i<0?0-V:V}{let B=i<0?A:E;for(;B>=0&&B<s.length;){const J=Math.abs(i)-Math.abs(S),V=o[B];ft(V!=null,`Previous layout not found for panel index ${B}`);const Y=V-J,Z=ka({panelConstraints:s,panelIndex:B,size:Y});if(!Tl(V,Z)&&(S+=V-Z,_[B]=Z,S.toPrecision(3).localeCompare(Math.abs(i).toPrecision(3),void 0,{numeric:!0})>=0))break;i<0?B--:B++}}if(ig(h,_))return h;{const U=i<0?E:A,B=o[U];ft(B!=null,`Previous layout not found for panel index ${U}`);const J=B+S,V=ka({panelConstraints:s,panelIndex:U,size:J});if(_[U]=V,!Tl(V,J)){let Y=J-V,K=i<0?E:A;for(;K>=0&&K<s.length;){const k=_[K];ft(k!=null,`Previous layout not found for panel index ${K}`);const I=k+Y,tt=ka({panelConstraints:s,panelIndex:K,size:I});if(Tl(k,tt)||(Y-=tt-k,_[K]=tt),Tl(Y,0))break;i>0?K--:K++}}}const G=_.reduce((U,B)=>B+U,0);return Tl(G,100)?_:h}function cg({layout:i,panelsArray:o,pivotIndices:s}){let f=0,h=100,v=0,_=0;const A=s[0];ft(A!=null,"No pivot index found"),o.forEach((U,B)=>{const{constraints:J}=U,{maxSize:V=100,minSize:Y=0}=J;B===A?(f=Y,h=V):(v+=Y,_+=V)});const E=Math.min(h,100-v),S=Math.max(f,100-_),G=i[A];return{valueMax:E,valueMin:S,valueNow:G}}function Pn(i,o=document){return Array.from(o.querySelectorAll(`[${Lt.resizeHandleId}][data-panel-group-id="${i}"]`))}function c0(i,o,s=document){const h=Pn(i,s).findIndex(v=>v.getAttribute(Lt.resizeHandleId)===o);return h??null}function f0(i,o,s){const f=c0(i,o,s);return f!=null?[f,f+1]:[-1,-1]}function o0(i,o=document){var s;if(o instanceof HTMLElement&&(o==null||(s=o.dataset)===null||s===void 0?void 0:s.panelGroupId)==i)return o;const f=o.querySelector(`[data-panel-group][data-panel-group-id="${i}"]`);return f||null}function Ri(i,o=document){const s=o.querySelector(`[${Lt.resizeHandleId}="${i}"]`);return s||null}function fg(i,o,s,f=document){var h,v,_,A;const E=Ri(o,f),S=Pn(i,f),G=E?S.indexOf(E):-1,U=(h=(v=s[G])===null||v===void 0?void 0:v.id)!==null&&h!==void 0?h:null,B=(_=(A=s[G+1])===null||A===void 0?void 0:A.id)!==null&&_!==void 0?_:null;return[U,B]}function og({committedValuesRef:i,eagerValuesRef:o,groupId:s,layout:f,panelDataArray:h,panelGroupElement:v,setLayout:_}){x.useRef({didWarnAboutMissingResizeHandle:!1}),ua(()=>{if(!v)return;const A=Pn(s,v);for(let E=0;E<h.length-1;E++){const{valueMax:S,valueMin:G,valueNow:U}=cg({layout:f,panelsArray:h,pivotIndices:[E,E+1]}),B=A[E];if(B!=null){const J=h[E];ft(J,`No panel data found for index "${E}"`),B.setAttribute("aria-controls",J.id),B.setAttribute("aria-valuemax",""+Math.round(S)),B.setAttribute("aria-valuemin",""+Math.round(G)),B.setAttribute("aria-valuenow",U!=null?""+Math.round(U):"")}}return()=>{A.forEach((E,S)=>{E.removeAttribute("aria-controls"),E.removeAttribute("aria-valuemax"),E.removeAttribute("aria-valuemin"),E.removeAttribute("aria-valuenow")})}},[s,f,h,v]),x.useEffect(()=>{if(!v)return;const A=o.current;ft(A,"Eager values not found");const{panelDataArray:E}=A,S=o0(s,v);ft(S!=null,`No group found for id "${s}"`);const G=Pn(s,v);ft(G,`No resize handles found for group id "${s}"`);const U=G.map(B=>{const J=B.getAttribute(Lt.resizeHandleId);ft(J,"Resize handle element has no handle id attribute");const[V,Y]=fg(s,J,E,v);if(V==null||Y==null)return()=>{};const Z=K=>{if(!K.defaultPrevented)switch(K.key){case"Enter":{K.preventDefault();const k=E.findIndex(I=>I.id===V);if(k>=0){const I=E[k];ft(I,`No panel data found for index ${k}`);const tt=f[k],{collapsedSize:nt=0,collapsible:W,minSize:q=0}=I.constraints;if(tt!=null&&W){const Et=kn({delta:Tl(tt,nt)?q-nt:nt-tt,initialLayout:f,panelConstraints:E.map(xt=>xt.constraints),pivotIndices:f0(s,J,v),prevLayout:f,trigger:"keyboard"});f!==Et&&_(Et)}}break}}};return B.addEventListener("keydown",Z),()=>{B.removeEventListener("keydown",Z)}});return()=>{U.forEach(B=>B())}},[v,i,o,s,f,h,_])}function qv(i,o){if(i.length!==o.length)return!1;for(let s=0;s<i.length;s++)if(i[s]!==o[s])return!1;return!0}function r0(i,o){const s=i==="horizontal",{x:f,y:h}=Di(o);return s?f:h}function rg(i,o,s,f,h){const v=s==="horizontal",_=Ri(o,h);ft(_,`No resize handle element found for id "${o}"`);const A=_.getAttribute(Lt.groupId);ft(A,"Resize handle element has no group id attribute");let{initialCursorPosition:E}=f;const S=r0(s,i),G=o0(A,h);ft(G,`No group element found for id "${A}"`);const U=G.getBoundingClientRect(),B=v?U.width:U.height;return(S-E)/B*100}function sg(i,o,s,f,h,v){if(Iv(i)){const _=s==="horizontal";let A=0;i.shiftKey?A=100:h!=null?A=h:A=10;let E=0;switch(i.key){case"ArrowDown":E=_?0:A;break;case"ArrowLeft":E=_?-A:0;break;case"ArrowRight":E=_?A:0;break;case"ArrowUp":E=_?0:-A;break;case"End":E=100;break;case"Home":E=-100;break}return E}else return f==null?0:rg(i,o,s,f,v)}function dg({panelDataArray:i}){const o=Array(i.length),s=i.map(v=>v.constraints);let f=0,h=100;for(let v=0;v<i.length;v++){const _=s[v];ft(_,`Panel constraints not found for index ${v}`);const{defaultSize:A}=_;A!=null&&(f++,o[v]=A,h-=A)}for(let v=0;v<i.length;v++){const _=s[v];ft(_,`Panel constraints not found for index ${v}`);const{defaultSize:A}=_;if(A!=null)continue;const E=i.length-f,S=h/E;f++,o[v]=S,h-=S}return o}function $a(i,o,s){o.forEach((f,h)=>{const v=i[h];ft(v,`Panel data not found for index ${h}`);const{callbacks:_,constraints:A,id:E}=v,{collapsedSize:S=0,collapsible:G}=A,U=s[E];if(U==null||f!==U){s[E]=f;const{onCollapse:B,onExpand:J,onResize:V}=_;V&&V(f,U),G&&(B||J)&&(J&&(U==null||re(U,S))&&!re(f,S)&&J(),B&&(U==null||!re(U,S))&&re(f,S)&&B())}})}function zi(i,o){if(i.length!==o.length)return!1;for(let s=0;s<i.length;s++)if(i[s]!=o[s])return!1;return!0}function vg({defaultSize:i,dragState:o,layout:s,panelData:f,panelIndex:h,precision:v=3}){const _=s[h];let A;return _==null?A=i!=null?i.toPrecision(v):"1":f.length===1?A="1":A=_.toPrecision(v),{flexBasis:0,flexGrow:A,flexShrink:1,overflow:"hidden",pointerEvents:o!==null?"none":void 0}}function yg(i,o=10){let s=null;return(...h)=>{s!==null&&clearTimeout(s),s=setTimeout(()=>{i(...h)},o)}}function Yv(i){try{if(typeof localStorage<"u")i.getItem=o=>localStorage.getItem(o),i.setItem=(o,s)=>{localStorage.setItem(o,s)};else throw new Error("localStorage not supported in this environment")}catch(o){console.error(o),i.getItem=()=>null,i.setItem=()=>{}}}function s0(i){return`react-resizable-panels:${i}`}function d0(i){return i.map(o=>{const{constraints:s,id:f,idIsFromProps:h,order:v}=o;return h?f:v?`${v}:${JSON.stringify(s)}`:JSON.stringify(s)}).sort((o,s)=>o.localeCompare(s)).join(",")}function v0(i,o){try{const s=s0(i),f=o.getItem(s);if(f){const h=JSON.parse(f);if(typeof h=="object"&&h!=null)return h}}catch{}return null}function mg(i,o,s){var f,h;const v=(f=v0(i,s))!==null&&f!==void 0?f:{},_=d0(o);return(h=v[_])!==null&&h!==void 0?h:null}function hg(i,o,s,f,h){var v;const _=s0(i),A=d0(o),E=(v=v0(i,h))!==null&&v!==void 0?v:{};E[A]={expandToSizes:Object.fromEntries(s.entries()),layout:f};try{h.setItem(_,JSON.stringify(E))}catch(S){console.error(S)}}function Gv({layout:i,panelConstraints:o}){const s=[...i],f=s.reduce((v,_)=>v+_,0);if(s.length!==o.length)throw Error(`Invalid ${o.length} panel layout: ${s.map(v=>`${v}%`).join(", ")}`);if(!Tl(f,100)&&s.length>0)for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=100/f*_;s[v]=A}let h=0;for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=ka({panelConstraints:o,panelIndex:v,size:_});_!=A&&(h+=_-A,s[v]=A)}if(!Tl(h,0))for(let v=0;v<o.length;v++){const _=s[v];ft(_!=null,`No layout data found for index ${v}`);const A=_+h,E=ka({panelConstraints:o,panelIndex:v,size:A});if(_!==E&&(h-=E-_,s[v]=E,Tl(h,0)))break}return s}const gg=100,Fn={getItem:i=>(Yv(Fn),Fn.getItem(i)),setItem:(i,o)=>{Yv(Fn),Fn.setItem(i,o)}},Lv={};function y0({autoSaveId:i=null,children:o,className:s="",direction:f,forwardedRef:h,id:v=null,onLayout:_=null,keyboardResizeBy:A=null,storage:E=Fn,style:S,tagName:G="div",...U}){const B=vo(v),J=x.useRef(null),[V,Y]=x.useState(null),[Z,K]=x.useState([]),k=ug(),I=x.useRef({}),tt=x.useRef(new Map),nt=x.useRef(0),W=x.useRef({autoSaveId:i,direction:f,dragState:V,id:B,keyboardResizeBy:A,onLayout:_,storage:E}),q=x.useRef({layout:Z,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(h,()=>({getId:()=>W.current.id,getLayout:()=>{const{layout:O}=q.current;return O},setLayout:O=>{const{onLayout:H}=W.current,{layout:X,panelDataArray:j}=q.current,L=Gv({layout:O,panelConstraints:j.map(F=>F.constraints)});qv(X,L)||(K(L),q.current.layout=L,H&&H(L),$a(j,L,I.current))}}),[]),ua(()=>{W.current.autoSaveId=i,W.current.direction=f,W.current.dragState=V,W.current.id=B,W.current.onLayout=_,W.current.storage=E}),og({committedValuesRef:W,eagerValuesRef:q,groupId:B,layout:Z,panelDataArray:q.current.panelDataArray,setLayout:K,panelGroupElement:J.current}),x.useEffect(()=>{const{panelDataArray:O}=q.current;if(i){if(Z.length===0||Z.length!==O.length)return;let H=Lv[i];H==null&&(H=yg(hg,gg),Lv[i]=H);const X=[...O],j=new Map(tt.current);H(i,X,j,Z,E)}},[i,Z,E]),x.useEffect(()=>{});const Et=x.useCallback(O=>{const{onLayout:H}=W.current,{layout:X,panelDataArray:j}=q.current;if(O.constraints.collapsible){const L=j.map(nl=>nl.constraints),{collapsedSize:F=0,panelSize:at,pivotIndices:Rt}=ea(j,O,X);if(ft(at!=null,`Panel size not found for panel "${O.id}"`),!re(at,F)){tt.current.set(O.id,at);const il=Wa(j,O)===j.length-1?at-F:F-at,Nt=kn({delta:il,initialLayout:X,panelConstraints:L,pivotIndices:Rt,prevLayout:X,trigger:"imperative-api"});zi(X,Nt)||(K(Nt),q.current.layout=Nt,H&&H(Nt),$a(j,Nt,I.current))}}},[]),xt=x.useCallback((O,H)=>{const{onLayout:X}=W.current,{layout:j,panelDataArray:L}=q.current;if(O.constraints.collapsible){const F=L.map(Jt=>Jt.constraints),{collapsedSize:at=0,panelSize:Rt=0,minSize:nl=0,pivotIndices:il}=ea(L,O,j),Nt=H??nl;if(re(Rt,at)){const Jt=tt.current.get(O.id),Vl=Jt!=null&&Jt>=Nt?Jt:Nt,Pa=Wa(L,O)===L.length-1?Rt-Vl:Vl-Rt,kt=kn({delta:Pa,initialLayout:j,panelConstraints:F,pivotIndices:il,prevLayout:j,trigger:"imperative-api"});zi(j,kt)||(K(kt),q.current.layout=kt,X&&X(kt),$a(L,kt,I.current))}}},[]),qt=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{panelSize:j}=ea(X,O,H);return ft(j!=null,`Panel size not found for panel "${O.id}"`),j},[]),bt=x.useCallback((O,H)=>{const{panelDataArray:X}=q.current,j=Wa(X,O);return vg({defaultSize:H,dragState:V,layout:Z,panelData:X,panelIndex:j})},[V,Z]),ot=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{collapsedSize:j=0,collapsible:L,panelSize:F}=ea(X,O,H);return ft(F!=null,`Panel size not found for panel "${O.id}"`),L===!0&&re(F,j)},[]),al=x.useCallback(O=>{const{layout:H,panelDataArray:X}=q.current,{collapsedSize:j=0,collapsible:L,panelSize:F}=ea(X,O,H);return ft(F!=null,`Panel size not found for panel "${O.id}"`),!L||ia(F,j)>0},[]),Ct=x.useCallback(O=>{const{panelDataArray:H}=q.current;H.push(O),H.sort((X,j)=>{const L=X.order,F=j.order;return L==null&&F==null?0:L==null?-1:F==null?1:L-F}),q.current.panelDataArrayChanged=!0,k()},[k]);ua(()=>{if(q.current.panelDataArrayChanged){q.current.panelDataArrayChanged=!1;const{autoSaveId:O,onLayout:H,storage:X}=W.current,{layout:j,panelDataArray:L}=q.current;let F=null;if(O){const Rt=mg(O,L,X);Rt&&(tt.current=new Map(Object.entries(Rt.expandToSizes)),F=Rt.layout)}F==null&&(F=dg({panelDataArray:L}));const at=Gv({layout:F,panelConstraints:L.map(Rt=>Rt.constraints)});qv(j,at)||(K(at),q.current.layout=at,H&&H(at),$a(L,at,I.current))}}),ua(()=>{const O=q.current;return()=>{O.layout=[]}},[]);const pt=x.useCallback(O=>{let H=!1;const X=J.current;return X&&window.getComputedStyle(X,null).getPropertyValue("direction")==="rtl"&&(H=!0),function(L){L.preventDefault();const F=J.current;if(!F)return()=>null;const{direction:at,dragState:Rt,id:nl,keyboardResizeBy:il,onLayout:Nt}=W.current,{layout:Jt,panelDataArray:Vl}=q.current,{initialLayout:se}=Rt??{},Pa=f0(nl,O,F);let kt=sg(L,O,at,Rt,il,F);const ca=at==="horizontal";ca&&H&&(kt=-kt);const tn=Vl.map(Ni=>Ni.constraints),Kl=kn({delta:kt,initialLayout:se??Jt,panelConstraints:tn,pivotIndices:Pa,prevLayout:Jt,trigger:Iv(L)?"keyboard":"mouse-or-touch"}),tu=!zi(Jt,Kl);(Pv(L)||t0(L))&&nt.current!=kt&&(nt.current=kt,!tu&&kt!==0?ca?ao(O,kt<0?e0:a0):ao(O,kt<0?n0:u0):ao(O,0)),tu&&(K(Kl),q.current.layout=Kl,Nt&&Nt(Kl),$a(Vl,Kl,I.current))}},[]),M=x.useCallback((O,H)=>{const{onLayout:X}=W.current,{layout:j,panelDataArray:L}=q.current,F=L.map(Jt=>Jt.constraints),{panelSize:at,pivotIndices:Rt}=ea(L,O,j);ft(at!=null,`Panel size not found for panel "${O.id}"`);const il=Wa(L,O)===L.length-1?at-H:H-at,Nt=kn({delta:il,initialLayout:j,panelConstraints:F,pivotIndices:Rt,prevLayout:j,trigger:"imperative-api"});zi(j,Nt)||(K(Nt),q.current.layout=Nt,X&&X(Nt),$a(L,Nt,I.current))},[]),Q=x.useCallback((O,H)=>{const{layout:X,panelDataArray:j}=q.current,{collapsedSize:L=0,collapsible:F}=H,{collapsedSize:at=0,collapsible:Rt,maxSize:nl=100,minSize:il=0}=O.constraints,{panelSize:Nt}=ea(j,O,X);Nt!=null&&(F&&Rt&&re(Nt,L)?re(L,at)||M(O,at):Nt<il?M(O,il):Nt>nl&&M(O,nl))},[M]),lt=x.useCallback((O,H)=>{const{direction:X}=W.current,{layout:j}=q.current;if(!J.current)return;const L=Ri(O,J.current);ft(L,`Drag handle element not found for id "${O}"`);const F=r0(X,H);Y({dragHandleId:O,dragHandleRect:L.getBoundingClientRect(),initialCursorPosition:F,initialLayout:j})},[]),mt=x.useCallback(()=>{Y(null)},[]),ht=x.useCallback(O=>{const{panelDataArray:H}=q.current,X=Wa(H,O);X>=0&&(H.splice(X,1),delete I.current[O.id],q.current.panelDataArrayChanged=!0,k())},[k]),m=x.useMemo(()=>({collapsePanel:Et,direction:f,dragState:V,expandPanel:xt,getPanelSize:qt,getPanelStyle:bt,groupId:B,isPanelCollapsed:ot,isPanelExpanded:al,reevaluatePanelConstraints:Q,registerPanel:Ct,registerResizeHandle:pt,resizePanel:M,startDragging:lt,stopDragging:mt,unregisterPanel:ht,panelGroupElement:J.current}),[Et,V,f,xt,qt,bt,B,ot,al,Q,Ct,pt,M,lt,mt,ht]),R={display:"flex",flexDirection:f==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(Oi.Provider,{value:m},x.createElement(G,{...U,children:o,className:s,id:v,ref:J,style:{...R,...S},[Lt.group]:"",[Lt.groupDirection]:f,[Lt.groupId]:B}))}const Sg=x.forwardRef((i,o)=>x.createElement(y0,{...i,forwardedRef:o}));y0.displayName="PanelGroup";Sg.displayName="forwardRef(PanelGroup)";function Wa(i,o){return i.findIndex(s=>s===o||s.id===o.id)}function ea(i,o,s){const f=Wa(i,o),v=f===i.length-1?[f-1,f]:[f,f+1],_=s[f];return{...o.constraints,panelSize:_,pivotIndices:v}}function bg({disabled:i,handleId:o,resizeHandler:s,panelGroupElement:f}){x.useEffect(()=>{if(i||s==null||f==null)return;const h=Ri(o,f);if(h==null)return;const v=_=>{if(!_.defaultPrevented)switch(_.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{_.preventDefault(),s(_);break}case"F6":{_.preventDefault();const A=h.getAttribute(Lt.groupId);ft(A,`No group element found for id "${A}"`);const E=Pn(A,f),S=c0(A,o,f);ft(S!==null,`No resize element found for id "${o}"`);const G=_.shiftKey?S>0?S-1:E.length-1:S+1<E.length?S+1:0;E[G].focus();break}}};return h.addEventListener("keydown",v),()=>{h.removeEventListener("keydown",v)}},[f,i,o,s])}function zg({children:i=null,className:o="",disabled:s=!1,hitAreaMargins:f,id:h,onBlur:v,onClick:_,onDragging:A,onFocus:E,onPointerDown:S,onPointerUp:G,style:U={},tabIndex:B=0,tagName:J="div",...V}){var Y,Z;const K=x.useRef(null),k=x.useRef({onClick:_,onDragging:A,onPointerDown:S,onPointerUp:G});x.useEffect(()=>{k.current.onClick=_,k.current.onDragging=A,k.current.onPointerDown=S,k.current.onPointerUp=G});const I=x.useContext(Oi);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:tt,groupId:nt,registerResizeHandle:W,startDragging:q,stopDragging:Et,panelGroupElement:xt}=I,qt=vo(h),[bt,ot]=x.useState("inactive"),[al,Ct]=x.useState(!1),[pt,M]=x.useState(null),Q=x.useRef({state:bt});ua(()=>{Q.current.state=bt}),x.useEffect(()=>{if(s)M(null);else{const m=W(qt);M(()=>m)}},[s,qt,W]);const lt=(Y=f?.coarse)!==null&&Y!==void 0?Y:15,mt=(Z=f?.fine)!==null&&Z!==void 0?Z:5;x.useEffect(()=>{if(s||pt==null)return;const m=K.current;ft(m,"Element ref not attached");let R=!1;return ag(qt,m,tt,{coarse:lt,fine:mt},(H,X,j)=>{if(!X){ot("inactive");return}switch(H){case"down":{ot("drag"),R=!1,ft(j,'Expected event to be defined for "down" action'),q(qt,j);const{onDragging:L,onPointerDown:F}=k.current;L?.(!0),F?.();break}case"move":{const{state:L}=Q.current;R=!0,L!=="drag"&&ot("hover"),ft(j,'Expected event to be defined for "move" action'),pt(j);break}case"up":{ot("hover"),Et();const{onClick:L,onDragging:F,onPointerUp:at}=k.current;F?.(!1),at?.(),R||L?.();break}}})},[lt,tt,s,mt,W,qt,pt,q,Et]),bg({disabled:s,handleId:qt,resizeHandler:pt,panelGroupElement:xt});const ht={touchAction:"none",userSelect:"none"};return x.createElement(J,{...V,children:i,className:o,id:h,onBlur:()=>{Ct(!1),v?.()},onFocus:()=>{Ct(!0),E?.()},ref:K,role:"separator",style:{...ht,...U},tabIndex:B,[Lt.groupDirection]:tt,[Lt.groupId]:nt,[Lt.resizeHandle]:"",[Lt.resizeHandleActive]:bt==="drag"?"pointer":al?"keyboard":void 0,[Lt.resizeHandleEnabled]:!s,[Lt.resizeHandleId]:qt,[Lt.resizeHandleState]:bt})}zg.displayName="PanelResizeHandle";export{wh as P,jm as R,_g as a,Vh as b,zg as c,Sg as d,Eg as e,qm as g,Ag as i,pg as j,x as r,Tg as u};
@@ -0,0 +1,4 @@
1
+ import{a as z}from"./index-DRShM2ob.js";import"./react-BoEjKzFZ.js";const R=/([A-Za-z][A-Za-z0-9_.:/-]*(?:\s+[A-Za-z][A-Za-z0-9_.:/-]*){0,7})\s*$/,C=new Set(["tabular","tabularx","tabulary","longtable","array","matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"]),q=new Set(["math","displaymath","equation","equation*","align","align*","alignat","alignat*","gather","gather*","multline","multline*","flalign","flalign*","tikzpicture","axis","scope","pgfonlayer","pgfpicture","tabular","tabularx","tabulary","longtable","array","matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","verbatim","Verbatim","lstlisting","minted","comment","algorithmic","alignat"]),w=new Set(["documentclass","usepackage","RequirePackage","includegraphics","tikzset","pgfplotsset","hypersetup","lstset","definecolor","colorlet","setlength","setcounter","draw","path","fill","filldraw","shade","node","addplot","color","textcolor","colorbox","pagecolor"]),E=new Set(["label","hypertarget","ref","pageref","autoref","nameref","hyperref","index","gls","Gls","glspl","Glspl","cite","citep","citet","citeauthor","citeyear","citenum","parencite","textcite","autocite","footcite"]),$=5,p=new Map,Z=12;let y=!1,x=null;class b extends Error{constructor(){super("A newer writing check replaced this request."),this.name="HarperLintSupersededError"}}function D(t){return t instanceof b}function m(t,n,e){e>n&&t.push({from:n,to:e})}function g(t,n,e,o){if(t[n]!==e)return null;let i=0;for(let r=n;r<t.length;r+=1){const s=t[r-1]==="\\"&&t[r-2]!=="\\";if(!s&&t[r]===e&&(i+=1),!s&&t[r]===o&&(i-=1,i===0))return{from:n,to:r+1,end:r+1}}return null}function u(t,n){let e=n;for(;e<t.length&&/[ \t\r\n]/.test(t[e]);)e+=1;return e}function O(t,n){if(t[n]!=="%")return!1;let e=0;for(let o=n-1;o>=0&&t[o]==="\\";o-=1)e+=1;return e%2===0}function j(t){return/[=,!/]/.test(t)||/\b(?:colorbar|legend|width|height|draw|fill|style|domain|samples|anchor|at|axis)\b/.test(t)}function P(t){return E.has(t)||/^cite[A-Za-z]*/.test(t)}function I(t,n){for(let e=t.indexOf("=");e>=0;e=t.indexOf("=",e+1)){const i=Math.max(...[`
2
+ `,"[","{","]","}",",",";"].map(a=>t.lastIndexOf(a,e-1)+1)),s=t.slice(i,e).match(R);s?.index!==void 0&&m(n,i+s.index,e);let l=e+1;for(;l<t.length&&/\s/.test(t[l]);)l+=1;let f=l;if(t[l]==="{")f=g(t,l,"{","}")?.end??l;else for(;f<t.length&&!/[,\]\}\n]/.test(t[f]);)f+=1;m(n,l,f)}}function B(t,n,e){const o=/\\(begin|end)\s*\{\s*([^{}]+?)\s*\}/g;o.lastIndex=n;let i=1;for(let r=o.exec(t);r;r=o.exec(t))if(r[2].trim()===e){if(r[1]==="begin")i+=1;else if(--i===0)return o.lastIndex}return null}function H(t,n){for(const e of t.matchAll(/\\\((?:\\.|[^])*?\\\)|\\\[(?:\\.|[^])*?\\\]/g))e.index!==void 0&&m(n,e.index,e.index+e[0].length);for(let e=0;e<t.length;e+=1){if(t[e]!=="$"||t[e-1]==="\\")continue;const o=t[e+1]==="$"?"$$":"$",i=t.indexOf(o,e+o.length);i>=0&&(m(n,e,i+o.length),e=i+o.length-1)}}function M(t){const n=[],e=/[A-Za-z@]/;for(let i=0;i<t.length;i+=1){if(O(t,i)){const a=t.indexOf(`
3
+ `,i);m(n,i,a<0?t.length:a),i=a<0?t.length:a;continue}if(t[i]!=="\\")continue;const r=i;let s=i+1;if(e.test(t[s]??""))for(;s<t.length&&/[A-Za-z@0-9:_]/.test(t[s]);)s+=1;else s<t.length&&(s+=1);const l=t.slice(i+1,s);m(n,r,s);let f=u(t,s);if(l==="begin"||l==="end"){const a=g(t,f,"{","}");if(a){m(n,a.from,a.to);const d=t.slice(a.from+1,a.to-1).trim();if(f=u(t,a.end),l==="begin"){const h=g(t,f,"[","]");if(h&&(m(n,h.from,h.to),f=u(t,h.end)),C.has(d)){const c=g(t,f,"{","}");c&&m(n,c.from,c.to)}if(q.has(d)){const c=B(t,a.end,d);if(c!==null){m(n,r,c),i=c-1;continue}}}}i=s-1;continue}if(P(l))for(t[f]==="*"&&(f=u(t,f+1));;){const a=g(t,f,"[","]")??g(t,f,"{","}");if(!a)break;m(n,a.from,a.to),f=u(t,a.end)}else{const a=g(t,f,"[","]");if(a&&(w.has(l)||j(t.slice(a.from+1,a.to-1)))&&(m(n,a.from,a.to),f=u(t,a.end)),w.has(l)){const d=l==="definecolor"||l==="colorlet"?3:1;for(let h=0;h<d;h+=1){const c=g(t,f,"{","}");if(!c)break;m(n,c.from,c.to),f=u(t,c.end)}}}i=s-1}H(t,n),I(t,n);for(const i of t.matchAll(/(?:https?|ftp):\/\/[^\s]+/gi))i.index!==void 0&&m(n,i.index,i.index+i[0].length);n.sort((i,r)=>i.from-r.from||i.to-r.to);const o=[];for(const i of n){const r=o.at(-1);r&&i.from<=r.to?r.to=Math.max(r.to,i.to):o.push({...i})}return o}function k(t){const n=M(t),e=[];let o=0,i=0;for(const r of t){for(;i<n.length&&n[i].to<=o;)i+=1;const s=n[i];e.push(s&&s.from<=o&&o<s.to&&r!==`
4
+ `&&r!=="\r"?" ":r),o+=r.length}return e.join("")}function T(t){const n=[0];let e=0;for(const o of t)e+=o.length,n.push(e);return n}function L(t){return[...new Set(t.map(n=>n.trim()).filter(Boolean))].sort((n,e)=>n.localeCompare(e)).join("\0")}async function V(t,n,e){return(await z(`/api/projects/${t}/spellcheck`,{method:"POST",body:JSON.stringify({path:n,source:e})})).lints}function K(t,n,e,o){const i={from:e.start,to:e.end},r={from:o[e.start]??-1,to:o[e.end]??-1},s=[i,r].filter((l,f,a)=>l.from>=0&&l.to>l.from&&l.to<=t.length&&a.findIndex(d=>d.from===l.from&&d.to===l.to)===f);return s.length===0?null:s.find(l=>n.slice(l.from,l.to)===e.problem)??s.find(l=>/[A-Za-z]/.test(n.slice(l.from,l.to)))??s[0]??null}function N(t,n,e,o){const i=K(t,n,e,o);if(!i)return null;const{from:r,to:s}=i;if(!/[A-Za-z]/.test(n.slice(r,s)))return null;const l=t.slice(r,s);if(!l.trim()||/[\\%$]/.test(l))return null;const f=e.kind==="Spelling"||e.kind==="Typo"?"spelling":"grammar",a=e.suggestions.filter((d,h,c)=>h<$&&c.indexOf(d)===h);return{from:r,to:s,word:l,kind:f,message:e.message,suggestions:a}}function S(t){let n=2166136261;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return`${t.length}:${n>>>0}`}function v(t,n){const e=S(t),o=p.get(e);return!o||o.source!==t||o.dictionary!==n?null:(p.delete(e),p.set(e,o),o.issues)}function _(t,n,e){const o=S(t);for(p.set(o,{source:t,dictionary:n,issues:e});p.size>Z;){const i=p.keys().next().value;if(i===void 0)break;p.delete(i)}}async function G(t,n,e){const o=L(n),i=v(t,o);if(i)return i;const r=k(t),s=T(t),l=new Set(n.map(a=>a.trim().toLocaleLowerCase("en-US")).filter(Boolean)),f=e.map(a=>N(t,r,a,s)).filter(a=>!!a).filter(a=>a.kind!=="spelling"||!l.has(a.word.trim().toLocaleLowerCase("en-US"))).sort((a,d)=>a.from-d.from||a.to-d.to);return _(t,o,f),f}async function U(t,n,e,o){const i=L(o),r=v(e,i);if(r)return r;const s=k(e),l=await V(t,n,s);return G(e,o,l)}async function A(){if(y||!x)return;const t=x;x=null,y=!0;try{t.resolve(await U(t.projectId,t.path,t.source,t.customWords))}catch(n){t.reject(n)}finally{y=!1,A()}}function F(t,n,e,o=[]){return new Promise((i,r)=>{x?.reject(new b),x={projectId:t,path:n,source:e,customWords:[...o],resolve:i,reject:r},A()})}export{b as HarperLintSupersededError,M as ignoredRanges,D as isHarperLintSupersededError,F as lintLatex,G as mapLatexLints,k as maskLatexSource};
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/iosevka@5.2.5/400.css" />
11
11
  <link rel="icon" type="image/svg+xml" href="/logo.svg" />
12
12
  <title>TexLite</title>
13
- <script type="module" crossorigin src="/assets/index-BQCB3z5H.js"></script>
14
- <link rel="modulepreload" crossorigin href="/assets/react-CsO_xvbl.js">
15
- <link rel="stylesheet" crossorigin href="/assets/index-BnvpaWsa.css">
13
+ <script type="module" crossorigin src="/assets/index-DRShM2ob.js"></script>
14
+ <link rel="modulepreload" crossorigin href="/assets/react-BoEjKzFZ.js">
15
+ <link rel="stylesheet" crossorigin href="/assets/index-DzcH7hBu.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
@@ -21,7 +21,16 @@ export function reanchorFileComments(db, projectId, filePath, oldSource, newSour
21
21
  let start = clamp(dmp.diff_xIndex(diffs, oldStart), 0, newSource.length);
22
22
  let end = clamp(dmp.diff_xIndex(diffs, oldEnd), start, newSource.length);
23
23
  let orphaned = false;
24
- if (oldEnd > oldStart && end === start) {
24
+ // A diff-mapped range is only trustworthy when it still contains the
25
+ // exact text that the author selected. A replacement can preserve a
26
+ // non-empty range while changing every character, which otherwise makes
27
+ // a comment silently point at an unrelated piece of source.
28
+ const hasSelectedRange = oldEnd > oldStart || comment.selected_text.length > 0;
29
+ const originalTextMatches = !hasSelectedRange || oldSource.slice(oldStart, oldEnd) === comment.selected_text;
30
+ if (hasSelectedRange && !originalTextMatches) {
31
+ orphaned = true;
32
+ }
33
+ else if (hasSelectedRange && newSource.slice(start, end) !== comment.selected_text) {
25
34
  const relocated = nearestContextualMatch(newSource, comment.selected_text, start, comment.context_before, comment.context_after);
26
35
  if (relocated === null) {
27
36
  orphaned = true;
@@ -31,6 +40,8 @@ export function reanchorFileComments(db, projectId, filePath, oldSource, newSour
31
40
  end = relocated + comment.selected_text.length;
32
41
  }
33
42
  }
43
+ if (hasSelectedRange && !comment.selected_text)
44
+ orphaned = true;
34
45
  const anchor = anchorAt(newSource, start, end, orphaned);
35
46
  update.run(orphaned ? comment.selected_text : anchor.selectedText, anchor.startOffset, anchor.endOffset, anchor.contextBefore, anchor.contextAfter, Number(anchor.orphaned), new Date().toISOString(), comment.id);
36
47
  }
@@ -67,6 +78,16 @@ function nearestContextualMatch(source, selected, expected, contextBefore, conte
67
78
  const before = source.slice(Math.max(0, found - contextBefore.length), found);
68
79
  const after = source.slice(found + selected.length, found + selected.length + contextAfter.length);
69
80
  const contextScore = commonSuffixLength(before, contextBefore) + commonPrefixLength(after, contextAfter);
81
+ // Do not relocate based solely on proximity. A repeated word with no
82
+ // matching context is ambiguous and must be surfaced as orphaned.
83
+ const availableContext = contextBefore.length + contextAfter.length;
84
+ if (availableContext === 0)
85
+ return null;
86
+ const minimumContext = Math.min(4, availableContext);
87
+ if (contextScore < minimumContext) {
88
+ cursor = found + Math.max(1, selected.length);
89
+ continue;
90
+ }
70
91
  const rank = contextScore * 1000 - distance;
71
92
  if (rank > bestRank) {
72
93
  best = found;