@profoundlogic/coderflow-server 0.7.7 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/coder-server.js +1 -1
  2. package/dist/config.js +1 -1
  3. package/dist/lib/agent-keepalive.js +1 -1
  4. package/dist/lib/agent-models.js +1 -1
  5. package/dist/lib/api-keys.js +1 -1
  6. package/dist/lib/apiKeys.js +1 -1
  7. package/dist/lib/app-server-ports.js +1 -1
  8. package/dist/lib/auto-judge.js +1 -1
  9. package/dist/lib/automation-service.js +1 -1
  10. package/dist/lib/basic-auth.js +1 -1
  11. package/dist/lib/bindings.js +1 -1
  12. package/dist/lib/build-history.js +1 -1
  13. package/dist/lib/build-output-service.js +1 -1
  14. package/dist/lib/build-scheduler.js +1 -1
  15. package/dist/lib/build-service.js +1 -1
  16. package/dist/lib/ca-certificates.js +1 -1
  17. package/dist/lib/claude-oauth-refresh.js +1 -1
  18. package/dist/lib/cli/build.js +1 -1
  19. package/dist/lib/cli/cleanup-users.js +1 -1
  20. package/dist/lib/cli/config-command.js +1 -1
  21. package/dist/lib/cli/config.js +1 -1
  22. package/dist/lib/cli/create-user.js +1 -1
  23. package/dist/lib/cli/grant-admin.js +1 -1
  24. package/dist/lib/cli/init.js +1 -1
  25. package/dist/lib/cli/jira.js +1 -1
  26. package/dist/lib/cli/license.js +1 -1
  27. package/dist/lib/cli/list-roles.js +1 -1
  28. package/dist/lib/cli/list-users.js +1 -1
  29. package/dist/lib/cli/server-manager.js +1 -1
  30. package/dist/lib/cli/set-password.js +1 -1
  31. package/dist/lib/compression-filter.js +1 -0
  32. package/dist/lib/config-migration.js +1 -1
  33. package/dist/lib/container-credential-sync.js +1 -1
  34. package/dist/lib/container-tokens.js +1 -1
  35. package/dist/lib/data-dir.js +1 -1
  36. package/dist/lib/deployment-history.js +1 -1
  37. package/dist/lib/deployment-service.js +1 -1
  38. package/dist/lib/docker-utils.js +1 -1
  39. package/dist/lib/email.js +1 -1
  40. package/dist/lib/emailTemplates.js +1 -1
  41. package/dist/lib/entitlement.js +1 -1
  42. package/dist/lib/external-connections.js +1 -1
  43. package/dist/lib/fetch-utils.js +1 -1
  44. package/dist/lib/git-commit-details-route.js +1 -1
  45. package/dist/lib/git-history-diff-guardrails.js +1 -1
  46. package/dist/lib/git-provider-service.js +1 -1
  47. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -1
  48. package/dist/lib/git-provider-setup/index.js +1 -1
  49. package/dist/lib/git-provider-setup/setup-factory.js +1 -1
  50. package/dist/lib/git-provider-setup/setup-interface.js +1 -1
  51. package/dist/lib/git-providers/azure-devops-provider.js +1 -1
  52. package/dist/lib/git-providers/github-app-provider.js +1 -1
  53. package/dist/lib/git-providers/index.js +1 -1
  54. package/dist/lib/git-providers/provider-factory.js +1 -1
  55. package/dist/lib/git-providers/provider-interface.js +1 -1
  56. package/dist/lib/github-urls.js +1 -1
  57. package/dist/lib/group-objective-linking.js +1 -1
  58. package/dist/lib/ibmi-sync.js +1 -1
  59. package/dist/lib/jira-client.js +1 -1
  60. package/dist/lib/judge-blinding.js +1 -1
  61. package/dist/lib/logger.js +1 -1
  62. package/dist/lib/memory-utils.js +1 -1
  63. package/dist/lib/migration-to-scoped-rbac.js +1 -1
  64. package/dist/lib/model-fetcher.js +1 -1
  65. package/dist/lib/notifications.js +1 -1
  66. package/dist/lib/objective-context.js +1 -1
  67. package/dist/lib/oidc-auth.js +1 -1
  68. package/dist/lib/oidc-device-flow.js +1 -1
  69. package/dist/lib/passwordTokens.js +1 -1
  70. package/dist/lib/permission-resolver.js +1 -1
  71. package/dist/lib/pin-cascade.js +1 -1
  72. package/dist/lib/provider-accounts.js +1 -1
  73. package/dist/lib/provider-oauth.js +1 -1
  74. package/dist/lib/provider-profile.js +1 -1
  75. package/dist/lib/provider-token-refresh.js +1 -1
  76. package/dist/lib/rbac-user-state.js +1 -1
  77. package/dist/lib/request-url.js +1 -1
  78. package/dist/lib/rewind.js +1 -1
  79. package/dist/lib/role-definitions.js +1 -1
  80. package/dist/lib/roles.js +1 -1
  81. package/dist/lib/secrets.js +1 -1
  82. package/dist/lib/setup-repo-git-auth.js +1 -1
  83. package/dist/lib/state-capture.js +1 -1
  84. package/dist/lib/static-files.js +1 -1
  85. package/dist/lib/task-aliases.js +1 -1
  86. package/dist/lib/task-name-format.js +1 -1
  87. package/dist/lib/task-name-generator.js +1 -1
  88. package/dist/lib/task-source-metadata.js +1 -1
  89. package/dist/lib/teams.js +1 -1
  90. package/dist/lib/user-git-oauth.js +1 -1
  91. package/dist/lib/user-git-tokens.js +1 -1
  92. package/dist/lib/users.js +1 -1
  93. package/dist/middleware/requireAuth.js +1 -1
  94. package/dist/middleware/requireInit.js +1 -1
  95. package/dist/middleware/requirePermission.js +1 -1
  96. package/dist/package.json +1 -1
  97. package/dist/playwright.config.js +1 -1
  98. package/dist/playwright.task-terminal.config.js +1 -1
  99. package/dist/routes/apiKeys.js +1 -1
  100. package/dist/routes/auth-oidc.js +1 -1
  101. package/dist/routes/auth.js +1 -1
  102. package/dist/routes/automations.js +1 -1
  103. package/dist/routes/bindings.js +1 -1
  104. package/dist/routes/build.js +1 -1
  105. package/dist/routes/containers.js +1 -1
  106. package/dist/routes/deploy-task.js +1 -1
  107. package/dist/routes/environment-management.js +1 -1
  108. package/dist/routes/environments.js +1 -1
  109. package/dist/routes/external-skills.js +1 -1
  110. package/dist/routes/git-credentials.js +1 -1
  111. package/dist/routes/git-oauth.js +1 -1
  112. package/dist/routes/git-provider-setup.js +1 -1
  113. package/dist/routes/health.js +1 -1
  114. package/dist/routes/jira.js +1 -1
  115. package/dist/routes/logs.js +1 -0
  116. package/dist/routes/objective-management.js +1 -1
  117. package/dist/routes/password.js +1 -1
  118. package/dist/routes/prompt.js +1 -1
  119. package/dist/routes/provider-auth.js +1 -1
  120. package/dist/routes/qa.js +1 -1
  121. package/dist/routes/roles.js +1 -1
  122. package/dist/routes/settings.js +1 -1
  123. package/dist/routes/skill-management.js +1 -1
  124. package/dist/routes/skills.js +1 -1
  125. package/dist/routes/stats.js +1 -0
  126. package/dist/routes/tasks.js +1 -1
  127. package/dist/routes/teams.js +1 -1
  128. package/dist/routes/templates.js +1 -1
  129. package/dist/routes/test-task.js +1 -1
  130. package/dist/routes/test.js +1 -1
  131. package/dist/routes/users.js +1 -1
  132. package/dist/routes/visualizations.js +1 -1
  133. package/dist/scripts/create-user.js +1 -1
  134. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  135. package/dist/start.js +1 -1
  136. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  137. package/dist/web-ui/public/activity-feed.js +1 -1
  138. package/dist/web-ui/public/activity-formatters.js +1 -1
  139. package/dist/web-ui/public/admin.css +682 -0
  140. package/dist/web-ui/public/admin.html +648 -0
  141. package/dist/web-ui/public/admin.js +1 -0
  142. package/dist/web-ui/public/agent-event-parser.js +1 -1
  143. package/dist/web-ui/public/app.js +1 -1
  144. package/dist/web-ui/public/approve-dialog.js +1 -1
  145. package/dist/web-ui/public/automation-links.js +1 -1
  146. package/dist/web-ui/public/automation-schedule.js +1 -1
  147. package/dist/web-ui/public/comments-widget.js +1 -1
  148. package/dist/web-ui/public/diff-utils.js +1 -1
  149. package/dist/web-ui/public/environments.html +3 -3
  150. package/dist/web-ui/public/environments.js +1 -1
  151. package/dist/web-ui/public/feedback-widget.js +1 -1
  152. package/dist/web-ui/public/file-selection-tree.js +1 -1
  153. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  154. package/dist/web-ui/public/git-history.html +2 -2
  155. package/dist/web-ui/public/git-history.js +1 -1
  156. package/dist/web-ui/public/git-status.js +1 -1
  157. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  158. package/dist/web-ui/public/index.html +2 -170
  159. package/dist/web-ui/public/index.js +1 -1
  160. package/dist/web-ui/public/login.js +1 -1
  161. package/dist/web-ui/public/markdown-editor.js +1 -1
  162. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  163. package/dist/web-ui/public/modal-maximize.js +1 -1
  164. package/dist/web-ui/public/notifications.js +1 -1
  165. package/dist/web-ui/public/permissions.js +1 -1
  166. package/dist/web-ui/public/pr-dialog.js +1 -1
  167. package/dist/web-ui/public/roles.html +2 -2
  168. package/dist/web-ui/public/roles.js +1 -1
  169. package/dist/web-ui/public/settings.html +66 -4
  170. package/dist/web-ui/public/settings.js +1 -1
  171. package/dist/web-ui/public/setup-password.js +1 -1
  172. package/dist/web-ui/public/skills.html +2 -2
  173. package/dist/web-ui/public/skills.js +1 -1
  174. package/dist/web-ui/public/sse-client.js +1 -1
  175. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  176. package/dist/web-ui/public/styles.css +10 -2
  177. package/dist/web-ui/public/task-judging-helpers.js +1 -1
  178. package/dist/web-ui/public/task.js +1 -1
  179. package/dist/web-ui/public/teams.html +2 -2
  180. package/dist/web-ui/public/teams.js +1 -1
  181. package/dist/web-ui/public/terminal.js +1 -1
  182. package/dist/web-ui/public/theme.js +1 -1
  183. package/dist/web-ui/public/users.html +2 -2
  184. package/dist/web-ui/public/users.js +1 -1
  185. package/dist/web-ui/public/variant-grouping.js +1 -1
  186. package/package.json +1 -1
  187. package/dist/web-ui/public/server-health.js +0 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0x705e92){return _0x705e92==='test'||_0x705e92==='deploy';}export function createApproveDialogHTML(_0x1cf5d9='',_0x151e12={}){const _0x80b94b=_0x1cf5d9,_0x3a7a60=_0x151e12['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x42ed45=_0x151e12['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x5eee23=_0x151e12['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'approve-modal\x22\x20class=\x22'+_0x3a7a60+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x80b94b+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'approve-warning\x22\x20class=\x22'+_0x42ed45+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x80b94b+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'approve-error\x22\x20class=\x22'+_0x5eee23+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x80b94b+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x80b94b+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x80b94b+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x80b94b+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x80b94b+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x80b94b+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x80b94b+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit\x20(rebase)</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x80b94b+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x80b94b+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x80b94b+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x80b94b+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x80b94b+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x80b94b+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x80b94b+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x80b94b+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x80b94b+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x80b94b+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x80b94b+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x80b94b+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x80b94b+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x80b94b+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x80b94b+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x80b94b+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x5ab291={}){this['prefix']=_0x5ab291['prefix']||'',this['onApprove']=_0x5ab291['onApprove'],this['onSync']=_0x5ab291['onSync'],this['onSuccess']=_0x5ab291['onSuccess'],this['onError']=_0x5ab291['onError'],this['onCreatePR']=_0x5ab291['onCreatePR'],this['showToast']=_0x5ab291['showToast']||(()=>{}),this['container']=_0x5ab291['container']||document['body'],this['useTaskPageStyles']=_0x5ab291['useTaskPageStyles']||![],this['baseUrl']=_0x5ab291['baseUrl']||'',this['coderflowAttribution']=_0x5ab291['coderflowAttribution'],this['onSyncToIbmi']=_0x5ab291['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x5ab291['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}['init'](){if(this['initialized'])return;const _0x1ed833=document['createElement']('div');_0x1ed833['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x1ed833['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x1ea041){return document['getElementById'](''+this['prefix']+_0x1ea041);}['_bindEvents'](){const _0x29dac6=this['_el']('approve-modal'),_0x5c4804=this['_el']('close-approve-modal'),_0xc09d0=this['_el']('cancel-approve'),_0x310e7f=this['_el']('confirm-approve'),_0x10f0c3=_0x29dac6?.['querySelector']('.modal-overlay'),_0x5bda23=this['_el']('create-new-branch'),_0x3d4c44=this['_el']('new-branch-input-container'),_0x37132e=this['_el']('new-branch-name'),_0x54e8ba=this['_el']('push-after-commit'),_0x2a96d1=this['_el']('create-pull-request'),_0x1192e8=this['_el']('pr-hint');_0x5c4804?.['addEventListener']('click',()=>this['hide']()),_0xc09d0?.['addEventListener']('click',()=>this['hide']()),_0x10f0c3?.['addEventListener']('click',()=>this['hide']()),_0x310e7f?.['addEventListener']('click',()=>this['_handleApprove']());_0x5bda23&&_0x5bda23['addEventListener']('change',()=>{_0x3d4c44&&(_0x3d4c44['hidden']=!_0x5bda23['checked']),_0x5bda23['checked']&&_0x37132e&&_0x37132e['focus']();});_0x2a96d1&&_0x54e8ba&&_0x5bda23&&(_0x2a96d1['addEventListener']('change',()=>{this['_createPR']=_0x2a96d1['checked'];if(_0x2a96d1['checked']){_0x54e8ba['checked']=!![],_0x54e8ba['disabled']=!![],_0x5bda23['checked']=!![],_0x5bda23['disabled']=!![];_0x3d4c44&&(_0x3d4c44['hidden']=![]);if(_0x1192e8)_0x1192e8['hidden']=![];}else{_0x54e8ba['disabled']=![],_0x5bda23['disabled']=![];if(_0x1192e8)_0x1192e8['hidden']=!![];}}),_0x54e8ba['addEventListener']('change',()=>{if(!_0x54e8ba['checked']&&_0x2a96d1['checked']){_0x2a96d1['checked']=![],this['_createPR']=![],_0x54e8ba['disabled']=![],_0x5bda23['disabled']=![];if(_0x1192e8)_0x1192e8['hidden']=!![];}}));const _0x24e331=this['_el']('sync-to-ibmi');_0x24e331&&_0x24e331['addEventListener']('change',async _0x3b6377=>{const _0x35b68a=this['_el']('ibmi-sync-fields');if(_0x35b68a)_0x35b68a['hidden']=!_0x3b6377['target']['checked'];if(_0x3b6377['target']['checked']){const _0x2a62c8=this['_el']('ibmi-sync-library'),_0x3b4760=localStorage['getItem']('coderflow_ibmi_sync_library');_0x3b4760&&_0x2a62c8&&!_0x2a62c8['value']&&(_0x2a62c8['value']=_0x3b4760);const _0xf92266=this['_el']('ibmi-sync-user');if(_0xf92266&&!_0xf92266['value']){const _0x36fe22=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x36fe22)_0xf92266['value']=_0x36fe22;}const _0x3e1fc5=this['_el']('ibmi-sync-password');if(_0x3e1fc5)_0x3e1fc5['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x43f3d5=>{_0x43f3d5['key']==='Escape'&&_0x29dac6&&!_0x29dac6['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x47ee52=this['_el']('ibmi-sync-file-tree'),_0x33fe2e=this['_el']('ibmi-sync-files-summary');if(!_0x47ee52)return;_0x47ee52['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x33fe2e)_0x33fe2e['textContent']='';try{const {files:_0x459c8b,absolutePaths:_0x2ebbb6}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x459c8b,this['_syncAbsolutePaths']=_0x2ebbb6;if(_0x459c8b['length']===0x0){_0x47ee52['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x572547}=await import('./file-selection-tree.js'),{validateIbmiFile:_0xbc4928,hasKnownIbmiExtension:_0x5c675b}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x572547({'container':_0x47ee52,'files':_0x459c8b,'isPreselected':_0x3d6d79=>{const {valid:_0x47893c}=_0xbc4928(_0x3d6d79);return _0x47893c&&_0x5c675b(_0x3d6d79);},'isDisabled':_0x1d2a4c=>{const {valid:_0x48fc03,reason:_0x2d542e}=_0xbc4928(_0x1d2a4c);return{'disabled':!_0x48fc03,'reason':_0x2d542e};},'isAutoCheckEligible':_0x22a2a0=>{const {valid:_0x44d6be}=_0xbc4928(_0x22a2a0);return _0x44d6be&&_0x5c675b(_0x22a2a0);},'onChange':_0x520301=>{_0x33fe2e&&(_0x33fe2e['textContent']=_0x520301['length']+'\x20of\x20'+_0x459c8b['length']+'\x20file'+(_0x459c8b['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x2cb58d){_0x47ee52['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x12666a){const _0x384329=this['_el']('approve-error'),_0x43468b=this['_el']('approve-error-text');_0x384329&&_0x43468b&&(_0x43468b['textContent']=_0x12666a,_0x384329['hidden']=![],_0x384329['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x1c9918=this['_el']('approve-error'),_0x6fe8bb=this['_el']('approve-error-text');_0x1c9918&&_0x6fe8bb&&(_0x1c9918['hidden']=!![],_0x6fe8bb['textContent']='');}['_displayBranchInfo'](_0x10d6fb,_0x4f5a5d={}){const _0x2ebfbc=this['_el']('approve-branches');if(!_0x2ebfbc)return;const _0xf0f3ca=[];for(const _0x49139b of _0x10d6fb){_0x4f5a5d[_0x49139b['name']]&&_0xf0f3ca['push']({'repo':_0x49139b['name'],'branch':_0x4f5a5d[_0x49139b['name']]});}if(_0xf0f3ca['length']>0x0){_0x2ebfbc['hidden']=![];if(_0xf0f3ca['length']===0x1)_0x2ebfbc['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0xf0f3ca[0x0]['branch']+'</code></div>';else{const _0x3db50f=_0xf0f3ca['map'](_0x3cb6ce=>'<div\x20class=\x22branch-item\x22><strong>'+_0x3cb6ce['repo']+':</strong>\x20<code>'+_0x3cb6ce['branch']+'</code></div>')['join']('');_0x2ebfbc['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x3db50f+'</div></div>';}}else _0x2ebfbc['hidden']=!![],_0x2ebfbc['innerHTML']='';}['showWarning'](_0x310d4e){const _0x4d11ab=this['_el']('approve-warning'),_0x2d4dd8=this['_el']('approve-warning-text');_0x4d11ab&&_0x2d4dd8&&(_0x2d4dd8['textContent']=_0x310d4e,_0x4d11ab['hidden']=![]);}['hideWarning'](){const _0x18d54a=this['_el']('approve-warning'),_0x575730=this['_el']('approve-warning-text');_0x18d54a&&_0x575730&&(_0x18d54a['hidden']=!![],_0x575730['textContent']='');}['_stripCoAuthoredByLines'](_0x126820){return _0x126820['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x5f4ece){try{let _0x181551;try{const _0x56937d=await fetch(this['baseUrl']+'/settings');if(_0x56937d['ok']){const _0x11ab58=await _0x56937d['json']();_0x181551=_0x11ab58['coderflow_attribution']!==![];}}catch(_0x20056e){}_0x181551===undefined&&(this['coderflowAttribution']!==undefined?_0x181551=this['coderflowAttribution']!==![]:_0x181551=!![]);const _0x4ebddc=this['_stripCoAuthoredByLines'](_0x5f4ece);if(!_0x181551)return _0x4ebddc;const _0xb3e480='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x4ebddc+_0xb3e480;}catch(_0x36dcc2){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x36dcc2),_0x5f4ece;}}['show'](_0x27f8a2){!this['initialized']&&this['init']();this['taskData']=_0x27f8a2;const _0x235302=this['_el']('approve-modal'),_0x184ef0=this['_el']('commit-message-input'),_0x44d5c3=this['_el']('pull-before-commit'),_0x2648a1=this['_el']('push-after-commit'),_0x39839d=this['_el']('create-new-branch'),_0x1609fb=this['_el']('new-branch-input-container'),_0x2b2f1f=this['_el']('new-branch-name'),_0x18d4c9=this['_el']('approve-repo-name'),_0x4fa8b4=this['_el']('approve-stats'),_0x598281=this['_el']('multi-repo-note');if(!_0x235302)return;this['hideError'](),this['hideWarning']();_0x27f8a2['warning']&&this['showWarning'](_0x27f8a2['warning']);const _0x32dbba=_0x27f8a2['reposChanged']||[];if(_0x32dbba['length']===0x0&&!_0x27f8a2['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x32dbba,_0x27f8a2);const _0x57b33d=_0x27f8a2['commitMessage']||'',_0x4bf740=this['_stripCoAuthoredByLines'](_0x57b33d);_0x184ef0['value']=_0x4bf740;if(_0x44d5c3)_0x44d5c3['checked']=!![];if(_0x2648a1)_0x2648a1['checked']=!![];_0x39839d&&(_0x39839d['checked']=![]);_0x1609fb&&(_0x1609fb['hidden']=!![]);_0x2b2f1f&&(_0x2b2f1f['value']='');if(_0x2648a1)_0x2648a1['disabled']=![];if(_0x39839d)_0x39839d['disabled']=![];this['updatePRSupport'](_0x27f8a2['prSupported']===!![]);const _0x17b17c=this['_el']('ibmi-sync-section');if(_0x17b17c){_0x17b17c['hidden']=!_0x27f8a2['ibmiSyncAvailable'];const _0x32267d=this['_el']('sync-to-ibmi'),_0x39912b=this['_el']('ibmi-sync-fields'),_0x47469c=this['_el']('ibmi-sync-library');if(_0x32267d)_0x32267d['checked']=![];if(_0x39912b)_0x39912b['hidden']=!![];if(_0x47469c)_0x47469c['value']='';const _0xd92e4b=this['_el']('ibmi-sync-credentials-row');_0xd92e4b&&(_0xd92e4b['hidden']=!(_0x27f8a2['ibmiSyncAvailable']&&_0x27f8a2['syncCredentials']==='prompt'));}const _0x1f8f46=this['_el']('confirm-approve');_0x27f8a2['syncFirst']&&this['onSync']?(_0x1f8f46&&(_0x1f8f46['disabled']=!![],_0x1f8f46['textContent']='Syncing...'),this['_performSync']()):_0x1f8f46&&(_0x1f8f46['disabled']=![],_0x1f8f46['textContent']='Commit\x20Changes');_0x235302['hidden']=![];const _0x1393d7=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x1393d7,'taskId':_0x27f8a2['taskId'],'originalCommitMessage':_0x4bf740}),setTimeout(()=>{_0x184ef0['focus'](),_0x184ef0['setSelectionRange'](0x0,_0x184ef0['value']['length']);},0x64);}['updatePRSupport'](_0x463e49){const _0x4db73a=this['_el']('pr-option-section'),_0x1e77aa=this['_el']('create-pull-request'),_0xc436c8=this['_el']('pr-hint'),_0x39cd88=this['_el']('push-after-commit'),_0x52f21e=this['_el']('create-new-branch');if(!_0x4db73a)return;if(_0x463e49){_0x4db73a['hidden']=![];_0x1e77aa&&!_0x1e77aa['disabled']&&(_0x1e77aa['checked']=![]);if(_0xc436c8)_0xc436c8['hidden']=!![];this['_createPR']=![];return;}_0x1e77aa?.['checked']&&(_0x1e77aa['checked']=![]);if(_0xc436c8)_0xc436c8['hidden']=!![];if(_0x39cd88)_0x39cd88['disabled']=![];if(_0x52f21e)_0x52f21e['disabled']=![];this['_createPR']=![],_0x4db73a['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x46d88d,taskId:_0x20883e,originalCommitMessage:_0x5a8e1c}){const _0x1e4324=this['_el']('commit-message-input');if(!_0x1e4324)return;const _0x41daa9=await this['_addAttributionIfEnabled'](_0x5a8e1c);if(_0x46d88d!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x20883e)return;if(!this['isVisible']())return;const _0x1023ca=_0x71323f=>_0x71323f['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x1023ca(_0x1e4324['value'])!==_0x1023ca(_0x5a8e1c))return;_0x1e4324['value']=_0x41daa9;}['_updateDisplay'](_0x5a0049,_0x37bcf4){const _0x11c157=this['_el']('approve-repo-name'),_0x4739e8=this['_el']('approve-stats'),_0x4f4e38=this['_el']('multi-repo-note');if(_0x5a0049['length']===0x0){if(_0x11c157)_0x11c157['textContent']='Syncing...';if(_0x4739e8)_0x4739e8['textContent']='';if(_0x4f4e38)_0x4f4e38['hidden']=!![];return;}const _0x3a8446=_0x5a0049['reduce']((_0x1d4b6b,_0xa8b561)=>_0x1d4b6b+(_0xa8b561['files_changed']||0x0),0x0),_0x5501fb=_0x5a0049['reduce']((_0x12b1c9,_0x2a1014)=>_0x12b1c9+(_0x2a1014['lines_added']||0x0),0x0),_0x5b5bf3=_0x5a0049['reduce']((_0x5be3c1,_0x836123)=>_0x5be3c1+(_0x836123['lines_deleted']||0x0),0x0);if(_0x5a0049['length']===0x1){if(_0x11c157)_0x11c157['textContent']=_0x5a0049[0x0]?.['name']||'repository';if(_0x4f4e38)_0x4f4e38['hidden']=!![];}else{const _0x2e0d2c=_0x5a0049['map'](_0x54bacd=>_0x54bacd['name'])['join'](',\x20');if(_0x11c157)_0x11c157['textContent']=_0x5a0049['length']+'\x20repositories:\x20'+_0x2e0d2c;if(_0x4f4e38)_0x4f4e38['hidden']=![];}_0x4739e8&&(_0x4739e8['textContent']=_0x3a8446+'\x20file'+(_0x3a8446===0x1?'':'s')+'\x20changed\x20(+'+_0x5501fb+'\x20-'+_0x5b5bf3+')'),this['_displayBranchInfo'](_0x5a0049,_0x37bcf4?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x214077=this['_el']('confirm-approve');try{const _0x2d35fe=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x2d35fe['repos_changed']){const _0x197499=this['taskData']['reposChanged']?.['length']||0x0,_0x1b6831=this['taskData']['reposChanged']?.['reduce']((_0x4a497c,_0x33fb9c)=>_0x4a497c+(_0x33fb9c['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x2d35fe['repos_changed'];if(_0x2d35fe['current_branches']){const _0x545407={...this['taskData']['branches']||{}};for(const [_0x12195f,_0x3f91ca]of Object['entries'](_0x2d35fe['current_branches'])){_0x3f91ca?_0x545407[_0x12195f]=_0x3f91ca:delete _0x545407[_0x12195f];}this['taskData']['branches']=_0x545407;}this['_updateDisplay'](_0x2d35fe['repos_changed'],this['taskData']);const _0x170548=_0x2d35fe['repos_changed']['length'],_0x4a596d=_0x2d35fe['repos_changed']['reduce']((_0x5a514d,_0x445334)=>_0x5a514d+(_0x445334['files_changed']||0x0),0x0);(_0x4a596d>_0x1b6831||_0x170548>_0x197499)&&this['showWarning'](this['taskData']['warning']?this['taskData']['warning']+'\x20Additional\x20changes\x20detected\x20since\x20last\x20sync.':'Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.');}_0x214077&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x214077['disabled']=!![],_0x214077['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x214077['disabled']=![],_0x214077['textContent']='Commit\x20Changes'));}catch(_0x4340a3){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x4340a3);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x4340a3['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x214077&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x214077['disabled']=![],_0x214077['textContent']='Commit\x20Changes'):(_0x214077['disabled']=!![],_0x214077['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x3534c8=this['_el']('approve-modal');_0x3534c8&&(_0x3534c8['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x36644d=this['_el']('commit-message-input'),_0x1a90cc=this['_el']('pull-before-commit'),_0x116904=this['_el']('push-after-commit'),_0x35271e=this['_el']('create-new-branch'),_0x596628=this['_el']('new-branch-name'),_0x222c7c=this['_el']('confirm-approve'),_0x228bd9=_0x36644d['value']['trim'](),_0x47ae5f=_0x1a90cc?.['checked']??!![],_0x328dd6=_0x116904?.['checked']??!![],_0x3ccd52=_0x35271e?.['checked']||![],_0x431fab=_0x596628?.['value']['trim']()||'';this['hideError']();if(!_0x228bd9){this['showError']('Commit\x20message\x20is\x20required'),_0x36644d['focus']();return;}if(_0x3ccd52&&!_0x431fab){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x596628?.['focus']();return;}if(_0x3ccd52&&_0x431fab){const _0x5afc42=/[\s~^:?*\[\\]/;if(_0x5afc42['test'](_0x431fab)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x596628?.['focus']();return;}}const _0x1c8fc9=this['_el']('sync-to-ibmi')?.['checked'];if(_0x1c8fc9){const _0x2841ed=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x2841ed){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x4f29b=this['_syncFileTree']['getSelectedFiles']();if(_0x4f29b['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x57484d=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x57484d){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x2f4ebc=this['_el']('ibmi-sync-password')?.['value'];if(!_0x2f4ebc){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x2c1ddb=_0x222c7c?.['textContent']||'Commit\x20Changes';_0x222c7c&&(_0x222c7c['disabled']=!![],_0x3ccd52?_0x222c7c['textContent']='Creating\x20branch\x20&\x20committing...':_0x222c7c['textContent']=_0x47ae5f?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x628263={'commit_message':_0x228bd9,'pull':_0x47ae5f,'push':_0x328dd6};_0x3ccd52&&_0x431fab&&(_0x628263['new_branch']=_0x431fab);let _0x2dcc9a=null;this['onApprove']&&(_0x2dcc9a=await this['onApprove'](this['taskData']['taskId'],_0x628263));let _0x15a1e7='Changes\x20committed';if(_0x3ccd52)_0x15a1e7='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x431fab+'\x27',_0x328dd6&&(_0x15a1e7+='\x20and\x20pushed');else{if(_0x47ae5f&&_0x328dd6)_0x15a1e7='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x47ae5f)_0x15a1e7='Changes\x20pulled\x20and\x20committed';else _0x328dd6&&(_0x15a1e7='Changes\x20committed\x20and\x20pushed');}}const _0x18aa34=this['_el']('sync-to-ibmi')?.['checked'];let _0x12a040=null,_0x1c35f0=null,_0x3e9ace=null,_0x559306=null;if(_0x18aa34&&this['onSyncToIbmi']){_0x12a040=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x1c35f0=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x3e9ace=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x2530b1=this['_syncFileTree']['getSelectedFiles']();_0x559306=_0x2530b1['map'](_0x291163=>{const _0x44b0be=this['_syncRelativeFiles']['indexOf'](_0x291163);return _0x44b0be>=0x0?this['_syncAbsolutePaths'][_0x44b0be]:_0x291163;});}}this['showToast'](_0x15a1e7,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x2dcc9a||{});}catch(_0x3f895d){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x3f895d);}if(_0x18aa34&&this['onSyncToIbmi']&&_0x12a040){localStorage['setItem']('coderflow_ibmi_sync_library',_0x12a040);if(_0x1c35f0)localStorage['setItem']('coderflow_ibmi_sync_user',_0x1c35f0);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x12a040,_0x1c35f0,_0x3e9ace,_0x559306);}catch(_0x181942){this['showToast']('Sync\x20failed:\x20'+_0x181942['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x3408fa){console['error']('Failed\x20to\x20approve\x20changes',_0x3408fa),this['showError']('Failed\x20to\x20commit:\x20'+_0x3408fa['message']),_0x222c7c&&(_0x222c7c['disabled']=![],_0x222c7c['textContent']=_0x2c1ddb),this['onError']&&this['onError'](_0x3408fa);}}['isVisible'](){const _0x645076=this['_el']('approve-modal');return _0x645076&&!_0x645076['hidden'];}['destroy'](){const _0x4b45a0=this['_el']('approve-modal');_0x4b45a0&&_0x4b45a0['remove'](),this['initialized']=![];}}export function getApproveState(_0x4b348b,_0x29b243){if(!_0x4b348b)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x4b348b['taskType']))return{'canApprove':![],'reason':(_0x4b348b['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x2689d8=_0x29b243?.['repos_changed']?.['length']>0x0,_0x1947e7=_0x4b348b['status']==='completed'||_0x4b348b['status']==='failed'||_0x4b348b['status']==='interrupted',_0x4bf6a1=_0x4b348b['containerState']==='running',_0x5b5a55=_0x4b348b['approvedBy']!==undefined&&_0x4b348b['approvedBy']!==null;if(_0x5b5a55){const _0x5bd054=_0x4b348b['approvedBy']['name']||_0x4b348b['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x5bd054};}if(!_0x2689d8)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x1947e7)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x4b348b['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x4bf6a1)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
1
+ function isLogOnlyTaskType(_0x2e82af){return _0x2e82af==='test'||_0x2e82af==='deploy';}export function createApproveDialogHTML(_0x53ede1='',_0x5dac42={}){const _0x1da364=_0x53ede1,_0x1c1007=_0x5dac42['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x3ae13b=_0x5dac42['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x14372a=_0x5dac42['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'approve-modal\x22\x20class=\x22'+_0x1c1007+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x1da364+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'approve-warning\x22\x20class=\x22'+_0x3ae13b+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x1da364+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'approve-error\x22\x20class=\x22'+_0x14372a+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x1da364+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x1da364+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x1da364+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x1da364+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x1da364+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x1da364+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x1da364+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit\x20(rebase)</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x1da364+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x1da364+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x1da364+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x1da364+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x1da364+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x1da364+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x1da364+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x1da364+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x1da364+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x1da364+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x1da364+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x1da364+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x1da364+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x1da364+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x1da364+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x1da364+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x30db08={}){this['prefix']=_0x30db08['prefix']||'',this['onApprove']=_0x30db08['onApprove'],this['onSync']=_0x30db08['onSync'],this['onSuccess']=_0x30db08['onSuccess'],this['onError']=_0x30db08['onError'],this['onCreatePR']=_0x30db08['onCreatePR'],this['showToast']=_0x30db08['showToast']||(()=>{}),this['container']=_0x30db08['container']||document['body'],this['useTaskPageStyles']=_0x30db08['useTaskPageStyles']||![],this['baseUrl']=_0x30db08['baseUrl']||'',this['coderflowAttribution']=_0x30db08['coderflowAttribution'],this['onSyncToIbmi']=_0x30db08['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x30db08['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}['init'](){if(this['initialized'])return;const _0x1a4c6c=document['createElement']('div');_0x1a4c6c['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x1a4c6c['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x6f101c){return document['getElementById'](''+this['prefix']+_0x6f101c);}['_bindEvents'](){const _0x19e200=this['_el']('approve-modal'),_0x4799a8=this['_el']('close-approve-modal'),_0x9115cc=this['_el']('cancel-approve'),_0x5dd6fc=this['_el']('confirm-approve'),_0x5270ac=_0x19e200?.['querySelector']('.modal-overlay'),_0x1ca05b=this['_el']('create-new-branch'),_0x2a8ae6=this['_el']('new-branch-input-container'),_0x606676=this['_el']('new-branch-name'),_0x1a22fc=this['_el']('push-after-commit'),_0xaa05a2=this['_el']('create-pull-request'),_0x21d1c8=this['_el']('pr-hint');_0x4799a8?.['addEventListener']('click',()=>this['hide']()),_0x9115cc?.['addEventListener']('click',()=>this['hide']()),_0x5270ac?.['addEventListener']('click',()=>this['hide']()),_0x5dd6fc?.['addEventListener']('click',()=>this['_handleApprove']());_0x1ca05b&&_0x1ca05b['addEventListener']('change',()=>{_0x2a8ae6&&(_0x2a8ae6['hidden']=!_0x1ca05b['checked']),_0x1ca05b['checked']&&_0x606676&&_0x606676['focus']();});_0xaa05a2&&_0x1a22fc&&_0x1ca05b&&(_0xaa05a2['addEventListener']('change',()=>{this['_createPR']=_0xaa05a2['checked'];if(_0xaa05a2['checked']){_0x1a22fc['checked']=!![],_0x1a22fc['disabled']=!![],_0x1ca05b['checked']=!![],_0x1ca05b['disabled']=!![];_0x2a8ae6&&(_0x2a8ae6['hidden']=![]);if(_0x21d1c8)_0x21d1c8['hidden']=![];}else{_0x1a22fc['disabled']=![],_0x1ca05b['disabled']=![];if(_0x21d1c8)_0x21d1c8['hidden']=!![];}}),_0x1a22fc['addEventListener']('change',()=>{if(!_0x1a22fc['checked']&&_0xaa05a2['checked']){_0xaa05a2['checked']=![],this['_createPR']=![],_0x1a22fc['disabled']=![],_0x1ca05b['disabled']=![];if(_0x21d1c8)_0x21d1c8['hidden']=!![];}}));const _0x266454=this['_el']('sync-to-ibmi');_0x266454&&_0x266454['addEventListener']('change',async _0x2e2f3e=>{const _0x170175=this['_el']('ibmi-sync-fields');if(_0x170175)_0x170175['hidden']=!_0x2e2f3e['target']['checked'];if(_0x2e2f3e['target']['checked']){const _0x57d1ad=this['_el']('ibmi-sync-library'),_0x522df3=localStorage['getItem']('coderflow_ibmi_sync_library');_0x522df3&&_0x57d1ad&&!_0x57d1ad['value']&&(_0x57d1ad['value']=_0x522df3);const _0x18d020=this['_el']('ibmi-sync-user');if(_0x18d020&&!_0x18d020['value']){const _0x58b817=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x58b817)_0x18d020['value']=_0x58b817;}const _0x5c58f0=this['_el']('ibmi-sync-password');if(_0x5c58f0)_0x5c58f0['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x10b0c8=>{_0x10b0c8['key']==='Escape'&&_0x19e200&&!_0x19e200['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x15c6f1=this['_el']('ibmi-sync-file-tree'),_0x2a99e2=this['_el']('ibmi-sync-files-summary');if(!_0x15c6f1)return;_0x15c6f1['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x2a99e2)_0x2a99e2['textContent']='';try{const {files:_0x3ad52b,absolutePaths:_0x5d11ac}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x3ad52b,this['_syncAbsolutePaths']=_0x5d11ac;if(_0x3ad52b['length']===0x0){_0x15c6f1['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x2f5185}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x11276c,hasKnownIbmiExtension:_0x4d165e}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x2f5185({'container':_0x15c6f1,'files':_0x3ad52b,'isPreselected':_0x5cab9c=>{const {valid:_0x36bcfc}=_0x11276c(_0x5cab9c);return _0x36bcfc&&_0x4d165e(_0x5cab9c);},'isDisabled':_0x281e7b=>{const {valid:_0x104a6d,reason:_0x105c54}=_0x11276c(_0x281e7b);return{'disabled':!_0x104a6d,'reason':_0x105c54};},'isAutoCheckEligible':_0x23eb86=>{const {valid:_0x51eab4}=_0x11276c(_0x23eb86);return _0x51eab4&&_0x4d165e(_0x23eb86);},'onChange':_0x478f34=>{_0x2a99e2&&(_0x2a99e2['textContent']=_0x478f34['length']+'\x20of\x20'+_0x3ad52b['length']+'\x20file'+(_0x3ad52b['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x53d6f4){_0x15c6f1['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x1b47e2){const _0x4d5015=this['_el']('approve-error'),_0x1fcaa6=this['_el']('approve-error-text');_0x4d5015&&_0x1fcaa6&&(_0x1fcaa6['textContent']=_0x1b47e2,_0x4d5015['hidden']=![],_0x4d5015['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x5be430=this['_el']('approve-error'),_0x56569a=this['_el']('approve-error-text');_0x5be430&&_0x56569a&&(_0x5be430['hidden']=!![],_0x56569a['textContent']='');}['_displayBranchInfo'](_0x1668ed,_0xc54903={}){const _0x10bab2=this['_el']('approve-branches');if(!_0x10bab2)return;const _0x27ab11=[];for(const _0x49cc96 of _0x1668ed){_0xc54903[_0x49cc96['name']]&&_0x27ab11['push']({'repo':_0x49cc96['name'],'branch':_0xc54903[_0x49cc96['name']]});}if(_0x27ab11['length']>0x0){_0x10bab2['hidden']=![];if(_0x27ab11['length']===0x1)_0x10bab2['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x27ab11[0x0]['branch']+'</code></div>';else{const _0x55676d=_0x27ab11['map'](_0x498070=>'<div\x20class=\x22branch-item\x22><strong>'+_0x498070['repo']+':</strong>\x20<code>'+_0x498070['branch']+'</code></div>')['join']('');_0x10bab2['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x55676d+'</div></div>';}}else _0x10bab2['hidden']=!![],_0x10bab2['innerHTML']='';}['showWarning'](_0x336dbf){const _0x1fbbc4=this['_el']('approve-warning'),_0x1cff1b=this['_el']('approve-warning-text');_0x1fbbc4&&_0x1cff1b&&(_0x1cff1b['textContent']=_0x336dbf,_0x1fbbc4['hidden']=![]);}['hideWarning'](){const _0x5e10dd=this['_el']('approve-warning'),_0x498ea4=this['_el']('approve-warning-text');_0x5e10dd&&_0x498ea4&&(_0x5e10dd['hidden']=!![],_0x498ea4['textContent']='');}['_stripCoAuthoredByLines'](_0x475e8b){return _0x475e8b['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x5f0e1c){try{let _0x5c2f01;try{const _0x2ab7f3=await fetch(this['baseUrl']+'/settings');if(_0x2ab7f3['ok']){const _0x4075f3=await _0x2ab7f3['json']();_0x5c2f01=_0x4075f3['coderflow_attribution']!==![];}}catch(_0x18e0d9){}_0x5c2f01===undefined&&(this['coderflowAttribution']!==undefined?_0x5c2f01=this['coderflowAttribution']!==![]:_0x5c2f01=!![]);const _0x2673bf=this['_stripCoAuthoredByLines'](_0x5f0e1c);if(!_0x5c2f01)return _0x2673bf;const _0x3055c0='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x2673bf+_0x3055c0;}catch(_0x5b8748){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x5b8748),_0x5f0e1c;}}['show'](_0x32432){!this['initialized']&&this['init']();this['taskData']=_0x32432;const _0x522dd3=this['_el']('approve-modal'),_0x1cc09c=this['_el']('commit-message-input'),_0x2cc990=this['_el']('pull-before-commit'),_0x3aa22e=this['_el']('push-after-commit'),_0x5befb1=this['_el']('create-new-branch'),_0x175f11=this['_el']('new-branch-input-container'),_0x242636=this['_el']('new-branch-name'),_0xb8d6fe=this['_el']('approve-repo-name'),_0x29d5c6=this['_el']('approve-stats'),_0x43acf4=this['_el']('multi-repo-note');if(!_0x522dd3)return;this['hideError'](),this['hideWarning']();_0x32432['warning']&&this['showWarning'](_0x32432['warning']);const _0x3fc112=_0x32432['reposChanged']||[];if(_0x3fc112['length']===0x0&&!_0x32432['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x3fc112,_0x32432);const _0x33fffd=_0x32432['commitMessage']||'',_0x53ab30=this['_stripCoAuthoredByLines'](_0x33fffd);_0x1cc09c['value']=_0x53ab30;if(_0x2cc990)_0x2cc990['checked']=!![];if(_0x3aa22e)_0x3aa22e['checked']=!![];_0x5befb1&&(_0x5befb1['checked']=![]);_0x175f11&&(_0x175f11['hidden']=!![]);_0x242636&&(_0x242636['value']='');if(_0x3aa22e)_0x3aa22e['disabled']=![];if(_0x5befb1)_0x5befb1['disabled']=![];this['updatePRSupport'](_0x32432['prSupported']===!![]);const _0xe64f85=this['_el']('ibmi-sync-section');if(_0xe64f85){_0xe64f85['hidden']=!_0x32432['ibmiSyncAvailable'];const _0x9c25aa=this['_el']('sync-to-ibmi'),_0x4f9ba1=this['_el']('ibmi-sync-fields'),_0x52bd8b=this['_el']('ibmi-sync-library');if(_0x9c25aa)_0x9c25aa['checked']=![];if(_0x4f9ba1)_0x4f9ba1['hidden']=!![];if(_0x52bd8b)_0x52bd8b['value']='';const _0x41bed3=this['_el']('ibmi-sync-credentials-row');_0x41bed3&&(_0x41bed3['hidden']=!(_0x32432['ibmiSyncAvailable']&&_0x32432['syncCredentials']==='prompt'));}const _0x1667d3=this['_el']('confirm-approve');_0x32432['syncFirst']&&this['onSync']?(_0x1667d3&&(_0x1667d3['disabled']=!![],_0x1667d3['textContent']='Syncing...'),this['_performSync']()):_0x1667d3&&(_0x1667d3['disabled']=![],_0x1667d3['textContent']='Commit\x20Changes');_0x522dd3['hidden']=![];const _0x1d306a=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x1d306a,'taskId':_0x32432['taskId'],'originalCommitMessage':_0x53ab30}),setTimeout(()=>{_0x1cc09c['focus'](),_0x1cc09c['setSelectionRange'](0x0,_0x1cc09c['value']['length']);},0x64);}['updatePRSupport'](_0x13acfa){const _0x397d52=this['_el']('pr-option-section'),_0x4a681d=this['_el']('create-pull-request'),_0x3f017c=this['_el']('pr-hint'),_0xb9e070=this['_el']('push-after-commit'),_0x3f13a7=this['_el']('create-new-branch');if(!_0x397d52)return;if(_0x13acfa){_0x397d52['hidden']=![];_0x4a681d&&!_0x4a681d['disabled']&&(_0x4a681d['checked']=![]);if(_0x3f017c)_0x3f017c['hidden']=!![];this['_createPR']=![];return;}_0x4a681d?.['checked']&&(_0x4a681d['checked']=![]);if(_0x3f017c)_0x3f017c['hidden']=!![];if(_0xb9e070)_0xb9e070['disabled']=![];if(_0x3f13a7)_0x3f13a7['disabled']=![];this['_createPR']=![],_0x397d52['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0xcd47f6,taskId:_0x41ebf8,originalCommitMessage:_0x2c2276}){const _0x1e126c=this['_el']('commit-message-input');if(!_0x1e126c)return;const _0x307e5f=await this['_addAttributionIfEnabled'](_0x2c2276);if(_0xcd47f6!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x41ebf8)return;if(!this['isVisible']())return;const _0x37b581=_0x4c445e=>_0x4c445e['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x37b581(_0x1e126c['value'])!==_0x37b581(_0x2c2276))return;_0x1e126c['value']=_0x307e5f;}['_updateDisplay'](_0x119c98,_0x5ecdec){const _0x5dbd4b=this['_el']('approve-repo-name'),_0x85fd69=this['_el']('approve-stats'),_0x2e8c49=this['_el']('multi-repo-note');if(_0x119c98['length']===0x0){if(_0x5dbd4b)_0x5dbd4b['textContent']='Syncing...';if(_0x85fd69)_0x85fd69['textContent']='';if(_0x2e8c49)_0x2e8c49['hidden']=!![];return;}const _0x27fe05=_0x119c98['reduce']((_0x4c454f,_0x5e76d2)=>_0x4c454f+(_0x5e76d2['files_changed']||0x0),0x0),_0x10110c=_0x119c98['reduce']((_0x43530f,_0x50b303)=>_0x43530f+(_0x50b303['lines_added']||0x0),0x0),_0x315f00=_0x119c98['reduce']((_0x165b23,_0x470b70)=>_0x165b23+(_0x470b70['lines_deleted']||0x0),0x0);if(_0x119c98['length']===0x1){if(_0x5dbd4b)_0x5dbd4b['textContent']=_0x119c98[0x0]?.['name']||'repository';if(_0x2e8c49)_0x2e8c49['hidden']=!![];}else{const _0x29971d=_0x119c98['map'](_0x4c1787=>_0x4c1787['name'])['join'](',\x20');if(_0x5dbd4b)_0x5dbd4b['textContent']=_0x119c98['length']+'\x20repositories:\x20'+_0x29971d;if(_0x2e8c49)_0x2e8c49['hidden']=![];}_0x85fd69&&(_0x85fd69['textContent']=_0x27fe05+'\x20file'+(_0x27fe05===0x1?'':'s')+'\x20changed\x20(+'+_0x10110c+'\x20-'+_0x315f00+')'),this['_displayBranchInfo'](_0x119c98,_0x5ecdec?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x38c876=this['_el']('confirm-approve');try{const _0x4011a7=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x4011a7['repos_changed']){const _0x2c261b=this['taskData']['reposChanged']?.['length']||0x0,_0x525a93=this['taskData']['reposChanged']?.['reduce']((_0x44f53c,_0x317a60)=>_0x44f53c+(_0x317a60['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x4011a7['repos_changed'];if(_0x4011a7['current_branches']){const _0x58e0dd={...this['taskData']['branches']||{}};for(const [_0x49e57a,_0x462bd1]of Object['entries'](_0x4011a7['current_branches'])){_0x462bd1?_0x58e0dd[_0x49e57a]=_0x462bd1:delete _0x58e0dd[_0x49e57a];}this['taskData']['branches']=_0x58e0dd;}this['_updateDisplay'](_0x4011a7['repos_changed'],this['taskData']);const _0x284648=_0x4011a7['repos_changed']['length'],_0x52e13f=_0x4011a7['repos_changed']['reduce']((_0x823ef2,_0x2e89e0)=>_0x823ef2+(_0x2e89e0['files_changed']||0x0),0x0);(_0x52e13f>_0x525a93||_0x284648>_0x2c261b)&&this['showWarning'](this['taskData']['warning']?this['taskData']['warning']+'\x20Additional\x20changes\x20detected\x20since\x20last\x20sync.':'Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.');}_0x38c876&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x38c876['disabled']=!![],_0x38c876['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x38c876['disabled']=![],_0x38c876['textContent']='Commit\x20Changes'));}catch(_0xc0d8c8){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0xc0d8c8);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0xc0d8c8['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x38c876&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x38c876['disabled']=![],_0x38c876['textContent']='Commit\x20Changes'):(_0x38c876['disabled']=!![],_0x38c876['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x4cfae3=this['_el']('approve-modal');_0x4cfae3&&(_0x4cfae3['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x485904=this['_el']('commit-message-input'),_0x1d43bd=this['_el']('pull-before-commit'),_0xd0f035=this['_el']('push-after-commit'),_0x4663c9=this['_el']('create-new-branch'),_0x4523eb=this['_el']('new-branch-name'),_0x3a0001=this['_el']('confirm-approve'),_0x16c254=_0x485904['value']['trim'](),_0x3412ef=_0x1d43bd?.['checked']??!![],_0xc80bd2=_0xd0f035?.['checked']??!![],_0x4dee30=_0x4663c9?.['checked']||![],_0x4080d6=_0x4523eb?.['value']['trim']()||'';this['hideError']();if(!_0x16c254){this['showError']('Commit\x20message\x20is\x20required'),_0x485904['focus']();return;}if(_0x4dee30&&!_0x4080d6){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x4523eb?.['focus']();return;}if(_0x4dee30&&_0x4080d6){const _0x10560f=/[\s~^:?*\[\\]/;if(_0x10560f['test'](_0x4080d6)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x4523eb?.['focus']();return;}}const _0x291147=this['_el']('sync-to-ibmi')?.['checked'];if(_0x291147){const _0x319280=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x319280){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x54748c=this['_syncFileTree']['getSelectedFiles']();if(_0x54748c['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x23983d=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x23983d){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x3bf851=this['_el']('ibmi-sync-password')?.['value'];if(!_0x3bf851){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x436f55=_0x3a0001?.['textContent']||'Commit\x20Changes';_0x3a0001&&(_0x3a0001['disabled']=!![],_0x4dee30?_0x3a0001['textContent']='Creating\x20branch\x20&\x20committing...':_0x3a0001['textContent']=_0x3412ef?'Pulling\x20&\x20Committing...':'Committing...');try{const _0xc1fbfa={'commit_message':_0x16c254,'pull':_0x3412ef,'push':_0xc80bd2};_0x4dee30&&_0x4080d6&&(_0xc1fbfa['new_branch']=_0x4080d6);let _0x39bedd=null;this['onApprove']&&(_0x39bedd=await this['onApprove'](this['taskData']['taskId'],_0xc1fbfa));let _0x540b9b='Changes\x20committed';if(_0x4dee30)_0x540b9b='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x4080d6+'\x27',_0xc80bd2&&(_0x540b9b+='\x20and\x20pushed');else{if(_0x3412ef&&_0xc80bd2)_0x540b9b='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x3412ef)_0x540b9b='Changes\x20pulled\x20and\x20committed';else _0xc80bd2&&(_0x540b9b='Changes\x20committed\x20and\x20pushed');}}const _0x4b3743=this['_el']('sync-to-ibmi')?.['checked'];let _0x4539e6=null,_0x30c78a=null,_0x5bdd65=null,_0x4afd09=null;if(_0x4b3743&&this['onSyncToIbmi']){_0x4539e6=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x30c78a=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x5bdd65=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x2cfff2=this['_syncFileTree']['getSelectedFiles']();_0x4afd09=_0x2cfff2['map'](_0x33fc7f=>{const _0x191423=this['_syncRelativeFiles']['indexOf'](_0x33fc7f);return _0x191423>=0x0?this['_syncAbsolutePaths'][_0x191423]:_0x33fc7f;});}}this['showToast'](_0x540b9b,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x39bedd||{});}catch(_0x1503de){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x1503de);}if(_0x4b3743&&this['onSyncToIbmi']&&_0x4539e6){localStorage['setItem']('coderflow_ibmi_sync_library',_0x4539e6);if(_0x30c78a)localStorage['setItem']('coderflow_ibmi_sync_user',_0x30c78a);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x4539e6,_0x30c78a,_0x5bdd65,_0x4afd09);}catch(_0x3799da){this['showToast']('Sync\x20failed:\x20'+_0x3799da['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x449e0a){console['error']('Failed\x20to\x20approve\x20changes',_0x449e0a),this['showError']('Failed\x20to\x20commit:\x20'+_0x449e0a['message']),_0x3a0001&&(_0x3a0001['disabled']=![],_0x3a0001['textContent']=_0x436f55),this['onError']&&this['onError'](_0x449e0a);}}['isVisible'](){const _0x4eb1dc=this['_el']('approve-modal');return _0x4eb1dc&&!_0x4eb1dc['hidden'];}['destroy'](){const _0x55551e=this['_el']('approve-modal');_0x55551e&&_0x55551e['remove'](),this['initialized']=![];}}export function getApproveState(_0x17b73e,_0x2a76a6){if(!_0x17b73e)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x17b73e['taskType']))return{'canApprove':![],'reason':(_0x17b73e['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x108475=_0x2a76a6?.['repos_changed']?.['length']>0x0,_0x12b7d9=_0x17b73e['status']==='completed'||_0x17b73e['status']==='failed'||_0x17b73e['status']==='interrupted',_0x577dcb=_0x17b73e['containerState']==='running',_0x5629b5=_0x17b73e['approvedBy']!==undefined&&_0x17b73e['approvedBy']!==null;if(_0x5629b5){const _0x29ea70=_0x17b73e['approvedBy']['name']||_0x17b73e['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x29ea70};}if(!_0x108475)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x12b7d9)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x17b73e['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x577dcb)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
@@ -1 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x5c0f2d,_0x17e759){const _0x1db47c=new URLSearchParams();_0x5c0f2d&&_0x1db47c['set']('env',String(_0x5c0f2d));_0x1db47c['set']('tab','automations');_0x17e759&&_0x1db47c['set']('automation',String(_0x17e759));const _0x4a4822=_0x1db47c['toString']();return'environments.html'+(_0x4a4822?'?'+_0x4a4822:'');}export function buildAutomationTaskFilterHref(_0x37edff){const _0x3725ad=new URLSearchParams();_0x37edff&&_0x3725ad['set']('automation',String(_0x37edff));const _0x2e3b08=_0x3725ad['toString']();return'index.html'+(_0x2e3b08?'?'+_0x2e3b08:'');}export function parseAutomationDeepLinkParams(_0x214d2c=''){const _0x377f83=new URLSearchParams(_0x214d2c||'');return{'env':_0x377f83['get']('env'),'tab':_0x377f83['get']('tab'),'automation':_0x377f83['get']('automation')};}
1
+ export function buildAutomationEnvironmentHref(_0x149338,_0x561e95){const _0x439ae9=new URLSearchParams();_0x149338&&_0x439ae9['set']('env',String(_0x149338));_0x439ae9['set']('tab','automations');_0x561e95&&_0x439ae9['set']('automation',String(_0x561e95));const _0x4d266c=_0x439ae9['toString']();return'environments.html'+(_0x4d266c?'?'+_0x4d266c:'');}export function buildAutomationTaskFilterHref(_0xdf928){const _0x24f544=new URLSearchParams();_0xdf928&&_0x24f544['set']('automation',String(_0xdf928));const _0xfabd44=_0x24f544['toString']();return'index.html'+(_0xfabd44?'?'+_0xfabd44:'');}export function parseAutomationDeepLinkParams(_0x1806c8=''){const _0x35bda9=new URLSearchParams(_0x1806c8||'');return{'env':_0x35bda9['get']('env'),'tab':_0x35bda9['get']('tab'),'automation':_0x35bda9['get']('automation')};}
@@ -1 +1 @@
1
- export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':'1','monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x469cdb,_0x4ab43b,_0x5bb4ea){const _0x4040e3=Number['parseInt'](_0x469cdb,0xa);if(!Number['isInteger'](_0x4040e3)||_0x4040e3<_0x4ab43b||_0x4040e3>_0x5bb4ea)return null;return _0x4040e3;}function inferRecurringInterval(_0x10b797,_0x1c0713){if(_0x10b797==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x10b797==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x10b797!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x1c0713==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x1c0713))return'0\x20*\x20*\x20*\x20*';for(const _0x4c6a85 of RECURRING_INTERVAL_STEPS){if(_0x1c0713['startsWith']('*/'+_0x4c6a85)||_0x1c0713['includes']('/'+_0x4c6a85))return'0\x20*/'+_0x4c6a85+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x56fddb){const _0xa65574=String(_0x56fddb||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0xa65574)return{'start':'','end':''};const _0x4ad4f6=parseBoundedInteger(_0xa65574[0x1],0x0,0x17),_0x266c46=parseBoundedInteger(_0xa65574[0x2],0x0,0x17);if(_0x4ad4f6===null||_0x266c46===null||_0x4ad4f6>_0x266c46)return{'start':'','end':''};return{'start':String(_0x4ad4f6),'end':String(_0x266c46)};}export function parseAutomationScheduleToFormState(_0x11a545){const _0x1d412e=String(_0x11a545||'')['trim'](),_0x3447f1=createDefaultScheduleFormState(),_0x323673=_0x1d412e['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x323673){const _0x236eb6=parseBoundedInteger(_0x323673[0x1],0x0,0x3b),_0x2f3507=parseBoundedInteger(_0x323673[0x2],0x0,0x17);if(_0x236eb6!==null&&_0x2f3507!==null)return _0x3447f1['frequency']='daily',_0x3447f1['dailyMinute']=String(_0x236eb6),_0x3447f1['dailyHour']=String(_0x2f3507),_0x3447f1;}const _0xf9dd87=_0x1d412e['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0xf9dd87){const _0x31fee2=parseBoundedInteger(_0xf9dd87[0x1],0x0,0x3b),_0x431024=parseBoundedInteger(_0xf9dd87[0x2],0x0,0x17),_0x120302=parseBoundedInteger(_0xf9dd87[0x3],0x0,0x7);if(_0x31fee2!==null&&_0x431024!==null&&_0x120302!==null)return _0x3447f1['frequency']='weekly',_0x3447f1['weeklyMinute']=String(_0x31fee2),_0x3447f1['weeklyHour']=String(_0x431024),_0x3447f1['weeklyDay']=String(_0x120302===0x7?0x0:_0x120302),_0x3447f1;}const _0x3c788e=_0x1d412e['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x3c788e){const _0x40e480=parseBoundedInteger(_0x3c788e[0x1],0x0,0x3b),_0x980466=parseBoundedInteger(_0x3c788e[0x2],0x0,0x17),_0x4f8caa=parseBoundedInteger(_0x3c788e[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x40e480!==null&&_0x980466!==null&&_0x4f8caa!==null)return _0x3447f1['frequency']='monthly',_0x3447f1['monthlyMinute']=String(_0x40e480),_0x3447f1['monthlyHour']=String(_0x980466),_0x3447f1['monthlyDay']=String(_0x4f8caa),_0x3447f1;}const _0x55ee86=_0x1d412e['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x55ee86){const [,_0xf1eb4d,_0x5b8c6f,_0x2dc22c]=_0x55ee86;_0x3447f1['frequency']='recurring',_0x3447f1['recurringInterval']=inferRecurringInterval(_0xf1eb4d,_0x5b8c6f),_0x3447f1['recurringDayToken']=String(_0x2dc22c||'')['trim']()||'*';const _0x4a3af6=parseRecurringHourRange(_0x5b8c6f);return _0x3447f1['recurringStartHour']=_0x4a3af6['start'],_0x3447f1['recurringEndHour']=_0x4a3af6['end'],_0x3447f1;}return _0x3447f1['frequency']='custom',_0x3447f1['customCron']=_0x1d412e,_0x3447f1;}export function buildAutomationCronFromFormState(_0x37eb04={}){const _0x31b1fc=String(_0x37eb04['frequency']||'daily');if(_0x31b1fc==='custom')return String(_0x37eb04['customCron']||'')['trim']();if(_0x31b1fc==='daily'){const _0x53df08=String(_0x37eb04['dailyHour']??'2'),_0x1053d7=String(_0x37eb04['dailyMinute']??'0');return _0x1053d7+'\x20'+_0x53df08+'\x20*\x20*\x20*';}if(_0x31b1fc==='weekly'){const _0x31ad88=String(_0x37eb04['weeklyDay']??'1'),_0x37d6a0=String(_0x37eb04['weeklyHour']??'9'),_0x587251=String(_0x37eb04['weeklyMinute']??'0');return _0x587251+'\x20'+_0x37d6a0+'\x20*\x20*\x20'+_0x31ad88;}if(_0x31b1fc==='monthly'){const _0x32aedc=String(_0x37eb04['monthlyDay']??'1'),_0xa23643=String(_0x37eb04['monthlyHour']??'0'),_0x1306fe=String(_0x37eb04['monthlyMinute']??'0');return _0x1306fe+'\x20'+_0xa23643+'\x20'+_0x32aedc+'\x20*\x20*';}const _0x5aa012=String(_0x37eb04['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x2d7472='*/30',_0x1b47c1='*']=_0x5aa012['split'](/\s+/);let _0x12f8dc=_0x1b47c1;const _0xb0c8ed=String(_0x37eb04['recurringStartHour']??'')['trim'](),_0x2471fe=String(_0x37eb04['recurringEndHour']??'')['trim']();if(_0xb0c8ed!==''&&_0x2471fe!==''){const _0x4b50fd=Number['parseInt'](_0xb0c8ed,0xa),_0x5c0486=Number['parseInt'](_0x2471fe,0xa);if(Number['isInteger'](_0x4b50fd)&&Number['isInteger'](_0x5c0486)&&_0x4b50fd<=_0x5c0486){const _0x3e733e=_0x1b47c1['match'](/^\*\/(\d+)$/);_0x3e733e?_0x12f8dc=_0x4b50fd+'-'+_0x5c0486+'/'+_0x3e733e[0x1]:_0x12f8dc=_0x4b50fd+'-'+_0x5c0486;}}const _0x51446f=String(_0x37eb04['recurringDayToken']??'*')['trim']()||'*';return _0x2d7472+'\x20'+_0x12f8dc+'\x20*\x20*\x20'+_0x51446f;}
1
+ export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':'1','monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x22f666,_0x391cca,_0x884120){const _0x492616=Number['parseInt'](_0x22f666,0xa);if(!Number['isInteger'](_0x492616)||_0x492616<_0x391cca||_0x492616>_0x884120)return null;return _0x492616;}function inferRecurringInterval(_0x469fa1,_0x265875){if(_0x469fa1==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x469fa1==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x469fa1!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x265875==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x265875))return'0\x20*\x20*\x20*\x20*';for(const _0x31786b of RECURRING_INTERVAL_STEPS){if(_0x265875['startsWith']('*/'+_0x31786b)||_0x265875['includes']('/'+_0x31786b))return'0\x20*/'+_0x31786b+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x1a42ed){const _0x52ece7=String(_0x1a42ed||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x52ece7)return{'start':'','end':''};const _0x593747=parseBoundedInteger(_0x52ece7[0x1],0x0,0x17),_0x34e470=parseBoundedInteger(_0x52ece7[0x2],0x0,0x17);if(_0x593747===null||_0x34e470===null||_0x593747>_0x34e470)return{'start':'','end':''};return{'start':String(_0x593747),'end':String(_0x34e470)};}export function parseAutomationScheduleToFormState(_0x33b31d){const _0x5e4aea=String(_0x33b31d||'')['trim'](),_0x55dcf6=createDefaultScheduleFormState(),_0x4743d3=_0x5e4aea['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x4743d3){const _0x4c9ead=parseBoundedInteger(_0x4743d3[0x1],0x0,0x3b),_0x581f41=parseBoundedInteger(_0x4743d3[0x2],0x0,0x17);if(_0x4c9ead!==null&&_0x581f41!==null)return _0x55dcf6['frequency']='daily',_0x55dcf6['dailyMinute']=String(_0x4c9ead),_0x55dcf6['dailyHour']=String(_0x581f41),_0x55dcf6;}const _0x36718d=_0x5e4aea['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x36718d){const _0xb37458=parseBoundedInteger(_0x36718d[0x1],0x0,0x3b),_0x25ca46=parseBoundedInteger(_0x36718d[0x2],0x0,0x17),_0x5d16b7=parseBoundedInteger(_0x36718d[0x3],0x0,0x7);if(_0xb37458!==null&&_0x25ca46!==null&&_0x5d16b7!==null)return _0x55dcf6['frequency']='weekly',_0x55dcf6['weeklyMinute']=String(_0xb37458),_0x55dcf6['weeklyHour']=String(_0x25ca46),_0x55dcf6['weeklyDay']=String(_0x5d16b7===0x7?0x0:_0x5d16b7),_0x55dcf6;}const _0xa9846d=_0x5e4aea['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0xa9846d){const _0x537d96=parseBoundedInteger(_0xa9846d[0x1],0x0,0x3b),_0x2e5e39=parseBoundedInteger(_0xa9846d[0x2],0x0,0x17),_0x4ca206=parseBoundedInteger(_0xa9846d[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x537d96!==null&&_0x2e5e39!==null&&_0x4ca206!==null)return _0x55dcf6['frequency']='monthly',_0x55dcf6['monthlyMinute']=String(_0x537d96),_0x55dcf6['monthlyHour']=String(_0x2e5e39),_0x55dcf6['monthlyDay']=String(_0x4ca206),_0x55dcf6;}const _0x3b9642=_0x5e4aea['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x3b9642){const [,_0x34b001,_0x4bb49b,_0x1de1b9]=_0x3b9642;_0x55dcf6['frequency']='recurring',_0x55dcf6['recurringInterval']=inferRecurringInterval(_0x34b001,_0x4bb49b),_0x55dcf6['recurringDayToken']=String(_0x1de1b9||'')['trim']()||'*';const _0x4351d8=parseRecurringHourRange(_0x4bb49b);return _0x55dcf6['recurringStartHour']=_0x4351d8['start'],_0x55dcf6['recurringEndHour']=_0x4351d8['end'],_0x55dcf6;}return _0x55dcf6['frequency']='custom',_0x55dcf6['customCron']=_0x5e4aea,_0x55dcf6;}export function buildAutomationCronFromFormState(_0x3505a7={}){const _0x5d4e30=String(_0x3505a7['frequency']||'daily');if(_0x5d4e30==='custom')return String(_0x3505a7['customCron']||'')['trim']();if(_0x5d4e30==='daily'){const _0xe6dbde=String(_0x3505a7['dailyHour']??'2'),_0x1ff992=String(_0x3505a7['dailyMinute']??'0');return _0x1ff992+'\x20'+_0xe6dbde+'\x20*\x20*\x20*';}if(_0x5d4e30==='weekly'){const _0x16cc33=String(_0x3505a7['weeklyDay']??'1'),_0x15e3cb=String(_0x3505a7['weeklyHour']??'9'),_0x392460=String(_0x3505a7['weeklyMinute']??'0');return _0x392460+'\x20'+_0x15e3cb+'\x20*\x20*\x20'+_0x16cc33;}if(_0x5d4e30==='monthly'){const _0x302b8b=String(_0x3505a7['monthlyDay']??'1'),_0x5d3106=String(_0x3505a7['monthlyHour']??'0'),_0x2be9cb=String(_0x3505a7['monthlyMinute']??'0');return _0x2be9cb+'\x20'+_0x5d3106+'\x20'+_0x302b8b+'\x20*\x20*';}const _0x6ee9eb=String(_0x3505a7['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x3495f2='*/30',_0x1c70cc='*']=_0x6ee9eb['split'](/\s+/);let _0x5b2010=_0x1c70cc;const _0x20ccb7=String(_0x3505a7['recurringStartHour']??'')['trim'](),_0x23dd3f=String(_0x3505a7['recurringEndHour']??'')['trim']();if(_0x20ccb7!==''&&_0x23dd3f!==''){const _0x561492=Number['parseInt'](_0x20ccb7,0xa),_0x4ec1a5=Number['parseInt'](_0x23dd3f,0xa);if(Number['isInteger'](_0x561492)&&Number['isInteger'](_0x4ec1a5)&&_0x561492<=_0x4ec1a5){const _0x344e4f=_0x1c70cc['match'](/^\*\/(\d+)$/);_0x344e4f?_0x5b2010=_0x561492+'-'+_0x4ec1a5+'/'+_0x344e4f[0x1]:_0x5b2010=_0x561492+'-'+_0x4ec1a5;}}const _0x5318f6=String(_0x3505a7['recurringDayToken']??'*')['trim']()||'*';return _0x3495f2+'\x20'+_0x5b2010+'\x20*\x20*\x20'+_0x5318f6;}
@@ -1 +1 @@
1
- export class CommentsWidget{constructor(_0x4b2764,_0x186815={}){this['container']=_0x4b2764,this['options']={'taskId':_0x186815['taskId']||null,'currentUserId':_0x186815['currentUserId']||null,'compact':_0x186815['compact']||![],'skipHeader':_0x186815['skipHeader']||![],'onCommentsLoaded':_0x186815['onCommentsLoaded']||null,'onCommentsChanged':_0x186815['onCommentsChanged']||null,'enableAttachments':_0x186815['enableAttachments']||![],'getAPI':_0x186815['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x449963=this['options']['getAPI'](),_0x3a45a1=await _0x449963['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x3a45a1['attachments']||[];}catch(_0x26f298){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x26f298),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x1cddcc=this['header']['querySelector']('.comments-toggle-btn');_0x1cddcc['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0x2b960c=document['createElement']('div');_0x2b960c['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x2b960c['appendChild'](this['toolbar']);const _0x51fe5b=document['createElement']('div');_0x51fe5b['className']='comments-editor-placeholder',_0x2b960c['appendChild'](_0x51fe5b);const _0x707371=document['createElement']('div');_0x707371['className']='comments-input-actions',_0x707371['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0x2b960c),this['inputSection']['appendChild'](_0x707371),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x51fe5b),this['submitBtn']=_0x707371['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x707371['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x5cb285){const _0x5b3043=document['createElement']('textarea');_0x5b3043['placeholder']='Add\x20a\x20comment...',_0x5b3043['className']='comments-textarea',_0x5cb285['appendChild'](_0x5b3043);const _0x11dfc3=window['MarkdownEditor'];if(!_0x11dfc3){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x2dcf6d={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x185701=>{const _0x2315e4=_0x185701&&_0x185701['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x2315e4;},'fetchUsers':async()=>{const _0x17cc06=this['options']['getAPI']();return _0x17cc06['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x2dcf6d['onAddAttachments']=_0x5a741f=>{this['pendingAttachments']['push'](..._0x5a741f),this['submitBtn']['disabled']=![];},_0x2dcf6d['resolveAttachmentUrl']=_0x40f42f=>{const _0x8ef084=this['options']['getAPI']();return _0x8ef084['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x40f42f);},_0x2dcf6d['isAttachmentNameTaken']=_0x4e92dc=>{return this['pendingAttachments']['some'](_0x5f3b14=>_0x5f3b14['name']===_0x4e92dc)||this['existingAttachments']['some'](_0x9e2de3=>_0x9e2de3['name']===_0x4e92dc);});this['editor']=new _0x11dfc3(_0x5b3043,_0x2dcf6d);const _0x5be009=this['editor']['editor'],_0x150ab7=this['editor']['toolbar'];_0x150ab7&&(_0x150ab7['classList']['add']('comments-toolbar-hidden'),_0x5be009['addEventListener']('focus',()=>{_0x150ab7['classList']['remove']('comments-toolbar-hidden');}),_0x5be009['addEventListener']('blur',_0x2c8d4b=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x150ab7['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x150ab7['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x1766b1=this['header']['querySelector']('.comments-chevron');_0x1766b1&&(_0x1766b1['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x538f45){this['options']['taskId']=_0x538f45,this['comments']=[],this['renderComments'](),_0x538f45&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0x255bac=this['options']['getAPI'](),_0x1114ba=await _0x255bac['getComments'](this['options']['taskId']);this['comments']=_0x1114ba['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x1d5d8e){console['error']('Failed\x20to\x20load\x20comments:',_0x1d5d8e),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x4770e6=>{const _0x21c97a=this['createCommentElement'](_0x4770e6);this['commentsList']['appendChild'](_0x21c97a);});}['createCommentElement'](_0x15e9e2){const _0x5c352e=document['createElement']('div');_0x5c352e['className']='comment-item',_0x5c352e['dataset']['commentId']=_0x15e9e2['id'];const _0x58ad93=this['options']['currentUserId']&&_0x15e9e2['author']?.['userId']===this['options']['currentUserId'],_0x346e14=this['formatDate'](_0x15e9e2['createdAt']),_0x58b86a=_0x15e9e2['updatedAt']!==_0x15e9e2['createdAt'],_0x2ddf1b=this['resolveAttachmentUrls'](_0x15e9e2['content']);let _0x5b5379=window['marked']?window['marked']['parse'](_0x2ddf1b):_0x2ddf1b;_0x5b5379=this['renderMentions'](_0x5b5379),_0x5c352e['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x15e9e2['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x15e9e2['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x346e14+(_0x58b86a?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x58ad93?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x5b5379+'</div>\x0a\x20\x20\x20\x20';if(_0x58ad93){const _0x453d29=_0x5c352e['querySelector']('.comment-edit-btn'),_0x375732=_0x5c352e['querySelector']('.comment-delete-btn');_0x453d29?.['addEventListener']('click',()=>this['startEdit'](_0x15e9e2)),_0x375732?.['addEventListener']('click',()=>this['deleteComment'](_0x15e9e2['id']));}return _0x5c352e;}['formatDate'](_0x5da8d5){const _0x31badb=new Date(_0x5da8d5),_0x386818=new Date(),_0x42cbbe=_0x386818-_0x31badb,_0x165589=Math['floor'](_0x42cbbe/0xea60),_0x3d7bb6=Math['floor'](_0x42cbbe/0x36ee80),_0x578849=Math['floor'](_0x42cbbe/0x5265c00);if(_0x165589<0x1)return'just\x20now';if(_0x165589<0x3c)return _0x165589+'m\x20ago';if(_0x3d7bb6<0x18)return _0x3d7bb6+'h\x20ago';if(_0x578849<0x7)return _0x578849+'d\x20ago';return _0x31badb['toLocaleDateString']();}['escapeHtml'](_0x46d5ed){const _0x4b5d78=document['createElement']('div');return _0x4b5d78['textContent']=_0x46d5ed,_0x4b5d78['innerHTML'];}['resolveAttachmentUrls'](_0x4536b4){if(!_0x4536b4||!this['options']['taskId'])return _0x4536b4;const _0x6b265d=this['options']['getAPI'](),_0x2ecdbd=_0x6b265d['getBaseUrl']();let _0x51a264=String(_0x4536b4)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x43750b,_0x488141)=>{const _0x485cf9=String(_0x488141||'')['trim']();if(!_0x485cf9)return _0x43750b;let _0x428f50=_0x485cf9;try{_0x428f50=decodeURIComponent(_0x485cf9);}catch{}return']('+_0x2ecdbd+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x428f50)+')';});return _0x51a264;}['renderMentions'](_0x9dfe50){if(!_0x9dfe50)return _0x9dfe50;return String(_0x9dfe50)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x40f499,_0x526e83,_0x22084e)=>{const _0x4956dd=this['escapeHtml'](_0x22084e),_0x98b889=this['escapeHtml'](_0x526e83);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x98b889+'\x22>@'+_0x4956dd+'</span>';});}['startEdit'](_0x39f745){this['editingCommentId']=_0x39f745['id'],this['editor']['setValue'](_0x39f745['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x1ff8a1=this['editor']['getValue']()?.['trim']();if(!_0x1ff8a1&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0xeb0ce7=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0xeb0ce7['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x55d903=>({'name':_0x55d903['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x540c03=await _0xeb0ce7['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x1ff8a1),_0x2162da=this['comments']['findIndex'](_0x180a4a=>_0x180a4a['id']===this['editingCommentId']);_0x2162da!==-0x1&&(this['comments'][_0x2162da]=_0x540c03['comment']);}else{const _0x1b8645=await _0xeb0ce7['addComment'](this['options']['taskId'],_0x1ff8a1);this['comments']['push'](_0x1b8645['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x5c177d){console['error']('Failed\x20to\x20save\x20comment:',_0x5c177d),alert('Failed\x20to\x20save\x20comment:\x20'+_0x5c177d['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x5617e6){const _0x42a1f9=await this['showDeleteConfirmModal']();if(!_0x42a1f9)return;try{const _0x4ff73e=this['options']['getAPI']();await _0x4ff73e['deleteComment'](this['options']['taskId'],_0x5617e6),this['comments']=this['comments']['filter'](_0x3f0fe8=>_0x3f0fe8['id']!==_0x5617e6),this['renderComments'](),this['updateCount']();}catch(_0x50f8de){console['error']('Failed\x20to\x20delete\x20comment:',_0x50f8de),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x50f8de['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x474ff7=>{const _0x133d27=document['createElement']('div');_0x133d27['className']='comments-confirm-modal',_0x133d27['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x133d27);const _0x2d63a9=_0x26404b=>{document['removeEventListener']('keydown',_0x2e71c2),_0x133d27['remove'](),_0x474ff7(_0x26404b);},_0x2e71c2=_0x2cd80d=>{if(_0x2cd80d['key']==='Escape')_0x2d63a9(![]);};document['addEventListener']('keydown',_0x2e71c2),_0x133d27['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x2d63a9(![])),_0x133d27['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x2d63a9(![])),_0x133d27['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x2d63a9(![])),_0x133d27['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x2d63a9(!![])),_0x133d27['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x137e50){this['submitBtn']['disabled']=_0x137e50,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x137e50,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x137e50;}['updateCount'](){const _0x376268=this['comments']['length'],_0x3b9155=this['container']['querySelector']('#comments-count-badge');_0x3b9155&&(_0x3b9155['textContent']=_0x376268,_0x3b9155['hidden']=_0x376268===0x0);const _0x5e8fc9=this['container']['querySelector']('#comments-count');_0x5e8fc9&&(_0x5e8fc9['textContent']=_0x376268>0x0?'('+_0x376268+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
1
+ export class CommentsWidget{constructor(_0x16cb73,_0x31ba42={}){this['container']=_0x16cb73,this['options']={'taskId':_0x31ba42['taskId']||null,'currentUserId':_0x31ba42['currentUserId']||null,'compact':_0x31ba42['compact']||![],'skipHeader':_0x31ba42['skipHeader']||![],'onCommentsLoaded':_0x31ba42['onCommentsLoaded']||null,'onCommentsChanged':_0x31ba42['onCommentsChanged']||null,'enableAttachments':_0x31ba42['enableAttachments']||![],'getAPI':_0x31ba42['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x36de20=this['options']['getAPI'](),_0x294f20=await _0x36de20['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x294f20['attachments']||[];}catch(_0x25496d){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x25496d),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x292d6a=this['header']['querySelector']('.comments-toggle-btn');_0x292d6a['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0x449bc9=document['createElement']('div');_0x449bc9['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x449bc9['appendChild'](this['toolbar']);const _0x54e6f4=document['createElement']('div');_0x54e6f4['className']='comments-editor-placeholder',_0x449bc9['appendChild'](_0x54e6f4);const _0x3ff5c1=document['createElement']('div');_0x3ff5c1['className']='comments-input-actions',_0x3ff5c1['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0x449bc9),this['inputSection']['appendChild'](_0x3ff5c1),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x54e6f4),this['submitBtn']=_0x3ff5c1['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x3ff5c1['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0xd0d0c7){const _0x4b004c=document['createElement']('textarea');_0x4b004c['placeholder']='Add\x20a\x20comment...',_0x4b004c['className']='comments-textarea',_0xd0d0c7['appendChild'](_0x4b004c);const _0x787908=window['MarkdownEditor'];if(!_0x787908){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x100158={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x37c225=>{const _0x4f812f=_0x37c225&&_0x37c225['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x4f812f;},'fetchUsers':async()=>{const _0x3252a7=this['options']['getAPI']();return _0x3252a7['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x100158['onAddAttachments']=_0x598bdb=>{this['pendingAttachments']['push'](..._0x598bdb),this['submitBtn']['disabled']=![];},_0x100158['resolveAttachmentUrl']=_0x924a97=>{const _0x1be072=this['options']['getAPI']();return _0x1be072['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x924a97);},_0x100158['isAttachmentNameTaken']=_0x59f3ab=>{return this['pendingAttachments']['some'](_0xc5f238=>_0xc5f238['name']===_0x59f3ab)||this['existingAttachments']['some'](_0x165423=>_0x165423['name']===_0x59f3ab);});this['editor']=new _0x787908(_0x4b004c,_0x100158);const _0x2f9dba=this['editor']['editor'],_0x25df7c=this['editor']['toolbar'];_0x25df7c&&(_0x25df7c['classList']['add']('comments-toolbar-hidden'),_0x2f9dba['addEventListener']('focus',()=>{_0x25df7c['classList']['remove']('comments-toolbar-hidden');}),_0x2f9dba['addEventListener']('blur',_0x3e2fbb=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x25df7c['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x25df7c['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x55ae51=this['header']['querySelector']('.comments-chevron');_0x55ae51&&(_0x55ae51['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x25c1f1){this['options']['taskId']=_0x25c1f1,this['comments']=[],this['renderComments'](),_0x25c1f1&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0x1e2a10=this['options']['getAPI'](),_0x5ae104=await _0x1e2a10['getComments'](this['options']['taskId']);this['comments']=_0x5ae104['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x2bad4b){console['error']('Failed\x20to\x20load\x20comments:',_0x2bad4b),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x370dde=>{const _0x5d8ec0=this['createCommentElement'](_0x370dde);this['commentsList']['appendChild'](_0x5d8ec0);});}['createCommentElement'](_0x57c23a){const _0x25df95=document['createElement']('div');_0x25df95['className']='comment-item',_0x25df95['dataset']['commentId']=_0x57c23a['id'];const _0x4c67be=this['options']['currentUserId']&&_0x57c23a['author']?.['userId']===this['options']['currentUserId'],_0x518246=this['formatDate'](_0x57c23a['createdAt']),_0x2a0f59=_0x57c23a['updatedAt']!==_0x57c23a['createdAt'],_0x1b4d62=this['resolveAttachmentUrls'](_0x57c23a['content']);let _0x3fc147=window['marked']?window['marked']['parse'](_0x1b4d62):_0x1b4d62;_0x3fc147=this['renderMentions'](_0x3fc147),_0x25df95['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x57c23a['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x57c23a['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518246+(_0x2a0f59?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4c67be?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x3fc147+'</div>\x0a\x20\x20\x20\x20';if(_0x4c67be){const _0x5395b8=_0x25df95['querySelector']('.comment-edit-btn'),_0x1d0c47=_0x25df95['querySelector']('.comment-delete-btn');_0x5395b8?.['addEventListener']('click',()=>this['startEdit'](_0x57c23a)),_0x1d0c47?.['addEventListener']('click',()=>this['deleteComment'](_0x57c23a['id']));}return _0x25df95;}['formatDate'](_0x20fe66){const _0xc59ae2=new Date(_0x20fe66),_0x4b9ef3=new Date(),_0x158a05=_0x4b9ef3-_0xc59ae2,_0x4eea9e=Math['floor'](_0x158a05/0xea60),_0x3002ea=Math['floor'](_0x158a05/0x36ee80),_0x401358=Math['floor'](_0x158a05/0x5265c00);if(_0x4eea9e<0x1)return'just\x20now';if(_0x4eea9e<0x3c)return _0x4eea9e+'m\x20ago';if(_0x3002ea<0x18)return _0x3002ea+'h\x20ago';if(_0x401358<0x7)return _0x401358+'d\x20ago';return _0xc59ae2['toLocaleDateString']();}['escapeHtml'](_0x24fc53){const _0x157736=document['createElement']('div');return _0x157736['textContent']=_0x24fc53,_0x157736['innerHTML'];}['resolveAttachmentUrls'](_0x6826c0){if(!_0x6826c0||!this['options']['taskId'])return _0x6826c0;const _0x264006=this['options']['getAPI'](),_0x54a29b=_0x264006['getBaseUrl']();let _0x2ad83d=String(_0x6826c0)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x12c87c,_0x374597)=>{const _0x168c4a=String(_0x374597||'')['trim']();if(!_0x168c4a)return _0x12c87c;let _0x2ee985=_0x168c4a;try{_0x2ee985=decodeURIComponent(_0x168c4a);}catch{}return']('+_0x54a29b+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x2ee985)+')';});return _0x2ad83d;}['renderMentions'](_0x2aa8ea){if(!_0x2aa8ea)return _0x2aa8ea;return String(_0x2aa8ea)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x28444c,_0x29b03b,_0x3811da)=>{const _0xeeeb86=this['escapeHtml'](_0x3811da),_0x32e7b8=this['escapeHtml'](_0x29b03b);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x32e7b8+'\x22>@'+_0xeeeb86+'</span>';});}['startEdit'](_0x3cf2b2){this['editingCommentId']=_0x3cf2b2['id'],this['editor']['setValue'](_0x3cf2b2['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x713cee=this['editor']['getValue']()?.['trim']();if(!_0x713cee&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x16665d=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x16665d['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x44b735=>({'name':_0x44b735['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x53c843=await _0x16665d['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x713cee),_0x1e1b10=this['comments']['findIndex'](_0x4d5e02=>_0x4d5e02['id']===this['editingCommentId']);_0x1e1b10!==-0x1&&(this['comments'][_0x1e1b10]=_0x53c843['comment']);}else{const _0x338b39=await _0x16665d['addComment'](this['options']['taskId'],_0x713cee);this['comments']['push'](_0x338b39['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x5ee2c8){console['error']('Failed\x20to\x20save\x20comment:',_0x5ee2c8),alert('Failed\x20to\x20save\x20comment:\x20'+_0x5ee2c8['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x31fe0f){const _0x238d67=await this['showDeleteConfirmModal']();if(!_0x238d67)return;try{const _0x4ec6d2=this['options']['getAPI']();await _0x4ec6d2['deleteComment'](this['options']['taskId'],_0x31fe0f),this['comments']=this['comments']['filter'](_0x279f45=>_0x279f45['id']!==_0x31fe0f),this['renderComments'](),this['updateCount']();}catch(_0x294e9b){console['error']('Failed\x20to\x20delete\x20comment:',_0x294e9b),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x294e9b['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x10ec29=>{const _0x4b8c77=document['createElement']('div');_0x4b8c77['className']='comments-confirm-modal',_0x4b8c77['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x4b8c77);const _0x1dc549=_0x1eecbf=>{document['removeEventListener']('keydown',_0x4cecd8),_0x4b8c77['remove'](),_0x10ec29(_0x1eecbf);},_0x4cecd8=_0x393641=>{if(_0x393641['key']==='Escape')_0x1dc549(![]);};document['addEventListener']('keydown',_0x4cecd8),_0x4b8c77['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x1dc549(![])),_0x4b8c77['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x1dc549(![])),_0x4b8c77['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x1dc549(![])),_0x4b8c77['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x1dc549(!![])),_0x4b8c77['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x24d194){this['submitBtn']['disabled']=_0x24d194,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x24d194,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x24d194;}['updateCount'](){const _0x4122d7=this['comments']['length'],_0x3576ff=this['container']['querySelector']('#comments-count-badge');_0x3576ff&&(_0x3576ff['textContent']=_0x4122d7,_0x3576ff['hidden']=_0x4122d7===0x0);const _0x1c644e=this['container']['querySelector']('#comments-count');_0x1c644e&&(_0x1c644e['textContent']=_0x4122d7>0x0?'('+_0x4122d7+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
@@ -1 +1 @@
1
- import{Utils}from'./app.js';export function parsePatchContent(_0x4e85d5){const _0x11a348=[],_0x5665d5=_0x4e85d5['split']('\x0a');let _0x43a6d4=null,_0x32a20e=null;for(const _0x45dcb2 of _0x5665d5){if(_0x45dcb2['startsWith']('diff\x20--git')){_0x43a6d4&&_0x32a20e&&_0x43a6d4['hunks']['push'](_0x32a20e);_0x43a6d4&&_0x11a348['push'](_0x43a6d4);const _0x1074bc=_0x45dcb2['match'](/diff --git a\/(.+?) b\/(.+)/);_0x43a6d4={'oldPath':_0x1074bc?_0x1074bc[0x1]:'','newPath':_0x1074bc?_0x1074bc[0x2]:'','hunks':[],'isDeleted':![]},_0x32a20e=null;}else{if(_0x45dcb2['startsWith']('deleted\x20file\x20mode')&&_0x43a6d4)_0x43a6d4['isDeleted']=!![];else{if(_0x45dcb2['startsWith']('@@'))_0x32a20e&&_0x43a6d4&&_0x43a6d4['hunks']['push'](_0x32a20e),_0x32a20e={'header':_0x45dcb2,'lines':[]};else _0x32a20e&&_0x32a20e['lines']['push'](_0x45dcb2);}}}return _0x43a6d4&&_0x32a20e&&_0x43a6d4['hunks']['push'](_0x32a20e),_0x43a6d4&&_0x11a348['push'](_0x43a6d4),_0x11a348;}export function parseHunkHeader(_0x5d3eb5){const _0x3ec87e=_0x5d3eb5['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x3ec87e)return{'oldStart':parseInt(_0x3ec87e[0x1],0xa),'newStart':parseInt(_0x3ec87e[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x259c92,_0x2a5e68){const _0x466416=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x466416&&_0x2a5e68)try{const _0x452229=_0x466416['getLanguage'](_0x2a5e68)?_0x2a5e68:null;if(_0x452229)return _0x466416['highlight'](_0x259c92,{'language':_0x452229})['value'];}catch(_0x484965){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x484965);}return Utils['escapeHtml'](_0x259c92);}export function getFileLanguage(_0x9714ad){const _0x36560d=_0x9714ad['split']('.')['pop']()['toLowerCase'](),_0x2d7f6e={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x2d7f6e[_0x36560d]||null;}export function computeWordDiff(_0x53512e,_0x4c4367){const _0x20e68f=_0x5ed5c7=>{const _0x191627=[];let _0x577aa7='',_0x16d2c0=![];for(let _0x3c7175=0x0;_0x3c7175<_0x5ed5c7['length'];_0x3c7175++){const _0x38b0ba=_0x5ed5c7[_0x3c7175],_0xc0e524=/\s/['test'](_0x38b0ba);if(_0x577aa7==='')_0x577aa7=_0x38b0ba,_0x16d2c0=_0xc0e524;else _0xc0e524===_0x16d2c0?_0x577aa7+=_0x38b0ba:(_0x191627['push'](_0x577aa7),_0x577aa7=_0x38b0ba,_0x16d2c0=_0xc0e524);}return _0x577aa7&&_0x191627['push'](_0x577aa7),_0x191627;},_0x4983cb=_0x20e68f(_0x53512e),_0x21c7f9=_0x20e68f(_0x4c4367),_0x1a07c5=_0x4983cb['length'],_0x5af71b=_0x21c7f9['length'],_0x3e0875=Array(_0x1a07c5+0x1)['fill'](null)['map'](()=>Array(_0x5af71b+0x1)['fill'](0x0));for(let _0x5ab299=0x1;_0x5ab299<=_0x1a07c5;_0x5ab299++){for(let _0x4796a6=0x1;_0x4796a6<=_0x5af71b;_0x4796a6++){_0x4983cb[_0x5ab299-0x1]===_0x21c7f9[_0x4796a6-0x1]?_0x3e0875[_0x5ab299][_0x4796a6]=_0x3e0875[_0x5ab299-0x1][_0x4796a6-0x1]+0x1:_0x3e0875[_0x5ab299][_0x4796a6]=Math['max'](_0x3e0875[_0x5ab299-0x1][_0x4796a6],_0x3e0875[_0x5ab299][_0x4796a6-0x1]);}}const _0x5a74bf={'old':[],'new':[]};let _0x4054ab=_0x1a07c5,_0x495499=_0x5af71b;const _0x29b38d=[],_0x37ca4a=[];while(_0x4054ab>0x0||_0x495499>0x0){if(_0x4054ab>0x0&&_0x495499>0x0&&_0x4983cb[_0x4054ab-0x1]===_0x21c7f9[_0x495499-0x1])_0x29b38d['unshift']({'type':'equal','text':_0x4983cb[_0x4054ab-0x1]}),_0x37ca4a['unshift']({'type':'equal','text':_0x21c7f9[_0x495499-0x1]}),_0x4054ab--,_0x495499--;else{if(_0x495499>0x0&&(_0x4054ab===0x0||_0x3e0875[_0x4054ab][_0x495499-0x1]>=_0x3e0875[_0x4054ab-0x1][_0x495499]))_0x37ca4a['unshift']({'type':'insert','text':_0x21c7f9[_0x495499-0x1]}),_0x495499--;else _0x4054ab>0x0&&(_0x29b38d['unshift']({'type':'delete','text':_0x4983cb[_0x4054ab-0x1]}),_0x4054ab--);}}return _0x5a74bf['old']=_0x29b38d,_0x5a74bf['new']=_0x37ca4a,_0x5a74bf;}export function renderDiffLineWithWordHighlight(_0x1b2f44,_0x1151cb,_0x1a0a65,_0x2ba065){if(!_0x1151cb||_0x1151cb['length']===0x0)return highlightDiffLine(_0x1b2f44,_0x2ba065);let _0x9a7a82='';const _0x12b08e=_0x1a0a65==='add'?'diff-word-add':'diff-word-remove',_0x41d9b7=_0x1a0a65==='add'?'insert':'delete';for(const _0x4dd5b0 of _0x1151cb){const _0x8134c7=Utils['escapeHtml'](_0x4dd5b0['text']);_0x4dd5b0['type']===_0x41d9b7?_0x9a7a82+='<span\x20class=\x22'+_0x12b08e+'\x22>'+_0x8134c7+'</span>':_0x9a7a82+=_0x8134c7;}return _0x9a7a82;}export function calculateDiffStats(_0x19ece9){let _0x516818=0x0,_0x42d4bd=0x0,_0x123b8e=0x0;return _0x19ece9['forEach'](_0xca0001=>{let _0x47c750=0x0,_0x2b8c48=0x0;_0xca0001['hunks']['forEach'](_0x3e6a3a=>{_0x3e6a3a['lines']['forEach'](_0xd80135=>{if(_0xd80135['startsWith']('+'))_0x47c750+=0x1;else{if(_0xd80135['startsWith']('-'))_0x2b8c48+=0x1;}});}),(_0x47c750+_0x2b8c48>0x0||_0xca0001['isDeleted'])&&(_0x123b8e+=0x1),_0x516818+=_0x47c750,_0x42d4bd+=_0x2b8c48;}),{'additions':_0x516818,'deletions':_0x42d4bd,'files':_0x123b8e};}export function getFileStatus(_0x1d3770,_0x4e2cb1,_0x31364e){if(_0x1d3770['isDeleted'])return'deleted';if(_0x4e2cb1>0x0&&_0x31364e===0x0)return'added';return'modified';}export function safeBase64(_0x261540){try{return btoa(unescape(encodeURIComponent(_0x261540)));}catch(_0x547790){return btoa(_0x261540);}}export function getStorageKey(_0x2bbd13,_0x3ada1e){return _0x2bbd13+'-'+safeBase64(_0x3ada1e);}export function getCollapsedState(_0x1ac413,_0x48d5d){const _0xca4885=localStorage['getItem'](getStorageKey(_0x1ac413,_0x48d5d));return _0xca4885==='true';}export function renderUnifiedDiff(_0x14e2dd,_0x2f9751){return _0x14e2dd['map']((_0x42083c,_0x392667)=>{const _0x1ee23e=_0x42083c['newPath']||_0x42083c['oldPath']||'unknown',_0x3abe04='diff-'+_0x2f9751+'-'+_0x392667,_0x2b9295=getFileLanguage(_0x1ee23e),{additions:_0x2a6989,deletions:_0x4606dc}=calculateDiffStats([_0x42083c]),_0x1b8ee6=getCollapsedState(_0x2f9751,_0x1ee23e),_0x41b8d5=getFileStatus(_0x42083c,_0x2a6989,_0x4606dc),_0x4d1182=_0x41b8d5==='added'?'A':_0x41b8d5==='deleted'?'D':'M',_0x4c724f=_0x42083c['hunks']['map'](_0xa90b86=>{const {oldStart:_0x24354b,newStart:_0x4b2be7}=parseHunkHeader(_0xa90b86['header']);let _0x2d688e=_0x24354b,_0x24f296=_0x4b2be7;const _0x29121f=_0xa90b86['lines']['map'](_0x5f01fd=>({'line':_0x5f01fd,'type':_0x5f01fd['startsWith']('+')?'add':_0x5f01fd['startsWith']('-')?'remove':_0x5f01fd['startsWith']('\x5c')?'meta':'context'}));let _0x21587e=0x0;while(_0x21587e<_0x29121f['length']){if(_0x29121f[_0x21587e]['type']==='remove'){let _0x46cc02=_0x21587e,_0x19bc2f=_0x21587e;while(_0x19bc2f<_0x29121f['length']&&_0x29121f[_0x19bc2f]['type']==='remove')_0x19bc2f++;let _0x78be9b=_0x19bc2f,_0xa00f59=_0x78be9b;while(_0xa00f59<_0x29121f['length']&&_0x29121f[_0xa00f59]['type']==='add')_0xa00f59++;const _0x5e2433=_0x19bc2f-_0x46cc02,_0x1ece46=_0xa00f59-_0x78be9b,_0x381a22=Math['min'](_0x5e2433,_0x1ece46);for(let _0x4d7fdc=0x0;_0x4d7fdc<_0x381a22;_0x4d7fdc++){const _0xfdd085=_0x29121f[_0x46cc02+_0x4d7fdc]['line']['substring'](0x1),_0x23a86d=_0x29121f[_0x78be9b+_0x4d7fdc]['line']['substring'](0x1),_0xdec13b=computeWordDiff(_0xfdd085,_0x23a86d);_0x29121f[_0x46cc02+_0x4d7fdc]['wordDiff']=_0xdec13b['old'],_0x29121f[_0x78be9b+_0x4d7fdc]['wordDiff']=_0xdec13b['new'];}_0x21587e=_0xa00f59;}else _0x21587e++;}const _0xa82f0=_0x29121f['map'](_0xb0d6d3=>{const _0x26635b=_0xb0d6d3['line'];if(_0x26635b['startsWith']('+')){const _0x47c78d=_0x26635b['substring'](0x1),_0x3e92d6=_0xb0d6d3['wordDiff']?renderDiffLineWithWordHighlight(_0x47c78d,_0xb0d6d3['wordDiff'],'add',_0x2b9295):highlightDiffLine(_0x47c78d,_0x2b9295),_0x15365f='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x24f296+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x3e92d6+'</span></div>';return _0x24f296+=0x1,_0x15365f;}if(_0x26635b['startsWith']('-')){const _0x626025=_0x26635b['substring'](0x1),_0x28735a=_0xb0d6d3['wordDiff']?renderDiffLineWithWordHighlight(_0x626025,_0xb0d6d3['wordDiff'],'remove',_0x2b9295):highlightDiffLine(_0x626025,_0x2b9295),_0x58abc7='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x2d688e+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x28735a+'</span></div>';return _0x2d688e+=0x1,_0x58abc7;}if(_0x26635b['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x26635b)+'</span></div>';const _0x3afac2=_0x26635b['startsWith']('\x20')?_0x26635b['substring'](0x1):_0x26635b,_0x4f117e=highlightDiffLine(_0x3afac2,_0x2b9295),_0x719941='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x2d688e+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x24f296+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x4f117e+'</span></div>';return _0x2d688e+=0x1,_0x24f296+=0x1,_0x719941;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0xa90b86['header'])+'</div>'+_0xa82f0+'</div>';})['join'](''),_0x42eea9=_0x4c724f||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x3abe04+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x3abe04+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x1ee23e)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0x41b8d5+'\x22>'+_0x4d1182+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x1ee23e)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x2a6989+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x4606dc+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x3abe04+'\x22\x20data-collapsed=\x22'+_0x1b8ee6+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x1b8ee6?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x1b8ee6?'collapsed':'')+'\x22\x20id=\x22'+_0x3abe04+'\x22>'+_0x42eea9+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
1
+ import{Utils}from'./app.js';export function parsePatchContent(_0x141013){const _0x4a27db=[],_0x4aac05=_0x141013['split']('\x0a');let _0x1bf13a=null,_0x479901=null;for(const _0x245c4e of _0x4aac05){if(_0x245c4e['startsWith']('diff\x20--git')){_0x1bf13a&&_0x479901&&_0x1bf13a['hunks']['push'](_0x479901);_0x1bf13a&&_0x4a27db['push'](_0x1bf13a);const _0x3ea519=_0x245c4e['match'](/diff --git a\/(.+?) b\/(.+)/);_0x1bf13a={'oldPath':_0x3ea519?_0x3ea519[0x1]:'','newPath':_0x3ea519?_0x3ea519[0x2]:'','hunks':[],'isDeleted':![]},_0x479901=null;}else{if(_0x245c4e['startsWith']('deleted\x20file\x20mode')&&_0x1bf13a)_0x1bf13a['isDeleted']=!![];else{if(_0x245c4e['startsWith']('@@'))_0x479901&&_0x1bf13a&&_0x1bf13a['hunks']['push'](_0x479901),_0x479901={'header':_0x245c4e,'lines':[]};else _0x479901&&_0x479901['lines']['push'](_0x245c4e);}}}return _0x1bf13a&&_0x479901&&_0x1bf13a['hunks']['push'](_0x479901),_0x1bf13a&&_0x4a27db['push'](_0x1bf13a),_0x4a27db;}export function parseHunkHeader(_0x3ffee5){const _0x4f5b33=_0x3ffee5['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x4f5b33)return{'oldStart':parseInt(_0x4f5b33[0x1],0xa),'newStart':parseInt(_0x4f5b33[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x2d03d3,_0x1e7690){const _0x273c4d=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x273c4d&&_0x1e7690)try{const _0x277532=_0x273c4d['getLanguage'](_0x1e7690)?_0x1e7690:null;if(_0x277532)return _0x273c4d['highlight'](_0x2d03d3,{'language':_0x277532})['value'];}catch(_0x51a498){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x51a498);}return Utils['escapeHtml'](_0x2d03d3);}export function getFileLanguage(_0x1aceec){const _0x1e15f4=_0x1aceec['split']('.')['pop']()['toLowerCase'](),_0x21a086={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x21a086[_0x1e15f4]||null;}export function computeWordDiff(_0xeabd7d,_0x536dc8){const _0x96f840=_0x462715=>{const _0x651429=[];let _0x2648ee='',_0x54e07b=![];for(let _0x114d81=0x0;_0x114d81<_0x462715['length'];_0x114d81++){const _0x1e740e=_0x462715[_0x114d81],_0x4ebda9=/\s/['test'](_0x1e740e);if(_0x2648ee==='')_0x2648ee=_0x1e740e,_0x54e07b=_0x4ebda9;else _0x4ebda9===_0x54e07b?_0x2648ee+=_0x1e740e:(_0x651429['push'](_0x2648ee),_0x2648ee=_0x1e740e,_0x54e07b=_0x4ebda9);}return _0x2648ee&&_0x651429['push'](_0x2648ee),_0x651429;},_0x338413=_0x96f840(_0xeabd7d),_0x411490=_0x96f840(_0x536dc8),_0x602205=_0x338413['length'],_0x2972db=_0x411490['length'],_0x3e3a24=Array(_0x602205+0x1)['fill'](null)['map'](()=>Array(_0x2972db+0x1)['fill'](0x0));for(let _0x4eb607=0x1;_0x4eb607<=_0x602205;_0x4eb607++){for(let _0x26c0c9=0x1;_0x26c0c9<=_0x2972db;_0x26c0c9++){_0x338413[_0x4eb607-0x1]===_0x411490[_0x26c0c9-0x1]?_0x3e3a24[_0x4eb607][_0x26c0c9]=_0x3e3a24[_0x4eb607-0x1][_0x26c0c9-0x1]+0x1:_0x3e3a24[_0x4eb607][_0x26c0c9]=Math['max'](_0x3e3a24[_0x4eb607-0x1][_0x26c0c9],_0x3e3a24[_0x4eb607][_0x26c0c9-0x1]);}}const _0x3950ff={'old':[],'new':[]};let _0x51e28a=_0x602205,_0x3dca25=_0x2972db;const _0x1cd986=[],_0x5a75c7=[];while(_0x51e28a>0x0||_0x3dca25>0x0){if(_0x51e28a>0x0&&_0x3dca25>0x0&&_0x338413[_0x51e28a-0x1]===_0x411490[_0x3dca25-0x1])_0x1cd986['unshift']({'type':'equal','text':_0x338413[_0x51e28a-0x1]}),_0x5a75c7['unshift']({'type':'equal','text':_0x411490[_0x3dca25-0x1]}),_0x51e28a--,_0x3dca25--;else{if(_0x3dca25>0x0&&(_0x51e28a===0x0||_0x3e3a24[_0x51e28a][_0x3dca25-0x1]>=_0x3e3a24[_0x51e28a-0x1][_0x3dca25]))_0x5a75c7['unshift']({'type':'insert','text':_0x411490[_0x3dca25-0x1]}),_0x3dca25--;else _0x51e28a>0x0&&(_0x1cd986['unshift']({'type':'delete','text':_0x338413[_0x51e28a-0x1]}),_0x51e28a--);}}return _0x3950ff['old']=_0x1cd986,_0x3950ff['new']=_0x5a75c7,_0x3950ff;}export function renderDiffLineWithWordHighlight(_0x15f9f7,_0x53f000,_0x1ad527,_0x2e2879){if(!_0x53f000||_0x53f000['length']===0x0)return highlightDiffLine(_0x15f9f7,_0x2e2879);let _0x11bb22='';const _0x30a159=_0x1ad527==='add'?'diff-word-add':'diff-word-remove',_0x3f3ad0=_0x1ad527==='add'?'insert':'delete';for(const _0x5c9c8c of _0x53f000){const _0x279431=Utils['escapeHtml'](_0x5c9c8c['text']);_0x5c9c8c['type']===_0x3f3ad0?_0x11bb22+='<span\x20class=\x22'+_0x30a159+'\x22>'+_0x279431+'</span>':_0x11bb22+=_0x279431;}return _0x11bb22;}export function calculateDiffStats(_0x3562a6){let _0x34f327=0x0,_0x1d2025=0x0,_0x56d860=0x0;return _0x3562a6['forEach'](_0x2295e5=>{let _0x39edb2=0x0,_0x5eb25c=0x0;_0x2295e5['hunks']['forEach'](_0x2d227c=>{_0x2d227c['lines']['forEach'](_0x1bf94b=>{if(_0x1bf94b['startsWith']('+'))_0x39edb2+=0x1;else{if(_0x1bf94b['startsWith']('-'))_0x5eb25c+=0x1;}});}),(_0x39edb2+_0x5eb25c>0x0||_0x2295e5['isDeleted'])&&(_0x56d860+=0x1),_0x34f327+=_0x39edb2,_0x1d2025+=_0x5eb25c;}),{'additions':_0x34f327,'deletions':_0x1d2025,'files':_0x56d860};}export function getFileStatus(_0x4764df,_0x2f6d48,_0x39d97a){if(_0x4764df['isDeleted'])return'deleted';if(_0x2f6d48>0x0&&_0x39d97a===0x0)return'added';return'modified';}export function safeBase64(_0x4b8f67){try{return btoa(unescape(encodeURIComponent(_0x4b8f67)));}catch(_0x1616ef){return btoa(_0x4b8f67);}}export function getStorageKey(_0x16bf7f,_0x5b47a6){return _0x16bf7f+'-'+safeBase64(_0x5b47a6);}export function getCollapsedState(_0x2509a6,_0x404898){const _0x1ca2bd=localStorage['getItem'](getStorageKey(_0x2509a6,_0x404898));return _0x1ca2bd==='true';}export function renderUnifiedDiff(_0x3c32f3,_0x2def71){return _0x3c32f3['map']((_0x38ac4f,_0x1acc19)=>{const _0x303f80=_0x38ac4f['newPath']||_0x38ac4f['oldPath']||'unknown',_0x332f33='diff-'+_0x2def71+'-'+_0x1acc19,_0xe51690=getFileLanguage(_0x303f80),{additions:_0x177167,deletions:_0x371c98}=calculateDiffStats([_0x38ac4f]),_0x5ab35e=getCollapsedState(_0x2def71,_0x303f80),_0xc42189=getFileStatus(_0x38ac4f,_0x177167,_0x371c98),_0x46e0cc=_0xc42189==='added'?'A':_0xc42189==='deleted'?'D':'M',_0x4021d0=_0x38ac4f['hunks']['map'](_0x93dfbb=>{const {oldStart:_0x269862,newStart:_0x5bb2b3}=parseHunkHeader(_0x93dfbb['header']);let _0xc6718f=_0x269862,_0x4d8c34=_0x5bb2b3;const _0xce47fb=_0x93dfbb['lines']['map'](_0x574f68=>({'line':_0x574f68,'type':_0x574f68['startsWith']('+')?'add':_0x574f68['startsWith']('-')?'remove':_0x574f68['startsWith']('\x5c')?'meta':'context'}));let _0x144e0d=0x0;while(_0x144e0d<_0xce47fb['length']){if(_0xce47fb[_0x144e0d]['type']==='remove'){let _0x3d391f=_0x144e0d,_0x51b823=_0x144e0d;while(_0x51b823<_0xce47fb['length']&&_0xce47fb[_0x51b823]['type']==='remove')_0x51b823++;let _0x3c144d=_0x51b823,_0x2cae08=_0x3c144d;while(_0x2cae08<_0xce47fb['length']&&_0xce47fb[_0x2cae08]['type']==='add')_0x2cae08++;const _0x1e40ef=_0x51b823-_0x3d391f,_0x3191e5=_0x2cae08-_0x3c144d,_0x392400=Math['min'](_0x1e40ef,_0x3191e5);for(let _0x1ba06d=0x0;_0x1ba06d<_0x392400;_0x1ba06d++){const _0x4d9677=_0xce47fb[_0x3d391f+_0x1ba06d]['line']['substring'](0x1),_0x56d145=_0xce47fb[_0x3c144d+_0x1ba06d]['line']['substring'](0x1),_0x1d8a33=computeWordDiff(_0x4d9677,_0x56d145);_0xce47fb[_0x3d391f+_0x1ba06d]['wordDiff']=_0x1d8a33['old'],_0xce47fb[_0x3c144d+_0x1ba06d]['wordDiff']=_0x1d8a33['new'];}_0x144e0d=_0x2cae08;}else _0x144e0d++;}const _0x13bb5b=_0xce47fb['map'](_0x38db46=>{const _0x5e0797=_0x38db46['line'];if(_0x5e0797['startsWith']('+')){const _0x5c923e=_0x5e0797['substring'](0x1),_0x28e735=_0x38db46['wordDiff']?renderDiffLineWithWordHighlight(_0x5c923e,_0x38db46['wordDiff'],'add',_0xe51690):highlightDiffLine(_0x5c923e,_0xe51690),_0x54226b='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4d8c34+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x28e735+'</span></div>';return _0x4d8c34+=0x1,_0x54226b;}if(_0x5e0797['startsWith']('-')){const _0x173263=_0x5e0797['substring'](0x1),_0x47c5b3=_0x38db46['wordDiff']?renderDiffLineWithWordHighlight(_0x173263,_0x38db46['wordDiff'],'remove',_0xe51690):highlightDiffLine(_0x173263,_0xe51690),_0x2e3822='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0xc6718f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x47c5b3+'</span></div>';return _0xc6718f+=0x1,_0x2e3822;}if(_0x5e0797['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x5e0797)+'</span></div>';const _0x2f0c7a=_0x5e0797['startsWith']('\x20')?_0x5e0797['substring'](0x1):_0x5e0797,_0x5b76cf=highlightDiffLine(_0x2f0c7a,_0xe51690),_0x5b7914='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0xc6718f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4d8c34+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x5b76cf+'</span></div>';return _0xc6718f+=0x1,_0x4d8c34+=0x1,_0x5b7914;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x93dfbb['header'])+'</div>'+_0x13bb5b+'</div>';})['join'](''),_0x40713e=_0x4021d0||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x332f33+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x332f33+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x303f80)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0xc42189+'\x22>'+_0x46e0cc+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x303f80)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x177167+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x371c98+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x332f33+'\x22\x20data-collapsed=\x22'+_0x5ab35e+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x5ab35e?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x5ab35e?'collapsed':'')+'\x22\x20id=\x22'+_0x332f33+'\x22>'+_0x40713e+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
@@ -106,11 +106,11 @@
106
106
  </svg>
107
107
  <span class="option-text">Server Settings</span>
108
108
  </button>
109
- <button type="button" class="dropdown-item admin-menu-item" id="server-health-btn">
109
+ <button type="button" class="dropdown-item admin-menu-item" onclick="window.location.href='admin.html'">
110
110
  <svg class="option-icon icon-health" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
111
111
  <path d="M22 12h-4l-3 9L9 3l-3 9H2"></path>
112
112
  </svg>
113
- <span class="option-text">Server Health</span>
113
+ <span class="option-text">Server Administration</span>
114
114
  </button>
115
115
  <button type="button" class="dropdown-item admin-menu-item" onclick="window.location.href='git-history.html'">
116
116
  <svg class="option-icon icon-git-history" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
@@ -1968,7 +1968,7 @@
1968
1968
  <div class="modal-body">
1969
1969
  <div id="run-deployment-error" class="modal-error" hidden></div>
1970
1970
  <div id="run-deployment-parameters"></div>
1971
- <div class="form-row">
1971
+ <div>
1972
1972
  <label class="checkbox-label">
1973
1973
  <input type="checkbox" id="run-deployment-dry-run">
1974
1974
  <span>Dry run (validate only, don't execute)</span>