@rytass/bpm-core-react 0.14.0 → 0.16.2

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 (247) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/chunks/{FormBuilderView-BYLN6W-P.js → FormBuilderView-BYL42M0d.js} +499 -476
  3. package/dist/chunks/FormBuilderView-BYL42M0d.js.map +1 -0
  4. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs +3 -0
  5. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs.map +1 -0
  6. package/dist/chunks/FormRendererView-DRFi_IH7.cjs +4 -0
  7. package/dist/chunks/FormRendererView-DRFi_IH7.cjs.map +1 -0
  8. package/dist/chunks/FormRendererView-cZGOOjU5.js +986 -0
  9. package/dist/chunks/FormRendererView-cZGOOjU5.js.map +1 -0
  10. package/dist/chunks/{admin-pickers-DLlG_1du.js → admin-pickers-DxhzECkD.js} +52 -51
  11. package/dist/chunks/admin-pickers-DxhzECkD.js.map +1 -0
  12. package/dist/chunks/admin-pickers-qe3j--gX.cjs +2 -0
  13. package/dist/chunks/admin-pickers-qe3j--gX.cjs.map +1 -0
  14. package/dist/chunks/approval-instance-list-page-CPXMP3PL.js.map +1 -1
  15. package/dist/chunks/approval-instance-list-page-ax0pm8bt.cjs.map +1 -1
  16. package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
  17. package/dist/chunks/auth-provider-B5oPmvk2.js.map +1 -1
  18. package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
  19. package/dist/chunks/bpm-form-field-Cao0rMol.js.map +1 -1
  20. package/dist/chunks/{categories-DGlxuC6X.js → categories-1gKxeEqw.js} +4 -10
  21. package/dist/chunks/categories-1gKxeEqw.js.map +1 -0
  22. package/dist/chunks/{categories-Yid05WAX.cjs → categories-DjENouRm.cjs} +2 -2
  23. package/dist/chunks/categories-DjENouRm.cjs.map +1 -0
  24. package/dist/chunks/{compose-CSWbRgJJ.js → compose-DO6n0NJi.js} +5 -5
  25. package/dist/chunks/compose-DO6n0NJi.js.map +1 -0
  26. package/dist/chunks/compose-DUH9cQ-L.cjs +2 -0
  27. package/dist/chunks/compose-DUH9cQ-L.cjs.map +1 -0
  28. package/dist/chunks/dashboard-page-BWQBSGDq.cjs +2 -0
  29. package/dist/chunks/dashboard-page-BWQBSGDq.cjs.map +1 -0
  30. package/dist/chunks/{dashboard-page-CeCLV1tp.js → dashboard-page-DdBvV6YI.js} +15 -16
  31. package/dist/chunks/dashboard-page-DdBvV6YI.js.map +1 -0
  32. package/dist/chunks/delegations-BLzYnOae.cjs +2 -0
  33. package/dist/chunks/delegations-BLzYnOae.cjs.map +1 -0
  34. package/dist/chunks/delegations-Ckf03icM.cjs +2 -0
  35. package/dist/chunks/delegations-Ckf03icM.cjs.map +1 -0
  36. package/dist/chunks/{delegations-DRupxJ4_.js → delegations-MxF3uJGW.js} +205 -215
  37. package/dist/chunks/delegations-MxF3uJGW.js.map +1 -0
  38. package/dist/chunks/{delegations-B8gLSt0i.js → delegations-_b4_xBit.js} +167 -173
  39. package/dist/chunks/delegations-_b4_xBit.js.map +1 -0
  40. package/dist/chunks/designer-2YvjP_GU.cjs +65 -0
  41. package/dist/chunks/designer-2YvjP_GU.cjs.map +1 -0
  42. package/dist/chunks/{designer-BtsIL0BB.js → designer-B-cfiob9.js} +1334 -1254
  43. package/dist/chunks/designer-B-cfiob9.js.map +1 -0
  44. package/dist/chunks/{detail-C8NOqY0p.js → detail-C6NdVijG.js} +852 -841
  45. package/dist/chunks/detail-C6NdVijG.js.map +1 -0
  46. package/dist/chunks/detail-DKobK4Cg.cjs +2 -0
  47. package/dist/chunks/detail-DKobK4Cg.cjs.map +1 -0
  48. package/dist/chunks/format-date-time-CB-LxzqT.js.map +1 -1
  49. package/dist/chunks/format-date-time-D-cx5M8z.cjs.map +1 -1
  50. package/dist/chunks/format-member-label-DudVI55w.js +13 -0
  51. package/dist/chunks/format-member-label-DudVI55w.js.map +1 -0
  52. package/dist/chunks/format-member-label-t7ANTF62.cjs +2 -0
  53. package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -0
  54. package/dist/chunks/login-AtVxZBsC.cjs.map +1 -1
  55. package/dist/chunks/login-C6qlTC6F.js.map +1 -1
  56. package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
  57. package/dist/chunks/notifications-DJ5wzCye.js.map +1 -1
  58. package/dist/chunks/{orgs-BpqVu5ka.js → orgs-Bpp1U60k.js} +538 -557
  59. package/dist/chunks/orgs-Bpp1U60k.js.map +1 -0
  60. package/dist/chunks/orgs-ywaE1_02.cjs +2 -0
  61. package/dist/chunks/orgs-ywaE1_02.cjs.map +1 -0
  62. package/dist/chunks/providers-DHtDZFNA.cjs.map +1 -1
  63. package/dist/chunks/providers-J5eyByQj.js.map +1 -1
  64. package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
  65. package/dist/chunks/router-adapter-DftlFTOd.js.map +1 -1
  66. package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
  67. package/dist/chunks/routes-config-yZbESPlw.js.map +1 -1
  68. package/dist/chunks/task-node-label-BF6UllxP.cjs +2 -0
  69. package/dist/chunks/task-node-label-BF6UllxP.cjs.map +1 -0
  70. package/dist/chunks/task-node-label-CWZgOBj0.js +9 -0
  71. package/dist/chunks/task-node-label-CWZgOBj0.js.map +1 -0
  72. package/dist/chunks/use-bpm-member-D57LKe_u.js.map +1 -1
  73. package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
  74. package/dist/chunks/users-BSVo_eNe.js +215 -0
  75. package/dist/chunks/users-BSVo_eNe.js.map +1 -0
  76. package/dist/chunks/users-DFSBTDMy.cjs +2 -0
  77. package/dist/chunks/users-DFSBTDMy.cjs.map +1 -0
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.cjs.map +1 -1
  80. package/dist/index.js +2 -2
  81. package/dist/index.js.map +1 -1
  82. package/dist/lib/format-member-label.d.ts +12 -0
  83. package/dist/lib/member-profile-resolution.d.ts +48 -0
  84. package/dist/lib/routes-config.d.ts +1 -1
  85. package/dist/lib/task-node-label.d.ts +10 -0
  86. package/dist/next/index.cjs.map +1 -1
  87. package/dist/next/index.js.map +1 -1
  88. package/dist/next/workflow-chat-route.cjs.map +1 -1
  89. package/dist/next/workflow-chat-route.js.map +1 -1
  90. package/dist/pages/admin/delegations/index.cjs +1 -1
  91. package/dist/pages/admin/delegations/index.cjs.map +1 -1
  92. package/dist/pages/admin/delegations/index.js +1 -1
  93. package/dist/pages/admin/delegations/index.js.map +1 -1
  94. package/dist/pages/admin/orgs/index.cjs +1 -1
  95. package/dist/pages/admin/orgs/index.cjs.map +1 -1
  96. package/dist/pages/admin/orgs/index.js +1 -1
  97. package/dist/pages/admin/orgs/index.js.map +1 -1
  98. package/dist/pages/admin/users/index.cjs +1 -1
  99. package/dist/pages/admin/users/index.cjs.map +1 -1
  100. package/dist/pages/admin/users/index.js +1 -1
  101. package/dist/pages/admin/users/index.js.map +1 -1
  102. package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
  103. package/dist/pages/admin/webhook-endpoints/index.js.map +1 -1
  104. package/dist/pages/cc/index.cjs.map +1 -1
  105. package/dist/pages/cc/index.js.map +1 -1
  106. package/dist/pages/dashboard/index.cjs.map +1 -1
  107. package/dist/pages/dashboard/index.js.map +1 -1
  108. package/dist/pages/delegations/index.cjs +1 -1
  109. package/dist/pages/delegations/index.cjs.map +1 -1
  110. package/dist/pages/delegations/index.js +1 -1
  111. package/dist/pages/delegations/index.js.map +1 -1
  112. package/dist/pages/inbox/index.cjs.map +1 -1
  113. package/dist/pages/inbox/index.js.map +1 -1
  114. package/dist/pages/instances/detail/index.cjs +1 -1
  115. package/dist/pages/instances/detail/index.cjs.map +1 -1
  116. package/dist/pages/instances/detail/index.js +1 -1
  117. package/dist/pages/instances/detail/index.js.map +1 -1
  118. package/dist/pages/instances/new/index.cjs.map +1 -1
  119. package/dist/pages/instances/new/index.js.map +1 -1
  120. package/dist/pages/login/index.cjs.map +1 -1
  121. package/dist/pages/login/index.js.map +1 -1
  122. package/dist/pages/root/index.cjs.map +1 -1
  123. package/dist/pages/root/index.js.map +1 -1
  124. package/dist/pages/search/index.cjs.map +1 -1
  125. package/dist/pages/search/index.js.map +1 -1
  126. package/dist/pages/sent/index.cjs.map +1 -1
  127. package/dist/pages/sent/index.js.map +1 -1
  128. package/dist/pages/settings/notifications/index.cjs.map +1 -1
  129. package/dist/pages/settings/notifications/index.js.map +1 -1
  130. package/dist/pages/templates/categories/index.cjs +1 -1
  131. package/dist/pages/templates/categories/index.cjs.map +1 -1
  132. package/dist/pages/templates/categories/index.js +1 -1
  133. package/dist/pages/templates/categories/index.js.map +1 -1
  134. package/dist/pages/templates/compose/index.cjs +1 -1
  135. package/dist/pages/templates/compose/index.cjs.map +1 -1
  136. package/dist/pages/templates/compose/index.js +1 -1
  137. package/dist/pages/templates/compose/index.js.map +1 -1
  138. package/dist/pages/templates/designer/index.cjs +1 -1
  139. package/dist/pages/templates/designer/index.cjs.map +1 -1
  140. package/dist/pages/templates/designer/index.js +1 -1
  141. package/dist/pages/templates/designer/index.js.map +1 -1
  142. package/dist/pages/templates/index.cjs.map +1 -1
  143. package/dist/pages/templates/index.js.map +1 -1
  144. package/dist/pages/templates/versions/index.cjs.map +1 -1
  145. package/dist/pages/templates/versions/index.js.map +1 -1
  146. package/dist/views/admin/delegations/index.cjs +1 -1
  147. package/dist/views/admin/delegations/index.js +1 -2
  148. package/dist/views/admin/index.cjs +1 -1
  149. package/dist/views/admin/index.js +3 -3
  150. package/dist/views/admin/orgs/index.cjs +1 -1
  151. package/dist/views/admin/orgs/index.js +1 -2
  152. package/dist/views/admin/users/index.cjs +1 -1
  153. package/dist/views/admin/users/index.js +1 -2
  154. package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
  155. package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
  156. package/dist/views/cc/index.cjs.map +1 -1
  157. package/dist/views/cc/index.js.map +1 -1
  158. package/dist/views/dashboard/index.cjs +1 -1
  159. package/dist/views/dashboard/index.cjs.map +1 -1
  160. package/dist/views/dashboard/index.js +1 -1
  161. package/dist/views/dashboard/index.js.map +1 -1
  162. package/dist/views/delegations/index.cjs +1 -1
  163. package/dist/views/delegations/index.js +1 -2
  164. package/dist/views/forms/builder/index.cjs +1 -1
  165. package/dist/views/forms/builder/index.js +1 -2
  166. package/dist/views/forms/renderer/form-field-link.d.ts +16 -0
  167. package/dist/views/forms/renderer/index.cjs +1 -1
  168. package/dist/views/forms/renderer/index.js +1 -2
  169. package/dist/views/forms/renderer/member-field-options.d.ts +39 -0
  170. package/dist/views/forms/renderer/member-field.d.ts +21 -0
  171. package/dist/views/inbox/index.cjs +1 -1
  172. package/dist/views/inbox/index.cjs.map +1 -1
  173. package/dist/views/inbox/index.js +101 -102
  174. package/dist/views/inbox/index.js.map +1 -1
  175. package/dist/views/instances/detail/index.cjs +1 -1
  176. package/dist/views/instances/detail/index.js +1 -2
  177. package/dist/views/instances/detail/sections/container-helpers.d.ts +3 -2
  178. package/dist/views/instances/detail/submitted-by.d.ts +23 -0
  179. package/dist/views/instances/index.js +1 -2
  180. package/dist/views/instances/new/index.cjs +1 -1
  181. package/dist/views/instances/new/index.cjs.map +1 -1
  182. package/dist/views/instances/new/index.js +4 -11
  183. package/dist/views/instances/new/index.js.map +1 -1
  184. package/dist/views/login/index.js +1 -2
  185. package/dist/views/search/index.cjs.map +1 -1
  186. package/dist/views/search/index.js.map +1 -1
  187. package/dist/views/sent/SentView.d.ts +1 -1
  188. package/dist/views/sent/index.cjs +1 -1
  189. package/dist/views/sent/index.cjs.map +1 -1
  190. package/dist/views/sent/index.js +2 -2
  191. package/dist/views/sent/index.js.map +1 -1
  192. package/dist/views/settings/index.js +1 -2
  193. package/dist/views/settings/notifications/index.js +1 -2
  194. package/dist/views/templates/categories/index.cjs +1 -1
  195. package/dist/views/templates/categories/index.js +1 -2
  196. package/dist/views/templates/compose/index.cjs +1 -1
  197. package/dist/views/templates/compose/index.js +1 -2
  198. package/dist/views/templates/designer/designer-version-labels.d.ts +12 -0
  199. package/dist/views/templates/designer/dry-run-assignee-label.d.ts +28 -0
  200. package/dist/views/templates/designer/dry-run-sample-data.d.ts +9 -0
  201. package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +35 -0
  202. package/dist/views/templates/designer/index.cjs +1 -1
  203. package/dist/views/templates/designer/index.js +1 -2
  204. package/dist/views/templates/index.cjs +1 -1
  205. package/dist/views/templates/index.cjs.map +1 -1
  206. package/dist/views/templates/index.js +1 -1
  207. package/dist/views/templates/index.js.map +1 -1
  208. package/dist/views/templates/versions/index.cjs.map +1 -1
  209. package/dist/views/templates/versions/index.js.map +1 -1
  210. package/package.json +5 -5
  211. package/dist/chunks/FormBuilderView-BYLN6W-P.js.map +0 -1
  212. package/dist/chunks/FormBuilderView-VmdPVbg7.cjs +0 -3
  213. package/dist/chunks/FormBuilderView-VmdPVbg7.cjs.map +0 -1
  214. package/dist/chunks/FormRendererView-Bs8lTb4k.cjs +0 -2
  215. package/dist/chunks/FormRendererView-Bs8lTb4k.cjs.map +0 -1
  216. package/dist/chunks/FormRendererView-UPowZZgw.js +0 -798
  217. package/dist/chunks/FormRendererView-UPowZZgw.js.map +0 -1
  218. package/dist/chunks/admin-pickers-Btvij1at.cjs +0 -2
  219. package/dist/chunks/admin-pickers-Btvij1at.cjs.map +0 -1
  220. package/dist/chunks/admin-pickers-DLlG_1du.js.map +0 -1
  221. package/dist/chunks/categories-DGlxuC6X.js.map +0 -1
  222. package/dist/chunks/categories-Yid05WAX.cjs.map +0 -1
  223. package/dist/chunks/compose-CHZoX-H0.cjs +0 -2
  224. package/dist/chunks/compose-CHZoX-H0.cjs.map +0 -1
  225. package/dist/chunks/compose-CSWbRgJJ.js.map +0 -1
  226. package/dist/chunks/dashboard-page-CeCLV1tp.js.map +0 -1
  227. package/dist/chunks/dashboard-page-DooFJsxM.cjs +0 -2
  228. package/dist/chunks/dashboard-page-DooFJsxM.cjs.map +0 -1
  229. package/dist/chunks/delegations-8LsxcQM4.cjs +0 -2
  230. package/dist/chunks/delegations-8LsxcQM4.cjs.map +0 -1
  231. package/dist/chunks/delegations-B8gLSt0i.js.map +0 -1
  232. package/dist/chunks/delegations-DRupxJ4_.js.map +0 -1
  233. package/dist/chunks/delegations-DlYwMiAW.cjs +0 -2
  234. package/dist/chunks/delegations-DlYwMiAW.cjs.map +0 -1
  235. package/dist/chunks/designer-BtsIL0BB.js.map +0 -1
  236. package/dist/chunks/designer-Dm6cX2kZ.cjs +0 -65
  237. package/dist/chunks/designer-Dm6cX2kZ.cjs.map +0 -1
  238. package/dist/chunks/detail-C8NOqY0p.js.map +0 -1
  239. package/dist/chunks/detail-CX-3hZoL.cjs +0 -2
  240. package/dist/chunks/detail-CX-3hZoL.cjs.map +0 -1
  241. package/dist/chunks/orgs-BpqVu5ka.js.map +0 -1
  242. package/dist/chunks/orgs-D0-5BaHT.cjs +0 -2
  243. package/dist/chunks/orgs-D0-5BaHT.cjs.map +0 -1
  244. package/dist/chunks/users-C9LA-Rd7.cjs +0 -2
  245. package/dist/chunks/users-C9LA-Rd7.cjs.map +0 -1
  246. package/dist/chunks/users-FWrb3ehW.js +0 -214
  247. package/dist/chunks/users-FWrb3ehW.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-chat-route.cjs","names":[],"sources":["../../src/next/workflow-chat-route.ts"],"sourcesContent":["import {\n convertToModelMessages,\n jsonSchema,\n streamText,\n tool,\n type LanguageModel,\n type Tool,\n type ToolSet,\n type UIMessage,\n} from 'ai';\nimport { openai } from '@ai-sdk/openai';\nimport { WORKFLOW_TOOLSET } from '@rytass/bpm-core-shared';\n\n/**\n * Next.js route handler for the workflow designer LLM assistant.\n *\n * The model is advertised the workflow {@link WORKFLOW_TOOLSET} but the tools\n * carry **no `execute`** — so every tool call is forwarded to the browser,\n * where `useChat`'s `onToolCall` runs it against the React designer controller\n * (see `use-workflow-chat.ts`). This route only holds the API key, runs the\n * model, and streams the tool-call plan back. It never touches the canvas.\n *\n * Host usage (apps/client/src/app/api/chat/route.ts):\n * export const runtime = 'nodejs';\n * export const POST = createWorkflowChatPOST();\n */\n\n/** Default OpenAI model id (overridable via BPM_LLM_MODEL). */\nconst DEFAULT_MODEL = 'gpt-5.4-mini';\n\n/**\n * Resolve the model via the OpenAI provider directly (reads `OPENAI_API_KEY`).\n * Accepts a bare id (`gpt-5.4-mini`) or a `openai/`-prefixed id; the prefix is\n * stripped. This deployment talks to OpenAI directly — no AI Gateway.\n */\nfunction resolveModel(setting: string): LanguageModel {\n return openai(setting.replace(/^openai\\//u, ''));\n}\n\n/**\n * Strict guardrail: the assistant may ONLY design this approval flow, using the\n * provided tools. Anything else is declined. Lives server-side so it cannot be\n * overridden by client-supplied messages.\n */\nexport const WORKFLOW_CHAT_SYSTEM_PROMPT = `你是「簽核流程設計器」頁面內建的 AI 助理,唯一職責是協助使用者在這個畫布上設計/修改一個簽核審批流程(workflow)。\n\n你只能透過系統提供的工具(tools)來操作流程:新增/重命名/刪除節點、連線、設定簽核人、設定條件分流、設定系統節點動作、自動排版、查詢現況與驗證等。除了這些工具,你沒有其他能力。\n\n工作守則:\n1. 動作前,先呼叫 get_workflow_snapshot 了解目前畫布的節點與連線,再規劃要呼叫哪些工具。\n2. 盡量用高階工具(insert_approval_step / insert_notification / insert_conditional_branch)一次完成多步;需要細修時再用細顆粒工具。\n3. **重要:要果斷、先把流程畫出來。** 使用者只給一兩句話時,直接依常見公司慣例建立初稿,不要反覆追問細節。簽核人若使用者沒指定,就省略 approverResolver(系統會自動用「直屬主管」為預設,不需要真實會員 id);通知節點同理可省略 action(預設站內通知)。先把結構建好、再請使用者調整。\n4. 工具呼叫不會因為「缺簽核人/缺資料」而失敗;缺的部分會以合理預設補上,並由 validate_workflow 標示。所以放心連續呼叫工具把流程建完,不要因為怕缺欄位就停下來問。\n5. 當使用者「點名」某個人或部門當簽核人/收件者時,先用 search_members(依姓名關鍵字)、list_org_units、list_positions 查到真實 id,再用 set_user_task_approver / set_service_action 指定(如 DIRECT memberIds、ORG_UNIT_MANAGER orgUnitId、POSITION positionId)。查不到就回報並請使用者確認,不要編造 id。\n6. 節點 id 可從 snapshot 取得;連線條件需要先綁定表單欄位(若 list_form_fields 為空,提醒使用者先綁定表單版本)。\n7. **條件分流務必主動補上「其他情況」**:設計 exclusiveGateway(條件分流)時,除了符合條件的分支,一定要保留一條未設條件、標記為預設(isDefault)的「其他情況」路徑當 else(通常指向後續節點或完成)。不要把所有輸出連線都設成條件而沒有預設出口;缺預設出口時,用 set_edge_default 把其中一條設為預設。\n8. 完成後,呼叫 validate_workflow,並用一兩句話說明你建了什麼流程、哪些地方(如簽核人、條件門檻)建議使用者再確認或指定。\n9. 全程使用繁體中文(台灣用語)回覆。\n\n嚴格界線:\n- 只做「設計這個簽核流程」相關的事。任何與此無關的請求(閒聊、寫詩、寫程式、查天氣/新聞、操作其他系統或頁面、回答一般知識問題等)一律婉拒,並簡短引導使用者回到流程設計,例如:「我只能協助你設計這個簽核流程,需要我幫你新增關卡或設定條件嗎?」\n- 不要假裝執行你工具以外的動作,也不要編造結果。`;\n\n/** Build AI SDK tools from WORKFLOW_TOOLSET — no `execute`, so the browser runs them. */\nexport function buildWorkflowAiSdkTools(): ToolSet {\n const entries: readonly (readonly [string, Tool])[] = WORKFLOW_TOOLSET.map(\n (workflowTool) =>\n [\n workflowTool.name,\n tool({\n description: workflowTool.description,\n inputSchema: jsonSchema(\n workflowTool.inputSchema as Parameters<typeof jsonSchema>[0],\n ),\n }),\n ] as const,\n );\n\n return Object.fromEntries(entries) as ToolSet;\n}\n\nexport interface WorkflowChatRouteOptions {\n /** Override the OpenAI model id (else BPM_LLM_MODEL env, else the default). */\n readonly model?: string;\n /** Override the system prompt (else the strict design-only guardrail). */\n readonly system?: string;\n}\n\ninterface WorkflowChatRequestBody {\n readonly messages: readonly UIMessage[];\n}\n\n/** Create the `POST` handler for the workflow chat route. */\nexport function createWorkflowChatPOST(\n options: WorkflowChatRouteOptions = {},\n): (request: Request) => Promise<Response> {\n const tools = buildWorkflowAiSdkTools();\n\n return async function POST(request: Request): Promise<Response> {\n const body = (await request.json()) as WorkflowChatRequestBody;\n const result = streamText({\n messages: await convertToModelMessages([...body.messages]),\n model: resolveModel(\n options.model ?? process.env.BPM_LLM_MODEL ?? DEFAULT_MODEL,\n ),\n system: options.system ?? WORKFLOW_CHAT_SYSTEM_PROMPT,\n tools,\n });\n\n return result.toUIMessageStreamResponse();\n };\n}\n"],"mappings":"wJA4BA,IAAM,EAAgB,eAOtB,SAAS,EAAa,EAAgC,CACpD,OAAA,EAAO,EAAA,OAAA,CAAO,EAAQ,QAAQ,aAAc,EAAE,CAAC,CACjD,CAOA,IAAa,EAA8B;;;;;;;;;;;;;;;;;2BAoB3C,SAAgB,GAAmC,CACjD,IAAM,EAAgD,EAAA,iBAAiB,IACpE,GACC,CACE,EAAa,MAAA,EACb,EAAA,KAAA,CAAK,CACH,YAAa,EAAa,YAC1B,aAAA,EAAa,EAAA,WAAA,CACX,EAAa,WACf,CACF,CAAC,CACH,CACJ,EAEA,OAAO,OAAO,YAAY,CAAO,CACnC,CAcA,SAAgB,EACd,EAAoC,CAAC,EACI,CACzC,IAAM,EAAQ,EAAwB,EAEtC,OAAO,eAAoB,EAAqC,CAC9D,IAAM,EAAQ,MAAM,EAAQ,KAAK,EAUjC,OAAA,EATe,EAAA,WAAA,CAAW,CACxB,SAAU,MAAA,EAAM,EAAA,uBAAA,CAAuB,CAAC,GAAG,EAAK,QAAQ,CAAC,EACzD,MAAO,EACL,EAAQ,OAAS,QAAQ,IAAI,eAAiB,CAChD,EACA,OAAQ,EAAQ,QAAU,EAC1B,OACF,CAEO,CAAA,CAAO,0BAA0B,CAC1C,CACF"}
1
+ {"version":3,"file":"workflow-chat-route.cjs","names":["openai","WORKFLOW_TOOLSET","tool","jsonSchema","streamText","convertToModelMessages","ai","_ai_sdk_openai","_rytass_bpm_core_shared","DEFAULT_MODEL","resolveModel","setting","WORKFLOW_CHAT_SYSTEM_PROMPT","buildWorkflowAiSdkTools","entries","workflowTool","createWorkflowChatPOST","tools","body","request","options"],"sources":["../../src/next/workflow-chat-route.ts"],"sourcesContent":["import {\n convertToModelMessages,\n jsonSchema,\n streamText,\n tool,\n type LanguageModel,\n type Tool,\n type ToolSet,\n type UIMessage,\n} from 'ai';\nimport { openai } from '@ai-sdk/openai';\nimport { WORKFLOW_TOOLSET } from '@rytass/bpm-core-shared';\n\n/**\n * Next.js route handler for the workflow designer LLM assistant.\n *\n * The model is advertised the workflow {@link WORKFLOW_TOOLSET} but the tools\n * carry **no `execute`** — so every tool call is forwarded to the browser,\n * where `useChat`'s `onToolCall` runs it against the React designer controller\n * (see `use-workflow-chat.ts`). This route only holds the API key, runs the\n * model, and streams the tool-call plan back. It never touches the canvas.\n *\n * Host usage (apps/client/src/app/api/chat/route.ts):\n * export const runtime = 'nodejs';\n * export const POST = createWorkflowChatPOST();\n */\n\n/** Default OpenAI model id (overridable via BPM_LLM_MODEL). */\nconst DEFAULT_MODEL = 'gpt-5.4-mini';\n\n/**\n * Resolve the model via the OpenAI provider directly (reads `OPENAI_API_KEY`).\n * Accepts a bare id (`gpt-5.4-mini`) or a `openai/`-prefixed id; the prefix is\n * stripped. This deployment talks to OpenAI directly — no AI Gateway.\n */\nfunction resolveModel(setting: string): LanguageModel {\n return openai(setting.replace(/^openai\\//u, ''));\n}\n\n/**\n * Strict guardrail: the assistant may ONLY design this approval flow, using the\n * provided tools. Anything else is declined. Lives server-side so it cannot be\n * overridden by client-supplied messages.\n */\nexport const WORKFLOW_CHAT_SYSTEM_PROMPT = `你是「簽核流程設計器」頁面內建的 AI 助理,唯一職責是協助使用者在這個畫布上設計/修改一個簽核審批流程(workflow)。\n\n你只能透過系統提供的工具(tools)來操作流程:新增/重命名/刪除節點、連線、設定簽核人、設定條件分流、設定系統節點動作、自動排版、查詢現況與驗證等。除了這些工具,你沒有其他能力。\n\n工作守則:\n1. 動作前,先呼叫 get_workflow_snapshot 了解目前畫布的節點與連線,再規劃要呼叫哪些工具。\n2. 盡量用高階工具(insert_approval_step / insert_notification / insert_conditional_branch)一次完成多步;需要細修時再用細顆粒工具。\n3. **重要:要果斷、先把流程畫出來。** 使用者只給一兩句話時,直接依常見公司慣例建立初稿,不要反覆追問細節。簽核人若使用者沒指定,就省略 approverResolver(系統會自動用「直屬主管」為預設,不需要真實會員 id);通知節點同理可省略 action(預設站內通知)。先把結構建好、再請使用者調整。\n4. 工具呼叫不會因為「缺簽核人/缺資料」而失敗;缺的部分會以合理預設補上,並由 validate_workflow 標示。所以放心連續呼叫工具把流程建完,不要因為怕缺欄位就停下來問。\n5. 當使用者「點名」某個人或部門當簽核人/收件者時,先用 search_members(依姓名關鍵字)、list_org_units、list_positions 查到真實 id,再用 set_user_task_approver / set_service_action 指定(如 DIRECT memberIds、ORG_UNIT_MANAGER orgUnitId、POSITION positionId)。查不到就回報並請使用者確認,不要編造 id。\n6. 節點 id 可從 snapshot 取得;連線條件需要先綁定表單欄位(若 list_form_fields 為空,提醒使用者先綁定表單版本)。\n7. **條件分流務必主動補上「其他情況」**:設計 exclusiveGateway(條件分流)時,除了符合條件的分支,一定要保留一條未設條件、標記為預設(isDefault)的「其他情況」路徑當 else(通常指向後續節點或完成)。不要把所有輸出連線都設成條件而沒有預設出口;缺預設出口時,用 set_edge_default 把其中一條設為預設。\n8. 完成後,呼叫 validate_workflow,並用一兩句話說明你建了什麼流程、哪些地方(如簽核人、條件門檻)建議使用者再確認或指定。\n9. 全程使用繁體中文(台灣用語)回覆。\n\n嚴格界線:\n- 只做「設計這個簽核流程」相關的事。任何與此無關的請求(閒聊、寫詩、寫程式、查天氣/新聞、操作其他系統或頁面、回答一般知識問題等)一律婉拒,並簡短引導使用者回到流程設計,例如:「我只能協助你設計這個簽核流程,需要我幫你新增關卡或設定條件嗎?」\n- 不要假裝執行你工具以外的動作,也不要編造結果。`;\n\n/** Build AI SDK tools from WORKFLOW_TOOLSET — no `execute`, so the browser runs them. */\nexport function buildWorkflowAiSdkTools(): ToolSet {\n const entries: readonly (readonly [string, Tool])[] = WORKFLOW_TOOLSET.map(\n (workflowTool) =>\n [\n workflowTool.name,\n tool({\n description: workflowTool.description,\n inputSchema: jsonSchema(\n workflowTool.inputSchema as Parameters<typeof jsonSchema>[0],\n ),\n }),\n ] as const,\n );\n\n return Object.fromEntries(entries) as ToolSet;\n}\n\nexport interface WorkflowChatRouteOptions {\n /** Override the OpenAI model id (else BPM_LLM_MODEL env, else the default). */\n readonly model?: string;\n /** Override the system prompt (else the strict design-only guardrail). */\n readonly system?: string;\n}\n\ninterface WorkflowChatRequestBody {\n readonly messages: readonly UIMessage[];\n}\n\n/** Create the `POST` handler for the workflow chat route. */\nexport function createWorkflowChatPOST(\n options: WorkflowChatRouteOptions = {},\n): (request: Request) => Promise<Response> {\n const tools = buildWorkflowAiSdkTools();\n\n return async function POST(request: Request): Promise<Response> {\n const body = (await request.json()) as WorkflowChatRequestBody;\n const result = streamText({\n messages: await convertToModelMessages([...body.messages]),\n model: resolveModel(\n options.model ?? process.env.BPM_LLM_MODEL ?? DEFAULT_MODEL,\n ),\n system: options.system ?? WORKFLOW_CHAT_SYSTEM_PROMPT,\n tools,\n });\n\n return result.toUIMessageStreamResponse();\n };\n}\n"],"mappings":"wJA4BA,IAAMS,EAAgB,eAOtB,SAASC,EAAa,EAAgC,CACpD,OAAA,EAAOV,EAAAA,OAAAA,CAAOW,EAAQ,QAAQ,aAAc,EAAE,CAAC,CACjD,CAOA,IAAaC,EAA8B;;;;;;;;;;;;;;;;;2BAoB3C,SAAgBC,GAAmC,CACjD,IAAMC,EAAgDb,EAAAA,iBAAiB,IACpE,GACC,CACEc,EAAa,MAAA,EACbb,EAAAA,KAAAA,CAAK,CACH,YAAaa,EAAa,YAC1B,aAAA,EAAaZ,EAAAA,WAAAA,CACXY,EAAa,WACf,CACF,CAAC,CACH,CACJ,EAEA,OAAO,OAAO,YAAYD,CAAO,CACnC,CAcA,SAAgBE,EACd,EAAoC,CAAC,EACI,CACzC,IAAMC,EAAQJ,EAAwB,EAEtC,OAAO,eAAoB,EAAqC,CAC9D,IAAMK,EAAQ,MAAMC,EAAQ,KAAK,EAUjC,OAAA,EATef,EAAAA,WAAAA,CAAW,CACxB,SAAU,MAAA,EAAMC,EAAAA,uBAAAA,CAAuB,CAAC,GAAGa,EAAK,QAAQ,CAAC,EACzD,MAAOR,EACLU,EAAQ,OAAS,QAAQ,IAAI,eAAiBX,CAChD,EACA,OAAQW,EAAQ,QAAUR,EAC1B,OACF,CAEO,CAAA,CAAO,0BAA0B,CAC1C,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-chat-route.js","names":[],"sources":["../../src/next/workflow-chat-route.ts"],"sourcesContent":["import {\n convertToModelMessages,\n jsonSchema,\n streamText,\n tool,\n type LanguageModel,\n type Tool,\n type ToolSet,\n type UIMessage,\n} from 'ai';\nimport { openai } from '@ai-sdk/openai';\nimport { WORKFLOW_TOOLSET } from '@rytass/bpm-core-shared';\n\n/**\n * Next.js route handler for the workflow designer LLM assistant.\n *\n * The model is advertised the workflow {@link WORKFLOW_TOOLSET} but the tools\n * carry **no `execute`** — so every tool call is forwarded to the browser,\n * where `useChat`'s `onToolCall` runs it against the React designer controller\n * (see `use-workflow-chat.ts`). This route only holds the API key, runs the\n * model, and streams the tool-call plan back. It never touches the canvas.\n *\n * Host usage (apps/client/src/app/api/chat/route.ts):\n * export const runtime = 'nodejs';\n * export const POST = createWorkflowChatPOST();\n */\n\n/** Default OpenAI model id (overridable via BPM_LLM_MODEL). */\nconst DEFAULT_MODEL = 'gpt-5.4-mini';\n\n/**\n * Resolve the model via the OpenAI provider directly (reads `OPENAI_API_KEY`).\n * Accepts a bare id (`gpt-5.4-mini`) or a `openai/`-prefixed id; the prefix is\n * stripped. This deployment talks to OpenAI directly — no AI Gateway.\n */\nfunction resolveModel(setting: string): LanguageModel {\n return openai(setting.replace(/^openai\\//u, ''));\n}\n\n/**\n * Strict guardrail: the assistant may ONLY design this approval flow, using the\n * provided tools. Anything else is declined. Lives server-side so it cannot be\n * overridden by client-supplied messages.\n */\nexport const WORKFLOW_CHAT_SYSTEM_PROMPT = `你是「簽核流程設計器」頁面內建的 AI 助理,唯一職責是協助使用者在這個畫布上設計/修改一個簽核審批流程(workflow)。\n\n你只能透過系統提供的工具(tools)來操作流程:新增/重命名/刪除節點、連線、設定簽核人、設定條件分流、設定系統節點動作、自動排版、查詢現況與驗證等。除了這些工具,你沒有其他能力。\n\n工作守則:\n1. 動作前,先呼叫 get_workflow_snapshot 了解目前畫布的節點與連線,再規劃要呼叫哪些工具。\n2. 盡量用高階工具(insert_approval_step / insert_notification / insert_conditional_branch)一次完成多步;需要細修時再用細顆粒工具。\n3. **重要:要果斷、先把流程畫出來。** 使用者只給一兩句話時,直接依常見公司慣例建立初稿,不要反覆追問細節。簽核人若使用者沒指定,就省略 approverResolver(系統會自動用「直屬主管」為預設,不需要真實會員 id);通知節點同理可省略 action(預設站內通知)。先把結構建好、再請使用者調整。\n4. 工具呼叫不會因為「缺簽核人/缺資料」而失敗;缺的部分會以合理預設補上,並由 validate_workflow 標示。所以放心連續呼叫工具把流程建完,不要因為怕缺欄位就停下來問。\n5. 當使用者「點名」某個人或部門當簽核人/收件者時,先用 search_members(依姓名關鍵字)、list_org_units、list_positions 查到真實 id,再用 set_user_task_approver / set_service_action 指定(如 DIRECT memberIds、ORG_UNIT_MANAGER orgUnitId、POSITION positionId)。查不到就回報並請使用者確認,不要編造 id。\n6. 節點 id 可從 snapshot 取得;連線條件需要先綁定表單欄位(若 list_form_fields 為空,提醒使用者先綁定表單版本)。\n7. **條件分流務必主動補上「其他情況」**:設計 exclusiveGateway(條件分流)時,除了符合條件的分支,一定要保留一條未設條件、標記為預設(isDefault)的「其他情況」路徑當 else(通常指向後續節點或完成)。不要把所有輸出連線都設成條件而沒有預設出口;缺預設出口時,用 set_edge_default 把其中一條設為預設。\n8. 完成後,呼叫 validate_workflow,並用一兩句話說明你建了什麼流程、哪些地方(如簽核人、條件門檻)建議使用者再確認或指定。\n9. 全程使用繁體中文(台灣用語)回覆。\n\n嚴格界線:\n- 只做「設計這個簽核流程」相關的事。任何與此無關的請求(閒聊、寫詩、寫程式、查天氣/新聞、操作其他系統或頁面、回答一般知識問題等)一律婉拒,並簡短引導使用者回到流程設計,例如:「我只能協助你設計這個簽核流程,需要我幫你新增關卡或設定條件嗎?」\n- 不要假裝執行你工具以外的動作,也不要編造結果。`;\n\n/** Build AI SDK tools from WORKFLOW_TOOLSET — no `execute`, so the browser runs them. */\nexport function buildWorkflowAiSdkTools(): ToolSet {\n const entries: readonly (readonly [string, Tool])[] = WORKFLOW_TOOLSET.map(\n (workflowTool) =>\n [\n workflowTool.name,\n tool({\n description: workflowTool.description,\n inputSchema: jsonSchema(\n workflowTool.inputSchema as Parameters<typeof jsonSchema>[0],\n ),\n }),\n ] as const,\n );\n\n return Object.fromEntries(entries) as ToolSet;\n}\n\nexport interface WorkflowChatRouteOptions {\n /** Override the OpenAI model id (else BPM_LLM_MODEL env, else the default). */\n readonly model?: string;\n /** Override the system prompt (else the strict design-only guardrail). */\n readonly system?: string;\n}\n\ninterface WorkflowChatRequestBody {\n readonly messages: readonly UIMessage[];\n}\n\n/** Create the `POST` handler for the workflow chat route. */\nexport function createWorkflowChatPOST(\n options: WorkflowChatRouteOptions = {},\n): (request: Request) => Promise<Response> {\n const tools = buildWorkflowAiSdkTools();\n\n return async function POST(request: Request): Promise<Response> {\n const body = (await request.json()) as WorkflowChatRequestBody;\n const result = streamText({\n messages: await convertToModelMessages([...body.messages]),\n model: resolveModel(\n options.model ?? process.env.BPM_LLM_MODEL ?? DEFAULT_MODEL,\n ),\n system: options.system ?? WORKFLOW_CHAT_SYSTEM_PROMPT,\n tools,\n });\n\n return result.toUIMessageStreamResponse();\n };\n}\n"],"mappings":";;;;AA4BA,IAAM,IAAgB;AAOtB,SAAS,EAAa,GAAgC;CACpD,OAAO,EAAO,EAAQ,QAAQ,cAAc,EAAE,CAAC;AACjD;AAOA,IAAa,IAA8B;AAoB3C,SAAgB,IAAmC;CACjD,IAAM,IAAgD,EAAiB,KACpE,MACC,CACE,EAAa,MACb,EAAK;EACH,aAAa,EAAa;EAC1B,aAAa,EACX,EAAa,WACf;CACF,CAAC,CACH,CACJ;CAEA,OAAO,OAAO,YAAY,CAAO;AACnC;AAcA,SAAgB,EACd,IAAoC,CAAC,GACI;CACzC,IAAM,IAAQ,EAAwB;CAEtC,OAAO,eAAoB,GAAqC;EAC9D,IAAM,IAAQ,MAAM,EAAQ,KAAK;EAUjC,OATe,EAAW;GACxB,UAAU,MAAM,EAAuB,CAAC,GAAG,EAAK,QAAQ,CAAC;GACzD,OAAO,EACL,EAAQ,SAAS,QAAQ,IAAI,iBAAiB,CAChD;GACA,QAAQ,EAAQ,UAAU;GAC1B;EACF,CAEO,CAAA,CAAO,0BAA0B;CAC1C;AACF"}
1
+ {"version":3,"file":"workflow-chat-route.js","names":["DEFAULT_MODEL","resolveModel","openai","setting","WORKFLOW_CHAT_SYSTEM_PROMPT","buildWorkflowAiSdkTools","entries","WORKFLOW_TOOLSET","workflowTool","tool","jsonSchema","createWorkflowChatPOST","tools","body","request","streamText","convertToModelMessages","options"],"sources":["../../src/next/workflow-chat-route.ts"],"sourcesContent":["import {\n convertToModelMessages,\n jsonSchema,\n streamText,\n tool,\n type LanguageModel,\n type Tool,\n type ToolSet,\n type UIMessage,\n} from 'ai';\nimport { openai } from '@ai-sdk/openai';\nimport { WORKFLOW_TOOLSET } from '@rytass/bpm-core-shared';\n\n/**\n * Next.js route handler for the workflow designer LLM assistant.\n *\n * The model is advertised the workflow {@link WORKFLOW_TOOLSET} but the tools\n * carry **no `execute`** — so every tool call is forwarded to the browser,\n * where `useChat`'s `onToolCall` runs it against the React designer controller\n * (see `use-workflow-chat.ts`). This route only holds the API key, runs the\n * model, and streams the tool-call plan back. It never touches the canvas.\n *\n * Host usage (apps/client/src/app/api/chat/route.ts):\n * export const runtime = 'nodejs';\n * export const POST = createWorkflowChatPOST();\n */\n\n/** Default OpenAI model id (overridable via BPM_LLM_MODEL). */\nconst DEFAULT_MODEL = 'gpt-5.4-mini';\n\n/**\n * Resolve the model via the OpenAI provider directly (reads `OPENAI_API_KEY`).\n * Accepts a bare id (`gpt-5.4-mini`) or a `openai/`-prefixed id; the prefix is\n * stripped. This deployment talks to OpenAI directly — no AI Gateway.\n */\nfunction resolveModel(setting: string): LanguageModel {\n return openai(setting.replace(/^openai\\//u, ''));\n}\n\n/**\n * Strict guardrail: the assistant may ONLY design this approval flow, using the\n * provided tools. Anything else is declined. Lives server-side so it cannot be\n * overridden by client-supplied messages.\n */\nexport const WORKFLOW_CHAT_SYSTEM_PROMPT = `你是「簽核流程設計器」頁面內建的 AI 助理,唯一職責是協助使用者在這個畫布上設計/修改一個簽核審批流程(workflow)。\n\n你只能透過系統提供的工具(tools)來操作流程:新增/重命名/刪除節點、連線、設定簽核人、設定條件分流、設定系統節點動作、自動排版、查詢現況與驗證等。除了這些工具,你沒有其他能力。\n\n工作守則:\n1. 動作前,先呼叫 get_workflow_snapshot 了解目前畫布的節點與連線,再規劃要呼叫哪些工具。\n2. 盡量用高階工具(insert_approval_step / insert_notification / insert_conditional_branch)一次完成多步;需要細修時再用細顆粒工具。\n3. **重要:要果斷、先把流程畫出來。** 使用者只給一兩句話時,直接依常見公司慣例建立初稿,不要反覆追問細節。簽核人若使用者沒指定,就省略 approverResolver(系統會自動用「直屬主管」為預設,不需要真實會員 id);通知節點同理可省略 action(預設站內通知)。先把結構建好、再請使用者調整。\n4. 工具呼叫不會因為「缺簽核人/缺資料」而失敗;缺的部分會以合理預設補上,並由 validate_workflow 標示。所以放心連續呼叫工具把流程建完,不要因為怕缺欄位就停下來問。\n5. 當使用者「點名」某個人或部門當簽核人/收件者時,先用 search_members(依姓名關鍵字)、list_org_units、list_positions 查到真實 id,再用 set_user_task_approver / set_service_action 指定(如 DIRECT memberIds、ORG_UNIT_MANAGER orgUnitId、POSITION positionId)。查不到就回報並請使用者確認,不要編造 id。\n6. 節點 id 可從 snapshot 取得;連線條件需要先綁定表單欄位(若 list_form_fields 為空,提醒使用者先綁定表單版本)。\n7. **條件分流務必主動補上「其他情況」**:設計 exclusiveGateway(條件分流)時,除了符合條件的分支,一定要保留一條未設條件、標記為預設(isDefault)的「其他情況」路徑當 else(通常指向後續節點或完成)。不要把所有輸出連線都設成條件而沒有預設出口;缺預設出口時,用 set_edge_default 把其中一條設為預設。\n8. 完成後,呼叫 validate_workflow,並用一兩句話說明你建了什麼流程、哪些地方(如簽核人、條件門檻)建議使用者再確認或指定。\n9. 全程使用繁體中文(台灣用語)回覆。\n\n嚴格界線:\n- 只做「設計這個簽核流程」相關的事。任何與此無關的請求(閒聊、寫詩、寫程式、查天氣/新聞、操作其他系統或頁面、回答一般知識問題等)一律婉拒,並簡短引導使用者回到流程設計,例如:「我只能協助你設計這個簽核流程,需要我幫你新增關卡或設定條件嗎?」\n- 不要假裝執行你工具以外的動作,也不要編造結果。`;\n\n/** Build AI SDK tools from WORKFLOW_TOOLSET — no `execute`, so the browser runs them. */\nexport function buildWorkflowAiSdkTools(): ToolSet {\n const entries: readonly (readonly [string, Tool])[] = WORKFLOW_TOOLSET.map(\n (workflowTool) =>\n [\n workflowTool.name,\n tool({\n description: workflowTool.description,\n inputSchema: jsonSchema(\n workflowTool.inputSchema as Parameters<typeof jsonSchema>[0],\n ),\n }),\n ] as const,\n );\n\n return Object.fromEntries(entries) as ToolSet;\n}\n\nexport interface WorkflowChatRouteOptions {\n /** Override the OpenAI model id (else BPM_LLM_MODEL env, else the default). */\n readonly model?: string;\n /** Override the system prompt (else the strict design-only guardrail). */\n readonly system?: string;\n}\n\ninterface WorkflowChatRequestBody {\n readonly messages: readonly UIMessage[];\n}\n\n/** Create the `POST` handler for the workflow chat route. */\nexport function createWorkflowChatPOST(\n options: WorkflowChatRouteOptions = {},\n): (request: Request) => Promise<Response> {\n const tools = buildWorkflowAiSdkTools();\n\n return async function POST(request: Request): Promise<Response> {\n const body = (await request.json()) as WorkflowChatRequestBody;\n const result = streamText({\n messages: await convertToModelMessages([...body.messages]),\n model: resolveModel(\n options.model ?? process.env.BPM_LLM_MODEL ?? DEFAULT_MODEL,\n ),\n system: options.system ?? WORKFLOW_CHAT_SYSTEM_PROMPT,\n tools,\n });\n\n return result.toUIMessageStreamResponse();\n };\n}\n"],"mappings":";;;;AA4BA,IAAMA,IAAgB;AAOtB,SAASC,EAAa,GAAgC;CACpD,OAAOC,EAAOC,EAAQ,QAAQ,cAAc,EAAE,CAAC;AACjD;AAOA,IAAaC,IAA8B;AAoB3C,SAAgBC,IAAmC;CACjD,IAAMC,IAAgDC,EAAiB,KACpE,MACC,CACEC,EAAa,MACbC,EAAK;EACH,aAAaD,EAAa;EAC1B,aAAaE,EACXF,EAAa,WACf;CACF,CAAC,CACH,CACJ;CAEA,OAAO,OAAO,YAAYF,CAAO;AACnC;AAcA,SAAgBK,EACd,IAAoC,CAAC,GACI;CACzC,IAAMC,IAAQP,EAAwB;CAEtC,OAAO,eAAoB,GAAqC;EAC9D,IAAMQ,IAAQ,MAAMC,EAAQ,KAAK;EAUjC,OATeC,EAAW;GACxB,UAAU,MAAMC,EAAuB,CAAC,GAAGH,EAAK,QAAQ,CAAC;GACzD,OAAOZ,EACLgB,EAAQ,SAAS,QAAQ,IAAI,iBAAiBjB,CAChD;GACA,QAAQiB,EAAQ,UAAUb;GAC1B;EACF,CAEO,CAAA,CAAO,0BAA0B;CAC1C;AACF"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/delegations-DlYwMiAW.cjs");let t=require("react/jsx-runtime");var n={title:`代理設定 | BPM Admin`,description:`設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/delegations-BLzYnOae.cjs");let t=require("react/jsx-runtime");var n={title:`代理設定 | BPM Admin`,description:`設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/admin/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminDelegationsView } from '../../../views/admin/delegations';\n\nexport const metadata: Metadata = {\n title: '代理設定 | BPM Admin',\n description: '設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。',\n};\n\nexport default function AdminDelegationsPage(): ReactElement {\n return <AdminDelegationsView />;\n}\n"],"mappings":"8LAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,8BACf,EAEA,SAAwB,GAAqC,CAC3D,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAuB,CAAA,CAChC"}
1
+ {"version":3,"file":"index.cjs","names":["AdminDelegationsView","require_delegations","react_jsx_runtime","metadata","AdminDelegationsPage"],"sources":["../../../../src/pages/admin/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminDelegationsView } from '../../../views/admin/delegations';\n\nexport const metadata: Metadata = {\n title: '代理設定 | BPM Admin',\n description: '設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。',\n};\n\nexport default function AdminDelegationsPage(): ReactElement {\n return <AdminDelegationsView />;\n}\n"],"mappings":"8LAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,8BACf,EAEA,SAAwBC,GAAqC,CAC3D,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAuB,CAAA,CAChC"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/delegations-B8gLSt0i.js";
1
+ import { t as e } from "../../../chunks/delegations-_b4_xBit.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/admin/delegations/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/admin/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminDelegationsView } from '../../../views/admin/delegations';\n\nexport const metadata: Metadata = {\n title: '代理設定 | BPM Admin',\n description: '設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。',\n};\n\nexport default function AdminDelegationsPage(): ReactElement {\n return <AdminDelegationsView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAAqC;CAC3D,OAAO,kBAAC,GAAD,CAAuB,CAAA;AAChC"}
1
+ {"version":3,"file":"index.js","names":["AdminDelegationsView","metadata","AdminDelegationsPage"],"sources":["../../../../src/pages/admin/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminDelegationsView } from '../../../views/admin/delegations';\n\nexport const metadata: Metadata = {\n title: '代理設定 | BPM Admin',\n description: '設定簽核代理規則,讓符合範圍的待簽任務自動改派給代理人。',\n};\n\nexport default function AdminDelegationsPage(): ReactElement {\n return <AdminDelegationsView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAAqC;CAC3D,OAAO,kBAACF,GAAD,CAAuB,CAAA;AAChC"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/orgs-D0-5BaHT.cjs");let t=require("react/jsx-runtime");var n={title:`組織管理 | BPM Admin`,description:`維護組織樹、職位、會員歸屬與簽核主管解析規則。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/orgs-ywaE1_02.cjs");let t=require("react/jsx-runtime");var n={title:`組織管理 | BPM Admin`,description:`維護組織樹、職位、會員歸屬與簽核主管解析規則。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/admin/orgs/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminOrgsView } from '../../../views/admin/orgs';\n\nexport const metadata: Metadata = {\n title: '組織管理 | BPM Admin',\n description: '維護組織樹、職位、會員歸屬與簽核主管解析規則。',\n};\n\nexport default function AdminOrgsPage(): ReactElement {\n return <AdminOrgsView />;\n}\n"],"mappings":"uLAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,yBACf,EAEA,SAAwB,GAA8B,CACpD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAgB,CAAA,CACzB"}
1
+ {"version":3,"file":"index.cjs","names":["AdminOrgsView","require_orgs","react_jsx_runtime","metadata","AdminOrgsPage"],"sources":["../../../../src/pages/admin/orgs/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminOrgsView } from '../../../views/admin/orgs';\n\nexport const metadata: Metadata = {\n title: '組織管理 | BPM Admin',\n description: '維護組織樹、職位、會員歸屬與簽核主管解析規則。',\n};\n\nexport default function AdminOrgsPage(): ReactElement {\n return <AdminOrgsView />;\n}\n"],"mappings":"uLAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,yBACf,EAEA,SAAwBC,GAA8B,CACpD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAgB,CAAA,CACzB"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/orgs-BpqVu5ka.js";
1
+ import { t as e } from "../../../chunks/orgs-Bpp1U60k.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/admin/orgs/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/admin/orgs/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminOrgsView } from '../../../views/admin/orgs';\n\nexport const metadata: Metadata = {\n title: '組織管理 | BPM Admin',\n description: '維護組織樹、職位、會員歸屬與簽核主管解析規則。',\n};\n\nexport default function AdminOrgsPage(): ReactElement {\n return <AdminOrgsView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAA8B;CACpD,OAAO,kBAAC,GAAD,CAAgB,CAAA;AACzB"}
1
+ {"version":3,"file":"index.js","names":["AdminOrgsView","metadata","AdminOrgsPage"],"sources":["../../../../src/pages/admin/orgs/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminOrgsView } from '../../../views/admin/orgs';\n\nexport const metadata: Metadata = {\n title: '組織管理 | BPM Admin',\n description: '維護組織樹、職位、會員歸屬與簽核主管解析規則。',\n};\n\nexport default function AdminOrgsPage(): ReactElement {\n return <AdminOrgsView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAA8B;CACpD,OAAO,kBAACF,GAAD,CAAgB,CAAA;AACzB"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-C9LA-Rd7.cjs");let t=require("react/jsx-runtime");var n={title:`會員對照 | BPM Admin`,description:`檢視 BPM 內部會員組織歸屬與主管解析。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-DFSBTDMy.cjs");let t=require("react/jsx-runtime");var n={title:`會員對照 | BPM Admin`,description:`檢視 BPM 內部會員組織歸屬與主管解析。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/admin/users/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminUsersView } from '../../../views/admin/users';\n\nexport const metadata: Metadata = {\n title: '會員對照 | BPM Admin',\n description: '檢視 BPM 內部會員組織歸屬與主管解析。',\n};\n\nexport default function AdminUsersPage(): ReactElement {\n return <AdminUsersView />;\n}\n"],"mappings":"wLAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,uBACf,EAEA,SAAwB,GAA+B,CACrD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAiB,CAAA,CAC1B"}
1
+ {"version":3,"file":"index.cjs","names":["AdminUsersView","require_users","react_jsx_runtime","metadata","AdminUsersPage"],"sources":["../../../../src/pages/admin/users/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminUsersView } from '../../../views/admin/users';\n\nexport const metadata: Metadata = {\n title: '會員對照 | BPM Admin',\n description: '檢視 BPM 內部會員組織歸屬與主管解析。',\n};\n\nexport default function AdminUsersPage(): ReactElement {\n return <AdminUsersView />;\n}\n"],"mappings":"wLAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,uBACf,EAEA,SAAwBC,GAA+B,CACrD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAiB,CAAA,CAC1B"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/users-FWrb3ehW.js";
1
+ import { t as e } from "../../../chunks/users-BSVo_eNe.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/admin/users/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/admin/users/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminUsersView } from '../../../views/admin/users';\n\nexport const metadata: Metadata = {\n title: '會員對照 | BPM Admin',\n description: '檢視 BPM 內部會員組織歸屬與主管解析。',\n};\n\nexport default function AdminUsersPage(): ReactElement {\n return <AdminUsersView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAA+B;CACrD,OAAO,kBAAC,GAAD,CAAiB,CAAA;AAC1B"}
1
+ {"version":3,"file":"index.js","names":["AdminUsersView","metadata","AdminUsersPage"],"sources":["../../../../src/pages/admin/users/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminUsersView } from '../../../views/admin/users';\n\nexport const metadata: Metadata = {\n title: '會員對照 | BPM Admin',\n description: '檢視 BPM 內部會員組織歸屬與主管解析。',\n};\n\nexport default function AdminUsersPage(): ReactElement {\n return <AdminUsersView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAA+B;CACrD,OAAO,kBAACF,GAAD,CAAiB,CAAA;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/admin/webhook-endpoints/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminWebhookEndpointsView } from '../../../views/admin/webhook-endpoints';\n\nexport const metadata: Metadata = {\n title: 'Webhook 端點 | BPM Admin',\n description: '維護知會節點可呼叫的外部系統端點。',\n};\n\nexport default function AdminWebhookEndpointsPage(): ReactElement {\n return <AdminWebhookEndpointsView />;\n}\n"],"mappings":"sMAIA,IAAa,EAAqB,CAChC,MAAO,yBACP,YAAa,mBACf,EAEA,SAAwB,GAA0C,CAChE,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,0BAAD,CAA4B,CAAA,CACrC"}
1
+ {"version":3,"file":"index.cjs","names":["AdminWebhookEndpointsView","require_views_admin_webhook_endpoints_index","react_jsx_runtime","metadata","AdminWebhookEndpointsPage"],"sources":["../../../../src/pages/admin/webhook-endpoints/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminWebhookEndpointsView } from '../../../views/admin/webhook-endpoints';\n\nexport const metadata: Metadata = {\n title: 'Webhook 端點 | BPM Admin',\n description: '維護知會節點可呼叫的外部系統端點。',\n};\n\nexport default function AdminWebhookEndpointsPage(): ReactElement {\n return <AdminWebhookEndpointsView />;\n}\n"],"mappings":"sMAIA,IAAaG,EAAqB,CAChC,MAAO,yBACP,YAAa,mBACf,EAEA,SAAwBC,GAA0C,CAChE,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,0BAAD,CAA4B,CAAA,CACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/admin/webhook-endpoints/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminWebhookEndpointsView } from '../../../views/admin/webhook-endpoints';\n\nexport const metadata: Metadata = {\n title: 'Webhook 端點 | BPM Admin',\n description: '維護知會節點可呼叫的外部系統端點。',\n};\n\nexport default function AdminWebhookEndpointsPage(): ReactElement {\n return <AdminWebhookEndpointsView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAA0C;CAChE,OAAO,kBAAC,GAAD,CAA4B,CAAA;AACrC"}
1
+ {"version":3,"file":"index.js","names":["metadata","AdminWebhookEndpointsPage","AdminWebhookEndpointsView"],"sources":["../../../../src/pages/admin/webhook-endpoints/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminWebhookEndpointsView } from '../../../views/admin/webhook-endpoints';\n\nexport const metadata: Metadata = {\n title: 'Webhook 端點 | BPM Admin',\n description: '維護知會節點可呼叫的外部系統端點。',\n};\n\nexport default function AdminWebhookEndpointsPage(): ReactElement {\n return <AdminWebhookEndpointsView />;\n}\n"],"mappings":";;;AAIA,IAAaA,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAA0C;CAChE,OAAO,kBAACC,GAAD,CAA4B,CAAA;AACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/cc/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { CcView } from '../../views/cc';\n\n/**\n * Next.js metadata for the BPM \"cc\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '抄送給我 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM cc inbox. Usage in\n * `app/cc/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/cc';\n * ```\n */\nexport default function CcPage(): ReactElement {\n return <CcView />;\n}\n"],"mappings":"8KAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwB,GAAuB,CAC7C,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,OAAD,CAAS,CAAA,CAClB"}
1
+ {"version":3,"file":"index.cjs","names":["CcView","require_views_cc_index","react_jsx_runtime","metadata","CcPage"],"sources":["../../../src/pages/cc/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { CcView } from '../../views/cc';\n\n/**\n * Next.js metadata for the BPM \"cc\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '抄送給我 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM cc inbox. Usage in\n * `app/cc/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/cc';\n * ```\n */\nexport default function CcPage(): ReactElement {\n return <CcView />;\n}\n"],"mappings":"8KAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwBC,GAAuB,CAC7C,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,OAAD,CAAS,CAAA,CAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/cc/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { CcView } from '../../views/cc';\n\n/**\n * Next.js metadata for the BPM \"cc\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '抄送給我 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM cc inbox. Usage in\n * `app/cc/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/cc';\n * ```\n */\nexport default function CcPage(): ReactElement {\n return <CcView />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwB,IAAuB;CAC7C,OAAO,kBAAC,GAAD,CAAS,CAAA;AAClB"}
1
+ {"version":3,"file":"index.js","names":["metadata","CcPage","CcView"],"sources":["../../../src/pages/cc/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { CcView } from '../../views/cc';\n\n/**\n * Next.js metadata for the BPM \"cc\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '抄送給我 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM cc inbox. Usage in\n * `app/cc/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/cc';\n * ```\n */\nexport default function CcPage(): ReactElement {\n return <CcView />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwBC,IAAuB;CAC7C,OAAO,kBAACC,GAAD,CAAS,CAAA;AAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/dashboard/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DashboardView } from '../../views/dashboard';\n\n/**\n * Next.js metadata for the BPM dashboard page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '工作台 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM dashboard. Usage in\n * `app/dashboard/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/dashboard';\n * ```\n */\nexport default function DashboardPage(): ReactElement {\n return <DashboardView />;\n}\n"],"mappings":"qLAQA,IAAa,EAAqB,CAChC,MAAO,iBACT,EAUA,SAAwB,GAA8B,CACpD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,cAAD,CAAgB,CAAA,CACzB"}
1
+ {"version":3,"file":"index.cjs","names":["DashboardView","require_views_dashboard_index","react_jsx_runtime","metadata","DashboardPage"],"sources":["../../../src/pages/dashboard/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DashboardView } from '../../views/dashboard';\n\n/**\n * Next.js metadata for the BPM dashboard page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '工作台 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM dashboard. Usage in\n * `app/dashboard/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/dashboard';\n * ```\n */\nexport default function DashboardPage(): ReactElement {\n return <DashboardView />;\n}\n"],"mappings":"qLAQA,IAAaG,EAAqB,CAChC,MAAO,iBACT,EAUA,SAAwBC,GAA8B,CACpD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,cAAD,CAAgB,CAAA,CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/dashboard/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DashboardView } from '../../views/dashboard';\n\n/**\n * Next.js metadata for the BPM dashboard page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '工作台 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM dashboard. Usage in\n * `app/dashboard/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/dashboard';\n * ```\n */\nexport default function DashboardPage(): ReactElement {\n return <DashboardView />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,kBACT;AAUA,SAAwB,IAA8B;CACpD,OAAO,kBAAC,GAAD,CAAgB,CAAA;AACzB"}
1
+ {"version":3,"file":"index.js","names":["metadata","DashboardPage","DashboardView"],"sources":["../../../src/pages/dashboard/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DashboardView } from '../../views/dashboard';\n\n/**\n * Next.js metadata for the BPM dashboard page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '工作台 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM dashboard. Usage in\n * `app/dashboard/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/dashboard';\n * ```\n */\nexport default function DashboardPage(): ReactElement {\n return <DashboardView />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,kBACT;AAUA,SAAwBC,IAA8B;CACpD,OAAO,kBAACC,GAAD,CAAgB,CAAA;AACzB"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../chunks/delegations-8LsxcQM4.cjs");let t=require("react/jsx-runtime");var n={title:`我的代理 | BPM Admin`,description:`設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../chunks/delegations-Ckf03icM.cjs");let t=require("react/jsx-runtime");var n={title:`我的代理 | BPM Admin`,description:`設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DelegationsView } from '../../views/delegations';\n\nexport const metadata: Metadata = {\n title: '我的代理 | BPM Admin',\n description: '設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。',\n};\n\nexport default function DelegationsPage(): ReactElement {\n return <DelegationsView />;\n}\n"],"mappings":"2LAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,kCACf,EAEA,SAAwB,GAAgC,CACtD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAkB,CAAA,CAC3B"}
1
+ {"version":3,"file":"index.cjs","names":["DelegationsView","require_delegations","react_jsx_runtime","metadata","DelegationsPage"],"sources":["../../../src/pages/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DelegationsView } from '../../views/delegations';\n\nexport const metadata: Metadata = {\n title: '我的代理 | BPM Admin',\n description: '設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。',\n};\n\nexport default function DelegationsPage(): ReactElement {\n return <DelegationsView />;\n}\n"],"mappings":"2LAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,kCACf,EAEA,SAAwBC,GAAgC,CACtD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAkB,CAAA,CAC3B"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../chunks/delegations-DRupxJ4_.js";
1
+ import { t as e } from "../../chunks/delegations-MxF3uJGW.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/delegations/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DelegationsView } from '../../views/delegations';\n\nexport const metadata: Metadata = {\n title: '我的代理 | BPM Admin',\n description: '設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。',\n};\n\nexport default function DelegationsPage(): ReactElement {\n return <DelegationsView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAAgC;CACtD,OAAO,kBAAC,GAAD,CAAkB,CAAA;AAC3B"}
1
+ {"version":3,"file":"index.js","names":["DelegationsView","metadata","DelegationsPage"],"sources":["../../../src/pages/delegations/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { DelegationsView } from '../../views/delegations';\n\nexport const metadata: Metadata = {\n title: '我的代理 | BPM Admin',\n description: '設定自己的簽核代理,讓指定期間內的新待簽任務自動交由代理人處理。',\n};\n\nexport default function DelegationsPage(): ReactElement {\n return <DelegationsView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAAgC;CACtD,OAAO,kBAACF,GAAD,CAAkB,CAAA;AAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/inbox/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InboxView } from '../../views/inbox';\n\n/**\n * Next.js metadata for the BPM inbox page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我的待簽 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM inbox. Usage in\n * `app/inbox/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/inbox';\n * ```\n */\nexport default function InboxPage(): ReactElement {\n return <InboxView />;\n}\n"],"mappings":"iLAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwB,GAA0B,CAChD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,UAAD,CAAY,CAAA,CACrB"}
1
+ {"version":3,"file":"index.cjs","names":["InboxView","require_views_inbox_index","react_jsx_runtime","metadata","InboxPage"],"sources":["../../../src/pages/inbox/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InboxView } from '../../views/inbox';\n\n/**\n * Next.js metadata for the BPM inbox page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我的待簽 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM inbox. Usage in\n * `app/inbox/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/inbox';\n * ```\n */\nexport default function InboxPage(): ReactElement {\n return <InboxView />;\n}\n"],"mappings":"iLAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwBC,GAA0B,CAChD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,UAAD,CAAY,CAAA,CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/inbox/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InboxView } from '../../views/inbox';\n\n/**\n * Next.js metadata for the BPM inbox page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我的待簽 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM inbox. Usage in\n * `app/inbox/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/inbox';\n * ```\n */\nexport default function InboxPage(): ReactElement {\n return <InboxView />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwB,IAA0B;CAChD,OAAO,kBAAC,GAAD,CAAY,CAAA;AACrB"}
1
+ {"version":3,"file":"index.js","names":["metadata","InboxPage","InboxView"],"sources":["../../../src/pages/inbox/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InboxView } from '../../views/inbox';\n\n/**\n * Next.js metadata for the BPM inbox page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我的待簽 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM inbox. Usage in\n * `app/inbox/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/inbox';\n * ```\n */\nexport default function InboxPage(): ReactElement {\n return <InboxView />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwBC,IAA0B;CAChD,OAAO,kBAACC,GAAD,CAAY,CAAA;AACrB"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/detail-CX-3hZoL.cjs");let t=require("react/jsx-runtime");var n={title:`案件詳情 | BPM Admin`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{instanceId:r})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/detail-DKobK4Cg.cjs");let t=require("react/jsx-runtime");var n={title:`案件詳情 | BPM Admin`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{instanceId:r})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/instances/detail/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceDetailView } from '../../../views/instances/detail';\n\n/**\n * Next.js metadata for the BPM instance detail page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件詳情 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM instance detail screen.\n * Accepts the standard App Router `params: Promise<{ id: string }>` shape\n * and forwards the resolved `id` into the view as `instanceId`.\n *\n * Usage in `app/instances/[id]/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/detail';\n * ```\n */\nexport default async function InstanceDetailPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <InstanceDetailView instanceId={id} />;\n}\n"],"mappings":"yLAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAaA,eAA8B,EAAmB,CAC/C,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAM,EACrB,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAoB,WAAY,CAAK,CAAA,CAC9C"}
1
+ {"version":3,"file":"index.cjs","names":["InstanceDetailView","require_detail","react_jsx_runtime","metadata","InstanceDetailPage","params","id"],"sources":["../../../../src/pages/instances/detail/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceDetailView } from '../../../views/instances/detail';\n\n/**\n * Next.js metadata for the BPM instance detail page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件詳情 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM instance detail screen.\n * Accepts the standard App Router `params: Promise<{ id: string }>` shape\n * and forwards the resolved `id` into the view as `instanceId`.\n *\n * Usage in `app/instances/[id]/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/detail';\n * ```\n */\nexport default async function InstanceDetailPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <InstanceDetailView instanceId={id} />;\n}\n"],"mappings":"yLAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAaA,eAA8BC,EAAmB,CAC/C,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAMC,EACrB,OAAO,EAAAH,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAoB,WAAYM,CAAK,CAAA,CAC9C"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/detail-C8NOqY0p.js";
1
+ import { t as e } from "../../../chunks/detail-C6NdVijG.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/instances/detail/index.tsx
4
4
  var n = { title: "案件詳情 | BPM Admin" };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/instances/detail/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceDetailView } from '../../../views/instances/detail';\n\n/**\n * Next.js metadata for the BPM instance detail page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件詳情 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM instance detail screen.\n * Accepts the standard App Router `params: Promise<{ id: string }>` shape\n * and forwards the resolved `id` into the view as `instanceId`.\n *\n * Usage in `app/instances/[id]/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/detail';\n * ```\n */\nexport default async function InstanceDetailPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <InstanceDetailView instanceId={id} />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAaA,eAA8B,EAAmB,EAC/C,aAGwB;CACxB,IAAM,EAAE,UAAO,MAAM;CACrB,OAAO,kBAAC,GAAD,EAAoB,YAAY,EAAK,CAAA;AAC9C"}
1
+ {"version":3,"file":"index.js","names":["InstanceDetailView","metadata","InstanceDetailPage","params","id"],"sources":["../../../../src/pages/instances/detail/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceDetailView } from '../../../views/instances/detail';\n\n/**\n * Next.js metadata for the BPM instance detail page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件詳情 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM instance detail screen.\n * Accepts the standard App Router `params: Promise<{ id: string }>` shape\n * and forwards the resolved `id` into the view as `instanceId`.\n *\n * Usage in `app/instances/[id]/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/detail';\n * ```\n */\nexport default async function InstanceDetailPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <InstanceDetailView instanceId={id} />;\n}\n"],"mappings":";;;AAQA,IAAaC,IAAqB,EAChC,OAAO,mBACT;AAaA,eAA8BC,EAAmB,EAC/C,aAGwB;CACxB,IAAM,EAAE,UAAO,MAAMC;CACrB,OAAO,kBAACH,GAAD,EAAoB,YAAYI,EAAK,CAAA;AAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/instances/new/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceNewView } from '../../../views/instances/new';\n\n/**\n * Next.js metadata for the BPM \"launch approval\" page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '發起簽核 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM launch screen. Usage in\n * `app/instances/new/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/new';\n * ```\n */\nexport default async function InstanceNewPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly templateId?: string }>;\n}): Promise<ReactElement> {\n const { templateId } = await searchParams;\n return <InstanceNewView templateId={templateId ?? null} />;\n}\n"],"mappings":"4LAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAUA,eAA8B,EAAgB,CAC5C,gBAGwB,CACxB,GAAM,CAAE,cAAe,MAAM,EAC7B,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,gBAAD,CAAiB,WAAY,GAAc,IAAO,CAAA,CAC3D"}
1
+ {"version":3,"file":"index.cjs","names":["InstanceNewView","require_views_instances_new_index","react_jsx_runtime","metadata","InstanceNewPage","searchParams","templateId"],"sources":["../../../../src/pages/instances/new/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceNewView } from '../../../views/instances/new';\n\n/**\n * Next.js metadata for the BPM \"launch approval\" page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '發起簽核 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM launch screen. Usage in\n * `app/instances/new/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/new';\n * ```\n */\nexport default async function InstanceNewPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly templateId?: string }>;\n}): Promise<ReactElement> {\n const { templateId } = await searchParams;\n return <InstanceNewView templateId={templateId ?? null} />;\n}\n"],"mappings":"4LAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAUA,eAA8BC,EAAgB,CAC5C,gBAGwB,CACxB,GAAM,CAAE,cAAe,MAAMC,EAC7B,OAAO,EAAAH,EAAA,IAAA,CAACF,EAAAA,gBAAD,CAAiB,WAAYM,GAAc,IAAO,CAAA,CAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/instances/new/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceNewView } from '../../../views/instances/new';\n\n/**\n * Next.js metadata for the BPM \"launch approval\" page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '發起簽核 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM launch screen. Usage in\n * `app/instances/new/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/new';\n * ```\n */\nexport default async function InstanceNewPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly templateId?: string }>;\n}): Promise<ReactElement> {\n const { templateId } = await searchParams;\n return <InstanceNewView templateId={templateId ?? null} />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAUA,eAA8B,EAAgB,EAC5C,mBAGwB;CACxB,IAAM,EAAE,kBAAe,MAAM;CAC7B,OAAO,kBAAC,GAAD,EAAiB,YAAY,KAAc,KAAO,CAAA;AAC3D"}
1
+ {"version":3,"file":"index.js","names":["metadata","InstanceNewPage","searchParams","InstanceNewView","templateId"],"sources":["../../../../src/pages/instances/new/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { InstanceNewView } from '../../../views/instances/new';\n\n/**\n * Next.js metadata for the BPM \"launch approval\" page. Consumers re-export\n * this alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '發起簽核 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM launch screen. Usage in\n * `app/instances/new/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/instances/new';\n * ```\n */\nexport default async function InstanceNewPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly templateId?: string }>;\n}): Promise<ReactElement> {\n const { templateId } = await searchParams;\n return <InstanceNewView templateId={templateId ?? null} />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,mBACT;AAUA,eAA8BC,EAAgB,EAC5C,mBAGwB;CACxB,IAAM,EAAE,kBAAe,MAAMC;CAC7B,OAAO,kBAACC,GAAD,EAAiB,YAAYC,KAAc,KAAO,CAAA;AAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/login/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { LoginView } from '../../views/login';\n\n/**\n * Next.js metadata for the BPM login page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: 'Login | BPM Admin',\n description: 'Sign in to the BPM approval workflow administration console.',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM login screen.\n *\n * Consumer usage in `app/login/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/login';\n * ```\n */\nexport default async function LoginPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly next?: string }>;\n}): Promise<ReactElement> {\n const { next } = await searchParams;\n return <LoginView defaultNextPath={next} />;\n}\n"],"mappings":"qLAQA,IAAa,EAAqB,CAChC,MAAO,oBACP,YAAa,8DACf,EAWA,eAA8B,EAAU,CACtC,gBAGwB,CACxB,GAAM,CAAE,QAAS,MAAM,EACvB,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAW,gBAAiB,CAAO,CAAA,CAC5C"}
1
+ {"version":3,"file":"index.cjs","names":["LoginView","require_login","react_jsx_runtime","metadata","LoginPage","searchParams","next"],"sources":["../../../src/pages/login/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { LoginView } from '../../views/login';\n\n/**\n * Next.js metadata for the BPM login page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: 'Login | BPM Admin',\n description: 'Sign in to the BPM approval workflow administration console.',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM login screen.\n *\n * Consumer usage in `app/login/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/login';\n * ```\n */\nexport default async function LoginPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly next?: string }>;\n}): Promise<ReactElement> {\n const { next } = await searchParams;\n return <LoginView defaultNextPath={next} />;\n}\n"],"mappings":"qLAQA,IAAaG,EAAqB,CAChC,MAAO,oBACP,YAAa,8DACf,EAWA,eAA8BC,EAAU,CACtC,gBAGwB,CACxB,GAAM,CAAE,QAAS,MAAMC,EACvB,OAAO,EAAAH,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAW,gBAAiBM,CAAO,CAAA,CAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/login/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { LoginView } from '../../views/login';\n\n/**\n * Next.js metadata for the BPM login page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: 'Login | BPM Admin',\n description: 'Sign in to the BPM approval workflow administration console.',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM login screen.\n *\n * Consumer usage in `app/login/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/login';\n * ```\n */\nexport default async function LoginPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly next?: string }>;\n}): Promise<ReactElement> {\n const { next } = await searchParams;\n return <LoginView defaultNextPath={next} />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAWA,eAA8B,EAAU,EACtC,mBAGwB;CACxB,IAAM,EAAE,YAAS,MAAM;CACvB,OAAO,kBAAC,GAAD,EAAW,iBAAiB,EAAO,CAAA;AAC5C"}
1
+ {"version":3,"file":"index.js","names":["LoginView","metadata","LoginPage","searchParams","next"],"sources":["../../../src/pages/login/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { LoginView } from '../../views/login';\n\n/**\n * Next.js metadata for the BPM login page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: 'Login | BPM Admin',\n description: 'Sign in to the BPM approval workflow administration console.',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM login screen.\n *\n * Consumer usage in `app/login/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/login';\n * ```\n */\nexport default async function LoginPage({\n searchParams,\n}: {\n readonly searchParams: Promise<{ readonly next?: string }>;\n}): Promise<ReactElement> {\n const { next } = await searchParams;\n return <LoginView defaultNextPath={next} />;\n}\n"],"mappings":";;;AAQA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAWA,eAA8BC,EAAU,EACtC,mBAGwB;CACxB,IAAM,EAAE,YAAS,MAAMC;CACvB,OAAO,kBAACH,GAAD,EAAW,iBAAiBI,EAAO,CAAA;AAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/root/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { redirect } from 'next/navigation';\n\n/**\n * Next.js metadata for the BPM root path.\n */\nexport const metadata: Metadata = {\n title: 'BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM root path. Server-side\n * redirects to `/dashboard` — never renders any client tree, so it cannot\n * pollute the chunk boundary with `'use client'`.\n *\n * Consumer usage in `app/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/root';\n * ```\n */\nexport default function RootPage(): ReactElement {\n redirect('/dashboard');\n}\n"],"mappings":"gIAOA,IAAa,EAAqB,CAChC,MAAO,WACT,EAaA,SAAwB,GAAyB,EAC/C,EAAA,EAAA,SAAA,CAAS,YAAY,CACvB"}
1
+ {"version":3,"file":"index.cjs","names":["next_navigation","metadata","RootPage"],"sources":["../../../src/pages/root/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { redirect } from 'next/navigation';\n\n/**\n * Next.js metadata for the BPM root path.\n */\nexport const metadata: Metadata = {\n title: 'BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM root path. Server-side\n * redirects to `/dashboard` — never renders any client tree, so it cannot\n * pollute the chunk boundary with `'use client'`.\n *\n * Consumer usage in `app/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/root';\n * ```\n */\nexport default function RootPage(): ReactElement {\n redirect('/dashboard');\n}\n"],"mappings":"gIAOA,IAAaC,EAAqB,CAChC,MAAO,WACT,EAaA,SAAwBC,GAAyB,EAC/C,EAAAF,EAAA,SAAA,CAAS,YAAY,CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/root/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { redirect } from 'next/navigation';\n\n/**\n * Next.js metadata for the BPM root path.\n */\nexport const metadata: Metadata = {\n title: 'BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM root path. Server-side\n * redirects to `/dashboard` — never renders any client tree, so it cannot\n * pollute the chunk boundary with `'use client'`.\n *\n * Consumer usage in `app/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/root';\n * ```\n */\nexport default function RootPage(): ReactElement {\n redirect('/dashboard');\n}\n"],"mappings":";;AAOA,IAAa,IAAqB,EAChC,OAAO,YACT;AAaA,SAAwB,IAAyB;CAC/C,EAAS,YAAY;AACvB"}
1
+ {"version":3,"file":"index.js","names":["metadata","RootPage"],"sources":["../../../src/pages/root/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { redirect } from 'next/navigation';\n\n/**\n * Next.js metadata for the BPM root path.\n */\nexport const metadata: Metadata = {\n title: 'BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM root path. Server-side\n * redirects to `/dashboard` — never renders any client tree, so it cannot\n * pollute the chunk boundary with `'use client'`.\n *\n * Consumer usage in `app/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/root';\n * ```\n */\nexport default function RootPage(): ReactElement {\n redirect('/dashboard');\n}\n"],"mappings":";;AAOA,IAAaA,IAAqB,EAChC,OAAO,YACT;AAaA,SAAwBC,IAAyB;CAC/C,EAAS,YAAY;AACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/search/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SearchView } from '../../views/search';\n\n/**\n * Next.js metadata for the BPM case search page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件查詢 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM case search. Usage in\n * `app/search/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/search';\n * ```\n */\nexport default function SearchPage(): ReactElement {\n return <SearchView />;\n}\n"],"mappings":"kLAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwB,GAA2B,CACjD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,WAAD,CAAa,CAAA,CACtB"}
1
+ {"version":3,"file":"index.cjs","names":["SearchView","require_views_search_index","react_jsx_runtime","metadata","SearchPage"],"sources":["../../../src/pages/search/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SearchView } from '../../views/search';\n\n/**\n * Next.js metadata for the BPM case search page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件查詢 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM case search. Usage in\n * `app/search/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/search';\n * ```\n */\nexport default function SearchPage(): ReactElement {\n return <SearchView />;\n}\n"],"mappings":"kLAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwBC,GAA2B,CACjD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,WAAD,CAAa,CAAA,CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/search/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SearchView } from '../../views/search';\n\n/**\n * Next.js metadata for the BPM case search page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件查詢 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM case search. Usage in\n * `app/search/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/search';\n * ```\n */\nexport default function SearchPage(): ReactElement {\n return <SearchView />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwB,IAA2B;CACjD,OAAO,kBAAC,GAAD,CAAa,CAAA;AACtB"}
1
+ {"version":3,"file":"index.js","names":["metadata","SearchPage","SearchView"],"sources":["../../../src/pages/search/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SearchView } from '../../views/search';\n\n/**\n * Next.js metadata for the BPM case search page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '案件查詢 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM case search. Usage in\n * `app/search/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/search';\n * ```\n */\nexport default function SearchPage(): ReactElement {\n return <SearchView />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwBC,IAA2B;CACjD,OAAO,kBAACC,GAAD,CAAa,CAAA;AACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/sent/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SentView } from '../../views/sent';\n\n/**\n * Next.js metadata for the BPM \"sent\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我發起的 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM sent inbox. Usage in\n * `app/sent/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/sent';\n * ```\n */\nexport default function SentPage(): ReactElement {\n return <SentView />;\n}\n"],"mappings":"gLAQA,IAAa,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwB,GAAyB,CAC/C,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,SAAD,CAAW,CAAA,CACpB"}
1
+ {"version":3,"file":"index.cjs","names":["SentView","require_views_sent_index","react_jsx_runtime","metadata","SentPage"],"sources":["../../../src/pages/sent/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SentView } from '../../views/sent';\n\n/**\n * Next.js metadata for the BPM \"sent\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我發起的 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM sent inbox. Usage in\n * `app/sent/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/sent';\n * ```\n */\nexport default function SentPage(): ReactElement {\n return <SentView />;\n}\n"],"mappings":"gLAQA,IAAaG,EAAqB,CAChC,MAAO,kBACT,EAUA,SAAwBC,GAAyB,CAC/C,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,SAAD,CAAW,CAAA,CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/sent/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SentView } from '../../views/sent';\n\n/**\n * Next.js metadata for the BPM \"sent\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我發起的 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM sent inbox. Usage in\n * `app/sent/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/sent';\n * ```\n */\nexport default function SentPage(): ReactElement {\n return <SentView />;\n}\n"],"mappings":";;;AAQA,IAAa,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwB,IAAyB;CAC/C,OAAO,kBAAC,GAAD,CAAW,CAAA;AACpB"}
1
+ {"version":3,"file":"index.js","names":["metadata","SentPage","SentView"],"sources":["../../../src/pages/sent/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SentView } from '../../views/sent';\n\n/**\n * Next.js metadata for the BPM \"sent\" page. Consumers re-export this\n * alongside the default page component.\n */\nexport const metadata: Metadata = {\n title: '我發起的 | BPM Admin',\n};\n\n/**\n * Drop-in Next.js App Router page for the BPM sent inbox. Usage in\n * `app/sent/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/sent';\n * ```\n */\nexport default function SentPage(): ReactElement {\n return <SentView />;\n}\n"],"mappings":";;;AAQA,IAAaA,IAAqB,EAChC,OAAO,mBACT;AAUA,SAAwBC,IAAyB;CAC/C,OAAO,kBAACC,GAAD,CAAW,CAAA;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/settings/notifications/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SettingsNotificationsView } from '../../../views/settings/notifications';\n\nexport const metadata: Metadata = {\n title: '通知設定 | BPM Admin',\n description: '調整站內通知、Email 通知與摘要頻率。',\n};\n\nexport default function SettingsNotificationsPage(): ReactElement {\n return <SettingsNotificationsView />;\n}\n"],"mappings":"gMAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,uBACf,EAEA,SAAwB,GAA0C,CAChE,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAA4B,CAAA,CACrC"}
1
+ {"version":3,"file":"index.cjs","names":["SettingsNotificationsView","require_notifications","react_jsx_runtime","metadata","SettingsNotificationsPage"],"sources":["../../../../src/pages/settings/notifications/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SettingsNotificationsView } from '../../../views/settings/notifications';\n\nexport const metadata: Metadata = {\n title: '通知設定 | BPM Admin',\n description: '調整站內通知、Email 通知與摘要頻率。',\n};\n\nexport default function SettingsNotificationsPage(): ReactElement {\n return <SettingsNotificationsView />;\n}\n"],"mappings":"gMAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,uBACf,EAEA,SAAwBC,GAA0C,CAChE,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAA4B,CAAA,CACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/settings/notifications/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SettingsNotificationsView } from '../../../views/settings/notifications';\n\nexport const metadata: Metadata = {\n title: '通知設定 | BPM Admin',\n description: '調整站內通知、Email 通知與摘要頻率。',\n};\n\nexport default function SettingsNotificationsPage(): ReactElement {\n return <SettingsNotificationsView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAA0C;CAChE,OAAO,kBAAC,GAAD,CAA4B,CAAA;AACrC"}
1
+ {"version":3,"file":"index.js","names":["SettingsNotificationsView","metadata","SettingsNotificationsPage"],"sources":["../../../../src/pages/settings/notifications/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { SettingsNotificationsView } from '../../../views/settings/notifications';\n\nexport const metadata: Metadata = {\n title: '通知設定 | BPM Admin',\n description: '調整站內通知、Email 通知與摘要頻率。',\n};\n\nexport default function SettingsNotificationsPage(): ReactElement {\n return <SettingsNotificationsView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAA0C;CAChE,OAAO,kBAACF,GAAD,CAA4B,CAAA;AACrC"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/categories-Yid05WAX.cjs");let t=require("react/jsx-runtime");var n={title:`範本分類管理 | BPM Admin`,description:`維護 BPM 流程範本的分類設定。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/categories-DjENouRm.cjs");let t=require("react/jsx-runtime");var n={title:`範本分類管理 | BPM Admin`,description:`維護 BPM 流程範本的分類設定。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/templates/categories/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateCategoriesView } from '../../../views/templates/categories';\n\nexport const metadata: Metadata = {\n title: '範本分類管理 | BPM Admin',\n description: '維護 BPM 流程範本的分類設定。',\n};\n\nexport default function TemplateCategoriesPage(): ReactElement {\n return <TemplateCategoriesView />;\n}\n"],"mappings":"6LAIA,IAAa,EAAqB,CAChC,MAAO,qBACP,YAAa,mBACf,EAEA,SAAwB,GAAuC,CAC7D,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAyB,CAAA,CAClC"}
1
+ {"version":3,"file":"index.cjs","names":["TemplateCategoriesView","require_categories","react_jsx_runtime","metadata","TemplateCategoriesPage"],"sources":["../../../../src/pages/templates/categories/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateCategoriesView } from '../../../views/templates/categories';\n\nexport const metadata: Metadata = {\n title: '範本分類管理 | BPM Admin',\n description: '維護 BPM 流程範本的分類設定。',\n};\n\nexport default function TemplateCategoriesPage(): ReactElement {\n return <TemplateCategoriesView />;\n}\n"],"mappings":"6LAIA,IAAaG,EAAqB,CAChC,MAAO,qBACP,YAAa,mBACf,EAEA,SAAwBC,GAAuC,CAC7D,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,EAAD,CAAyB,CAAA,CAClC"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/categories-DGlxuC6X.js";
1
+ import { t as e } from "../../../chunks/categories-1gKxeEqw.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/templates/categories/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/templates/categories/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateCategoriesView } from '../../../views/templates/categories';\n\nexport const metadata: Metadata = {\n title: '範本分類管理 | BPM Admin',\n description: '維護 BPM 流程範本的分類設定。',\n};\n\nexport default function TemplateCategoriesPage(): ReactElement {\n return <TemplateCategoriesView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAAuC;CAC7D,OAAO,kBAAC,GAAD,CAAyB,CAAA;AAClC"}
1
+ {"version":3,"file":"index.js","names":["TemplateCategoriesView","metadata","TemplateCategoriesPage"],"sources":["../../../../src/pages/templates/categories/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateCategoriesView } from '../../../views/templates/categories';\n\nexport const metadata: Metadata = {\n title: '範本分類管理 | BPM Admin',\n description: '維護 BPM 流程範本的分類設定。',\n};\n\nexport default function TemplateCategoriesPage(): ReactElement {\n return <TemplateCategoriesView />;\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAAuC;CAC7D,OAAO,kBAACF,GAAD,CAAyB,CAAA;AAClC"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/compose-CHZoX-H0.cjs");let t=require("react/jsx-runtime"),n=require("next/server");var r={title:`建立模板(表單 + 流程) | BPM Admin`,description:`以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。`};async function i(){return await(0,n.connection)(),(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`})}exports.default=i,exports.metadata=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/compose-DUH9cQ-L.cjs");let t=require("react/jsx-runtime"),n=require("next/server");var r={title:`建立模板(表單 + 流程) | BPM Admin`,description:`以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。`};async function i(){return await(0,n.connection)(),(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`})}exports.default=i,exports.metadata=r;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/templates/compose/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { connection } from 'next/server';\nimport { TemplateComposeWizardView } from '../../../views/templates/compose';\n\nexport const metadata: Metadata = {\n title: '建立模板(表單 + 流程) | BPM Admin',\n description: '以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。',\n};\n\n/**\n * Drop-in Next.js App Router page for the unified template wizard.\n *\n * Consumer usage in `app/templates/compose/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/templates/compose';\n * ```\n *\n * The Step 1 (流程設計) embedded designer offers the same opt-in AI assistant\n * as the standalone designer page. `BPM_AI_ASSISTANT_ENABLED` shows the button;\n * `OPENAI_API_KEY` decides whether it's usable (else a disabled placeholder).\n * Both are server-only env on the Next.js host.\n *\n * `await connection()` opts this route out of static prerendering so those env\n * vars are read at request time. They are NOT set during `next build` (only\n * injected into the runtime container), so without this the flags would bake to\n * `false` on a production build — unlike the `[id]` designer page, which is\n * already dynamic by virtue of its route params. Survives the host's one-line\n * re-export, so npm consumers don't need their own route-segment config.\n */\nexport default async function TemplateComposePage(): Promise<ReactElement> {\n await connection();\n\n return (\n <TemplateComposeWizardView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n />\n );\n}\n"],"mappings":"mNAKA,IAAa,EAAqB,CAChC,MAAO,4BACP,YAAa,8BACf,EAuBA,eAA8B,GAA6C,CAGzE,OAFA,MAAA,EAAM,EAAA,WAAA,CAAW,GAGf,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CACE,qBAAsB,EAAQ,QAAQ,IAAI,eAC1C,gBAAiB,QAAQ,IAAI,2BAA6B,MAC3D,CAAA,CAEL"}
1
+ {"version":3,"file":"index.cjs","names":["connection","TemplateComposeWizardView","require_compose","react_jsx_runtime","next_server","metadata","TemplateComposePage"],"sources":["../../../../src/pages/templates/compose/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { connection } from 'next/server';\nimport { TemplateComposeWizardView } from '../../../views/templates/compose';\n\nexport const metadata: Metadata = {\n title: '建立模板(表單 + 流程) | BPM Admin',\n description: '以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。',\n};\n\n/**\n * Drop-in Next.js App Router page for the unified template wizard.\n *\n * Consumer usage in `app/templates/compose/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/templates/compose';\n * ```\n *\n * The Step 1 (流程設計) embedded designer offers the same opt-in AI assistant\n * as the standalone designer page. `BPM_AI_ASSISTANT_ENABLED` shows the button;\n * `OPENAI_API_KEY` decides whether it's usable (else a disabled placeholder).\n * Both are server-only env on the Next.js host.\n *\n * `await connection()` opts this route out of static prerendering so those env\n * vars are read at request time. They are NOT set during `next build` (only\n * injected into the runtime container), so without this the flags would bake to\n * `false` on a production build — unlike the `[id]` designer page, which is\n * already dynamic by virtue of its route params. Survives the host's one-line\n * re-export, so npm consumers don't need their own route-segment config.\n */\nexport default async function TemplateComposePage(): Promise<ReactElement> {\n await connection();\n\n return (\n <TemplateComposeWizardView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n />\n );\n}\n"],"mappings":"mNAKA,IAAaK,EAAqB,CAChC,MAAO,4BACP,YAAa,8BACf,EAuBA,eAA8BC,GAA6C,CAGzE,OAFA,MAAA,EAAMN,EAAAA,WAAAA,CAAW,GAGf,EAAAG,EAAA,IAAA,CAACF,EAAAA,EAAD,CACE,qBAAsB,EAAQ,QAAQ,IAAI,eAC1C,gBAAiB,QAAQ,IAAI,2BAA6B,MAC3D,CAAA,CAEL"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/compose-CSWbRgJJ.js";
1
+ import { t as e } from "../../../chunks/compose-DO6n0NJi.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import { connection as n } from "next/server";
4
4
  //#region src/pages/templates/compose/index.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/templates/compose/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { connection } from 'next/server';\nimport { TemplateComposeWizardView } from '../../../views/templates/compose';\n\nexport const metadata: Metadata = {\n title: '建立模板(表單 + 流程) | BPM Admin',\n description: '以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。',\n};\n\n/**\n * Drop-in Next.js App Router page for the unified template wizard.\n *\n * Consumer usage in `app/templates/compose/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/templates/compose';\n * ```\n *\n * The Step 1 (流程設計) embedded designer offers the same opt-in AI assistant\n * as the standalone designer page. `BPM_AI_ASSISTANT_ENABLED` shows the button;\n * `OPENAI_API_KEY` decides whether it's usable (else a disabled placeholder).\n * Both are server-only env on the Next.js host.\n *\n * `await connection()` opts this route out of static prerendering so those env\n * vars are read at request time. They are NOT set during `next build` (only\n * injected into the runtime container), so without this the flags would bake to\n * `false` on a production build — unlike the `[id]` designer page, which is\n * already dynamic by virtue of its route params. Survives the host's one-line\n * re-export, so npm consumers don't need their own route-segment config.\n */\nexport default async function TemplateComposePage(): Promise<ReactElement> {\n await connection();\n\n return (\n <TemplateComposeWizardView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n />\n );\n}\n"],"mappings":";;;;AAKA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAuBA,eAA8B,IAA6C;CAGzE,OAFA,MAAM,EAAW,GAGf,kBAAC,GAAD;EACE,sBAAsB,EAAQ,QAAQ,IAAI;EAC1C,iBAAiB,QAAQ,IAAI,6BAA6B;CAC3D,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["TemplateComposeWizardView","metadata","TemplateComposePage","connection"],"sources":["../../../../src/pages/templates/compose/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { connection } from 'next/server';\nimport { TemplateComposeWizardView } from '../../../views/templates/compose';\n\nexport const metadata: Metadata = {\n title: '建立模板(表單 + 流程) | BPM Admin',\n description: '以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。',\n};\n\n/**\n * Drop-in Next.js App Router page for the unified template wizard.\n *\n * Consumer usage in `app/templates/compose/page.tsx`:\n *\n * ```ts\n * export { default, metadata } from '@rytass/bpm-core-react/pages/templates/compose';\n * ```\n *\n * The Step 1 (流程設計) embedded designer offers the same opt-in AI assistant\n * as the standalone designer page. `BPM_AI_ASSISTANT_ENABLED` shows the button;\n * `OPENAI_API_KEY` decides whether it's usable (else a disabled placeholder).\n * Both are server-only env on the Next.js host.\n *\n * `await connection()` opts this route out of static prerendering so those env\n * vars are read at request time. They are NOT set during `next build` (only\n * injected into the runtime container), so without this the flags would bake to\n * `false` on a production build — unlike the `[id]` designer page, which is\n * already dynamic by virtue of its route params. Survives the host's one-line\n * re-export, so npm consumers don't need their own route-segment config.\n */\nexport default async function TemplateComposePage(): Promise<ReactElement> {\n await connection();\n\n return (\n <TemplateComposeWizardView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n />\n );\n}\n"],"mappings":";;;;AAKA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAuBA,eAA8BC,IAA6C;CAGzE,OAFA,MAAMC,EAAW,GAGf,kBAACH,GAAD;EACE,sBAAsB,EAAQ,QAAQ,IAAI;EAC1C,iBAAiB,QAAQ,IAAI,6BAA6B;CAC3D,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/designer-Dm6cX2kZ.cjs");let t=require("react/jsx-runtime");var n={title:`流程設計器 | BPM Admin`,description:`以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`,showDryRun:process.env.BPM_TEMPLATE_DRY_RUN_ENABLED!==`false`,templateId:r})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/designer-2YvjP_GU.cjs");let t=require("react/jsx-runtime");var n={title:`流程設計器 | BPM Admin`,description:`以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`,showDryRun:process.env.BPM_TEMPLATE_DRY_RUN_ENABLED!==`false`,templateId:r})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/templates/designer/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateDesignerView } from '../../../views/templates/designer';\n\nexport const metadata: Metadata = {\n title: '流程設計器 | BPM Admin',\n description: '以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。',\n};\n\nexport default async function TemplateDesignerPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n\n // AI assistant is opt-in per deployment. `BPM_AI_ASSISTANT_ENABLED` shows the\n // feature; `OPENAI_API_KEY` decides whether it's usable (else a disabled\n // placeholder). Both are server-only env on the Next.js host.\n //\n // The dry-run button shows by default; set `BPM_TEMPLATE_DRY_RUN_ENABLED` to\n // `'false'` to hide it for a deployment.\n return (\n <TemplateDesignerView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n showDryRun={process.env.BPM_TEMPLATE_DRY_RUN_ENABLED !== 'false'}\n templateId={id}\n />\n );\n}\n"],"mappings":"2LAIA,IAAa,EAAqB,CAChC,MAAO,oBACP,YAAa,+BACf,EAEA,eAA8B,EAAqB,CACjD,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAM,EAQrB,OACE,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CACE,qBAAsB,EAAQ,QAAQ,IAAI,eAC1C,gBAAiB,QAAQ,IAAI,2BAA6B,OAC1D,WAAY,QAAQ,IAAI,+BAAiC,QACzD,WAAY,CACb,CAAA,CAEL"}
1
+ {"version":3,"file":"index.cjs","names":["TemplateDesignerView","require_designer","react_jsx_runtime","metadata","TemplateDesignerPage","params","id"],"sources":["../../../../src/pages/templates/designer/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateDesignerView } from '../../../views/templates/designer';\n\nexport const metadata: Metadata = {\n title: '流程設計器 | BPM Admin',\n description: '以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。',\n};\n\nexport default async function TemplateDesignerPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n\n // AI assistant is opt-in per deployment. `BPM_AI_ASSISTANT_ENABLED` shows the\n // feature; `OPENAI_API_KEY` decides whether it's usable (else a disabled\n // placeholder). Both are server-only env on the Next.js host.\n //\n // The dry-run button shows by default; set `BPM_TEMPLATE_DRY_RUN_ENABLED` to\n // `'false'` to hide it for a deployment.\n return (\n <TemplateDesignerView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n showDryRun={process.env.BPM_TEMPLATE_DRY_RUN_ENABLED !== 'false'}\n templateId={id}\n />\n );\n}\n"],"mappings":"2LAIA,IAAaG,EAAqB,CAChC,MAAO,oBACP,YAAa,+BACf,EAEA,eAA8BC,EAAqB,CACjD,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAMC,EAQrB,OACE,EAAAH,EAAA,IAAA,CAACF,EAAAA,EAAD,CACE,qBAAsB,EAAQ,QAAQ,IAAI,eAC1C,gBAAiB,QAAQ,IAAI,2BAA6B,OAC1D,WAAY,QAAQ,IAAI,+BAAiC,QACzD,WAAYM,CACb,CAAA,CAEL"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/designer-BtsIL0BB.js";
1
+ import { t as e } from "../../../chunks/designer-B-cfiob9.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/templates/designer/index.tsx
4
4
  var n = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/pages/templates/designer/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateDesignerView } from '../../../views/templates/designer';\n\nexport const metadata: Metadata = {\n title: '流程設計器 | BPM Admin',\n description: '以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。',\n};\n\nexport default async function TemplateDesignerPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n\n // AI assistant is opt-in per deployment. `BPM_AI_ASSISTANT_ENABLED` shows the\n // feature; `OPENAI_API_KEY` decides whether it's usable (else a disabled\n // placeholder). Both are server-only env on the Next.js host.\n //\n // The dry-run button shows by default; set `BPM_TEMPLATE_DRY_RUN_ENABLED` to\n // `'false'` to hide it for a deployment.\n return (\n <TemplateDesignerView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n showDryRun={process.env.BPM_TEMPLATE_DRY_RUN_ENABLED !== 'false'}\n templateId={id}\n />\n );\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,eAA8B,EAAqB,EACjD,aAGwB;CACxB,IAAM,EAAE,UAAO,MAAM;CAQrB,OACE,kBAAC,GAAD;EACE,sBAAsB,EAAQ,QAAQ,IAAI;EAC1C,iBAAiB,QAAQ,IAAI,6BAA6B;EAC1D,YAAY,QAAQ,IAAI,iCAAiC;EACzD,YAAY;CACb,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["TemplateDesignerView","metadata","TemplateDesignerPage","params","id"],"sources":["../../../../src/pages/templates/designer/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateDesignerView } from '../../../views/templates/designer';\n\nexport const metadata: Metadata = {\n title: '流程設計器 | BPM Admin',\n description: '以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。',\n};\n\nexport default async function TemplateDesignerPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n\n // AI assistant is opt-in per deployment. `BPM_AI_ASSISTANT_ENABLED` shows the\n // feature; `OPENAI_API_KEY` decides whether it's usable (else a disabled\n // placeholder). Both are server-only env on the Next.js host.\n //\n // The dry-run button shows by default; set `BPM_TEMPLATE_DRY_RUN_ENABLED` to\n // `'false'` to hide it for a deployment.\n return (\n <TemplateDesignerView\n aiAssistantAvailable={Boolean(process.env.OPENAI_API_KEY)}\n showAiAssistant={process.env.BPM_AI_ASSISTANT_ENABLED === 'true'}\n showDryRun={process.env.BPM_TEMPLATE_DRY_RUN_ENABLED !== 'false'}\n templateId={id}\n />\n );\n}\n"],"mappings":";;;AAIA,IAAaC,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,eAA8BC,EAAqB,EACjD,aAGwB;CACxB,IAAM,EAAE,UAAO,MAAMC;CAQrB,OACE,kBAACH,GAAD;EACE,sBAAsB,EAAQ,QAAQ,IAAI;EAC1C,iBAAiB,QAAQ,IAAI,6BAA6B;EAC1D,YAAY,QAAQ,IAAI,iCAAiC;EACzD,YAAYI;CACb,CAAA;AAEL"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pages/templates/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplatesView } from '../../views/templates';\n\nexport const metadata: Metadata = {\n title: '簽核模板 | BPM Admin',\n description: '設計簽核表單與流程,建立、編輯與發佈簽核模板。',\n};\n\nexport default function TemplatesPage(): ReactElement {\n return <TemplatesView />;\n}\n"],"mappings":"qLAIA,IAAa,EAAqB,CAChC,MAAO,mBACP,YAAa,yBACf,EAEA,SAAwB,GAA8B,CACpD,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,cAAD,CAAgB,CAAA,CACzB"}
1
+ {"version":3,"file":"index.cjs","names":["TemplatesView","require_views_templates_index","react_jsx_runtime","metadata","TemplatesPage"],"sources":["../../../src/pages/templates/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplatesView } from '../../views/templates';\n\nexport const metadata: Metadata = {\n title: '簽核模板 | BPM Admin',\n description: '設計簽核表單與流程,建立、編輯與發佈簽核模板。',\n};\n\nexport default function TemplatesPage(): ReactElement {\n return <TemplatesView />;\n}\n"],"mappings":"qLAIA,IAAaG,EAAqB,CAChC,MAAO,mBACP,YAAa,yBACf,EAEA,SAAwBC,GAA8B,CACpD,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,cAAD,CAAgB,CAAA,CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/templates/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplatesView } from '../../views/templates';\n\nexport const metadata: Metadata = {\n title: '簽核模板 | BPM Admin',\n description: '設計簽核表單與流程,建立、編輯與發佈簽核模板。',\n};\n\nexport default function TemplatesPage(): ReactElement {\n return <TemplatesView />;\n}\n"],"mappings":";;;AAIA,IAAa,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwB,IAA8B;CACpD,OAAO,kBAAC,GAAD,CAAgB,CAAA;AACzB"}
1
+ {"version":3,"file":"index.js","names":["metadata","TemplatesPage","TemplatesView"],"sources":["../../../src/pages/templates/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplatesView } from '../../views/templates';\n\nexport const metadata: Metadata = {\n title: '簽核模板 | BPM Admin',\n description: '設計簽核表單與流程,建立、編輯與發佈簽核模板。',\n};\n\nexport default function TemplatesPage(): ReactElement {\n return <TemplatesView />;\n}\n"],"mappings":";;;AAIA,IAAaA,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAA8B;CACpD,OAAO,kBAACC,GAAD,CAAgB,CAAA;AACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../src/pages/templates/versions/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateVersionsView } from '../../../views/templates/versions';\n\nexport const metadata: Metadata = {\n title: '範本版本歷史 | BPM Admin',\n description: '檢視 BPM 流程範本的版本發布與 rollback 紀錄。',\n};\n\nexport default async function TemplateVersionsPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <TemplateVersionsView templateId={id} />;\n}\n"],"mappings":"iMAIA,IAAa,EAAqB,CAChC,MAAO,qBACP,YAAa,gCACf,EAEA,eAA8B,EAAqB,CACjD,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAM,EACrB,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,qBAAD,CAAsB,WAAY,CAAK,CAAA,CAChD"}
1
+ {"version":3,"file":"index.cjs","names":["TemplateVersionsView","require_views_templates_versions_index","react_jsx_runtime","metadata","TemplateVersionsPage","params","id"],"sources":["../../../../src/pages/templates/versions/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { TemplateVersionsView } from '../../../views/templates/versions';\n\nexport const metadata: Metadata = {\n title: '範本版本歷史 | BPM Admin',\n description: '檢視 BPM 流程範本的版本發布與 rollback 紀錄。',\n};\n\nexport default async function TemplateVersionsPage({\n params,\n}: {\n readonly params: Promise<{ readonly id: string }>;\n}): Promise<ReactElement> {\n const { id } = await params;\n return <TemplateVersionsView templateId={id} />;\n}\n"],"mappings":"iMAIA,IAAaG,EAAqB,CAChC,MAAO,qBACP,YAAa,gCACf,EAEA,eAA8BC,EAAqB,CACjD,UAGwB,CACxB,GAAM,CAAE,MAAO,MAAMC,EACrB,OAAO,EAAAH,EAAA,IAAA,CAACF,EAAAA,qBAAD,CAAsB,WAAYM,CAAK,CAAA,CAChD"}