@profoundlogic/coderflow-server 0.7.6 → 0.7.7

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 (173) hide show
  1. package/dist/base-image/agent-wrapper.sh +3 -1
  2. package/dist/coder-server.js +1 -1
  3. package/dist/config.js +1 -1
  4. package/dist/lib/agent-keepalive.js +1 -1
  5. package/dist/lib/agent-models.js +1 -1
  6. package/dist/lib/api-keys.js +1 -1
  7. package/dist/lib/apiKeys.js +1 -1
  8. package/dist/lib/app-server-ports.js +1 -1
  9. package/dist/lib/auto-judge.js +1 -1
  10. package/dist/lib/automation-service.js +1 -1
  11. package/dist/lib/basic-auth.js +1 -1
  12. package/dist/lib/bindings.js +1 -1
  13. package/dist/lib/build-history.js +1 -1
  14. package/dist/lib/build-output-service.js +1 -1
  15. package/dist/lib/build-scheduler.js +1 -1
  16. package/dist/lib/build-service.js +1 -1
  17. package/dist/lib/ca-certificates.js +1 -1
  18. package/dist/lib/claude-oauth-refresh.js +1 -1
  19. package/dist/lib/cli/build.js +1 -1
  20. package/dist/lib/cli/cleanup-users.js +1 -1
  21. package/dist/lib/cli/config-command.js +1 -1
  22. package/dist/lib/cli/config.js +1 -1
  23. package/dist/lib/cli/create-user.js +1 -1
  24. package/dist/lib/cli/grant-admin.js +1 -1
  25. package/dist/lib/cli/init.js +1 -1
  26. package/dist/lib/cli/jira.js +1 -1
  27. package/dist/lib/cli/license.js +1 -1
  28. package/dist/lib/cli/list-roles.js +1 -1
  29. package/dist/lib/cli/list-users.js +1 -1
  30. package/dist/lib/cli/server-manager.js +1 -1
  31. package/dist/lib/cli/set-password.js +1 -1
  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/objective-management.js +1 -1
  116. package/dist/routes/password.js +1 -1
  117. package/dist/routes/prompt.js +1 -1
  118. package/dist/routes/provider-auth.js +1 -1
  119. package/dist/routes/qa.js +1 -1
  120. package/dist/routes/roles.js +1 -1
  121. package/dist/routes/settings.js +1 -1
  122. package/dist/routes/skill-management.js +1 -1
  123. package/dist/routes/skills.js +1 -1
  124. package/dist/routes/tasks.js +1 -1
  125. package/dist/routes/teams.js +1 -1
  126. package/dist/routes/templates.js +1 -1
  127. package/dist/routes/test-task.js +1 -1
  128. package/dist/routes/test.js +1 -1
  129. package/dist/routes/users.js +1 -1
  130. package/dist/routes/visualizations.js +1 -1
  131. package/dist/scripts/create-user.js +1 -1
  132. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  133. package/dist/start.js +1 -1
  134. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  135. package/dist/web-ui/public/activity-feed.js +1 -1
  136. package/dist/web-ui/public/activity-formatters.js +1 -1
  137. package/dist/web-ui/public/agent-event-parser.js +1 -1
  138. package/dist/web-ui/public/app.js +1 -1
  139. package/dist/web-ui/public/approve-dialog.js +1 -1
  140. package/dist/web-ui/public/automation-links.js +1 -1
  141. package/dist/web-ui/public/automation-schedule.js +1 -1
  142. package/dist/web-ui/public/comments-widget.js +1 -1
  143. package/dist/web-ui/public/diff-utils.js +1 -1
  144. package/dist/web-ui/public/environments.js +1 -1
  145. package/dist/web-ui/public/feedback-widget.js +1 -1
  146. package/dist/web-ui/public/file-selection-tree.js +1 -1
  147. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  148. package/dist/web-ui/public/git-history.js +1 -1
  149. package/dist/web-ui/public/git-status.js +1 -1
  150. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  151. package/dist/web-ui/public/index.js +1 -1
  152. package/dist/web-ui/public/login.js +1 -1
  153. package/dist/web-ui/public/markdown-editor.js +1 -1
  154. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  155. package/dist/web-ui/public/modal-maximize.js +1 -1
  156. package/dist/web-ui/public/notifications.js +1 -1
  157. package/dist/web-ui/public/permissions.js +1 -1
  158. package/dist/web-ui/public/pr-dialog.js +1 -1
  159. package/dist/web-ui/public/roles.js +1 -1
  160. package/dist/web-ui/public/server-health.js +1 -1
  161. package/dist/web-ui/public/settings.js +1 -1
  162. package/dist/web-ui/public/setup-password.js +1 -1
  163. package/dist/web-ui/public/skills.js +1 -1
  164. package/dist/web-ui/public/sse-client.js +1 -1
  165. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  166. package/dist/web-ui/public/task-judging-helpers.js +1 -1
  167. package/dist/web-ui/public/task.js +1 -1
  168. package/dist/web-ui/public/teams.js +1 -1
  169. package/dist/web-ui/public/terminal.js +1 -1
  170. package/dist/web-ui/public/theme.js +1 -1
  171. package/dist/web-ui/public/users.js +1 -1
  172. package/dist/web-ui/public/variant-grouping.js +1 -1
  173. package/package.json +1 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0xcc34c5){return _0xcc34c5==='test'||_0xcc34c5==='deploy';}export function createApproveDialogHTML(_0x144283='',_0x17bd02={}){const _0x2516f4=_0x144283,_0x2b9309=_0x17bd02['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x15965a=_0x17bd02['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x5c36f8=_0x17bd02['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x2516f4+'approve-modal\x22\x20class=\x22'+_0x2b9309+'\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'+_0x2516f4+'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'+_0x2516f4+'approve-warning\x22\x20class=\x22'+_0x15965a+'\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'+_0x2516f4+'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'+_0x2516f4+'approve-error\x22\x20class=\x22'+_0x5c36f8+'\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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'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'+_0x2516f4+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x2516f4+'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(_0x1a0049={}){this['prefix']=_0x1a0049['prefix']||'',this['onApprove']=_0x1a0049['onApprove'],this['onSync']=_0x1a0049['onSync'],this['onSuccess']=_0x1a0049['onSuccess'],this['onError']=_0x1a0049['onError'],this['onCreatePR']=_0x1a0049['onCreatePR'],this['showToast']=_0x1a0049['showToast']||(()=>{}),this['container']=_0x1a0049['container']||document['body'],this['useTaskPageStyles']=_0x1a0049['useTaskPageStyles']||![],this['baseUrl']=_0x1a0049['baseUrl']||'',this['coderflowAttribution']=_0x1a0049['coderflowAttribution'],this['onSyncToIbmi']=_0x1a0049['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x1a0049['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 _0xd10a17=document['createElement']('div');_0xd10a17['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0xd10a17['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x2ad0dd){return document['getElementById'](''+this['prefix']+_0x2ad0dd);}['_bindEvents'](){const _0x48f193=this['_el']('approve-modal'),_0x20841c=this['_el']('close-approve-modal'),_0x3dfb26=this['_el']('cancel-approve'),_0xc5d3cc=this['_el']('confirm-approve'),_0x327d54=_0x48f193?.['querySelector']('.modal-overlay'),_0x3e9537=this['_el']('create-new-branch'),_0x1908ad=this['_el']('new-branch-input-container'),_0x2b75d0=this['_el']('new-branch-name'),_0x4a4286=this['_el']('push-after-commit'),_0x234f78=this['_el']('create-pull-request'),_0x281096=this['_el']('pr-hint');_0x20841c?.['addEventListener']('click',()=>this['hide']()),_0x3dfb26?.['addEventListener']('click',()=>this['hide']()),_0x327d54?.['addEventListener']('click',()=>this['hide']()),_0xc5d3cc?.['addEventListener']('click',()=>this['_handleApprove']());_0x3e9537&&_0x3e9537['addEventListener']('change',()=>{_0x1908ad&&(_0x1908ad['hidden']=!_0x3e9537['checked']),_0x3e9537['checked']&&_0x2b75d0&&_0x2b75d0['focus']();});_0x234f78&&_0x4a4286&&_0x3e9537&&(_0x234f78['addEventListener']('change',()=>{this['_createPR']=_0x234f78['checked'];if(_0x234f78['checked']){_0x4a4286['checked']=!![],_0x4a4286['disabled']=!![],_0x3e9537['checked']=!![],_0x3e9537['disabled']=!![];_0x1908ad&&(_0x1908ad['hidden']=![]);if(_0x281096)_0x281096['hidden']=![];}else{_0x4a4286['disabled']=![],_0x3e9537['disabled']=![];if(_0x281096)_0x281096['hidden']=!![];}}),_0x4a4286['addEventListener']('change',()=>{if(!_0x4a4286['checked']&&_0x234f78['checked']){_0x234f78['checked']=![],this['_createPR']=![],_0x4a4286['disabled']=![],_0x3e9537['disabled']=![];if(_0x281096)_0x281096['hidden']=!![];}}));const _0x53272a=this['_el']('sync-to-ibmi');_0x53272a&&_0x53272a['addEventListener']('change',async _0x17b63c=>{const _0x3834e2=this['_el']('ibmi-sync-fields');if(_0x3834e2)_0x3834e2['hidden']=!_0x17b63c['target']['checked'];if(_0x17b63c['target']['checked']){const _0x2b4d02=this['_el']('ibmi-sync-library'),_0x2fe201=localStorage['getItem']('coderflow_ibmi_sync_library');_0x2fe201&&_0x2b4d02&&!_0x2b4d02['value']&&(_0x2b4d02['value']=_0x2fe201);const _0x45a3c1=this['_el']('ibmi-sync-user');if(_0x45a3c1&&!_0x45a3c1['value']){const _0x5cfc78=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x5cfc78)_0x45a3c1['value']=_0x5cfc78;}const _0x1e47f8=this['_el']('ibmi-sync-password');if(_0x1e47f8)_0x1e47f8['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x1e02e3=>{_0x1e02e3['key']==='Escape'&&_0x48f193&&!_0x48f193['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x588854=this['_el']('ibmi-sync-file-tree'),_0x3a6629=this['_el']('ibmi-sync-files-summary');if(!_0x588854)return;_0x588854['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x3a6629)_0x3a6629['textContent']='';try{const {files:_0x53b5ca,absolutePaths:_0x202dc2}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x53b5ca,this['_syncAbsolutePaths']=_0x202dc2;if(_0x53b5ca['length']===0x0){_0x588854['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x25fe10}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x262cf0,hasKnownIbmiExtension:_0x3180c9}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x25fe10({'container':_0x588854,'files':_0x53b5ca,'isPreselected':_0x3a3555=>{const {valid:_0x37b9d9}=_0x262cf0(_0x3a3555);return _0x37b9d9&&_0x3180c9(_0x3a3555);},'isDisabled':_0x1e322e=>{const {valid:_0x43ad10,reason:_0x4ff015}=_0x262cf0(_0x1e322e);return{'disabled':!_0x43ad10,'reason':_0x4ff015};},'isAutoCheckEligible':_0x2ac72a=>{const {valid:_0x1d55cd}=_0x262cf0(_0x2ac72a);return _0x1d55cd&&_0x3180c9(_0x2ac72a);},'onChange':_0x48e27b=>{_0x3a6629&&(_0x3a6629['textContent']=_0x48e27b['length']+'\x20of\x20'+_0x53b5ca['length']+'\x20file'+(_0x53b5ca['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x82c90b){_0x588854['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x47ed05){const _0x3314e5=this['_el']('approve-error'),_0x40208f=this['_el']('approve-error-text');_0x3314e5&&_0x40208f&&(_0x40208f['textContent']=_0x47ed05,_0x3314e5['hidden']=![],_0x3314e5['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x4a6f5e=this['_el']('approve-error'),_0x3bc0b0=this['_el']('approve-error-text');_0x4a6f5e&&_0x3bc0b0&&(_0x4a6f5e['hidden']=!![],_0x3bc0b0['textContent']='');}['_displayBranchInfo'](_0x29fe83,_0x3ab484={}){const _0x4c429b=this['_el']('approve-branches');if(!_0x4c429b)return;const _0x2d890f=[];for(const _0x19bdd2 of _0x29fe83){_0x3ab484[_0x19bdd2['name']]&&_0x2d890f['push']({'repo':_0x19bdd2['name'],'branch':_0x3ab484[_0x19bdd2['name']]});}if(_0x2d890f['length']>0x0){_0x4c429b['hidden']=![];if(_0x2d890f['length']===0x1)_0x4c429b['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x2d890f[0x0]['branch']+'</code></div>';else{const _0x51a5ec=_0x2d890f['map'](_0x396292=>'<div\x20class=\x22branch-item\x22><strong>'+_0x396292['repo']+':</strong>\x20<code>'+_0x396292['branch']+'</code></div>')['join']('');_0x4c429b['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x51a5ec+'</div></div>';}}else _0x4c429b['hidden']=!![],_0x4c429b['innerHTML']='';}['showWarning'](_0x3fc505){const _0x1647f0=this['_el']('approve-warning'),_0x26f4a4=this['_el']('approve-warning-text');_0x1647f0&&_0x26f4a4&&(_0x26f4a4['textContent']=_0x3fc505,_0x1647f0['hidden']=![]);}['hideWarning'](){const _0x3cd993=this['_el']('approve-warning'),_0xec64e2=this['_el']('approve-warning-text');_0x3cd993&&_0xec64e2&&(_0x3cd993['hidden']=!![],_0xec64e2['textContent']='');}['_stripCoAuthoredByLines'](_0x12d671){return _0x12d671['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0xddbbf1){try{let _0x3acc8f;try{const _0x2290ce=await fetch(this['baseUrl']+'/settings');if(_0x2290ce['ok']){const _0x3a9794=await _0x2290ce['json']();_0x3acc8f=_0x3a9794['coderflow_attribution']!==![];}}catch(_0x5c62a3){}_0x3acc8f===undefined&&(this['coderflowAttribution']!==undefined?_0x3acc8f=this['coderflowAttribution']!==![]:_0x3acc8f=!![]);const _0x32b00f=this['_stripCoAuthoredByLines'](_0xddbbf1);if(!_0x3acc8f)return _0x32b00f;const _0x390418='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x32b00f+_0x390418;}catch(_0x5d0f37){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x5d0f37),_0xddbbf1;}}['show'](_0x5a05bb){!this['initialized']&&this['init']();this['taskData']=_0x5a05bb;const _0x3979a1=this['_el']('approve-modal'),_0x13efa8=this['_el']('commit-message-input'),_0x3f4dfb=this['_el']('pull-before-commit'),_0x240512=this['_el']('push-after-commit'),_0x59b3be=this['_el']('create-new-branch'),_0x5c7a4c=this['_el']('new-branch-input-container'),_0x2d08e8=this['_el']('new-branch-name'),_0xf2989e=this['_el']('approve-repo-name'),_0x53440e=this['_el']('approve-stats'),_0x2f467d=this['_el']('multi-repo-note');if(!_0x3979a1)return;this['hideError'](),this['hideWarning']();_0x5a05bb['warning']&&this['showWarning'](_0x5a05bb['warning']);const _0xe10406=_0x5a05bb['reposChanged']||[];if(_0xe10406['length']===0x0&&!_0x5a05bb['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0xe10406,_0x5a05bb);const _0x15bb4a=_0x5a05bb['commitMessage']||'',_0x58ac97=this['_stripCoAuthoredByLines'](_0x15bb4a);_0x13efa8['value']=_0x58ac97;if(_0x3f4dfb)_0x3f4dfb['checked']=!![];if(_0x240512)_0x240512['checked']=!![];_0x59b3be&&(_0x59b3be['checked']=![]);_0x5c7a4c&&(_0x5c7a4c['hidden']=!![]);_0x2d08e8&&(_0x2d08e8['value']='');if(_0x240512)_0x240512['disabled']=![];if(_0x59b3be)_0x59b3be['disabled']=![];this['updatePRSupport'](_0x5a05bb['prSupported']===!![]);const _0x12ebf7=this['_el']('ibmi-sync-section');if(_0x12ebf7){_0x12ebf7['hidden']=!_0x5a05bb['ibmiSyncAvailable'];const _0x204df9=this['_el']('sync-to-ibmi'),_0x4a3b46=this['_el']('ibmi-sync-fields'),_0x2000bd=this['_el']('ibmi-sync-library');if(_0x204df9)_0x204df9['checked']=![];if(_0x4a3b46)_0x4a3b46['hidden']=!![];if(_0x2000bd)_0x2000bd['value']='';const _0x3d46d2=this['_el']('ibmi-sync-credentials-row');_0x3d46d2&&(_0x3d46d2['hidden']=!(_0x5a05bb['ibmiSyncAvailable']&&_0x5a05bb['syncCredentials']==='prompt'));}const _0x9b19ae=this['_el']('confirm-approve');_0x5a05bb['syncFirst']&&this['onSync']?(_0x9b19ae&&(_0x9b19ae['disabled']=!![],_0x9b19ae['textContent']='Syncing...'),this['_performSync']()):_0x9b19ae&&(_0x9b19ae['disabled']=![],_0x9b19ae['textContent']='Commit\x20Changes');_0x3979a1['hidden']=![];const _0x2dca17=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x2dca17,'taskId':_0x5a05bb['taskId'],'originalCommitMessage':_0x58ac97}),setTimeout(()=>{_0x13efa8['focus'](),_0x13efa8['setSelectionRange'](0x0,_0x13efa8['value']['length']);},0x64);}['updatePRSupport'](_0x34db4d){const _0x5c33d8=this['_el']('pr-option-section'),_0x4ce9e2=this['_el']('create-pull-request'),_0x31f851=this['_el']('pr-hint'),_0x3a578b=this['_el']('push-after-commit'),_0x31f8f0=this['_el']('create-new-branch');if(!_0x5c33d8)return;if(_0x34db4d){_0x5c33d8['hidden']=![];_0x4ce9e2&&!_0x4ce9e2['disabled']&&(_0x4ce9e2['checked']=![]);if(_0x31f851)_0x31f851['hidden']=!![];this['_createPR']=![];return;}_0x4ce9e2?.['checked']&&(_0x4ce9e2['checked']=![]);if(_0x31f851)_0x31f851['hidden']=!![];if(_0x3a578b)_0x3a578b['disabled']=![];if(_0x31f8f0)_0x31f8f0['disabled']=![];this['_createPR']=![],_0x5c33d8['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0xa0a9d3,taskId:_0xbd9296,originalCommitMessage:_0x58da47}){const _0x17db19=this['_el']('commit-message-input');if(!_0x17db19)return;const _0x1668ce=await this['_addAttributionIfEnabled'](_0x58da47);if(_0xa0a9d3!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0xbd9296)return;if(!this['isVisible']())return;const _0x2f17a5=_0x14e324=>_0x14e324['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x2f17a5(_0x17db19['value'])!==_0x2f17a5(_0x58da47))return;_0x17db19['value']=_0x1668ce;}['_updateDisplay'](_0x19f0e6,_0x56cbd6){const _0x1606ef=this['_el']('approve-repo-name'),_0x4df81b=this['_el']('approve-stats'),_0x10adaa=this['_el']('multi-repo-note');if(_0x19f0e6['length']===0x0){if(_0x1606ef)_0x1606ef['textContent']='Syncing...';if(_0x4df81b)_0x4df81b['textContent']='';if(_0x10adaa)_0x10adaa['hidden']=!![];return;}const _0x365c0f=_0x19f0e6['reduce']((_0x212430,_0x488b58)=>_0x212430+(_0x488b58['files_changed']||0x0),0x0),_0x235331=_0x19f0e6['reduce']((_0x1a5f09,_0x213ed3)=>_0x1a5f09+(_0x213ed3['lines_added']||0x0),0x0),_0x2aa2a5=_0x19f0e6['reduce']((_0x565dca,_0x3b9b3e)=>_0x565dca+(_0x3b9b3e['lines_deleted']||0x0),0x0);if(_0x19f0e6['length']===0x1){if(_0x1606ef)_0x1606ef['textContent']=_0x19f0e6[0x0]?.['name']||'repository';if(_0x10adaa)_0x10adaa['hidden']=!![];}else{const _0x4cea55=_0x19f0e6['map'](_0x5a4574=>_0x5a4574['name'])['join'](',\x20');if(_0x1606ef)_0x1606ef['textContent']=_0x19f0e6['length']+'\x20repositories:\x20'+_0x4cea55;if(_0x10adaa)_0x10adaa['hidden']=![];}_0x4df81b&&(_0x4df81b['textContent']=_0x365c0f+'\x20file'+(_0x365c0f===0x1?'':'s')+'\x20changed\x20(+'+_0x235331+'\x20-'+_0x2aa2a5+')'),this['_displayBranchInfo'](_0x19f0e6,_0x56cbd6?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x2a7c2c=this['_el']('confirm-approve');try{const _0x1e11db=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x1e11db['repos_changed']){const _0x3e5782=this['taskData']['reposChanged']?.['length']||0x0,_0xa4156d=this['taskData']['reposChanged']?.['reduce']((_0xc5dffa,_0x3b770b)=>_0xc5dffa+(_0x3b770b['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x1e11db['repos_changed'];if(_0x1e11db['current_branches']){const _0x32e9af={...this['taskData']['branches']||{}};for(const [_0x3f01e2,_0x46f696]of Object['entries'](_0x1e11db['current_branches'])){_0x46f696?_0x32e9af[_0x3f01e2]=_0x46f696:delete _0x32e9af[_0x3f01e2];}this['taskData']['branches']=_0x32e9af;}this['_updateDisplay'](_0x1e11db['repos_changed'],this['taskData']);const _0x45aa91=_0x1e11db['repos_changed']['length'],_0x1b94b2=_0x1e11db['repos_changed']['reduce']((_0x13fa43,_0x10ff03)=>_0x13fa43+(_0x10ff03['files_changed']||0x0),0x0);(_0x1b94b2>_0xa4156d||_0x45aa91>_0x3e5782)&&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.');}_0x2a7c2c&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x2a7c2c['disabled']=!![],_0x2a7c2c['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x2a7c2c['disabled']=![],_0x2a7c2c['textContent']='Commit\x20Changes'));}catch(_0x518fb0){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x518fb0);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x518fb0['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x2a7c2c&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x2a7c2c['disabled']=![],_0x2a7c2c['textContent']='Commit\x20Changes'):(_0x2a7c2c['disabled']=!![],_0x2a7c2c['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x26d528=this['_el']('approve-modal');_0x26d528&&(_0x26d528['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x26b008=this['_el']('commit-message-input'),_0x2ce03a=this['_el']('pull-before-commit'),_0x48fb94=this['_el']('push-after-commit'),_0x468e71=this['_el']('create-new-branch'),_0x57f153=this['_el']('new-branch-name'),_0x3a88a1=this['_el']('confirm-approve'),_0x226fcd=_0x26b008['value']['trim'](),_0x39aba3=_0x2ce03a?.['checked']??!![],_0x49effb=_0x48fb94?.['checked']??!![],_0x39f61e=_0x468e71?.['checked']||![],_0x3b69a5=_0x57f153?.['value']['trim']()||'';this['hideError']();if(!_0x226fcd){this['showError']('Commit\x20message\x20is\x20required'),_0x26b008['focus']();return;}if(_0x39f61e&&!_0x3b69a5){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x57f153?.['focus']();return;}if(_0x39f61e&&_0x3b69a5){const _0x1ef663=/[\s~^:?*\[\\]/;if(_0x1ef663['test'](_0x3b69a5)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x57f153?.['focus']();return;}}const _0x5e22e9=this['_el']('sync-to-ibmi')?.['checked'];if(_0x5e22e9){const _0x2be49b=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x2be49b){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0xf21953=this['_syncFileTree']['getSelectedFiles']();if(_0xf21953['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x31fa98=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x31fa98){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0xd6c7b0=this['_el']('ibmi-sync-password')?.['value'];if(!_0xd6c7b0){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x3f9def=_0x3a88a1?.['textContent']||'Commit\x20Changes';_0x3a88a1&&(_0x3a88a1['disabled']=!![],_0x39f61e?_0x3a88a1['textContent']='Creating\x20branch\x20&\x20committing...':_0x3a88a1['textContent']=_0x39aba3?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x1134ff={'commit_message':_0x226fcd,'pull':_0x39aba3,'push':_0x49effb};_0x39f61e&&_0x3b69a5&&(_0x1134ff['new_branch']=_0x3b69a5);let _0x87a71c=null;this['onApprove']&&(_0x87a71c=await this['onApprove'](this['taskData']['taskId'],_0x1134ff));let _0xc3204e='Changes\x20committed';if(_0x39f61e)_0xc3204e='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x3b69a5+'\x27',_0x49effb&&(_0xc3204e+='\x20and\x20pushed');else{if(_0x39aba3&&_0x49effb)_0xc3204e='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x39aba3)_0xc3204e='Changes\x20pulled\x20and\x20committed';else _0x49effb&&(_0xc3204e='Changes\x20committed\x20and\x20pushed');}}const _0x2ff2c6=this['_el']('sync-to-ibmi')?.['checked'];let _0x14eefa=null,_0x481244=null,_0x10b4f4=null,_0x5f19f9=null;if(_0x2ff2c6&&this['onSyncToIbmi']){_0x14eefa=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x481244=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x10b4f4=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x2aa1ea=this['_syncFileTree']['getSelectedFiles']();_0x5f19f9=_0x2aa1ea['map'](_0x415e47=>{const _0x5d73c0=this['_syncRelativeFiles']['indexOf'](_0x415e47);return _0x5d73c0>=0x0?this['_syncAbsolutePaths'][_0x5d73c0]:_0x415e47;});}}this['showToast'](_0xc3204e,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x87a71c||{});}catch(_0x3753e6){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x3753e6);}if(_0x2ff2c6&&this['onSyncToIbmi']&&_0x14eefa){localStorage['setItem']('coderflow_ibmi_sync_library',_0x14eefa);if(_0x481244)localStorage['setItem']('coderflow_ibmi_sync_user',_0x481244);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x14eefa,_0x481244,_0x10b4f4,_0x5f19f9);}catch(_0x15eb5a){this['showToast']('Sync\x20failed:\x20'+_0x15eb5a['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x3653c5){console['error']('Failed\x20to\x20approve\x20changes',_0x3653c5),this['showError']('Failed\x20to\x20commit:\x20'+_0x3653c5['message']),_0x3a88a1&&(_0x3a88a1['disabled']=![],_0x3a88a1['textContent']=_0x3f9def),this['onError']&&this['onError'](_0x3653c5);}}['isVisible'](){const _0x4bcb0f=this['_el']('approve-modal');return _0x4bcb0f&&!_0x4bcb0f['hidden'];}['destroy'](){const _0x13ad18=this['_el']('approve-modal');_0x13ad18&&_0x13ad18['remove'](),this['initialized']=![];}}export function getApproveState(_0x5b62f0,_0x303ec0){if(!_0x5b62f0)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x5b62f0['taskType']))return{'canApprove':![],'reason':(_0x5b62f0['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x5e0fd9=_0x303ec0?.['repos_changed']?.['length']>0x0,_0x4516a4=_0x5b62f0['status']==='completed'||_0x5b62f0['status']==='failed'||_0x5b62f0['status']==='interrupted',_0x41700a=_0x5b62f0['containerState']==='running',_0x6cd698=_0x5b62f0['approvedBy']!==undefined&&_0x5b62f0['approvedBy']!==null;if(_0x6cd698){const _0x4f7113=_0x5b62f0['approvedBy']['name']||_0x5b62f0['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x4f7113};}if(!_0x5e0fd9)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x4516a4)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x5b62f0['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x41700a)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
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 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x3fa20a,_0x48c63a){const _0x8064af=new URLSearchParams();_0x3fa20a&&_0x8064af['set']('env',String(_0x3fa20a));_0x8064af['set']('tab','automations');_0x48c63a&&_0x8064af['set']('automation',String(_0x48c63a));const _0xe8151a=_0x8064af['toString']();return'environments.html'+(_0xe8151a?'?'+_0xe8151a:'');}export function buildAutomationTaskFilterHref(_0x3995ec){const _0x11386a=new URLSearchParams();_0x3995ec&&_0x11386a['set']('automation',String(_0x3995ec));const _0x2f8887=_0x11386a['toString']();return'index.html'+(_0x2f8887?'?'+_0x2f8887:'');}export function parseAutomationDeepLinkParams(_0x25208a=''){const _0x2d37f6=new URLSearchParams(_0x25208a||'');return{'env':_0x2d37f6['get']('env'),'tab':_0x2d37f6['get']('tab'),'automation':_0x2d37f6['get']('automation')};}
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 +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(_0x28deca,_0x3a9a03,_0x5a3d26){const _0x4278e4=Number['parseInt'](_0x28deca,0xa);if(!Number['isInteger'](_0x4278e4)||_0x4278e4<_0x3a9a03||_0x4278e4>_0x5a3d26)return null;return _0x4278e4;}function inferRecurringInterval(_0x489d6f,_0x15f517){if(_0x489d6f==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x489d6f==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x489d6f!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x15f517==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x15f517))return'0\x20*\x20*\x20*\x20*';for(const _0x32582d of RECURRING_INTERVAL_STEPS){if(_0x15f517['startsWith']('*/'+_0x32582d)||_0x15f517['includes']('/'+_0x32582d))return'0\x20*/'+_0x32582d+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x4dae58){const _0x5a17d4=String(_0x4dae58||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x5a17d4)return{'start':'','end':''};const _0x10e2a3=parseBoundedInteger(_0x5a17d4[0x1],0x0,0x17),_0x40dbb1=parseBoundedInteger(_0x5a17d4[0x2],0x0,0x17);if(_0x10e2a3===null||_0x40dbb1===null||_0x10e2a3>_0x40dbb1)return{'start':'','end':''};return{'start':String(_0x10e2a3),'end':String(_0x40dbb1)};}export function parseAutomationScheduleToFormState(_0x4f1e9a){const _0x9fe9=String(_0x4f1e9a||'')['trim'](),_0x58ec45=createDefaultScheduleFormState(),_0x5e8a49=_0x9fe9['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x5e8a49){const _0x1ae9c2=parseBoundedInteger(_0x5e8a49[0x1],0x0,0x3b),_0x42e656=parseBoundedInteger(_0x5e8a49[0x2],0x0,0x17);if(_0x1ae9c2!==null&&_0x42e656!==null)return _0x58ec45['frequency']='daily',_0x58ec45['dailyMinute']=String(_0x1ae9c2),_0x58ec45['dailyHour']=String(_0x42e656),_0x58ec45;}const _0x54e3d2=_0x9fe9['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x54e3d2){const _0x4a9637=parseBoundedInteger(_0x54e3d2[0x1],0x0,0x3b),_0x2636d6=parseBoundedInteger(_0x54e3d2[0x2],0x0,0x17),_0x439899=parseBoundedInteger(_0x54e3d2[0x3],0x0,0x7);if(_0x4a9637!==null&&_0x2636d6!==null&&_0x439899!==null)return _0x58ec45['frequency']='weekly',_0x58ec45['weeklyMinute']=String(_0x4a9637),_0x58ec45['weeklyHour']=String(_0x2636d6),_0x58ec45['weeklyDay']=String(_0x439899===0x7?0x0:_0x439899),_0x58ec45;}const _0x7f09e6=_0x9fe9['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x7f09e6){const _0x5efe4c=parseBoundedInteger(_0x7f09e6[0x1],0x0,0x3b),_0x435a74=parseBoundedInteger(_0x7f09e6[0x2],0x0,0x17),_0x4b3837=parseBoundedInteger(_0x7f09e6[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x5efe4c!==null&&_0x435a74!==null&&_0x4b3837!==null)return _0x58ec45['frequency']='monthly',_0x58ec45['monthlyMinute']=String(_0x5efe4c),_0x58ec45['monthlyHour']=String(_0x435a74),_0x58ec45['monthlyDay']=String(_0x4b3837),_0x58ec45;}const _0x408ac5=_0x9fe9['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x408ac5){const [,_0x4a741b,_0x35a485,_0x5206ff]=_0x408ac5;_0x58ec45['frequency']='recurring',_0x58ec45['recurringInterval']=inferRecurringInterval(_0x4a741b,_0x35a485),_0x58ec45['recurringDayToken']=String(_0x5206ff||'')['trim']()||'*';const _0x3703d9=parseRecurringHourRange(_0x35a485);return _0x58ec45['recurringStartHour']=_0x3703d9['start'],_0x58ec45['recurringEndHour']=_0x3703d9['end'],_0x58ec45;}return _0x58ec45['frequency']='custom',_0x58ec45['customCron']=_0x9fe9,_0x58ec45;}export function buildAutomationCronFromFormState(_0x430c41={}){const _0x38fc74=String(_0x430c41['frequency']||'daily');if(_0x38fc74==='custom')return String(_0x430c41['customCron']||'')['trim']();if(_0x38fc74==='daily'){const _0xa3e14b=String(_0x430c41['dailyHour']??'2'),_0x2c1e3a=String(_0x430c41['dailyMinute']??'0');return _0x2c1e3a+'\x20'+_0xa3e14b+'\x20*\x20*\x20*';}if(_0x38fc74==='weekly'){const _0x10f081=String(_0x430c41['weeklyDay']??'1'),_0x1236ce=String(_0x430c41['weeklyHour']??'9'),_0x4c92ee=String(_0x430c41['weeklyMinute']??'0');return _0x4c92ee+'\x20'+_0x1236ce+'\x20*\x20*\x20'+_0x10f081;}if(_0x38fc74==='monthly'){const _0x123a48=String(_0x430c41['monthlyDay']??'1'),_0x4a82ae=String(_0x430c41['monthlyHour']??'0'),_0x5745d5=String(_0x430c41['monthlyMinute']??'0');return _0x5745d5+'\x20'+_0x4a82ae+'\x20'+_0x123a48+'\x20*\x20*';}const _0xe3f3a3=String(_0x430c41['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x3b94ce='*/30',_0x178f19='*']=_0xe3f3a3['split'](/\s+/);let _0x3b13b3=_0x178f19;const _0x279cde=String(_0x430c41['recurringStartHour']??'')['trim'](),_0x2d9f55=String(_0x430c41['recurringEndHour']??'')['trim']();if(_0x279cde!==''&&_0x2d9f55!==''){const _0x3fb1c9=Number['parseInt'](_0x279cde,0xa),_0x458895=Number['parseInt'](_0x2d9f55,0xa);if(Number['isInteger'](_0x3fb1c9)&&Number['isInteger'](_0x458895)&&_0x3fb1c9<=_0x458895){const _0x2e2a14=_0x178f19['match'](/^\*\/(\d+)$/);_0x2e2a14?_0x3b13b3=_0x3fb1c9+'-'+_0x458895+'/'+_0x2e2a14[0x1]:_0x3b13b3=_0x3fb1c9+'-'+_0x458895;}}const _0x44367c=String(_0x430c41['recurringDayToken']??'*')['trim']()||'*';return _0x3b94ce+'\x20'+_0x3b13b3+'\x20*\x20*\x20'+_0x44367c;}
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 +1 @@
1
- export class CommentsWidget{constructor(_0x5a870d,_0x14469a={}){this['container']=_0x5a870d,this['options']={'taskId':_0x14469a['taskId']||null,'currentUserId':_0x14469a['currentUserId']||null,'compact':_0x14469a['compact']||![],'skipHeader':_0x14469a['skipHeader']||![],'onCommentsLoaded':_0x14469a['onCommentsLoaded']||null,'onCommentsChanged':_0x14469a['onCommentsChanged']||null,'enableAttachments':_0x14469a['enableAttachments']||![],'getAPI':_0x14469a['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 _0x4cf332=this['options']['getAPI'](),_0x348bda=await _0x4cf332['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x348bda['attachments']||[];}catch(_0x12d54d){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x12d54d),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 _0x659b80=this['header']['querySelector']('.comments-toggle-btn');_0x659b80['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 _0x4d2943=document['createElement']('div');_0x4d2943['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x4d2943['appendChild'](this['toolbar']);const _0x10fb61=document['createElement']('div');_0x10fb61['className']='comments-editor-placeholder',_0x4d2943['appendChild'](_0x10fb61);const _0x28a0bb=document['createElement']('div');_0x28a0bb['className']='comments-input-actions',_0x28a0bb['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'](_0x4d2943),this['inputSection']['appendChild'](_0x28a0bb),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x10fb61),this['submitBtn']=_0x28a0bb['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x28a0bb['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x51cb89){const _0x5e5f79=document['createElement']('textarea');_0x5e5f79['placeholder']='Add\x20a\x20comment...',_0x5e5f79['className']='comments-textarea',_0x51cb89['appendChild'](_0x5e5f79);const _0x53fc91=window['MarkdownEditor'];if(!_0x53fc91){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x13acf2={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x5ef131=>{const _0x4df8e6=_0x5ef131&&_0x5ef131['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x4df8e6;},'fetchUsers':async()=>{const _0x18b780=this['options']['getAPI']();return _0x18b780['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x13acf2['onAddAttachments']=_0x31eada=>{this['pendingAttachments']['push'](..._0x31eada),this['submitBtn']['disabled']=![];},_0x13acf2['resolveAttachmentUrl']=_0x1b781e=>{const _0x3e3771=this['options']['getAPI']();return _0x3e3771['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x1b781e);},_0x13acf2['isAttachmentNameTaken']=_0x501a9e=>{return this['pendingAttachments']['some'](_0x4702dd=>_0x4702dd['name']===_0x501a9e)||this['existingAttachments']['some'](_0x2466d1=>_0x2466d1['name']===_0x501a9e);});this['editor']=new _0x53fc91(_0x5e5f79,_0x13acf2);const _0x171b1f=this['editor']['editor'],_0x5ce61c=this['editor']['toolbar'];_0x5ce61c&&(_0x5ce61c['classList']['add']('comments-toolbar-hidden'),_0x171b1f['addEventListener']('focus',()=>{_0x5ce61c['classList']['remove']('comments-toolbar-hidden');}),_0x171b1f['addEventListener']('blur',_0x5d80bd=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x5ce61c['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x5ce61c['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x3bca8b=this['header']['querySelector']('.comments-chevron');_0x3bca8b&&(_0x3bca8b['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x4bb7ea){this['options']['taskId']=_0x4bb7ea,this['comments']=[],this['renderComments'](),_0x4bb7ea&&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 _0xb4eb9=this['options']['getAPI'](),_0x26b933=await _0xb4eb9['getComments'](this['options']['taskId']);this['comments']=_0x26b933['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x46cd0d){console['error']('Failed\x20to\x20load\x20comments:',_0x46cd0d),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'](_0x1a5378=>{const _0x176df5=this['createCommentElement'](_0x1a5378);this['commentsList']['appendChild'](_0x176df5);});}['createCommentElement'](_0x14fe45){const _0x4bbee7=document['createElement']('div');_0x4bbee7['className']='comment-item',_0x4bbee7['dataset']['commentId']=_0x14fe45['id'];const _0x2093db=this['options']['currentUserId']&&_0x14fe45['author']?.['userId']===this['options']['currentUserId'],_0x33a4c2=this['formatDate'](_0x14fe45['createdAt']),_0x5d9ad1=_0x14fe45['updatedAt']!==_0x14fe45['createdAt'],_0x2479f8=this['resolveAttachmentUrls'](_0x14fe45['content']);let _0x382fce=window['marked']?window['marked']['parse'](_0x2479f8):_0x2479f8;_0x382fce=this['renderMentions'](_0x382fce),_0x4bbee7['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'](_0x14fe45['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x14fe45['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x33a4c2+(_0x5d9ad1?'\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'+(_0x2093db?'\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>'+_0x382fce+'</div>\x0a\x20\x20\x20\x20';if(_0x2093db){const _0x39d79f=_0x4bbee7['querySelector']('.comment-edit-btn'),_0x571178=_0x4bbee7['querySelector']('.comment-delete-btn');_0x39d79f?.['addEventListener']('click',()=>this['startEdit'](_0x14fe45)),_0x571178?.['addEventListener']('click',()=>this['deleteComment'](_0x14fe45['id']));}return _0x4bbee7;}['formatDate'](_0x158cc4){const _0x17e65f=new Date(_0x158cc4),_0x491d44=new Date(),_0x40eac9=_0x491d44-_0x17e65f,_0x5545d3=Math['floor'](_0x40eac9/0xea60),_0x324015=Math['floor'](_0x40eac9/0x36ee80),_0x40f40e=Math['floor'](_0x40eac9/0x5265c00);if(_0x5545d3<0x1)return'just\x20now';if(_0x5545d3<0x3c)return _0x5545d3+'m\x20ago';if(_0x324015<0x18)return _0x324015+'h\x20ago';if(_0x40f40e<0x7)return _0x40f40e+'d\x20ago';return _0x17e65f['toLocaleDateString']();}['escapeHtml'](_0x3c4fa8){const _0x169bff=document['createElement']('div');return _0x169bff['textContent']=_0x3c4fa8,_0x169bff['innerHTML'];}['resolveAttachmentUrls'](_0x180fee){if(!_0x180fee||!this['options']['taskId'])return _0x180fee;const _0x173b7f=this['options']['getAPI'](),_0x4eeca6=_0x173b7f['getBaseUrl']();let _0x2456c6=String(_0x180fee)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x33fb9a,_0x5c8c74)=>{const _0xb36355=String(_0x5c8c74||'')['trim']();if(!_0xb36355)return _0x33fb9a;let _0x3297e1=_0xb36355;try{_0x3297e1=decodeURIComponent(_0xb36355);}catch{}return']('+_0x4eeca6+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x3297e1)+')';});return _0x2456c6;}['renderMentions'](_0x2ca03d){if(!_0x2ca03d)return _0x2ca03d;return String(_0x2ca03d)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0xdffcee,_0x1e426c,_0x3fc0a1)=>{const _0x540211=this['escapeHtml'](_0x3fc0a1),_0x2ee97d=this['escapeHtml'](_0x1e426c);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x2ee97d+'\x22>@'+_0x540211+'</span>';});}['startEdit'](_0x4e7ac3){this['editingCommentId']=_0x4e7ac3['id'],this['editor']['setValue'](_0x4e7ac3['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 _0xd4e8e5=this['editor']['getValue']()?.['trim']();if(!_0xd4e8e5&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0xee0b00=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0xee0b00['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x35ade6=>({'name':_0x35ade6['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x9f88a2=await _0xee0b00['updateComment'](this['options']['taskId'],this['editingCommentId'],_0xd4e8e5),_0x37ab72=this['comments']['findIndex'](_0x1fcbf2=>_0x1fcbf2['id']===this['editingCommentId']);_0x37ab72!==-0x1&&(this['comments'][_0x37ab72]=_0x9f88a2['comment']);}else{const _0x119bd5=await _0xee0b00['addComment'](this['options']['taskId'],_0xd4e8e5);this['comments']['push'](_0x119bd5['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x1731ae){console['error']('Failed\x20to\x20save\x20comment:',_0x1731ae),alert('Failed\x20to\x20save\x20comment:\x20'+_0x1731ae['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x1e0a32){const _0x4a6675=await this['showDeleteConfirmModal']();if(!_0x4a6675)return;try{const _0x38c209=this['options']['getAPI']();await _0x38c209['deleteComment'](this['options']['taskId'],_0x1e0a32),this['comments']=this['comments']['filter'](_0x4baa68=>_0x4baa68['id']!==_0x1e0a32),this['renderComments'](),this['updateCount']();}catch(_0x1a3c30){console['error']('Failed\x20to\x20delete\x20comment:',_0x1a3c30),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x1a3c30['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x25caea=>{const _0x378def=document['createElement']('div');_0x378def['className']='comments-confirm-modal',_0x378def['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'](_0x378def);const _0x19a5e3=_0x483ea2=>{document['removeEventListener']('keydown',_0x2c0f54),_0x378def['remove'](),_0x25caea(_0x483ea2);},_0x2c0f54=_0x283f91=>{if(_0x283f91['key']==='Escape')_0x19a5e3(![]);};document['addEventListener']('keydown',_0x2c0f54),_0x378def['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x19a5e3(![])),_0x378def['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x19a5e3(![])),_0x378def['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x19a5e3(![])),_0x378def['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x19a5e3(!![])),_0x378def['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x35d821){this['submitBtn']['disabled']=_0x35d821,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x35d821,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x35d821;}['updateCount'](){const _0x42fb79=this['comments']['length'],_0x11851a=this['container']['querySelector']('#comments-count-badge');_0x11851a&&(_0x11851a['textContent']=_0x42fb79,_0x11851a['hidden']=_0x42fb79===0x0);const _0x7a2d8d=this['container']['querySelector']('#comments-count');_0x7a2d8d&&(_0x7a2d8d['textContent']=_0x42fb79>0x0?'('+_0x42fb79+')':''),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(_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 +1 @@
1
- import{Utils}from'./app.js';export function parsePatchContent(_0x7483b0){const _0x344e63=[],_0x3e91ae=_0x7483b0['split']('\x0a');let _0x4cb92f=null,_0x404b6c=null;for(const _0x4bf778 of _0x3e91ae){if(_0x4bf778['startsWith']('diff\x20--git')){_0x4cb92f&&_0x404b6c&&_0x4cb92f['hunks']['push'](_0x404b6c);_0x4cb92f&&_0x344e63['push'](_0x4cb92f);const _0x2df867=_0x4bf778['match'](/diff --git a\/(.+?) b\/(.+)/);_0x4cb92f={'oldPath':_0x2df867?_0x2df867[0x1]:'','newPath':_0x2df867?_0x2df867[0x2]:'','hunks':[],'isDeleted':![]},_0x404b6c=null;}else{if(_0x4bf778['startsWith']('deleted\x20file\x20mode')&&_0x4cb92f)_0x4cb92f['isDeleted']=!![];else{if(_0x4bf778['startsWith']('@@'))_0x404b6c&&_0x4cb92f&&_0x4cb92f['hunks']['push'](_0x404b6c),_0x404b6c={'header':_0x4bf778,'lines':[]};else _0x404b6c&&_0x404b6c['lines']['push'](_0x4bf778);}}}return _0x4cb92f&&_0x404b6c&&_0x4cb92f['hunks']['push'](_0x404b6c),_0x4cb92f&&_0x344e63['push'](_0x4cb92f),_0x344e63;}export function parseHunkHeader(_0x108f8b){const _0x2b9e30=_0x108f8b['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x2b9e30)return{'oldStart':parseInt(_0x2b9e30[0x1],0xa),'newStart':parseInt(_0x2b9e30[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x236f99,_0x362a51){const _0x586dfe=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x586dfe&&_0x362a51)try{const _0x1e4018=_0x586dfe['getLanguage'](_0x362a51)?_0x362a51:null;if(_0x1e4018)return _0x586dfe['highlight'](_0x236f99,{'language':_0x1e4018})['value'];}catch(_0x15ffe0){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x15ffe0);}return Utils['escapeHtml'](_0x236f99);}export function getFileLanguage(_0xd1307e){const _0x32e749=_0xd1307e['split']('.')['pop']()['toLowerCase'](),_0x2e237a={'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 _0x2e237a[_0x32e749]||null;}export function computeWordDiff(_0x339a61,_0x587a6){const _0x3fc6be=_0x393d72=>{const _0x2e29a1=[];let _0x4820a1='',_0x1d64ff=![];for(let _0x1e4de7=0x0;_0x1e4de7<_0x393d72['length'];_0x1e4de7++){const _0x27a5f9=_0x393d72[_0x1e4de7],_0x5623ce=/\s/['test'](_0x27a5f9);if(_0x4820a1==='')_0x4820a1=_0x27a5f9,_0x1d64ff=_0x5623ce;else _0x5623ce===_0x1d64ff?_0x4820a1+=_0x27a5f9:(_0x2e29a1['push'](_0x4820a1),_0x4820a1=_0x27a5f9,_0x1d64ff=_0x5623ce);}return _0x4820a1&&_0x2e29a1['push'](_0x4820a1),_0x2e29a1;},_0x53d71e=_0x3fc6be(_0x339a61),_0x593c06=_0x3fc6be(_0x587a6),_0x27f637=_0x53d71e['length'],_0x32fb55=_0x593c06['length'],_0x4b007c=Array(_0x27f637+0x1)['fill'](null)['map'](()=>Array(_0x32fb55+0x1)['fill'](0x0));for(let _0x1e1fb8=0x1;_0x1e1fb8<=_0x27f637;_0x1e1fb8++){for(let _0x448f3c=0x1;_0x448f3c<=_0x32fb55;_0x448f3c++){_0x53d71e[_0x1e1fb8-0x1]===_0x593c06[_0x448f3c-0x1]?_0x4b007c[_0x1e1fb8][_0x448f3c]=_0x4b007c[_0x1e1fb8-0x1][_0x448f3c-0x1]+0x1:_0x4b007c[_0x1e1fb8][_0x448f3c]=Math['max'](_0x4b007c[_0x1e1fb8-0x1][_0x448f3c],_0x4b007c[_0x1e1fb8][_0x448f3c-0x1]);}}const _0x2ff49d={'old':[],'new':[]};let _0x3102c9=_0x27f637,_0x2adaec=_0x32fb55;const _0x5c6f43=[],_0x16c4a0=[];while(_0x3102c9>0x0||_0x2adaec>0x0){if(_0x3102c9>0x0&&_0x2adaec>0x0&&_0x53d71e[_0x3102c9-0x1]===_0x593c06[_0x2adaec-0x1])_0x5c6f43['unshift']({'type':'equal','text':_0x53d71e[_0x3102c9-0x1]}),_0x16c4a0['unshift']({'type':'equal','text':_0x593c06[_0x2adaec-0x1]}),_0x3102c9--,_0x2adaec--;else{if(_0x2adaec>0x0&&(_0x3102c9===0x0||_0x4b007c[_0x3102c9][_0x2adaec-0x1]>=_0x4b007c[_0x3102c9-0x1][_0x2adaec]))_0x16c4a0['unshift']({'type':'insert','text':_0x593c06[_0x2adaec-0x1]}),_0x2adaec--;else _0x3102c9>0x0&&(_0x5c6f43['unshift']({'type':'delete','text':_0x53d71e[_0x3102c9-0x1]}),_0x3102c9--);}}return _0x2ff49d['old']=_0x5c6f43,_0x2ff49d['new']=_0x16c4a0,_0x2ff49d;}export function renderDiffLineWithWordHighlight(_0x47750a,_0xae835c,_0x1e2245,_0x2a862f){if(!_0xae835c||_0xae835c['length']===0x0)return highlightDiffLine(_0x47750a,_0x2a862f);let _0x3c1f45='';const _0x376e25=_0x1e2245==='add'?'diff-word-add':'diff-word-remove',_0x4d438a=_0x1e2245==='add'?'insert':'delete';for(const _0x2feec5 of _0xae835c){const _0x2d0d4d=Utils['escapeHtml'](_0x2feec5['text']);_0x2feec5['type']===_0x4d438a?_0x3c1f45+='<span\x20class=\x22'+_0x376e25+'\x22>'+_0x2d0d4d+'</span>':_0x3c1f45+=_0x2d0d4d;}return _0x3c1f45;}export function calculateDiffStats(_0x46b0bb){let _0x43f50d=0x0,_0x2c96a5=0x0,_0x4c83a3=0x0;return _0x46b0bb['forEach'](_0x48f960=>{let _0x482676=0x0,_0x34090b=0x0;_0x48f960['hunks']['forEach'](_0x2a33c1=>{_0x2a33c1['lines']['forEach'](_0x1e608c=>{if(_0x1e608c['startsWith']('+'))_0x482676+=0x1;else{if(_0x1e608c['startsWith']('-'))_0x34090b+=0x1;}});}),(_0x482676+_0x34090b>0x0||_0x48f960['isDeleted'])&&(_0x4c83a3+=0x1),_0x43f50d+=_0x482676,_0x2c96a5+=_0x34090b;}),{'additions':_0x43f50d,'deletions':_0x2c96a5,'files':_0x4c83a3};}export function getFileStatus(_0x49885a,_0x1bfad5,_0x472f12){if(_0x49885a['isDeleted'])return'deleted';if(_0x1bfad5>0x0&&_0x472f12===0x0)return'added';return'modified';}export function safeBase64(_0x410002){try{return btoa(unescape(encodeURIComponent(_0x410002)));}catch(_0x1b27f8){return btoa(_0x410002);}}export function getStorageKey(_0x807ecb,_0x2d93e3){return _0x807ecb+'-'+safeBase64(_0x2d93e3);}export function getCollapsedState(_0x2dff09,_0x16931c){const _0x37c209=localStorage['getItem'](getStorageKey(_0x2dff09,_0x16931c));return _0x37c209==='true';}export function renderUnifiedDiff(_0x5e99c0,_0x2c70ae){return _0x5e99c0['map']((_0x548914,_0xd3c27)=>{const _0x3227d5=_0x548914['newPath']||_0x548914['oldPath']||'unknown',_0x20af1b='diff-'+_0x2c70ae+'-'+_0xd3c27,_0x4550f9=getFileLanguage(_0x3227d5),{additions:_0x3f7f0c,deletions:_0x17bb8e}=calculateDiffStats([_0x548914]),_0x49c5a2=getCollapsedState(_0x2c70ae,_0x3227d5),_0x4d0a80=getFileStatus(_0x548914,_0x3f7f0c,_0x17bb8e),_0x9a3a05=_0x4d0a80==='added'?'A':_0x4d0a80==='deleted'?'D':'M',_0x43db99=_0x548914['hunks']['map'](_0x19003e=>{const {oldStart:_0x465e16,newStart:_0x3c3e55}=parseHunkHeader(_0x19003e['header']);let _0x5e714f=_0x465e16,_0x63b958=_0x3c3e55;const _0x17fb64=_0x19003e['lines']['map'](_0xb6d007=>({'line':_0xb6d007,'type':_0xb6d007['startsWith']('+')?'add':_0xb6d007['startsWith']('-')?'remove':_0xb6d007['startsWith']('\x5c')?'meta':'context'}));let _0x2fb176=0x0;while(_0x2fb176<_0x17fb64['length']){if(_0x17fb64[_0x2fb176]['type']==='remove'){let _0x26471a=_0x2fb176,_0x89512c=_0x2fb176;while(_0x89512c<_0x17fb64['length']&&_0x17fb64[_0x89512c]['type']==='remove')_0x89512c++;let _0x561069=_0x89512c,_0x14919c=_0x561069;while(_0x14919c<_0x17fb64['length']&&_0x17fb64[_0x14919c]['type']==='add')_0x14919c++;const _0x5d7ba4=_0x89512c-_0x26471a,_0x12b24f=_0x14919c-_0x561069,_0x28e4d0=Math['min'](_0x5d7ba4,_0x12b24f);for(let _0x5c3ddd=0x0;_0x5c3ddd<_0x28e4d0;_0x5c3ddd++){const _0xc72119=_0x17fb64[_0x26471a+_0x5c3ddd]['line']['substring'](0x1),_0x25f342=_0x17fb64[_0x561069+_0x5c3ddd]['line']['substring'](0x1),_0x184cac=computeWordDiff(_0xc72119,_0x25f342);_0x17fb64[_0x26471a+_0x5c3ddd]['wordDiff']=_0x184cac['old'],_0x17fb64[_0x561069+_0x5c3ddd]['wordDiff']=_0x184cac['new'];}_0x2fb176=_0x14919c;}else _0x2fb176++;}const _0x214d86=_0x17fb64['map'](_0x526011=>{const _0x604a97=_0x526011['line'];if(_0x604a97['startsWith']('+')){const _0x423b00=_0x604a97['substring'](0x1),_0x381c83=_0x526011['wordDiff']?renderDiffLineWithWordHighlight(_0x423b00,_0x526011['wordDiff'],'add',_0x4550f9):highlightDiffLine(_0x423b00,_0x4550f9),_0x21aad8='<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>'+_0x63b958+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x381c83+'</span></div>';return _0x63b958+=0x1,_0x21aad8;}if(_0x604a97['startsWith']('-')){const _0x1be10b=_0x604a97['substring'](0x1),_0x2f9d20=_0x526011['wordDiff']?renderDiffLineWithWordHighlight(_0x1be10b,_0x526011['wordDiff'],'remove',_0x4550f9):highlightDiffLine(_0x1be10b,_0x4550f9),_0xe2b15c='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x5e714f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x2f9d20+'</span></div>';return _0x5e714f+=0x1,_0xe2b15c;}if(_0x604a97['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'](_0x604a97)+'</span></div>';const _0x25256f=_0x604a97['startsWith']('\x20')?_0x604a97['substring'](0x1):_0x604a97,_0x203dd0=highlightDiffLine(_0x25256f,_0x4550f9),_0x2dc20c='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x5e714f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x63b958+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x203dd0+'</span></div>';return _0x5e714f+=0x1,_0x63b958+=0x1,_0x2dc20c;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x19003e['header'])+'</div>'+_0x214d86+'</div>';})['join'](''),_0x43b4f1=_0x43db99||'<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-'+_0x20af1b+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x20af1b+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x3227d5)+'\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'+_0x4d0a80+'\x22>'+_0x9a3a05+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x3227d5)+'</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>+'+_0x3f7f0c+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x17bb8e+'</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'+_0x20af1b+'\x22\x20data-collapsed=\x22'+_0x49c5a2+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x49c5a2?'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'+(_0x49c5a2?'collapsed':'')+'\x22\x20id=\x22'+_0x20af1b+'\x22>'+_0x43b4f1+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
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']('');}