@opengis/fcore 0.0.1-beta.3 → 0.0.1-beta.5

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 (180) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +71 -71
  3. package/dist/config.d.ts +2 -10
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/context.js +1 -1
  7. package/dist/errors.js +1 -1
  8. package/dist/fastify.d.ts +4 -5
  9. package/dist/fastify.d.ts.map +1 -1
  10. package/dist/fastify.js +1 -1
  11. package/dist/fcore.js +1 -1
  12. package/dist/index.d.ts +0 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/migrations/cli.js +1 -1
  16. package/dist/migrations/runner.js +1 -1
  17. package/dist/modules/auth/adduser-cli.d.ts +3 -0
  18. package/dist/modules/auth/adduser-cli.d.ts.map +1 -0
  19. package/dist/modules/auth/adduser-cli.js +2 -0
  20. package/dist/modules/auth/passwd-cli.d.ts +3 -0
  21. package/dist/modules/auth/passwd-cli.d.ts.map +1 -0
  22. package/dist/modules/auth/passwd-cli.js +2 -0
  23. package/dist/modules/auth/permission-cli.d.ts +3 -0
  24. package/dist/modules/auth/permission-cli.d.ts.map +1 -0
  25. package/dist/modules/auth/permission-cli.js +2 -0
  26. package/dist/modules/auth/route.d.ts.map +1 -1
  27. package/dist/modules/auth/route.js +1 -1
  28. package/dist/modules/auth/schema.d.ts +7 -1
  29. package/dist/modules/auth/schema.d.ts.map +1 -1
  30. package/dist/modules/auth/schema.js +1 -1
  31. package/dist/modules/auth/services/change-password.d.ts +9 -0
  32. package/dist/modules/auth/services/change-password.d.ts.map +1 -0
  33. package/dist/modules/auth/services/change-password.js +1 -0
  34. package/dist/modules/auth/services/get-current-user.js +1 -1
  35. package/dist/modules/auth/services/registration.d.ts +14 -0
  36. package/dist/modules/auth/services/registration.d.ts.map +1 -0
  37. package/dist/modules/auth/services/registration.js +1 -0
  38. package/dist/modules/auth/services/verify-two-factor.js +1 -1
  39. package/dist/modules/file/route.js +1 -1
  40. package/dist/modules/file/schema.js +1 -1
  41. package/dist/modules/file/services/get-file.js +1 -1
  42. package/dist/modules/file/services/resize-file.js +1 -1
  43. package/dist/modules/file/services/upload-file.js +1 -1
  44. package/dist/modules/resource/route.d.ts.map +1 -1
  45. package/dist/modules/resource/route.js +1 -1
  46. package/dist/modules/resource/schema.js +1 -1
  47. package/dist/modules/resource/services/add-note.js +1 -1
  48. package/dist/modules/resource/services/add-resource-file.js +1 -1
  49. package/dist/modules/resource/services/create-resource-relation.d.ts +8 -2
  50. package/dist/modules/resource/services/create-resource-relation.d.ts.map +1 -1
  51. package/dist/modules/resource/services/create-resource-relation.js +1 -1
  52. package/dist/modules/resource/services/create-resource.js +1 -1
  53. package/dist/modules/resource/services/delete-resource-relation.d.ts +8 -1
  54. package/dist/modules/resource/services/delete-resource-relation.d.ts.map +1 -1
  55. package/dist/modules/resource/services/delete-resource-relation.js +1 -1
  56. package/dist/modules/resource/services/delete-resource.js +1 -1
  57. package/dist/modules/resource/services/export-resource.js +1 -1
  58. package/dist/modules/resource/services/get-resource.js +1 -1
  59. package/dist/modules/resource/services/list-resource-relation.d.ts +7 -2
  60. package/dist/modules/resource/services/list-resource-relation.d.ts.map +1 -1
  61. package/dist/modules/resource/services/list-resource-relation.js +1 -1
  62. package/dist/modules/resource/services/list-resources.js +1 -1
  63. package/dist/modules/resource/services/search-resource.js +1 -1
  64. package/dist/modules/resource/services/suggest-resource.d.ts +10 -4
  65. package/dist/modules/resource/services/suggest-resource.d.ts.map +1 -1
  66. package/dist/modules/resource/services/suggest-resource.js +1 -1
  67. package/dist/modules/resource/services/update-resource.js +1 -1
  68. package/dist/modules/resource/services/upload-resource-file.js +1 -1
  69. package/dist/modules/system/route.d.ts +2 -1
  70. package/dist/modules/system/route.d.ts.map +1 -1
  71. package/dist/modules/system/route.js +1 -1
  72. package/dist/modules/system/schema.d.ts +22 -1
  73. package/dist/modules/system/schema.d.ts.map +1 -1
  74. package/dist/modules/system/schema.js +1 -1
  75. package/dist/modules/system/services/check-system.d.ts.map +1 -1
  76. package/dist/modules/system/services/check-system.js +1 -1
  77. package/dist/modules/system/services/get-access.d.ts +14 -0
  78. package/dist/modules/system/services/get-access.d.ts.map +1 -0
  79. package/dist/modules/system/services/get-access.js +1 -0
  80. package/dist/modules/system/services/get-api-list.d.ts +4 -1
  81. package/dist/modules/system/services/get-api-list.d.ts.map +1 -1
  82. package/dist/modules/system/services/get-api-list.js +1 -1
  83. package/dist/modules/system/services/get-audit-log.js +1 -1
  84. package/dist/modules/system/services/get-dictionary.js +1 -1
  85. package/dist/modules/system/services/get-system-log.d.ts +9 -5
  86. package/dist/modules/system/services/get-system-log.d.ts.map +1 -1
  87. package/dist/modules/system/services/get-system-log.js +1 -1
  88. package/dist/modules/system/services/get-system-settings.js +1 -1
  89. package/dist/modules/system/services/list-dictionaries.js +1 -1
  90. package/dist/modules/system/services/set-access.d.ts +16 -0
  91. package/dist/modules/system/services/set-access.d.ts.map +1 -0
  92. package/dist/modules/system/services/set-access.js +1 -0
  93. package/dist/modules/system/services/update-dictionary.d.ts +13 -0
  94. package/dist/modules/system/services/update-dictionary.d.ts.map +1 -0
  95. package/dist/modules/system/services/update-dictionary.js +1 -0
  96. package/dist/modules/system/services/update-system-settings.js +1 -1
  97. package/dist/modules/utils/require-admin.js +1 -1
  98. package/dist/modules/utils/safe-user.js +1 -1
  99. package/dist/modules/utils/unsupported.js +1 -1
  100. package/dist/plugins/audit/audit.js +1 -1
  101. package/dist/plugins/audit/index.js +1 -1
  102. package/dist/plugins/audit/services/write-audit.js +1 -1
  103. package/dist/plugins/auth/get-user-permissions.d.ts +3 -0
  104. package/dist/plugins/auth/get-user-permissions.d.ts.map +1 -0
  105. package/dist/plugins/auth/get-user-permissions.js +1 -0
  106. package/dist/plugins/auth/index.d.ts +4 -0
  107. package/dist/plugins/auth/index.d.ts.map +1 -1
  108. package/dist/plugins/auth/index.js +1 -1
  109. package/dist/plugins/auth/verifyUser.d.ts +9 -0
  110. package/dist/plugins/auth/verifyUser.d.ts.map +1 -0
  111. package/dist/plugins/auth/verifyUser.js +1 -0
  112. package/dist/plugins/dictionary.js +1 -1
  113. package/dist/plugins/file.js +1 -1
  114. package/dist/plugins/index.d.ts +1 -0
  115. package/dist/plugins/index.d.ts.map +1 -1
  116. package/dist/plugins/index.js +1 -1
  117. package/dist/plugins/logger/index.js +1 -1
  118. package/dist/plugins/logger/transport.js +1 -1
  119. package/dist/plugins/pg.js +1 -1
  120. package/dist/plugins/redis.js +1 -1
  121. package/dist/plugins/resource/index.js +1 -1
  122. package/dist/plugins/resource/resource.d.ts.map +1 -1
  123. package/dist/plugins/resource/resource.js +1 -1
  124. package/dist/plugins/resource/resource.registry.js +1 -1
  125. package/dist/plugins/resource/resource.types.d.ts +23 -0
  126. package/dist/plugins/resource/resource.types.d.ts.map +1 -1
  127. package/dist/plugins/resource/services/create-relation.d.ts +13 -0
  128. package/dist/plugins/resource/services/create-relation.d.ts.map +1 -0
  129. package/dist/plugins/resource/services/create-relation.js +1 -0
  130. package/dist/plugins/resource/services/create.js +1 -1
  131. package/dist/plugins/resource/services/delete-relation.d.ts +15 -0
  132. package/dist/plugins/resource/services/delete-relation.d.ts.map +1 -0
  133. package/dist/plugins/resource/services/delete-relation.js +1 -0
  134. package/dist/plugins/resource/services/delete.js +1 -1
  135. package/dist/plugins/resource/services/find-one.js +1 -1
  136. package/dist/plugins/resource/services/find-relation.d.ts +12 -0
  137. package/dist/plugins/resource/services/find-relation.d.ts.map +1 -0
  138. package/dist/plugins/resource/services/find-relation.js +1 -0
  139. package/dist/plugins/resource/services/find.js +1 -1
  140. package/dist/plugins/resource/services/update.js +1 -1
  141. package/dist/plugins/resource/utils/fields.js +1 -1
  142. package/dist/plugins/resource/utils/filters.js +1 -1
  143. package/dist/plugins/resource/utils/permissions.js +1 -1
  144. package/dist/plugins/resource/utils/sort.js +1 -1
  145. package/dist/plugins/resource/utils/sql.js +1 -1
  146. package/dist/shared/getIP.js +1 -1
  147. package/dist/type.d.ts +14 -0
  148. package/dist/type.d.ts.map +1 -1
  149. package/migrations/20260903120000_core_schema.sql +22 -19
  150. package/migrations/20260903130000_move_notes_files_to_admin.sql +17 -17
  151. package/migrations/20260903140000_settings_nulls_not_distinct.sql +18 -18
  152. package/migrations/20260905120000_add_user_foreign_keys.sql +43 -0
  153. package/package.json +10 -6
  154. package/dist/modules/auth/index.d.ts +0 -9
  155. package/dist/modules/auth/index.d.ts.map +0 -1
  156. package/dist/modules/auth/index.js +0 -1
  157. package/dist/modules/auth/services/login.d.ts +0 -10
  158. package/dist/modules/auth/services/login.d.ts.map +0 -1
  159. package/dist/modules/auth/services/login.js +0 -1
  160. package/dist/modules/auth/services/logout.d.ts +0 -9
  161. package/dist/modules/auth/services/logout.d.ts.map +0 -1
  162. package/dist/modules/auth/services/logout.js +0 -1
  163. package/dist/modules/auth/services/verifyPassword.d.ts +0 -11
  164. package/dist/modules/auth/services/verifyPassword.d.ts.map +0 -1
  165. package/dist/modules/auth/services/verifyPassword.js +0 -1
  166. package/dist/modules/file/index.d.ts +0 -8
  167. package/dist/modules/file/index.d.ts.map +0 -1
  168. package/dist/modules/file/index.js +0 -1
  169. package/dist/modules/resource/index.d.ts +0 -20
  170. package/dist/modules/resource/index.d.ts.map +0 -1
  171. package/dist/modules/resource/index.js +0 -1
  172. package/dist/modules/resource/services/list-children.d.ts +0 -6
  173. package/dist/modules/resource/services/list-children.d.ts.map +0 -1
  174. package/dist/modules/resource/services/list-children.js +0 -1
  175. package/dist/modules/system/index.d.ts +0 -13
  176. package/dist/modules/system/index.d.ts.map +0 -1
  177. package/dist/modules/system/index.js +0 -1
  178. package/dist/modules/utils/get-user-permissions.d.ts +0 -3
  179. package/dist/modules/utils/get-user-permissions.d.ts.map +0 -1
  180. package/dist/modules/utils/get-user-permissions.js +0 -1
@@ -0,0 +1,16 @@
1
+ import type { AppContext, User } from "../../../context.js";
2
+ import { type AccessRecord } from "./get-access.js";
3
+ type AccessInput = {
4
+ resource: string;
5
+ actions: string[];
6
+ };
7
+ export declare function setAccess(params: {
8
+ type: "user" | "role";
9
+ id: string;
10
+ access: AccessInput[];
11
+ user: User;
12
+ }, ctx: AppContext): Promise<{
13
+ access: AccessRecord[];
14
+ }>;
15
+ export {};
16
+ //# sourceMappingURL=set-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-access.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/set-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,WAAW,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,wBAAsB,SAAS,CAC3B,MAAM,EAAE;IACJ,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;CACd,EACD,GAAG,EAAE,UAAU,GAChB,OAAO,CAAC;IAAE,MAAM,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,CA8CrC"}
@@ -0,0 +1 @@
1
+ (function(_0xb50de2,_0x2262e7){const _0x13890d=_0x371d,_0x353da0=_0xb50de2();while(!![]){try{const _0x1ebad3=-parseInt(_0x13890d(0x99))/0x1+-parseInt(_0x13890d(0xa1))/0x2*(-parseInt(_0x13890d(0xa5))/0x3)+parseInt(_0x13890d(0x97))/0x4+-parseInt(_0x13890d(0xa8))/0x5+-parseInt(_0x13890d(0xb2))/0x6+-parseInt(_0x13890d(0xad))/0x7+parseInt(_0x13890d(0xa6))/0x8;if(_0x1ebad3===_0x2262e7)break;else _0x353da0['push'](_0x353da0['shift']());}catch(_0x3d1e5f){_0x353da0['push'](_0x353da0['shift']());}}}(_0x220e,0x42225));import{requireAdmin}from'../../utils/require-admin.js';function _0x371d(_0x339f21,_0x52403b){_0x339f21=_0x339f21-0x96;const _0x220e11=_0x220e();let _0x371d98=_0x220e11[_0x339f21];return _0x371d98;}import{getAccess}from'./get-access.js';function _0x220e(){const _0x582258=['UIjnA','102662sGcvMN','zkSOm','connect','DELETE\x20FROM\x20admin.role_access\x20WHERE\x20role_id\x20=\x20$1\x20AND\x20user_uid\x20IS\x20NULL','rkxIU','system:access','access','UEMnU','27730yFVrOO','BEGIN','VeKjP','FcKGP','9aQGKKq','9771024aHjlfo','fGeRu','2354950LeQqcX','release','DELETE\x20FROM\x20admin.role_access\x20WHERE\x20user_uid\x20=\x20$1\x20AND\x20role_id\x20IS\x20NULL','COMMIT','INSERT\x20INTO\x20admin.role_access\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(\x20resource,\x20actions,\x20user_uid,\x20created_by,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)','1873599zFMDBD','actions','type','rWCma','resource','2498190FAIOQe','YrEwB','user','ROLLBACK','query','INSERT\x20INTO\x20admin.role_access\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(\x20resource,\x20actions,\x20role_id,\x20created_by,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)','1062344MSaJNa'];_0x220e=function(){return _0x582258;};return _0x220e();}export async function setAccess(_0x4f943a,_0x5b504b){const _0x205bbc=_0x371d,_0x2a7505={'YrEwB':function(_0xbee1ab,_0x4b52a0,_0x17b149){return _0xbee1ab(_0x4b52a0,_0x17b149);},'FcKGP':_0x205bbc(0x9e),'VeKjP':_0x205bbc(0xa2),'fGeRu':function(_0x331080,_0x1e1a9b){return _0x331080===_0x1e1a9b;},'UIjnA':_0x205bbc(0xb4),'rWCma':_0x205bbc(0xaa),'rkxIU':function(_0x1e7982,_0x42ed75){return _0x1e7982===_0x42ed75;},'UEMnU':_0x205bbc(0xb5),'zkSOm':function(_0x54951e,_0x22cb83,_0x1f339b){return _0x54951e(_0x22cb83,_0x1f339b);}};_0x2a7505[_0x205bbc(0xb3)](requireAdmin,_0x4f943a[_0x205bbc(0xb4)],_0x2a7505[_0x205bbc(0xa4)]);const _0x3b4582=await _0x5b504b['pg'][_0x205bbc(0x9b)]();try{await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xa3)]);_0x2a7505[_0x205bbc(0xa7)](_0x4f943a[_0x205bbc(0xaf)],_0x2a7505[_0x205bbc(0x98)])?await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xb0)],[_0x4f943a['id']]):await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0x9c),[_0x4f943a['id']]);for(const _0x877461 of _0x4f943a[_0x205bbc(0x9f)]){_0x2a7505[_0x205bbc(0x9d)](_0x4f943a[_0x205bbc(0xaf)],_0x2a7505[_0x205bbc(0x98)])?await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0xac),[_0x877461[_0x205bbc(0xb1)],_0x877461[_0x205bbc(0xae)],_0x4f943a['id'],_0x4f943a[_0x205bbc(0xb4)]['id'],_0x4f943a[_0x205bbc(0xb4)]['id']]):await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0x96),[_0x877461[_0x205bbc(0xb1)],_0x877461[_0x205bbc(0xae)],_0x4f943a['id'],_0x4f943a[_0x205bbc(0xb4)]['id'],_0x4f943a[_0x205bbc(0xb4)]['id']]);}await _0x3b4582[_0x205bbc(0xb6)](_0x205bbc(0xab));}catch(_0x1b264a){await _0x3b4582[_0x205bbc(0xb6)](_0x2a7505[_0x205bbc(0xa0)]);throw _0x1b264a;}finally{_0x3b4582[_0x205bbc(0xa9)]();}return _0x2a7505[_0x205bbc(0x9a)](getAccess,_0x4f943a,_0x5b504b);}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Implements the update dictionary application service for the System module.
3
+ */
4
+ import type { AppContext, User } from "../../../context.js";
5
+ import type { DictionaryItem } from "../../../plugins/dictionary.js";
6
+ export declare function updateDictionary(params: {
7
+ name: string;
8
+ items: DictionaryItem[];
9
+ user: User;
10
+ }, ctx: AppContext): Promise<{
11
+ success: boolean;
12
+ }>;
13
+ //# sourceMappingURL=update-dictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-dictionary.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/update-dictionary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,wBAAsB,gBAAgB,CACpC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EAC7D,GAAG,EAAE,UAAU,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAK/B"}
@@ -0,0 +1 @@
1
+ (function(_0x1a68cc,_0xa211d){var _0x70731d=_0x28ee,_0x38dc60=_0x1a68cc();while(!![]){try{var _0x42889d=parseInt(_0x70731d(0x18b))/0x1*(-parseInt(_0x70731d(0x17e))/0x2)+parseInt(_0x70731d(0x17d))/0x3*(-parseInt(_0x70731d(0x182))/0x4)+-parseInt(_0x70731d(0x184))/0x5*(parseInt(_0x70731d(0x17c))/0x6)+-parseInt(_0x70731d(0x181))/0x7+parseInt(_0x70731d(0x186))/0x8+parseInt(_0x70731d(0x185))/0x9+parseInt(_0x70731d(0x17b))/0xa*(parseInt(_0x70731d(0x189))/0xb);if(_0x42889d===_0xa211d)break;else _0x38dc60['push'](_0x38dc60['shift']());}catch(_0x43e466){_0x38dc60['push'](_0x38dc60['shift']());}}}(_0x3ec2,0xcc95b));import{requireAdmin}from'../../utils/require-admin.js';function _0x28ee(_0xf287fe,_0x1a999c){_0xf287fe=_0xf287fe-0x179;var _0x3ec254=_0x3ec2();var _0x28eeff=_0x3ec254[_0xf287fe];return _0x28eeff;}export async function updateDictionary(_0x28090b,_0x26dcd0){var _0x48958a=_0x28ee,_0x2568a4={'aQDMd':function(_0x53b3f9,_0x1a343d,_0x292951){return _0x53b3f9(_0x1a343d,_0x292951);},'rpuoc':_0x48958a(0x179)};_0x2568a4[_0x48958a(0x188)](requireAdmin,_0x28090b[_0x48958a(0x17a)],_0x2568a4[_0x48958a(0x183)]),await _0x26dcd0[_0x48958a(0x18c)][_0x48958a(0x187)](_0x28090b[_0x48958a(0x18a)],_0x28090b[_0x48958a(0x180)]);var _0x2bac38={};return _0x2bac38[_0x48958a(0x17f)]=!![],_0x2bac38;}function _0x3ec2(){var _0x59342a=['items','291655vvfuXP','1911064prpajZ','rpuoc','26150COwtPx','13521159dzeduc','487896QpyWnd','put','aQDMd','190586ZCXxCZ','name','332YQZKZz','dictionary','system:dictionaries','user','1670KsnVuU','1788gFlEJt','6metRnv','6404KQLgwC','success'];_0x3ec2=function(){return _0x59342a;};return _0x3ec2();}
@@ -1 +1 @@
1
- (function(_0x2901ab,_0x25405e){const _0x363c7a=_0x428c,_0x114338=_0x2901ab();while(!![]){try{const _0x187f15=parseInt(_0x363c7a(0x1a8))/0x1*(-parseInt(_0x363c7a(0x1b3))/0x2)+-parseInt(_0x363c7a(0x1aa))/0x3+parseInt(_0x363c7a(0x1a9))/0x4*(parseInt(_0x363c7a(0x1ba))/0x5)+parseInt(_0x363c7a(0x1af))/0x6+parseInt(_0x363c7a(0x1b0))/0x7*(-parseInt(_0x363c7a(0x1b1))/0x8)+-parseInt(_0x363c7a(0x1c0))/0x9*(-parseInt(_0x363c7a(0x1bb))/0xa)+parseInt(_0x363c7a(0x1ab))/0xb;if(_0x187f15===_0x25405e)break;else _0x114338['push'](_0x114338['shift']());}catch(_0x5e0225){_0x114338['push'](_0x114338['shift']());}}}(_0x3e23,0x857a0));function _0x428c(_0x1fd78f,_0x1a9756){_0x1fd78f=_0x1fd78f-0x1a6;const _0x3e23c5=_0x3e23();let _0x428cfe=_0x3e23c5[_0x1fd78f];return _0x428cfe;}function _0x3e23(){const _0x17da18=['JyhhP','5isZksK','327010xcURiK','query','trim','Settings\x20patch\x20is\x20empty','Invalid\x20setting\x20key:\x20','63eQZQVh','success','keys','1PQdPEx','3416772GmykvA','2377464yqKzTR','19734649kQvwsz','system:settings:update','patch','user','1735362ZYDTYZ','3353WytFrG','16424fpSACg','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.settings\x20(resource,\x20resource_id,\x20key,\x20value,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20(\x27system\x27,\x20NULL,\x20$1,\x20$2::jsonb,\x20$3)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(resource,\x20resource_id,\x20key)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20DO\x20UPDATE\x20SET\x20value\x20=\x20EXCLUDED.value,\x20updated_by\x20=\x20EXCLUDED.updated_by,\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20','1687582sFwRKo','entries','stringify','includes','length','XAGEy'];_0x3e23=function(){return _0x17da18;};return _0x3e23();}import{requireAdmin}from'../../utils/require-admin.js';import{ValidationError}from'../../../errors.js';export async function updateSystemSettings(_0x4954c7,_0x2af17c){const _0x203ce7=_0x428c,_0x2335af={};_0x2335af[_0x203ce7(0x1b8)]=_0x203ce7(0x1ac),_0x2335af[_0x203ce7(0x1b9)]=_0x203ce7(0x1be);const _0x1b8007=_0x2335af;requireAdmin(_0x4954c7[_0x203ce7(0x1ae)],_0x1b8007[_0x203ce7(0x1b8)]);if(!Object[_0x203ce7(0x1a7)](_0x4954c7[_0x203ce7(0x1ad)])[_0x203ce7(0x1b7)])throw new ValidationError(_0x1b8007[_0x203ce7(0x1b9)]);for(const [_0x2c8c70,_0x597cd7]of Object[_0x203ce7(0x1b4)](_0x4954c7[_0x203ce7(0x1ad)])){if(!_0x2c8c70[_0x203ce7(0x1bd)]()||_0x2c8c70[_0x203ce7(0x1b6)]('..'))throw new ValidationError(_0x203ce7(0x1bf)+_0x2c8c70);await _0x2af17c['pg'][_0x203ce7(0x1bc)](_0x203ce7(0x1b2),[_0x2c8c70,JSON[_0x203ce7(0x1b5)](_0x597cd7),_0x4954c7[_0x203ce7(0x1ae)]['id']]);}const _0x1f8160={};return _0x1f8160[_0x203ce7(0x1a6)]=!![],_0x1f8160;}
1
+ (function(_0x14c413,_0x9334e4){const _0x1809eb=_0x50e8,_0x182946=_0x14c413();while(!![]){try{const _0x2335c7=-parseInt(_0x1809eb(0x8f))/0x1+parseInt(_0x1809eb(0x81))/0x2+parseInt(_0x1809eb(0x94))/0x3*(parseInt(_0x1809eb(0x88))/0x4)+-parseInt(_0x1809eb(0x91))/0x5+-parseInt(_0x1809eb(0x84))/0x6*(-parseInt(_0x1809eb(0x8d))/0x7)+parseInt(_0x1809eb(0x80))/0x8+-parseInt(_0x1809eb(0x85))/0x9;if(_0x2335c7===_0x9334e4)break;else _0x182946['push'](_0x182946['shift']());}catch(_0x3d6ab3){_0x182946['push'](_0x182946['shift']());}}}(_0x5b89,0xa9753));function _0x5b89(){const _0x1ca977=['emraa','4295816wAWRrb','586020NtdGqt','query','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.settings\x20(resource,\x20resource_id,\x20key,\x20value,\x20updated_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20(\x27system\x27,\x20NULL,\x20$1,\x20$2::jsonb,\x20$3)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(resource,\x20resource_id,\x20key)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20DO\x20UPDATE\x20SET\x20value\x20=\x20EXCLUDED.value,\x20updated_by\x20=\x20EXCLUDED.updated_by,\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20','2418qKbePm','3496554iBIQSY','patch','length','118748nXsiki','Settings\x20patch\x20is\x20empty','OiwmY','entries','keys','9597fryVur','success','886651HFilWC','includes','183355wJESwf','system:settings','PXQOo','63pcpKxP','user','Invalid\x20setting\x20key:\x20','stringify','trim'];_0x5b89=function(){return _0x1ca977;};return _0x5b89();}import{requireAdmin}from'../../utils/require-admin.js';function _0x50e8(_0xa82e04,_0x4547ee){_0xa82e04=_0xa82e04-0x7f;const _0x5b8981=_0x5b89();let _0x50e831=_0x5b8981[_0xa82e04];return _0x50e831;}import{ValidationError}from'../../../errors.js';export async function updateSystemSettings(_0x56c182,_0x520e51){const _0x3671b7=_0x50e8,_0x23c93c={'PXQOo':function(_0x5051ae,_0x5a26c7,_0x785d19){return _0x5051ae(_0x5a26c7,_0x785d19);},'OiwmY':_0x3671b7(0x92),'emraa':_0x3671b7(0x89)};_0x23c93c[_0x3671b7(0x93)](requireAdmin,_0x56c182[_0x3671b7(0x95)],_0x23c93c[_0x3671b7(0x8a)]);if(!Object[_0x3671b7(0x8c)](_0x56c182[_0x3671b7(0x86)])[_0x3671b7(0x87)])throw new ValidationError(_0x23c93c[_0x3671b7(0x7f)]);for(const [_0x490c2a,_0x580a56]of Object[_0x3671b7(0x8b)](_0x56c182[_0x3671b7(0x86)])){if(!_0x490c2a[_0x3671b7(0x98)]()||_0x490c2a[_0x3671b7(0x90)]('..'))throw new ValidationError(_0x3671b7(0x96)+_0x490c2a);await _0x520e51['pg'][_0x3671b7(0x82)](_0x3671b7(0x83),[_0x490c2a,JSON[_0x3671b7(0x97)](_0x580a56),_0x56c182[_0x3671b7(0x95)]['id']]);}const _0x52444f={};return _0x52444f[_0x3671b7(0x8e)]=!![],_0x52444f;}
@@ -1 +1 @@
1
- (function(_0x19d5b2,_0x2e20e2){var _0x139434=_0x3b4c,_0x595de8=_0x19d5b2();while(!![]){try{var _0x44159b=parseInt(_0x139434(0xd6))/0x1+-parseInt(_0x139434(0xe2))/0x2+-parseInt(_0x139434(0xd7))/0x3*(parseInt(_0x139434(0xe6))/0x4)+parseInt(_0x139434(0xe4))/0x5+-parseInt(_0x139434(0xe3))/0x6*(parseInt(_0x139434(0xdd))/0x7)+parseInt(_0x139434(0xdb))/0x8*(parseInt(_0x139434(0xe0))/0x9)+-parseInt(_0x139434(0xd9))/0xa*(-parseInt(_0x139434(0xdf))/0xb);if(_0x44159b===_0x2e20e2)break;else _0x595de8['push'](_0x595de8['shift']());}catch(_0x551857){_0x595de8['push'](_0x595de8['shift']());}}}(_0x170c,0x35b52));import{ForbiddenError}from'../../errors.js';function _0x3b4c(_0x3ae8d6,_0x476760){_0x3ae8d6=_0x3ae8d6-0xd6;var _0x170c97=_0x170c();var _0x3b4cec=_0x170c97[_0x3ae8d6];return _0x3b4cec;}function _0x170c(){var _0x45b808=['49688gfqJsI','1266171TkGmWe','admin','20pmRLux','bbdak','8UfMzHj','type','4417nyaDVQ','Admin\x20access\x20required','2280531YvdRSu','1549710QUZKLl','XptKz','289894gbnmXj','996rllZWr','1276080MRtNBy','User\x20required','4LCxtFI'];_0x170c=function(){return _0x45b808;};return _0x170c();}export function requireAdmin(_0x1a8afc,_0x2bfa40){var _0x10e4fa=_0x3b4c,_0x45db36={};_0x45db36[_0x10e4fa(0xda)]=_0x10e4fa(0xe5),_0x45db36[_0x10e4fa(0xe1)]=_0x10e4fa(0xde);var _0x11aa1b=_0x45db36;if(!_0x1a8afc)throw new ForbiddenError(_0x11aa1b[_0x10e4fa(0xda)]);if(_0x1a8afc[_0x10e4fa(0xdc)]!==_0x10e4fa(0xd8))throw new ForbiddenError(_0x11aa1b[_0x10e4fa(0xe1)]);}
1
+ function _0x3894(_0x321af9,_0xb9b37a){_0x321af9=_0x321af9-0x1cc;var _0x16ae53=_0x16ae();var _0x389429=_0x16ae53[_0x321af9];return _0x389429;}(function(_0x13d005,_0x19f391){var _0x500223=_0x3894,_0x51c9bb=_0x13d005();while(!![]){try{var _0x3c7623=-parseInt(_0x500223(0x1dd))/0x1+-parseInt(_0x500223(0x1df))/0x2*(-parseInt(_0x500223(0x1d1))/0x3)+-parseInt(_0x500223(0x1cc))/0x4+parseInt(_0x500223(0x1d0))/0x5+parseInt(_0x500223(0x1d7))/0x6*(parseInt(_0x500223(0x1d5))/0x7)+parseInt(_0x500223(0x1dc))/0x8*(parseInt(_0x500223(0x1d3))/0x9)+-parseInt(_0x500223(0x1d9))/0xa;if(_0x3c7623===_0x19f391)break;else _0x51c9bb['push'](_0x51c9bb['shift']());}catch(_0x4d09ef){_0x51c9bb['push'](_0x51c9bb['shift']());}}}(_0x16ae,0x2dc7c));function _0x16ae(){var _0x383237=['admin','9BmBbby','Admin\x20access\x20required','29085ARJdqB','type','282BHNqOt','jgBYR','1817680nQSsUE','includes','User\x20required','1331240vnOdFg','112775fyMIeD','Missing\x20permission:\x20','5602yCXBQD','815364gXUwDx','permissions','hGNOV','YiMsO','1551025ZqldKZ','15GxEfEf'];_0x16ae=function(){return _0x383237;};return _0x16ae();}import{ForbiddenError}from'../../errors.js';export function requireAdmin(_0x20b44a,_0x2978a2){var _0x4c38c8=_0x3894,_0x59c61a={};_0x59c61a[_0x4c38c8(0x1cf)]=_0x4c38c8(0x1db),_0x59c61a[_0x4c38c8(0x1d8)]=function(_0x51e988,_0x1048d9){return _0x51e988!==_0x1048d9;},_0x59c61a[_0x4c38c8(0x1ce)]=_0x4c38c8(0x1d2);var _0x28bd47=_0x59c61a;if(!_0x20b44a)throw new ForbiddenError(_0x28bd47[_0x4c38c8(0x1cf)]);if(_0x28bd47[_0x4c38c8(0x1d8)](_0x20b44a[_0x4c38c8(0x1d6)],_0x28bd47[_0x4c38c8(0x1ce)]))throw new ForbiddenError(_0x4c38c8(0x1d4));if(_0x20b44a[_0x4c38c8(0x1d6)]!==_0x28bd47[_0x4c38c8(0x1ce)]&&_0x2978a2&&!_0x20b44a[_0x4c38c8(0x1cd)]?.[_0x4c38c8(0x1da)](_0x2978a2))throw new ForbiddenError(_0x4c38c8(0x1de)+_0x2978a2);}
@@ -1 +1 @@
1
- function _0x57f2(){const _0x5b8491=['includes','toLowerCase','jrNao','917336TbOUqK','secret','fromEntries','filter','entries','password','salt','913731kLtxOM','DZJCk','fDtra','token','81DhUVhq','5156kwPyRZ','1368474BsOTUn','687992RJVlVH','1356960CkQyEa','some','117SYHDIp','625830LwNluI','credentials'];_0x57f2=function(){return _0x5b8491;};return _0x57f2();}(function(_0x2c429b,_0x4d03e){const _0xca213b=_0x23b3,_0x30946a=_0x2c429b();while(!![]){try{const _0x3df3e2=parseInt(_0xca213b(0x16a))/0x1*(parseInt(_0xca213b(0x17c))/0x2)+-parseInt(_0xca213b(0x177))/0x3+-parseInt(_0xca213b(0x17f))/0x4+-parseInt(_0xca213b(0x16b))/0x5+-parseInt(_0xca213b(0x17d))/0x6+parseInt(_0xca213b(0x170))/0x7+parseInt(_0xca213b(0x17e))/0x8*(parseInt(_0xca213b(0x17b))/0x9);if(_0x3df3e2===_0x4d03e)break;else _0x30946a['push'](_0x30946a['shift']());}catch(_0x427eb2){_0x30946a['push'](_0x30946a['shift']());}}}(_0x57f2,0x332c3));function _0x23b3(_0x478a2c,_0x214bd1){_0x478a2c=_0x478a2c-0x169;const _0x57f25c=_0x57f2();let _0x23b393=_0x57f25c[_0x478a2c];return _0x23b393;}export const safeUser=_0x2436c3=>{const _0xf15126=_0x23b3,_0x2c0a9c={};_0x2c0a9c[_0xf15126(0x179)]=_0xf15126(0x17a),_0x2c0a9c[_0xf15126(0x178)]=_0xf15126(0x171),_0x2c0a9c[_0xf15126(0x16f)]=_0xf15126(0x16c);const _0xa17b36=_0x2c0a9c,_0x383848=[_0xf15126(0x175),_0xf15126(0x176),_0xa17b36[_0xf15126(0x179)],_0xa17b36[_0xf15126(0x178)],_0xa17b36[_0xf15126(0x16f)]];return Object[_0xf15126(0x172)](Object[_0xf15126(0x174)](_0x2436c3)[_0xf15126(0x173)](([_0x28d426])=>!_0x383848[_0xf15126(0x169)](_0x5d41b5=>_0x28d426[_0xf15126(0x16e)]()[_0xf15126(0x16d)](_0x5d41b5))));};
1
+ (function(_0x233a53,_0x27ae40){const _0x574388=_0x2e72,_0xe9ec8c=_0x233a53();while(!![]){try{const _0x2ed5d5=parseInt(_0x574388(0xb9))/0x1*(parseInt(_0x574388(0xa7))/0x2)+parseInt(_0x574388(0xac))/0x3*(parseInt(_0x574388(0xa5))/0x4)+-parseInt(_0x574388(0xad))/0x5+-parseInt(_0x574388(0xb1))/0x6+-parseInt(_0x574388(0xa9))/0x7*(-parseInt(_0x574388(0xa6))/0x8)+-parseInt(_0x574388(0xae))/0x9+parseInt(_0x574388(0xab))/0xa*(parseInt(_0x574388(0xb5))/0xb);if(_0x2ed5d5===_0x27ae40)break;else _0xe9ec8c['push'](_0xe9ec8c['shift']());}catch(_0x4ca634){_0xe9ec8c['push'](_0xe9ec8c['shift']());}}}(_0x3c36,0x69e61));function _0x2e72(_0x5041f7,_0x5e5e9a){_0x5041f7=_0x5041f7-0xa2;const _0x3c36d4=_0x3c36();let _0x2e72c1=_0x3c36d4[_0x5041f7];return _0x2e72c1;}function _0x3c36(){const _0x3a52b1=['secret','password','WoLuJ','token','3093016GvWLoY','1485592yeyPeI','2uVuDij','qjfKl','21EDQQXm','toLowerCase','10PaWSPC','3ANWGQS','3639415SGdNfN','3403926xjIZrU','entries','credentials','4260078WDGbkf','includes','VYyMC','some','8892191TovBAm','filter','fromEntries','salt','111139NAlVGu'];_0x3c36=function(){return _0x3a52b1;};return _0x3c36();}export const safeUser=_0x2b2d9e=>{const _0x507ac7=_0x2e72,_0x56e320={};_0x56e320[_0x507ac7(0xa3)]=_0x507ac7(0xa2),_0x56e320[_0x507ac7(0xa8)]=_0x507ac7(0xba),_0x56e320[_0x507ac7(0xb3)]=_0x507ac7(0xb0);const _0x777357=_0x56e320,_0x437626=[_0x777357[_0x507ac7(0xa3)],_0x507ac7(0xb8),_0x507ac7(0xa4),_0x777357[_0x507ac7(0xa8)],_0x777357[_0x507ac7(0xb3)]];return Object[_0x507ac7(0xb7)](Object[_0x507ac7(0xaf)](_0x2b2d9e)[_0x507ac7(0xb6)](([_0x5c70f4])=>!_0x437626[_0x507ac7(0xb4)](_0x2e6a30=>_0x5c70f4[_0x507ac7(0xaa)]()[_0x507ac7(0xb2)](_0x2e6a30))));};
@@ -1 +1 @@
1
- function _0x78a2(_0x637a89,_0x34800d){_0x637a89=_0x637a89-0x6a;var _0x4d2d67=_0x4d2d();var _0x78a2c0=_0x4d2d67[_0x637a89];return _0x78a2c0;}function _0x4d2d(){var _0x2787f5=['9528UgYnsM','1340vMKTpj','32656692iucEOi','189384NWNRpr','175ylWIua','14569875hYmSTh','4207929oCVFsF','194408OtJxIx','4FbctrI','57508tgnCiE','\x20requires\x20a\x20project/provider\x20implementation','30fciItz','130urMWbb'];_0x4d2d=function(){return _0x2787f5;};return _0x4d2d();}(function(_0x46f259,_0x56c75e){var _0x13f475=_0x78a2,_0x56904a=_0x46f259();while(!![]){try{var _0x23a038=parseInt(_0x13f475(0x6c))/0x1*(parseInt(_0x13f475(0x6a))/0x2)+parseInt(_0x13f475(0x72))/0x3*(parseInt(_0x13f475(0x74))/0x4)+-parseInt(_0x13f475(0x6b))/0x5*(parseInt(_0x13f475(0x6f))/0x6)+parseInt(_0x13f475(0x70))/0x7*(parseInt(_0x13f475(0x73))/0x8)+parseInt(_0x13f475(0x71))/0x9+parseInt(_0x13f475(0x6d))/0xa*(parseInt(_0x13f475(0x75))/0xb)+-parseInt(_0x13f475(0x6e))/0xc;if(_0x23a038===_0x56c75e)break;else _0x56904a['push'](_0x56904a['shift']());}catch(_0x5d625d){_0x56904a['push'](_0x56904a['shift']());}}}(_0x4d2d,0xe329c));import{UnsupportedError}from'../../errors.js';export function unsupported(_0x137d01){var _0x23093b=_0x78a2;throw new UnsupportedError(_0x137d01+_0x23093b(0x76));}
1
+ (function(_0x420090,_0x105480){var _0x48580d=_0x3680,_0x4c6fb2=_0x420090();while(!![]){try{var _0x59a7ba=-parseInt(_0x48580d(0x1e3))/0x1+parseInt(_0x48580d(0x1e1))/0x2+-parseInt(_0x48580d(0x1de))/0x3*(-parseInt(_0x48580d(0x1e2))/0x4)+-parseInt(_0x48580d(0x1e0))/0x5*(parseInt(_0x48580d(0x1e4))/0x6)+parseInt(_0x48580d(0x1e7))/0x7*(-parseInt(_0x48580d(0x1e6))/0x8)+parseInt(_0x48580d(0x1e9))/0x9+parseInt(_0x48580d(0x1e5))/0xa*(parseInt(_0x48580d(0x1df))/0xb);if(_0x59a7ba===_0x105480)break;else _0x4c6fb2['push'](_0x4c6fb2['shift']());}catch(_0x1e3160){_0x4c6fb2['push'](_0x4c6fb2['shift']());}}}(_0x2833,0xeeddf));function _0x2833(){var _0x4ba437=['16OisPTr','699217uoyniL','8335158sNKGhj','1010VUzlRJ','1249664fsKEkM','14MRjztc','\x20requires\x20a\x20project/provider\x20implementation','7023123WYhtIp','402342NlfuaB','182402NTehpF','5eKnoBP','775280UvJAzA'];_0x2833=function(){return _0x4ba437;};return _0x2833();}import{UnsupportedError}from'../../errors.js';function _0x3680(_0x8465b4,_0x25ef52){_0x8465b4=_0x8465b4-0x1de;var _0x28338b=_0x2833();var _0x3680a0=_0x28338b[_0x8465b4];return _0x3680a0;}export function unsupported(_0x42cc7f){var _0xc20b71=_0x3680;throw new UnsupportedError(_0x42cc7f+_0xc20b71(0x1e8));}
@@ -1 +1 @@
1
- (function(_0x5c1888,_0x267a39){const _0x28e7e8=_0x94cb,_0x4fd2ca=_0x5c1888();while(!![]){try{const _0x337e6f=-parseInt(_0x28e7e8(0x111))/0x1*(parseInt(_0x28e7e8(0x112))/0x2)+-parseInt(_0x28e7e8(0x10a))/0x3*(-parseInt(_0x28e7e8(0x10e))/0x4)+parseInt(_0x28e7e8(0x10f))/0x5*(parseInt(_0x28e7e8(0x10c))/0x6)+parseInt(_0x28e7e8(0x110))/0x7+parseInt(_0x28e7e8(0x10b))/0x8+-parseInt(_0x28e7e8(0x109))/0x9*(-parseInt(_0x28e7e8(0x114))/0xa)+-parseInt(_0x28e7e8(0x113))/0xb;if(_0x337e6f===_0x267a39)break;else _0x4fd2ca['push'](_0x4fd2ca['shift']());}catch(_0x30d5f3){_0x4fd2ca['push'](_0x4fd2ca['shift']());}}}(_0x58dd,0xc2e93));import{writeAudit}from'./services/write-audit.js';function _0x94cb(_0x4793e9,_0x4536ad){_0x4793e9=_0x4793e9-0x109;const _0x58dd6a=_0x58dd();let _0x94cb72=_0x58dd6a[_0x4793e9];return _0x94cb72;}export function createAudit(_0x2b0d58){const _0xed51a1=_0x94cb,_0x464e8d=writeAudit(_0x2b0d58),_0x535377={};return _0x535377[_0xed51a1(0x10d)]=_0x464e8d,_0x535377;}function _0x58dd(){const _0x58d41e=['4145890GslVcc','1UfVpGo','2886174NCNGOy','36181277TFrXop','14700760QlSncc','9gfeRze','11478JVoBOL','7985832OGyGTj','2853456xblLnN','write','1588DmrDzC','10zdJUqn'];_0x58dd=function(){return _0x58d41e;};return _0x58dd();}
1
+ (function(_0x542822,_0x57887d){const _0x58e4ab=_0x56bb,_0x26d303=_0x542822();while(!![]){try{const _0x28ab4c=parseInt(_0x58e4ab(0x104))/0x1+-parseInt(_0x58e4ab(0x101))/0x2+parseInt(_0x58e4ab(0x105))/0x3+parseInt(_0x58e4ab(0x107))/0x4*(-parseInt(_0x58e4ab(0xfe))/0x5)+parseInt(_0x58e4ab(0xff))/0x6*(-parseInt(_0x58e4ab(0x108))/0x7)+-parseInt(_0x58e4ab(0x102))/0x8+-parseInt(_0x58e4ab(0x103))/0x9*(-parseInt(_0x58e4ab(0x100))/0xa);if(_0x28ab4c===_0x57887d)break;else _0x26d303['push'](_0x26d303['shift']());}catch(_0x21c01a){_0x26d303['push'](_0x26d303['shift']());}}}(_0x473e,0xd980e));import{writeAudit}from'./services/write-audit.js';function _0x56bb(_0x1b4c88,_0x411bc9){_0x1b4c88=_0x1b4c88-0xfd;const _0x473e83=_0x473e();let _0x56bbed=_0x473e83[_0x1b4c88];return _0x56bbed;}export function createAudit(_0x1bf917){const _0x2a2c50=_0x56bb,_0x5a75df={'MtkoF':function(_0x162fb4,_0x303b22){return _0x162fb4(_0x303b22);}},_0x454c2c=_0x5a75df[_0x2a2c50(0xfd)](writeAudit,_0x1bf917),_0x5911cd={};return _0x5911cd[_0x2a2c50(0x106)]=_0x454c2c,_0x5911cd;}function _0x473e(){const _0x198c74=['2247231faSaXn','write','3243188maDhel','791SJnsgA','MtkoF','5RjlANk','84108bGyOux','600YhGJWK','2852002boEekz','3236792UcTpVD','514872RyHmIJ','934768GAHlhz'];_0x473e=function(){return _0x198c74;};return _0x473e();}
@@ -1 +1 @@
1
- (function(_0x4cd514,_0x114fb9){var _0x4aa3a5=_0x5f15,_0x1e7b4d=_0x4cd514();while(!![]){try{var _0x4e6d53=-parseInt(_0x4aa3a5(0x125))/0x1*(parseInt(_0x4aa3a5(0x11f))/0x2)+parseInt(_0x4aa3a5(0x121))/0x3+-parseInt(_0x4aa3a5(0x11d))/0x4+-parseInt(_0x4aa3a5(0x120))/0x5+parseInt(_0x4aa3a5(0x124))/0x6*(parseInt(_0x4aa3a5(0x123))/0x7)+parseInt(_0x4aa3a5(0x11e))/0x8+parseInt(_0x4aa3a5(0x122))/0x9;if(_0x4e6d53===_0x114fb9)break;else _0x1e7b4d['push'](_0x1e7b4d['shift']());}catch(_0x4a0031){_0x1e7b4d['push'](_0x1e7b4d['shift']());}}}(_0x2b3b,0x7648e));function _0x5f15(_0x9b022d,_0x3c0453){_0x9b022d=_0x9b022d-0x11d;var _0x2b3b56=_0x2b3b();var _0x5f15ba=_0x2b3b56[_0x9b022d];return _0x5f15ba;}export*from'./audit.types.js';export*from'./audit.js';function _0x2b3b(){var _0x5144db=['729673PRjcme','2491484SZNIUT','2937752ZJfyCL','2iVYEYO','2538215sCGvRM','16116JlrbKC','13804902EbhhSr','7zmwLlb','2629272puvDnL'];_0x2b3b=function(){return _0x5144db;};return _0x2b3b();}
1
+ function _0x5816(_0x2ec9b4,_0x2d744c){_0x2ec9b4=_0x2ec9b4-0x1cc;var _0x216842=_0x2168();var _0x581610=_0x216842[_0x2ec9b4];return _0x581610;}(function(_0x29d3c6,_0x340962){var _0x33239e=_0x5816,_0x477a71=_0x29d3c6();while(!![]){try{var _0x5dd294=-parseInt(_0x33239e(0x1d0))/0x1+-parseInt(_0x33239e(0x1d1))/0x2+-parseInt(_0x33239e(0x1cd))/0x3+-parseInt(_0x33239e(0x1d3))/0x4+parseInt(_0x33239e(0x1d2))/0x5+-parseInt(_0x33239e(0x1ce))/0x6*(parseInt(_0x33239e(0x1cf))/0x7)+-parseInt(_0x33239e(0x1cc))/0x8*(-parseInt(_0x33239e(0x1d4))/0x9);if(_0x5dd294===_0x340962)break;else _0x477a71['push'](_0x477a71['shift']());}catch(_0x25bbe2){_0x477a71['push'](_0x477a71['shift']());}}}(_0x2168,0x97830));export*from'./audit.types.js';export*from'./audit.js';function _0x2168(){var _0x24c597=['403021NTcFQx','524148rqrVjQ','1234165UtVrIc','2265492MKnFOY','18fveMfJ','11813992mFGPmy','2949777fuAYJz','2190072snyazS','7wYjzFG'];_0x2168=function(){return _0x24c597;};return _0x2168();}
@@ -1 +1 @@
1
- (function(_0x1912e8,_0x1cb9c2){const _0x12757f=_0x7713,_0x244bf4=_0x1912e8();while(!![]){try{const _0x52e720=-parseInt(_0x12757f(0x105))/0x1*(parseInt(_0x12757f(0x139))/0x2)+-parseInt(_0x12757f(0x12c))/0x3+-parseInt(_0x12757f(0xe4))/0x4*(-parseInt(_0x12757f(0xe3))/0x5)+parseInt(_0x12757f(0x10f))/0x6*(-parseInt(_0x12757f(0x100))/0x7)+parseInt(_0x12757f(0xf6))/0x8*(-parseInt(_0x12757f(0x103))/0x9)+parseInt(_0x12757f(0xe9))/0xa+parseInt(_0x12757f(0x111))/0xb;if(_0x52e720===_0x1cb9c2)break;else _0x244bf4['push'](_0x244bf4['shift']());}catch(_0x385f71){_0x244bf4['push'](_0x244bf4['shift']());}}}(_0x32bd,0x6521c));function _0x32bd(){const _0x578857=['Audit\x20tables\x20are\x20unavailable;\x20audit\x20writes\x20are\x20disabled','resourceId','audit','QWnkS','32VjTIRA','JhRxh','bTmko','nxUXI','query','NKCKZ','Unable\x20to\x20check\x20audit\x20tables;\x20audit\x20writes\x20are\x20disabled','then','audit_log_data','ywMAn','1043924jASVHR','fields','admin.audit_log_data','1820655KosFTZ','requestId','223921HwZLPQ','has','err','aCegy','IgYTn','dJNUH','\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20user_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fields,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20action,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20request_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ip_address,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20metadata\x0a\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5,\x20$6,\x20$7,\x20$8,\x20$9)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20','LHhXR','GGspl','LcxdK','12WpJARh','action','12189276rLTcMv','frKbm','oldValue','metadata','catch','FzfhZ','gNUJl','entries','stringify','ipAddress','txPri','jsdOS','map','userId','gItBF','test','Tdwoo','field','PQtDg','eWrWd','ZsiZk','[REDACTED]','gHbHi','rYYzd','BXema','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log_data\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20audit_log_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20field,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20old_value,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20new_value\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','info','660111oNkJmx','audit_log','NnzXO','foundTables','PxyUR','JBHde','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20IN\x20(\x27audit_log\x27,\x20\x27audit_log_data\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','resource','expectedTables','oogdo','QYoxU','object','table_name','4VvOMaC','yDUBx','rows','warn','sHdmi','2064035LQhMQd','4ShDFpD','empty\x20pg','ZYBLR','newValue','module','6686360PQhDuP','admin.audit_log','logger','AaEND','OhpDS','ZGtWO','fromEntries','isArray','changes'];_0x32bd=function(){return _0x578857;};return _0x32bd();}const secretPattern=/password|token|secret|credential|salt/i;function _0x7713(_0x474cf2,_0x48ca63){_0x474cf2=_0x474cf2-0xe1;const _0x32bd02=_0x32bd();let _0x771303=_0x32bd02[_0x474cf2];return _0x771303;}function clean(_0x3bdfa9){const _0x3d46a1=_0x7713,_0x3922c5={'ywMAn':function(_0x7ebbc9,_0x2f7cb9){return _0x7ebbc9(_0x2f7cb9);},'aCegy':_0x3d46a1(0x11f),'ZGtWO':_0x3d46a1(0x137)};if(Array[_0x3d46a1(0xf0)](_0x3bdfa9))return _0x3922c5[_0x3d46a1(0x108)]!==_0x3922c5[_0x3d46a1(0x108)]?(_0x19630b[_0x3d46a1(0xeb)][_0x3d46a1(0x12b)]({'auditFallback':!![],'event':_0x3922c5[_0x3d46a1(0xff)](_0x32282d,{..._0x17f8e5,'changes':_0xe2f373[_0x3d46a1(0xf1)]?.[_0x3d46a1(0x11d)](_0x27ae82=>({..._0x27ae82,'oldValue':_0x10f208(_0x27ae82[_0x3d46a1(0x113)]),'newValue':_0xaac9de(_0x27ae82[_0x3d46a1(0xe7)])}))})},_0x3d46a1(0xf4)),0x0):_0x3bdfa9[_0x3d46a1(0x11d)](clean);if(_0x3bdfa9&&typeof _0x3bdfa9===_0x3922c5[_0x3d46a1(0xee)])return Object[_0x3d46a1(0xef)](Object[_0x3d46a1(0x118)](_0x3bdfa9)[_0x3d46a1(0x11d)](([_0x160a8e,_0x335f8e])=>[_0x160a8e,secretPattern[_0x3d46a1(0x120)](_0x160a8e)?_0x3d46a1(0x126):clean(_0x335f8e)]));return _0x3bdfa9;}export function writeAudit(_0x4a02ca){const _0x448eec=_0x7713,_0x428a4c={'NKCKZ':_0x448eec(0x12d),'gHbHi':_0x448eec(0xfe),'bTmko':function(_0xa7e021,_0x402dbe){return _0xa7e021!==_0x402dbe;},'gNUJl':_0x448eec(0xf5),'oogdo':_0x448eec(0xea),'NnzXO':_0x448eec(0x102),'IgYTn':_0x448eec(0xf2),'ZsiZk':function(_0x2e1834,_0x1510ef){return _0x2e1834===_0x1510ef;},'dJNUH':_0x448eec(0xf7),'nxUXI':_0x448eec(0xfc),'ZYBLR':function(_0xc651d1,_0x47ee0c){return _0xc651d1===_0x47ee0c;},'PQtDg':_0x448eec(0x11b),'eWrWd':_0x448eec(0x13a),'FzfhZ':function(_0x1a1069){return _0x1a1069();},'Tdwoo':function(_0x2b079a,_0x772291){return _0x2b079a(_0x772291);},'jsdOS':_0x448eec(0xf4),'GGspl':_0x448eec(0xe5),'rYYzd':function(_0x29a8db,_0x2df503){return _0x29a8db==_0x2df503;},'AaEND':function(_0x26d0a1,_0x5d21d7){return _0x26d0a1(_0x5d21d7);},'frKbm':_0x448eec(0x10e)};let _0x51e9cc,_0x27cb4a;async function _0x41e686(){const _0x5d50f8=_0x448eec,_0x3d3368={};_0x3d3368[_0x5d50f8(0xe2)]=_0x428a4c[_0x5d50f8(0xf9)];const _0x242c76=_0x3d3368;if(!_0x4a02ca['pg'])return _0x428a4c[_0x5d50f8(0xe6)](_0x5d50f8(0x130),_0x428a4c[_0x5d50f8(0x123)])?![]:![];if(_0x428a4c[_0x5d50f8(0xf8)](_0x51e9cc,undefined)){if(_0x428a4c[_0x5d50f8(0x124)]===_0x5d50f8(0xed)){_0x2bffe4=![];const _0x2ce61f={};return _0x2ce61f[_0x5d50f8(0x107)]=_0x359a93,_0x55a44d[_0x5d50f8(0xeb)][_0x5d50f8(0xe1)](_0x2ce61f,_0x242c76[_0x5d50f8(0xe2)]),![];}else return _0x51e9cc;}return _0x27cb4a??=_0x4a02ca['pg'][_0x5d50f8(0xfa)](_0x5d50f8(0x132))[_0x5d50f8(0xfd)](_0x3fc9c4=>{const _0x11f397=_0x5d50f8,_0x241913=new Set(_0x3fc9c4[_0x11f397(0x13b)][_0x11f397(0x11d)](_0x21094d=>_0x21094d[_0x11f397(0x138)]));_0x51e9cc=_0x241913[_0x11f397(0x106)](_0x428a4c[_0x11f397(0xfb)])&&_0x241913[_0x11f397(0x106)](_0x428a4c[_0x11f397(0x127)]);if(!_0x51e9cc){if(_0x428a4c[_0x11f397(0xf8)](_0x428a4c[_0x11f397(0x117)],_0x428a4c[_0x11f397(0x117)]))return _0xcf1f5c;else{const _0x3fdefb={};_0x3fdefb[_0x11f397(0x134)]=[_0x428a4c[_0x11f397(0x135)],_0x428a4c[_0x11f397(0x12e)]],_0x3fdefb[_0x11f397(0x12f)]=[..._0x241913],_0x4a02ca[_0x11f397(0xeb)][_0x11f397(0xe1)](_0x3fdefb,_0x428a4c[_0x11f397(0x109)]);}}return _0x51e9cc;})[_0x5d50f8(0x115)](_0x575677=>{const _0x1f832b=_0x5d50f8;if(_0x428a4c[_0x1f832b(0x125)](_0x1f832b(0xf7),_0x428a4c[_0x1f832b(0x10a)])){_0x51e9cc=![];const _0x2344eb={};return _0x2344eb[_0x1f832b(0x107)]=_0x575677,_0x4a02ca[_0x1f832b(0xeb)][_0x1f832b(0xe1)](_0x2344eb,_0x428a4c[_0x1f832b(0xf9)]),![];}else{const _0x3d53ed={};_0x3d53ed[_0x1f832b(0x134)]=[_0x1f832b(0xea),_0x1f832b(0x102)],_0x3d53ed[_0x1f832b(0x12f)]=[..._0x2d1c08],_0x136cc3[_0x1f832b(0xeb)][_0x1f832b(0xe1)](_0x3d53ed,_0x1f832b(0xf2));}}),_0x27cb4a;}return async function _0x3746cc(_0x9b711f){const _0x4f2ab5=_0x448eec,_0x43dc35={};_0x43dc35[_0x4f2ab5(0x10c)]=_0x4f2ab5(0xfe),_0x43dc35[_0x4f2ab5(0x136)]=_0x428a4c[_0x4f2ab5(0x135)],_0x43dc35[_0x4f2ab5(0x129)]=_0x428a4c[_0x4f2ab5(0x12e)],_0x43dc35[_0x4f2ab5(0x131)]=_0x428a4c[_0x4f2ab5(0x109)];const _0x5a03a2=_0x43dc35;if(!await _0x428a4c[_0x4f2ab5(0x116)](_0x41e686))return _0x4a02ca[_0x4f2ab5(0xeb)][_0x4f2ab5(0x12b)]({'auditFallback':!![],'event':_0x428a4c[_0x4f2ab5(0x121)](clean,{..._0x9b711f,'changes':_0x9b711f[_0x4f2ab5(0xf1)]?.[_0x4f2ab5(0x11d)](_0xc2b877=>({..._0xc2b877,'oldValue':clean(_0xc2b877[_0x4f2ab5(0x113)]),'newValue':clean(_0xc2b877[_0x4f2ab5(0xe7)])}))})},_0x428a4c[_0x4f2ab5(0x11c)]),0x0;if(!_0x4a02ca['pg'])throw new Error(_0x428a4c[_0x4f2ab5(0x10d)]);const _0x41b0e4=await _0x4a02ca['pg'][_0x4f2ab5(0xfa)](_0x4f2ab5(0x10b),[_0x9b711f[_0x4f2ab5(0x11e)]??null,_0x9b711f[_0x4f2ab5(0xe8)],_0x9b711f[_0x4f2ab5(0x133)],_0x428a4c[_0x4f2ab5(0x128)](_0x9b711f[_0x4f2ab5(0xf3)],null)?null:_0x428a4c[_0x4f2ab5(0xec)](String,_0x9b711f[_0x4f2ab5(0xf3)]),_0x9b711f[_0x4f2ab5(0x101)]??null,_0x9b711f[_0x4f2ab5(0x110)],_0x9b711f[_0x4f2ab5(0x104)]??null,_0x9b711f[_0x4f2ab5(0x11a)]??null,clean(_0x9b711f[_0x4f2ab5(0x114)]??{})]),_0x25f9b5=_0x41b0e4[_0x4f2ab5(0x13b)][0x0]['id'];for(const _0x3d690a of _0x9b711f[_0x4f2ab5(0xf1)]??[]){if(secretPattern[_0x4f2ab5(0x120)](_0x3d690a[_0x4f2ab5(0x122)])){if(_0x428a4c[_0x4f2ab5(0xe6)](_0x4f2ab5(0x10e),_0x428a4c[_0x4f2ab5(0x112)]))continue;else{const _0x9045f6=new _0x969dd6(_0x179308[_0x4f2ab5(0x13b)][_0x4f2ab5(0x11d)](_0x361d4b=>_0x361d4b[_0x4f2ab5(0x138)]));_0x3612e2=_0x9045f6[_0x4f2ab5(0x106)](_0x4f2ab5(0x12d))&&_0x9045f6[_0x4f2ab5(0x106)](XhpLWK[_0x4f2ab5(0x10c)]);if(!_0x320586){const _0x1e5661={};_0x1e5661[_0x4f2ab5(0x134)]=[XhpLWK[_0x4f2ab5(0x136)],XhpLWK[_0x4f2ab5(0x129)]],_0x1e5661[_0x4f2ab5(0x12f)]=[..._0x9045f6],_0x331dc5[_0x4f2ab5(0xeb)][_0x4f2ab5(0xe1)](_0x1e5661,XhpLWK[_0x4f2ab5(0x131)]);}return _0x2d8f40;}}await _0x4a02ca['pg'][_0x4f2ab5(0xfa)](_0x4f2ab5(0x12a),[_0x25f9b5,_0x3d690a[_0x4f2ab5(0x122)],JSON[_0x4f2ab5(0x119)](clean(_0x3d690a[_0x4f2ab5(0x113)])),JSON[_0x4f2ab5(0x119)](_0x428a4c[_0x4f2ab5(0x121)](clean,_0x3d690a[_0x4f2ab5(0xe7)]))]);}return _0x25f9b5;};}
1
+ (function(_0x1cde2a,_0x14ace5){const _0x115a05=_0x1060,_0x98a10a=_0x1cde2a();while(!![]){try{const _0x1b484d=-parseInt(_0x115a05(0x1d0))/0x1*(-parseInt(_0x115a05(0x1db))/0x2)+parseInt(_0x115a05(0x1f4))/0x3+-parseInt(_0x115a05(0x1f9))/0x4+-parseInt(_0x115a05(0x1ec))/0x5*(-parseInt(_0x115a05(0x1f7))/0x6)+parseInt(_0x115a05(0x1d9))/0x7*(parseInt(_0x115a05(0x1e7))/0x8)+parseInt(_0x115a05(0x214))/0x9+-parseInt(_0x115a05(0x1d3))/0xa;if(_0x1b484d===_0x14ace5)break;else _0x98a10a['push'](_0x98a10a['shift']());}catch(_0x504555){_0x98a10a['push'](_0x98a10a['shift']());}}}(_0x5563,0x60e8b));const secretPattern=/password|token|secret|credential|salt/i;function _0x5563(){const _0x58088f=['KCLaF','MrBsE','gdidv','MXaHd','rows','\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20user_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resource_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fields,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20action,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20request_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ip_address,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20metadata\x0a\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5,\x20$6,\x20$7,\x20$8,\x20$9)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20','72272tYlWDQ','ipAddress','VhtJN','requestId','rHJSE','70LEhqou','admin.audit_log_data','empty\x20pg','Yypom','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.audit_log_data\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20audit_log_id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20field,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20old_value,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20new_value\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','fromEntries','hWKxS','qkzSn','959367kFpRwl','expectedTables','oldValue','32106hQLiUU','tpucT','206440HgJfgo','xqoUP','uaKzt','RSUfc','nfiqm','query','object','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20IN\x20(\x27audit_log\x27,\x20\x27audit_log_data\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20','action','RgVMf','vRdHz','iOGHo','info','Lqhpl','warn','nhiXF','logger','test','map','resourceId','changes','LwxUb','KXYNj','module','Xdoib','audit','Unable\x20to\x20check\x20audit\x20tables;\x20audit\x20writes\x20are\x20disabled','892548FYuheP','BLQwz','Audit\x20tables\x20are\x20unavailable;\x20audit\x20writes\x20are\x20disabled','iEHZX','then','err','entries','oyKFt','catch','mciFy','userId','isArray','has','fPsqn','table_name','stringify','fields','[REDACTED]','field','metadata','17IrHCVS','YMzYy','IUEQA','8691650ypVnrR','hTcEQ','rZJHZ','MEmIY','audit_log_data','resource','427gGOodK','admin.audit_log','32090KDxQPT','newValue','ZhoaR','nqIsM','audit_log','foundTables'];_0x5563=function(){return _0x58088f;};return _0x5563();}function clean(_0x3e4776){const _0x39915d=_0x1060,_0x23ec0c={};_0x23ec0c[_0x39915d(0x1e9)]=function(_0x3ba40d,_0x1fcabb){return _0x3ba40d===_0x1fcabb;},_0x23ec0c[_0x39915d(0x215)]=_0x39915d(0x1ff);const _0x441cd3=_0x23ec0c;if(Array[_0x39915d(0x21f)](_0x3e4776))return _0x3e4776[_0x39915d(0x20b)](clean);if(_0x3e4776&&_0x441cd3[_0x39915d(0x1e9)](typeof _0x3e4776,_0x441cd3[_0x39915d(0x215)]))return Object[_0x39915d(0x1f1)](Object[_0x39915d(0x21a)](_0x3e4776)[_0x39915d(0x20b)](([_0x1201bb,_0x4bcbd7])=>[_0x1201bb,secretPattern[_0x39915d(0x20a)](_0x1201bb)?_0x39915d(0x1cd):clean(_0x4bcbd7)]));return _0x3e4776;}function _0x1060(_0x3688c8,_0x2dcf7f){_0x3688c8=_0x3688c8-0x1cd;const _0x556349=_0x5563();let _0x106056=_0x556349[_0x3688c8];return _0x106056;}export function writeAudit(_0x1429f5){const _0x3e6ac3=_0x1060,_0x575459={'nhiXF':_0x3e6ac3(0x213),'MEmIY':_0x3e6ac3(0x1df),'iEHZX':_0x3e6ac3(0x1ed),'hTcEQ':_0x3e6ac3(0x216),'LwxUb':function(_0x495d0e,_0x5dd62e){return _0x495d0e===_0x5dd62e;},'Yypom':_0x3e6ac3(0x1d5),'nqIsM':function(_0x472eb6,_0x6a226a){return _0x472eb6!==_0x6a226a;},'qkzSn':_0x3e6ac3(0x1d2),'MrBsE':_0x3e6ac3(0x1d7),'ZhoaR':_0x3e6ac3(0x1ee),'Lqhpl':function(_0x207309){return _0x207309();},'RgVMf':_0x3e6ac3(0x1fd),'oyKFt':function(_0x1fb0a5,_0x3e4f7c){return _0x1fb0a5==_0x3e4f7c;},'uaKzt':function(_0x52acf4,_0x4c3c30){return _0x52acf4(_0x4c3c30);},'Xdoib':function(_0x45b1fc,_0xfccd70){return _0x45b1fc===_0xfccd70;},'rHJSE':_0x3e6ac3(0x1fc),'vRdHz':_0x3e6ac3(0x1f2),'fPsqn':_0x3e6ac3(0x1e1),'YMzYy':_0x3e6ac3(0x204),'tpucT':function(_0x1c9caf,_0x1a8948){return _0x1c9caf(_0x1a8948);}};let _0x55c99c,_0x1dad25;async function _0x425973(){const _0x23af2f=_0x3e6ac3,_0xc5749c={};_0xc5749c[_0x23af2f(0x20f)]=_0x575459[_0x23af2f(0x208)],_0xc5749c[_0x23af2f(0x1e3)]=_0x575459[_0x23af2f(0x1d6)],_0xc5749c[_0x23af2f(0x1e4)]=_0x575459[_0x23af2f(0x217)],_0xc5749c[_0x23af2f(0x21d)]=_0x575459[_0x23af2f(0x1d4)];const _0x53ed70=_0xc5749c;if(_0x575459[_0x23af2f(0x20e)](_0x575459[_0x23af2f(0x1ef)],_0x23af2f(0x1d5))){if(!_0x1429f5['pg'])return![];if(_0x55c99c!==undefined){if(_0x575459[_0x23af2f(0x1de)](_0x23af2f(0x1fa),_0x575459[_0x23af2f(0x1f3)]))return _0x55c99c;else{_0x107b44=![];const _0x11ca58={};return _0x11ca58[_0x23af2f(0x219)]=_0xf54777,_0x42a18e[_0x23af2f(0x209)][_0x23af2f(0x207)](_0x11ca58,_0x53ed70[_0x23af2f(0x20f)]),![];}}return _0x1dad25??=_0x1429f5['pg'][_0x23af2f(0x1fe)](_0x23af2f(0x200))[_0x23af2f(0x218)](_0x11120b=>{const _0x4cadb2=_0x23af2f,_0x2a7af4=new Set(_0x11120b[_0x4cadb2(0x1e5)][_0x4cadb2(0x20b)](_0x13d562=>_0x13d562[_0x4cadb2(0x222)]));_0x55c99c=_0x2a7af4[_0x4cadb2(0x220)](_0x53ed70[_0x4cadb2(0x1e3)])&&_0x2a7af4[_0x4cadb2(0x220)](_0x4cadb2(0x1d7));if(!_0x55c99c){const _0xd5d5b8={};_0xd5d5b8[_0x4cadb2(0x1f5)]=[_0x4cadb2(0x1da),_0x53ed70[_0x4cadb2(0x1e4)]],_0xd5d5b8[_0x4cadb2(0x1e0)]=[..._0x2a7af4],_0x1429f5[_0x4cadb2(0x209)][_0x4cadb2(0x207)](_0xd5d5b8,_0x53ed70[_0x4cadb2(0x21d)]);}return _0x55c99c;})[_0x23af2f(0x21c)](_0xf44ae=>{const _0x39b08c=_0x23af2f;_0x55c99c=![];const _0x15190c={};return _0x15190c[_0x39b08c(0x219)]=_0xf44ae,_0x1429f5[_0x39b08c(0x209)][_0x39b08c(0x207)](_0x15190c,_0x39b08c(0x213)),![];}),_0x1dad25;}else return _0x157063[_0x23af2f(0x1f1)](_0x285cdb[_0x23af2f(0x21a)](_0xb3334c)[_0x23af2f(0x20b)](([_0x345d72,_0x16cd6a])=>[_0x345d72,_0xb8d4da[_0x23af2f(0x20a)](_0x345d72)?_0x23af2f(0x1cd):_0x1efb74(_0x16cd6a)]));}return async function _0x584a21(_0x1b6c3a){const _0xfd2fd8=_0x3e6ac3;if(!await _0x575459[_0xfd2fd8(0x206)](_0x425973))return _0x1429f5[_0xfd2fd8(0x209)][_0xfd2fd8(0x205)]({'auditFallback':!![],'event':clean({..._0x1b6c3a,'changes':_0x1b6c3a[_0xfd2fd8(0x20d)]?.[_0xfd2fd8(0x20b)](_0x590968=>({..._0x590968,'oldValue':clean(_0x590968[_0xfd2fd8(0x1f6)]),'newValue':clean(_0x590968[_0xfd2fd8(0x1dc)])}))})},_0xfd2fd8(0x212)),0x0;if(!_0x1429f5['pg']){if(_0x575459[_0xfd2fd8(0x202)]!==_0x575459[_0xfd2fd8(0x202)])return _0x4b63ec[_0xfd2fd8(0x20b)](_0x28e23c);else throw new Error(_0x575459[_0xfd2fd8(0x1dd)]);}const _0x36090a=await _0x1429f5['pg'][_0xfd2fd8(0x1fe)](_0xfd2fd8(0x1e6),[_0x1b6c3a[_0xfd2fd8(0x21e)]??null,_0x1b6c3a[_0xfd2fd8(0x210)],_0x1b6c3a[_0xfd2fd8(0x1d8)],_0x575459[_0xfd2fd8(0x21b)](_0x1b6c3a[_0xfd2fd8(0x20c)],null)?null:String(_0x1b6c3a[_0xfd2fd8(0x20c)]),_0x1b6c3a[_0xfd2fd8(0x224)]??null,_0x1b6c3a[_0xfd2fd8(0x201)],_0x1b6c3a[_0xfd2fd8(0x1ea)]??null,_0x1b6c3a[_0xfd2fd8(0x1e8)]??null,_0x575459[_0xfd2fd8(0x1fb)](clean,_0x1b6c3a[_0xfd2fd8(0x1cf)]??{})]),_0x1c52c8=_0x36090a[_0xfd2fd8(0x1e5)][0x0]['id'];for(const _0x311b3d of _0x1b6c3a[_0xfd2fd8(0x20d)]??[]){if(_0x575459[_0xfd2fd8(0x211)](_0x575459[_0xfd2fd8(0x1eb)],_0x575459[_0xfd2fd8(0x203)])){const _0x2e51df=new _0x4b9df9(_0x39ddb1[_0xfd2fd8(0x1e5)][_0xfd2fd8(0x20b)](_0x30323b=>_0x30323b[_0xfd2fd8(0x222)]));_0x21af0d=_0x2e51df[_0xfd2fd8(0x220)](_0x575459[_0xfd2fd8(0x1d6)])&&_0x2e51df[_0xfd2fd8(0x220)](_0x575459[_0xfd2fd8(0x1e2)]);if(!_0x56a354){const _0x4190b7={};_0x4190b7[_0xfd2fd8(0x1f5)]=[_0xfd2fd8(0x1da),_0xfd2fd8(0x1ed)],_0x4190b7[_0xfd2fd8(0x1e0)]=[..._0x2e51df],_0x30fdba[_0xfd2fd8(0x209)][_0xfd2fd8(0x207)](_0x4190b7,_0x575459[_0xfd2fd8(0x1d4)]);}return _0x425fa0;}else{if(secretPattern[_0xfd2fd8(0x20a)](_0x311b3d[_0xfd2fd8(0x1ce)])){if(_0x575459[_0xfd2fd8(0x20e)](_0x575459[_0xfd2fd8(0x221)],_0x575459[_0xfd2fd8(0x1d1)]))throw new _0x55426f(_0x575459[_0xfd2fd8(0x1dd)]);else continue;}await _0x1429f5['pg'][_0xfd2fd8(0x1fe)](_0xfd2fd8(0x1f0),[_0x1c52c8,_0x311b3d[_0xfd2fd8(0x1ce)],JSON[_0xfd2fd8(0x223)](clean(_0x311b3d[_0xfd2fd8(0x1f6)])),JSON[_0xfd2fd8(0x223)](_0x575459[_0xfd2fd8(0x1f8)](clean,_0x311b3d[_0xfd2fd8(0x1dc)]))]);}}return _0x1c52c8;};}
@@ -0,0 +1,3 @@
1
+ import type { ContextDependencies } from "../../context.js";
2
+ export declare function getUserPermissions(userId: string, ctx: Pick<ContextDependencies, "pg">): Promise<string[]>;
3
+ //# sourceMappingURL=get-user-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-permissions.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/get-user-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GACnC,OAAO,CAAC,MAAM,EAAE,CAAC,CAenB"}
@@ -0,0 +1 @@
1
+ (function(_0x4559d9,_0x2140b9){const _0x171d98=_0x548a,_0x3a064f=_0x4559d9();while(!![]){try{const _0x36e4b8=-parseInt(_0x171d98(0x1f4))/0x1*(parseInt(_0x171d98(0x1f3))/0x2)+parseInt(_0x171d98(0x1f5))/0x3*(parseInt(_0x171d98(0x1ff))/0x4)+-parseInt(_0x171d98(0x1fb))/0x5*(parseInt(_0x171d98(0x1fa))/0x6)+-parseInt(_0x171d98(0x1f6))/0x7*(parseInt(_0x171d98(0x1f9))/0x8)+-parseInt(_0x171d98(0x1ee))/0x9+-parseInt(_0x171d98(0x1f7))/0xa*(parseInt(_0x171d98(0x1f0))/0xb)+parseInt(_0x171d98(0x1f8))/0xc*(parseInt(_0x171d98(0x1fe))/0xd);if(_0x36e4b8===_0x2140b9)break;else _0x3a064f['push'](_0x3a064f['shift']());}catch(_0x1f7969){_0x3a064f['push'](_0x3a064f['shift']());}}}(_0x8a59,0xc1072));function _0x548a(_0x1e2e6f,_0x1010a2){_0x1e2e6f=_0x1e2e6f-0x1ee;const _0x8a597a=_0x8a59();let _0x548add=_0x8a597a[_0x1e2e6f];return _0x548add;}function _0x8a59(){const _0x283b61=['558371IVtjvW','\x0a\x20\x20\x20\x20\x20\x20SELECT\x20DISTINCT\x20ra.resource\x20||\x20\x27:\x27\x20||\x20action\x20AS\x20permission\x0a\x20\x20\x20\x20\x20\x20FROM\x20admin.role_access\x20ra\x0a\x20\x20\x20\x20\x20\x20LEFT\x20JOIN\x20admin.user_roles\x20ur\x20ON\x20ur.role_id\x20=\x20ra.role_id\x0a\x20\x20\x20\x20\x20\x20CROSS\x20JOIN\x20LATERAL\x20unnest(COALESCE(ra.actions,\x20\x27{}\x27::text[]))\x20AS\x20action\x0a\x20\x20\x20\x20\x20\x20WHERE\x20ra.user_uid\x20=\x20$1\x20OR\x20ur.user_uid\x20=\x20$1\x0a\x20\x20\x20\x20','permission','2QplUdJ','665900fnwyFX','12cXQias','56JytlyC','60zjAVPE','6121344xuKXdv','1188712VuejXq','5766630UPQhjj','5mpZzQp','query','map','117DmmMsx','865168vdxbNd','13907259gMeBSj','rows'];_0x8a59=function(){return _0x283b61;};return _0x8a59();}export async function getUserPermissions(_0x4a2bae,_0x44b9cb){const _0x285059=_0x548a,_0x1c11b8=await _0x44b9cb['pg'][_0x285059(0x1fc)](_0x285059(0x1f1),[_0x4a2bae]);return _0x1c11b8[_0x285059(0x1ef)][_0x285059(0x1fd)](_0x4adb9c=>_0x4adb9c[_0x285059(0x1f2)]);}
@@ -1,5 +1,9 @@
1
1
  export * from "./auth.types.js";
2
2
  import { type FastifyInstance } from "fastify";
3
3
  import { type ContextDependencies } from "../../context.js";
4
+ export * from "./verifyUser.js";
5
+ export * from "./get-user-permissions.js";
6
+ export declare function hashPassword(password: string): Promise<string>;
7
+ export declare function verifyPassword(password: string, stored: string): Promise<boolean>;
4
8
  export declare function createSessionStore(app: FastifyInstance, ctx: ContextDependencies): Promise<void>;
5
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,mBAAmB,iBAsCzB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAUhC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAE1C,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKpE;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,mBAAmB,iBA6CzB"}
@@ -1 +1 @@
1
- function _0x3648(){const _0x19ab59=['auth','parseOptions','database','registerUserSerializer','20qzaVvP','9HCRZPZ','secret','3239112mWCaLV','295888bmFVTV','Missing\x20config\x20or\x20redis\x20-\x20skipping\x20session\x20store\x20creation','warn','3233659PENERF','FMsnF','DBOpG','ctfic','760458dzPhcF','6AEdYAp','1561872EAhlXS','test','user','1204820GkjwGT','cookieOptions','secureSession','cookieName','register','5oETPwn','24HiGatW','10289146swcWMu','registerUserDeserializer','initialize'];_0x3648=function(){return _0x19ab59;};return _0x3648();}(function(_0x583b26,_0x5b8ba6){const _0x53c1c7=_0x20f0,_0x4c6899=_0x583b26();while(!![]){try{const _0x12073b=parseInt(_0x53c1c7(0xac))/0x1*(-parseInt(_0x53c1c7(0xb9))/0x2)+parseInt(_0x53c1c7(0xc1))/0x3*(parseInt(_0x53c1c7(0xb8))/0x4)+parseInt(_0x53c1c7(0xb5))/0x5*(parseInt(_0x53c1c7(0xc0))/0x6)+-parseInt(_0x53c1c7(0xae))/0x7+parseInt(_0x53c1c7(0xc2))/0x8+-parseInt(_0x53c1c7(0xb6))/0x9*(-parseInt(_0x53c1c7(0xc5))/0xa)+-parseInt(_0x53c1c7(0xbc))/0xb*(-parseInt(_0x53c1c7(0xad))/0xc);if(_0x12073b===_0x5b8ba6)break;else _0x4c6899['push'](_0x4c6899['shift']());}catch(_0x132eca){_0x4c6899['push'](_0x4c6899['shift']());}}}(_0x3648,0xc8568));function _0x20f0(_0x2f529e,_0x34accd){_0x2f529e=_0x2f529e-0xac;const _0x3648a2=_0x3648();let _0x20f00f=_0x3648a2[_0x2f529e];return _0x20f00f;}export*from'./auth.types.js';import _0x4170dc from'@fastify/cookie';import _0x117378 from'@fastify/session';import{Authenticator}from'@fastify/passport';import _0x2a9c6d from'fastify-session-redis-store';const fastifyPassport=new Authenticator();export async function createSessionStore(_0x101a4a,_0x30b1ec){const _0x28dc4c=_0x20f0,_0x1c77b1={};_0x1c77b1[_0x28dc4c(0xbe)]=function(_0x1a3a8c,_0x3ed1af){return _0x1a3a8c||_0x3ed1af;},_0x1c77b1[_0x28dc4c(0xbd)]=function(_0x26af57,_0x4a481a){return _0x26af57===_0x4a481a;},_0x1c77b1[_0x28dc4c(0xbf)]=_0x28dc4c(0xc3);const _0x3d7365=_0x1c77b1,{config:_0x53d17b,redis:_0x2bd5f5}=_0x30b1ec;if(_0x3d7365[_0x28dc4c(0xbe)](!_0x53d17b,!_0x2bd5f5)){console[_0x28dc4c(0xbb)](_0x28dc4c(0xba));return;}if(_0x3d7365[_0x28dc4c(0xbd)](process.env.NODE_ENV,_0x3d7365[_0x28dc4c(0xbf)])||process.env.VITEST)return;const _0x4e65cc={};_0x4e65cc[_0x28dc4c(0xb2)]=_0x53d17b[_0x28dc4c(0xb1)][_0x28dc4c(0xc6)],await _0x101a4a[_0x28dc4c(0xc9)](_0x4170dc,_0x4e65cc),await _0x101a4a[_0x28dc4c(0xc9)](_0x117378,{'secret':_0x53d17b[_0x28dc4c(0xb1)][_0x28dc4c(0xb7)],'cookieName':_0x53d17b[_0x28dc4c(0xb1)][_0x28dc4c(0xc8)],'cookie':_0x53d17b[_0x28dc4c(0xb1)][_0x28dc4c(0xc6)],'store':new _0x2a9c6d({'prefix':_0x53d17b[_0x28dc4c(0xb1)][_0x28dc4c(0xc8)]+':'+(_0x53d17b['pg']?.[_0x28dc4c(0xb3)]||'db')+':','client':_0x2bd5f5})}),await _0x101a4a[_0x28dc4c(0xc9)](fastifyPassport[_0x28dc4c(0xb0)]()),await _0x101a4a[_0x28dc4c(0xc9)](fastifyPassport[_0x28dc4c(0xc7)]()),fastifyPassport[_0x28dc4c(0xb4)](async _0x9cca8a=>({'user':_0x9cca8a})),fastifyPassport[_0x28dc4c(0xaf)](async _0x5dda65=>_0x5dda65?.[_0x28dc4c(0xc4)]||_0x5dda65);}
1
+ (function(_0x797def,_0x33f89f){const _0x3cc2e1=_0x4049,_0x594485=_0x797def();while(!![]){try{const _0x260309=-parseInt(_0x3cc2e1(0x1d5))/0x1*(-parseInt(_0x3cc2e1(0x1d9))/0x2)+parseInt(_0x3cc2e1(0x1bf))/0x3*(parseInt(_0x3cc2e1(0x1c2))/0x4)+parseInt(_0x3cc2e1(0x1ca))/0x5*(parseInt(_0x3cc2e1(0x1ce))/0x6)+parseInt(_0x3cc2e1(0x1cc))/0x7+-parseInt(_0x3cc2e1(0x1b4))/0x8+parseInt(_0x3cc2e1(0x1cd))/0x9*(parseInt(_0x3cc2e1(0x1d0))/0xa)+parseInt(_0x3cc2e1(0x1b6))/0xb*(-parseInt(_0x3cc2e1(0x1bb))/0xc);if(_0x260309===_0x33f89f)break;else _0x594485['push'](_0x594485['shift']());}catch(_0x1a2b02){_0x594485['push'](_0x594485['shift']());}}}(_0x466b,0x4f280));export*from'./auth.types.js';import{randomBytes,scrypt as _0x5677bc,timingSafeEqual}from'node:crypto';import{promisify}from'node:util';const scrypt=promisify(_0x5677bc);import _0x26d3c1 from'@fastify/cookie';import _0x15f004 from'@fastify/session';function _0x466b(){const _0x6dd4fd=['scrypt$','split','97700EgJyKu','register','ibGJA','BHzCy','permissions','registerUserDeserializer','secret','5083952cXSTfi','from','451TZSjDk','warn','toString','user','qRvLG','174396hbAwDK','Missing\x20config\x20or\x20redis\x20-\x20skipping\x20session\x20store\x20creation','cookieName','length','186JrJRul','initialize','HKkif','21592EyYnuy','secureSession','hex','qxwsJ','database','test','KiKFh','registerUserSerializer','111890SsBlTn','HXoXJ','2496410mXHJvd','1561221fPtqNn','66tvlUlD','ZJlqL','30jFNeGM','auth','cookieOptions','parseOptions','yuQKS','2BrZOtZ','scrypt'];_0x466b=function(){return _0x6dd4fd;};return _0x466b();}import{Authenticator}from'@fastify/passport';import _0x3ad01c from'fastify-session-redis-store';import{getUserPermissions}from'./get-user-permissions.js';function _0x4049(_0x4820ff,_0xba4116){_0x4820ff=_0x4820ff-0x1af;const _0x466b81=_0x466b();let _0x40490b=_0x466b81[_0x4820ff];return _0x40490b;}const fastifyPassport=new Authenticator();export*from'./verifyUser.js';export*from'./get-user-permissions.js';export async function hashPassword(_0x37615e){const _0x24142f=_0x4049,_0x481f27={};_0x481f27[_0x24142f(0x1cf)]=_0x24142f(0x1c4);const _0x256697=_0x481f27,_0x5f26a1=randomBytes(0x10),_0x598fcd=await scrypt(_0x37615e,_0x5f26a1,0x40);return _0x24142f(0x1d7)+_0x5f26a1[_0x24142f(0x1b8)](_0x256697[_0x24142f(0x1cf)])+'$'+_0x598fcd[_0x24142f(0x1b8)](_0x24142f(0x1c4));}export async function verifyPassword(_0x5852b9,_0x422409){const _0x40532a=_0x4049,_0x4a83e7={'HKkif':function(_0x16f51b,_0x8340ef){return _0x16f51b!==_0x8340ef;},'HXoXJ':_0x40532a(0x1c4),'qRvLG':function(_0x43f964,_0x469c2e,_0x51a4bf,_0x35eda9){return _0x43f964(_0x469c2e,_0x51a4bf,_0x35eda9);},'KiKFh':function(_0x5dae23,_0xceed48,_0x567dbb){return _0x5dae23(_0xceed48,_0x567dbb);}},[_0x143c55,_0x3971f7,_0x5bece4]=_0x422409[_0x40532a(0x1d8)]('$');if(_0x4a83e7[_0x40532a(0x1c1)](_0x143c55,_0x40532a(0x1d6))||!_0x3971f7||!_0x5bece4)return![];const _0x21ae0b=Buffer[_0x40532a(0x1b5)](_0x3971f7,_0x4a83e7[_0x40532a(0x1cb)]),_0x4bef58=Buffer[_0x40532a(0x1b5)](_0x5bece4,_0x4a83e7[_0x40532a(0x1cb)]),_0x4a3518=await _0x4a83e7[_0x40532a(0x1ba)](scrypt,_0x5852b9,_0x21ae0b,_0x4bef58[_0x40532a(0x1be)]);return _0x4a83e7[_0x40532a(0x1c8)](timingSafeEqual,_0x4a3518,_0x4bef58);}export async function createSessionStore(_0x32faf1,_0x63d607){const _0x2656c9=_0x4049,_0x3dce78={'yuQKS':function(_0x52ce2b,_0x3af2a2,_0x5c0d97){return _0x52ce2b(_0x3af2a2,_0x5c0d97);},'ibGJA':function(_0x30d941,_0x392209){return _0x30d941||_0x392209;},'qxwsJ':_0x2656c9(0x1bc),'BHzCy':_0x2656c9(0x1c7)},{config:_0x40e10f,redis:_0x2aab68}=_0x63d607;if(_0x3dce78[_0x2656c9(0x1af)](!_0x40e10f,!_0x2aab68)){console[_0x2656c9(0x1b7)](_0x3dce78[_0x2656c9(0x1c5)]);return;}if(process.env.NODE_ENV===_0x3dce78[_0x2656c9(0x1b0)]||process.env.VITEST)return;const _0xbd1249={};_0xbd1249[_0x2656c9(0x1d3)]=_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1d2)],await _0x32faf1[_0x2656c9(0x1da)](_0x26d3c1,_0xbd1249),await _0x32faf1[_0x2656c9(0x1da)](_0x15f004,{'secret':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1b3)],'cookieName':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1bd)],'cookie':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1d2)],'store':new _0x3ad01c({'prefix':_0x40e10f[_0x2656c9(0x1d1)][_0x2656c9(0x1bd)]+':'+(_0x40e10f['pg']?.[_0x2656c9(0x1c6)]||'db')+':','client':_0x2aab68})}),await _0x32faf1[_0x2656c9(0x1da)](fastifyPassport[_0x2656c9(0x1c0)]()),await _0x32faf1[_0x2656c9(0x1da)](fastifyPassport[_0x2656c9(0x1c3)]()),fastifyPassport[_0x2656c9(0x1c9)](async _0x593006=>({'user':_0x593006})),fastifyPassport[_0x2656c9(0x1b2)](async _0x5abe35=>{const _0x5b208b=_0x2656c9,_0x4ab90a=_0x5abe35?.[_0x5b208b(0x1b9)]||_0x5abe35;return _0x4ab90a?.['id']&&(_0x4ab90a[_0x5b208b(0x1b1)]=await _0x3dce78[_0x5b208b(0x1d4)](getUserPermissions,_0x4ab90a['id'],_0x63d607)),_0x4ab90a;});}
@@ -0,0 +1,9 @@
1
+ import { ContextDependencies } from "../../context.js";
2
+ type params = {
3
+ user: string;
4
+ password: string;
5
+ ip?: string;
6
+ };
7
+ export declare function verifyUser({ user, password, ip, }: params, { pg, logger }: Pick<ContextDependencies, "pg" | "logger">): Promise<import("./auth.types.js").AuthUser>;
8
+ export {};
9
+ //# sourceMappingURL=verifyUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyUser.d.ts","sourceRoot":"","sources":["../../../src/plugins/auth/verifyUser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAQ,MAAM,kBAAkB,CAAC;AAI7D,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAsB,UAAU,CAC9B,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,EAC/B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,QAAQ,CAAC,+CAgC3D"}
@@ -0,0 +1 @@
1
+ (function(_0x58059a,_0x2074dd){const _0x479d40=_0x4e11,_0x527589=_0x58059a();while(!![]){try{const _0x34e10c=-parseInt(_0x479d40(0x139))/0x1+-parseInt(_0x479d40(0x14a))/0x2*(-parseInt(_0x479d40(0x140))/0x3)+-parseInt(_0x479d40(0x13a))/0x4*(parseInt(_0x479d40(0x136))/0x5)+-parseInt(_0x479d40(0x14c))/0x6*(parseInt(_0x479d40(0x12d))/0x7)+parseInt(_0x479d40(0x141))/0x8*(parseInt(_0x479d40(0x130))/0x9)+-parseInt(_0x479d40(0x14f))/0xa*(parseInt(_0x479d40(0x13d))/0xb)+parseInt(_0x479d40(0x144))/0xc;if(_0x34e10c===_0x2074dd)break;else _0x527589['push'](_0x527589['shift']());}catch(_0x4b274c){_0x527589['push'](_0x527589['shift']());}}}(_0x5274,0x1a50a));import{BadRequestError}from'../../errors.js';function _0x4e11(_0x50714b,_0x479c4e){_0x50714b=_0x50714b-0x12d;const _0x5274f3=_0x5274();let _0x4e11cb=_0x5274f3[_0x50714b];return _0x4e11cb;}import{verifyPassword}from'./index.js';function _0x5274(){const _0x35d55e=['162PaPyzH','1816ZeMMtP','error','rows','1757952GusGuC','jeJml','auth/warn','user','then','query','5462OaUGbe','info','73806YmiYBy','not\x20enough\x20params:\x20user','user\x20not\x20found','30usjSFS','91EEajKH','IQtti','password_hash','8298QWKGId','select\x20uid\x20as\x20id,\x20user_type\x20as\x20type,\x20password_hash,\x20twofa\x20from\x20admin.users\x20where\x20$1\x20in\x20(login,email,phone)\x20and\x20enabled\x20limit\x201','rAuRl','qAISz','Wrong\x20password','not\x20enough\x20params:\x20password','2435hMOpbA','file','Xpybb','69855xQwCvv','740yszEUQ','user.login','MlauL','277255QDlZvb','metrics','TnZkB'];_0x5274=function(){return _0x35d55e;};return _0x5274();}export async function verifyUser({user:_0x391424,password:_0x162049,ip:_0x123b0f},{pg:_0x5048bb,logger:_0x49e37b}){const _0x5de9e1=_0x4e11,_0x5a7b9c={'jeJml':function(_0x162f28,_0x23ec79){return _0x162f28===_0x23ec79;},'TnZkB':_0x5de9e1(0x135),'rAuRl':_0x5de9e1(0x13b),'IQtti':_0x5de9e1(0x14e),'qAISz':_0x5de9e1(0x146),'Xpybb':function(_0x283b70,_0x3bd6be,_0x2c495e){return _0x283b70(_0x3bd6be,_0x2c495e);},'MlauL':_0x5de9e1(0x134)};if(!_0x391424||_0x5a7b9c[_0x5de9e1(0x145)](_0x391424,''))throw new BadRequestError(_0x5de9e1(0x14d));if(!_0x162049||_0x5a7b9c[_0x5de9e1(0x145)](_0x162049,''))throw new BadRequestError(_0x5a7b9c[_0x5de9e1(0x13f)]);_0x49e37b[_0x5de9e1(0x13e)](_0x5a7b9c[_0x5de9e1(0x132)]);const _0x19f4dc=_0x5de9e1(0x131),_0x5832c1=await _0x5048bb[_0x5de9e1(0x149)](_0x19f4dc,[_0x391424])[_0x5de9e1(0x148)](_0x5b648a=>_0x5b648a[_0x5de9e1(0x143)]?.[0x0]);if(!_0x5832c1){const _0x2c1300=_0x5a7b9c[_0x5de9e1(0x12e)],_0x5f5201={};_0x5f5201[_0x5de9e1(0x137)]=_0x5a7b9c[_0x5de9e1(0x133)],_0x5f5201[_0x5de9e1(0x142)]=_0x2c1300,_0x5f5201[_0x5de9e1(0x147)]=_0x391424,_0x5f5201['ip']=_0x123b0f,_0x49e37b[_0x5de9e1(0x14b)](_0x5f5201);throw new BadRequestError(_0x2c1300);}const _0x11be3b=await _0x5a7b9c[_0x5de9e1(0x138)](verifyPassword,_0x162049,_0x5832c1[_0x5de9e1(0x12f)]);if(!_0x11be3b){const _0x295a41=_0x5a7b9c[_0x5de9e1(0x13c)],_0x1ee9be={};_0x1ee9be[_0x5de9e1(0x137)]=_0x5a7b9c[_0x5de9e1(0x133)],_0x1ee9be[_0x5de9e1(0x142)]=_0x295a41,_0x1ee9be[_0x5de9e1(0x147)]=_0x391424,_0x1ee9be['ip']=_0x123b0f,_0x49e37b[_0x5de9e1(0x14b)](_0x1ee9be);throw new BadRequestError(_0x295a41);}return delete _0x5832c1[_0x5de9e1(0x12f)],_0x5832c1;}
@@ -1 +1 @@
1
- (function(_0x290b48,_0x360b81){const _0x36b07f=_0x3c65,_0x59fc85=_0x290b48();while(!![]){try{const _0x34932e=parseInt(_0x36b07f(0x242))/0x1*(parseInt(_0x36b07f(0x1f2))/0x2)+-parseInt(_0x36b07f(0x252))/0x3+-parseInt(_0x36b07f(0x220))/0x4+parseInt(_0x36b07f(0x214))/0x5*(parseInt(_0x36b07f(0x23b))/0x6)+-parseInt(_0x36b07f(0x236))/0x7+-parseInt(_0x36b07f(0x253))/0x8+-parseInt(_0x36b07f(0x21d))/0x9;if(_0x34932e===_0x360b81)break;else _0x59fc85['push'](_0x59fc85['shift']());}catch(_0x3ff6e0){_0x59fc85['push'](_0x59fc85['shift']());}}}(_0x1373,0xe46d4));function _0x1373(){const _0x4e8e8b=['XJtjW','hwdTC','then','SAWfc','6bbAPXi','Invalid\x20dictionary\x20items:\x20','Dictionary\x20table\x20not\x20found','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20di.id,\x20di.code,\x20di.name,\x20di.parent_id\x20AS\x20\x22parentId\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionary_items\x20di\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JOIN\x20admin.dictionaries\x20d\x20ON\x20d.id\x20=\x20di.dictionary_id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20d.code\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20di.name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','oTFWm','baElX','release','1219KMghCM','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionary_items\x20(dictionary_id,\x20code,\x20name,\x20parent_id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Invalid\x20dictionary\x20name:\x20','Dictionary\x20not\x20found:\x20','TMKbm','length','kbKTo','DELETE\x20FROM\x20admin.dictionary_items\x20WHERE\x20dictionary_id\x20=\x20$1','Kuane','code','QfmEk','ZPrig','gzuxQ','dCZHP','get','uloPV','3747840dOMRKf','105776JolZyb','LSulM','YMrPG','table_name','nhqXi','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20code,\x20name,\x20\x27database\x27\x20AS\x20source\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionaries\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','cKXRN','connect','LLDgN','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionaries\x20(code,\x20name,\x20module,\x20source,\x20editable)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(code)\x20DO\x20UPDATE\x20SET\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name\x20=\x20EXCLUDED.name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module\x20=\x20EXCLUDED.module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20source\x20=\x20EXCLUDED.source,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20editable\x20=\x20EXCLUDED.editable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2914jgUoSa','JDkOy','VyKDe','XTpag','BEGIN','SQylw','items','ikEpN','name','mrdDr','test','jgAmF','empty\x20pg','ROLLBACK','punDe','Jvxuo','fcore','PYskT','list','isArray','map','zMrhW','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20\x27dictionaries\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x201\x0a\x20\x20\x20\x20\x20\x20\x20\x20','TsaII','aOEmD','register','push','delete','clear','ZOURG','YRJUq','set','AurCr','yNKon','8411695FQstLJ','static','IFvyR','database','rows','dictionaries','FeUEh','znrAz','has','4776750iWdrsP','values','zGFiN','1586236nqGulV','YlDuf','parentId','put','TbSUE','Dictionary\x20already\x20registered:\x20','CFoUE','COMMIT','KgZON','hFFcr','fDVGi','fpSKO','tQXpZ','HanWr','aXYXP','Bcufb','Dictionary\x20items\x20must\x20be\x20an\x20array','custom','qnjvr','jYwBY','DCWAv','query','2330825UYFJYU'];_0x1373=function(){return _0x4e8e8b;};return _0x1373();}import{ConflictError,NotFoundError,ValidationError}from'../errors.js';const dictionaryName=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;function _0x3c65(_0x431639,_0x121a1a){_0x431639=_0x431639-0x1ee;const _0x1373b2=_0x1373();let _0x3c65f1=_0x1373b2[_0x431639];return _0x3c65f1;}export function createDictionary({pg:_0x4c6ac4,dictionaries:dictionaries=[]}){const _0x30e554=_0x3c65,_0x234d50={'KgZON':_0x30e554(0x1fe),'yNKon':function(_0x2788aa,_0x16aa52){return _0x2788aa===_0x16aa52;},'SQylw':_0x30e554(0x219),'DCWAv':function(_0x7a40d9,_0x17d319){return _0x7a40d9!==_0x17d319;},'fpSKO':_0x30e554(0x207),'CFoUE':_0x30e554(0x1f3),'YlDuf':_0x30e554(0x24a),'qnjvr':_0x30e554(0x215),'ikEpN':function(_0x57dd2e,_0x153bd8){return _0x57dd2e(_0x153bd8);},'mrdDr':function(_0x123100,_0x1b95b4){return _0x123100===_0x1b95b4;},'QfmEk':_0x30e554(0x1f4),'aXYXP':_0x30e554(0x23d),'gzuxQ':_0x30e554(0x1fd),'YRJUq':_0x30e554(0x217),'IFvyR':function(_0x1c5e03,_0x88ee6c){return _0x1c5e03(_0x88ee6c);},'ZPrig':function(_0x2c19dd,_0x4c8b0d){return _0x2c19dd(_0x4c8b0d);},'XJtjW':_0x30e554(0x238),'SAWfc':_0x30e554(0x257),'ZOURG':function(_0x9b91ef){return _0x9b91ef();},'jYwBY':_0x30e554(0x1f6),'fDVGi':_0x30e554(0x231),'kbKTo':_0x30e554(0x249),'cKXRN':_0x30e554(0x1f0),'uloPV':_0x30e554(0x227),'TMKbm':_0x30e554(0x21b),'oTFWm':_0x30e554(0x240),'PYskT':_0x30e554(0x1ff),'LSulM':_0x30e554(0x229),'Jvxuo':function(_0x2d2c58,_0x139bff){return _0x2d2c58(_0x139bff);},'FeUEh':_0x30e554(0x224),'HanWr':function(_0x3390e1,_0x55a261){return _0x3390e1!==_0x55a261;},'TsaII':_0x30e554(0x20a),'punDe':_0x30e554(0x212),'Bcufb':function(_0x375578,_0x3798a9){return _0x375578(_0x3798a9);}},_0x39d76f=new Map();let _0x89fc01,_0x23efbc;async function _0x29dc85(){const _0x45737c=_0x30e554,_0x51990b={'XTpag':_0x234d50[_0x45737c(0x228)],'zGFiN':function(_0x5209e7,_0x369b3f){const _0x4d5e5a=_0x45737c;return _0x234d50[_0x4d5e5a(0x213)](_0x5209e7,_0x369b3f);},'YMrPG':_0x234d50[_0x45737c(0x1f7)]};if(_0x234d50[_0x45737c(0x234)](_0x89fc01,undefined)){if(_0x234d50[_0x45737c(0x22b)]!==_0x234d50[_0x45737c(0x22b)])throw new _0x18d855(_0x51990b[_0x45737c(0x1f5)]);else return _0x89fc01;}if(!_0x4c6ac4)throw new Error(_0x45737c(0x1fe));return _0x23efbc??=_0x4c6ac4[_0x45737c(0x235)](_0x45737c(0x208))[_0x45737c(0x239)](_0x42c8a5=>{const _0x3205f1=_0x45737c,_0x1e80ae=_0x42c8a5[_0x3205f1(0x218)][0x0]?.[_0x3205f1(0x256)];_0x89fc01=_0x51990b[_0x3205f1(0x21f)](_0x1e80ae,_0x51990b[_0x3205f1(0x255)])?_0x1e80ae:null;}),await _0x23efbc,_0x89fc01;}function _0x41aa40(_0x558543){const _0x4c2cb2=_0x30e554,_0x5b00ac={};_0x5b00ac[_0x4c2cb2(0x22c)]=_0x4c2cb2(0x1fe);const _0x313553=_0x5b00ac;if(!dictionaryName[_0x4c2cb2(0x1fc)](_0x558543)){if(_0x234d50[_0x4c2cb2(0x234)](_0x234d50[_0x4c2cb2(0x226)],_0x234d50[_0x4c2cb2(0x226)]))throw new _0x3fc7cb(_0x313553[_0x4c2cb2(0x22c)]);else throw new ValidationError(_0x4c2cb2(0x244)+_0x558543);}}function _0x34f8cd(_0x4e9ae1){const _0x4d6417=_0x30e554;for(const _0x1f148c of Array[_0x4d6417(0x205)](_0x4e9ae1)?_0x4e9ae1:[_0x4e9ae1]){_0x41aa40(_0x1f148c[_0x4d6417(0x24b)]);if(!Array[_0x4d6417(0x205)](_0x1f148c[_0x4d6417(0x1f8)])){if(_0x234d50[_0x4d6417(0x221)]===_0x4d6417(0x24a))throw new ValidationError(_0x4d6417(0x23c)+_0x1f148c[_0x4d6417(0x24b)]);else throw new _0xdedf33(_0x4d6417(0x245)+_0xcb0e87);}if(_0x39d76f[_0x4d6417(0x21c)](_0x1f148c[_0x4d6417(0x24b)]))throw new ConflictError(_0x4d6417(0x225)+_0x1f148c[_0x4d6417(0x24b)]);_0x39d76f[_0x4d6417(0x211)](_0x1f148c[_0x4d6417(0x24b)],{..._0x1f148c,'source':_0x234d50[_0x4d6417(0x232)]});}}async function _0x3437aa(_0x4640a4){const _0x5bbbbb=_0x30e554;_0x234d50[_0x5bbbbb(0x1f9)](_0x41aa40,_0x4640a4);const _0x10d133=_0x39d76f[_0x5bbbbb(0x250)](_0x4640a4);if(_0x10d133)return _0x10d133[_0x5bbbbb(0x1f8)];const _0x4f890d=await _0x29dc85();if(!_0x4f890d){if(_0x234d50[_0x5bbbbb(0x1fb)](_0x234d50[_0x5bbbbb(0x24c)],_0x234d50[_0x5bbbbb(0x24c)]))throw new NotFoundError(_0x234d50[_0x5bbbbb(0x22e)]);else{const _0x2523f9=_0x148fed[_0x5bbbbb(0x218)][0x0]?.[_0x5bbbbb(0x256)];_0x2a4525=_0x2523f9===_0x5bbbbb(0x219)?_0x2523f9:null;}}if(!_0x4c6ac4){if(_0x234d50[_0x5bbbbb(0x213)](_0x234d50[_0x5bbbbb(0x24e)],_0x5bbbbb(0x1fd)))throw new Error(_0x5bbbbb(0x1fe));else!_0x37a20a[_0x5bbbbb(0x21c)](_0x3251d1[_0x5bbbbb(0x24b)])&&_0x1a05f3[_0x5bbbbb(0x20c)](_0x2138f9);}const _0x4ef481=await _0x4c6ac4[_0x5bbbbb(0x235)](_0x5bbbbb(0x23e),[_0x4640a4]);if(!_0x4ef481[_0x5bbbbb(0x218)][_0x5bbbbb(0x247)])throw new NotFoundError(_0x5bbbbb(0x245)+_0x4640a4);const _0x267ac0=_0x4ef481[_0x5bbbbb(0x218)];return _0x39d76f[_0x5bbbbb(0x211)](_0x4640a4,{'code':_0x4640a4,'name':_0x4640a4,'items':_0x267ac0,'source':_0x234d50[_0x5bbbbb(0x210)]}),_0x267ac0;}async function _0x20c30d(_0x396f3b,_0x583b2e){const _0x58a431=_0x30e554;_0x234d50[_0x58a431(0x24d)](_0x41aa40,_0x396f3b);if(!Array[_0x58a431(0x205)](_0x583b2e)){if(_0x234d50[_0x58a431(0x237)]!==_0x234d50[_0x58a431(0x23a)])throw new ValidationError(_0x58a431(0x230));else throw new _0x2ec4b2(_0x234d50[_0x58a431(0x22e)]);}const _0x4f4929=await _0x234d50[_0x58a431(0x20f)](_0x29dc85);if(!_0x4f4929)throw new NotFoundError(_0x234d50[_0x58a431(0x22e)]);if(!_0x4c6ac4)throw new Error(_0x234d50[_0x58a431(0x228)]);const _0x5f55f5=await _0x4c6ac4[_0x58a431(0x1ef)]();try{await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x233)]);const _0x454c16=await _0x5f55f5[_0x58a431(0x235)](_0x58a431(0x1f1),[_0x396f3b,_0x396f3b,_0x58a431(0x202),_0x234d50[_0x58a431(0x22a)],!![]]),_0x3d97f9=_0x454c16[_0x58a431(0x218)][0x0]['id'];await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x248)],[_0x3d97f9]);for(const _0x32fb5a of _0x583b2e){_0x234d50[_0x58a431(0x1ee)]===_0x234d50[_0x58a431(0x1ee)]?await _0x5f55f5[_0x58a431(0x235)](_0x58a431(0x243),[_0x3d97f9,_0x32fb5a[_0x58a431(0x24b)],_0x32fb5a[_0x58a431(0x1fa)],_0x32fb5a[_0x58a431(0x222)]??null]):_0xa79a6f[_0x58a431(0x241)]();}await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x251)]);}catch(_0x1e5a92){if(_0x234d50[_0x58a431(0x246)]!==_0x234d50[_0x58a431(0x23f)]){await _0x5f55f5[_0x58a431(0x235)](_0x234d50[_0x58a431(0x203)]);throw _0x1e5a92;}else return _0x5d65d7[_0x58a431(0x1f8)];}finally{if(_0x234d50[_0x58a431(0x1fb)](_0x234d50[_0x58a431(0x254)],_0x58a431(0x229)))_0x5f55f5[_0x58a431(0x241)]();else return _0x234d50[_0x58a431(0x216)](_0x15aa3f,_0x5e5ea3),_0x5da23d[_0x58a431(0x20d)](_0x5ea0d2);}_0x234d50[_0x58a431(0x201)](_0x2f74f5,_0x396f3b);}function _0x2f74f5(_0x3c2a9c){const _0x25d335=_0x30e554;return _0x234d50[_0x25d335(0x216)](_0x41aa40,_0x3c2a9c),_0x39d76f[_0x25d335(0x20d)](_0x3c2a9c);}async function _0x31e7e5(){const _0x58a313=_0x30e554;if(_0x234d50[_0x58a313(0x234)](_0x234d50[_0x58a313(0x21a)],_0x58a313(0x24f))){const _0x475686=[..._0x39d76f[_0x58a313(0x21e)]()][_0x58a313(0x206)](({code:_0x20933c,name:_0x2b9468,source:_0x1c3e3b})=>({'code':_0x20933c,'name':_0x2b9468??_0x20933c,'source':_0x1c3e3b})),_0x32d88c=await _0x234d50[_0x58a313(0x20f)](_0x29dc85);if(!_0x32d88c){if(_0x234d50[_0x58a313(0x22d)](_0x234d50[_0x58a313(0x209)],_0x234d50[_0x58a313(0x200)]))return _0x475686;else throw new _0x1920a9(_0x58a313(0x225)+_0x36ebf1[_0x58a313(0x24b)]);}if(!_0x4c6ac4)throw new Error(_0x234d50[_0x58a313(0x228)]);const _0xc4df03=await _0x4c6ac4[_0x58a313(0x235)](_0x58a313(0x258));for(const _0x30457f of _0xc4df03[_0x58a313(0x218)]){!_0x39d76f[_0x58a313(0x21c)](_0x30457f[_0x58a313(0x24b)])&&_0x475686[_0x58a313(0x20c)](_0x30457f);}return _0x475686;}else for(const _0x20930b of _0x2df3df[_0x58a313(0x205)](_0x3c7649)?_0x171b86:[_0x48c62d]){_0x234d50[_0x58a313(0x201)](_0x4269ef,_0x20930b[_0x58a313(0x24b)]);if(!_0x5f4913[_0x58a313(0x205)](_0x20930b[_0x58a313(0x1f8)]))throw new _0x2911b5(_0x58a313(0x23c)+_0x20930b[_0x58a313(0x24b)]);if(_0x54856c[_0x58a313(0x21c)](_0x20930b[_0x58a313(0x24b)]))throw new _0x49ea03(_0x58a313(0x225)+_0x20930b[_0x58a313(0x24b)]);_0x4b9f95[_0x58a313(0x211)](_0x20930b[_0x58a313(0x24b)],{..._0x20930b,'source':_0x58a313(0x215)});}}_0x234d50[_0x30e554(0x22f)](_0x34f8cd,dictionaries);const _0xda75b={};return _0xda75b[_0x30e554(0x20b)]=_0x34f8cd,_0xda75b[_0x30e554(0x250)]=_0x3437aa,_0xda75b[_0x30e554(0x223)]=_0x20c30d,_0xda75b[_0x30e554(0x20e)]=_0x2f74f5,_0xda75b[_0x30e554(0x204)]=_0x31e7e5,_0xda75b;}
1
+ (function(_0x29bbe5,_0x40888b){const _0x674b6c=_0x4266,_0x282d18=_0x29bbe5();while(!![]){try{const _0x1b293b=-parseInt(_0x674b6c(0x155))/0x1+-parseInt(_0x674b6c(0x179))/0x2+-parseInt(_0x674b6c(0x18a))/0x3+parseInt(_0x674b6c(0x189))/0x4+parseInt(_0x674b6c(0x14b))/0x5*(-parseInt(_0x674b6c(0x1ba))/0x6)+-parseInt(_0x674b6c(0x170))/0x7+parseInt(_0x674b6c(0x14f))/0x8;if(_0x1b293b===_0x40888b)break;else _0x282d18['push'](_0x282d18['shift']());}catch(_0xb41cab){_0x282d18['push'](_0x282d18['shift']());}}}(_0x2ef7,0xdc261));import{ConflictError,NotFoundError,ValidationError}from'../errors.js';function _0x2ef7(){const _0x2e4a22=['rkcUN','sNmXU','NQIeF','NgOcH','values','test','xYujU','viADQ','source','connect','iWbJO','ZCXuP','YzsIj','IiClm','has','Invalid\x20dictionary\x20name:\x20','DkSfQ','Dictionary\x20items\x20must\x20be\x20an\x20array','OKFBv','xgDBv','6JHUwWZ','Dictionary\x20not\x20found:\x20','DRSUO','NPuWH','rpKbz','TOfzb','DyEBT','rows','parentId','sjnLr','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_schema\x20=\x20\x27admin\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20\x27dictionaries\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x201\x0a\x20\x20\x20\x20\x20\x20\x20\x20','put','Dictionary\x20already\x20registered:\x20','xAqqR','xszQr','DBApu','Dictionary\x20table\x20not\x20found','wVpLr','3517550NFdTGg','twXXd','DELETE\x20FROM\x20admin.dictionary_items\x20WHERE\x20dictionary_id\x20=\x20$1','mIlrf','47221952hlIKNZ','CTjlh','yQKOX','eWGda','code','GvdfO','1298398kBUvya','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20di.id,\x20di.code,\x20di.name,\x20di.parent_id\x20AS\x20\x22parentId\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionary_items\x20di\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JOIN\x20admin.dictionaries\x20d\x20ON\x20d.id\x20=\x20di.dictionary_id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20d.code\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20di.name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','dictionaries','zekBw','LLIBa','hzoqD','ROLLBACK','zvNvb','map','eRVxK','IrWfY','XiKzh','Invalid\x20dictionary\x20items:\x20','gLWJX','COMMIT','vqamN','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionary_items\x20(dictionary_id,\x20code,\x20name,\x20parent_id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','PquLL','delete','rWiPp','nJPND','then','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.dictionaries\x20(code,\x20name,\x20module,\x20source,\x20editable)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20CONFLICT\x20(code)\x20DO\x20UPDATE\x20SET\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name\x20=\x20EXCLUDED.name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20module\x20=\x20EXCLUDED.module,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20source\x20=\x20EXCLUDED.source,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20editable\x20=\x20EXCLUDED.editable,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updated_at\x20=\x20now()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty\x20pg','ucGkO','ZmimF','LXDoJ','4545275LElLcM','opDxk','hKmmY','list','SEYVY','wTGtu','QWpav','mFAbi','PXoOa','2575082cRXUIu','table_name','query','fcore','HOklT','ZfRgp','AnEQD','DzqQS','JmmpW','oWKaC','jPLow','custom','ZoYAg','ZpcTl','BEGIN','get','1739628tkPgkh','4491444iBFBLg','static','ebmBs','TyGwy','hJAim','release','push','YAtsM','register','lbkBk','items','QBWVC','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20code,\x20name,\x20\x27database\x27\x20AS\x20source\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.dictionaries\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20name\x0a\x20\x20\x20\x20\x20\x20\x20\x20','QsZdi','isArray','clear','xqODo','UniMA','set','WncPX','eqdnd','database','jChAu','KdcNT','gOnmG','length','name','dkwOU'];_0x2ef7=function(){return _0x2e4a22;};return _0x2ef7();}function _0x4266(_0x3fbeef,_0x14169f){_0x3fbeef=_0x3fbeef-0x147;const _0x2ef7b7=_0x2ef7();let _0x426668=_0x2ef7b7[_0x3fbeef];return _0x426668;}const dictionaryName=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;export function createDictionary({pg:_0x46918f,dictionaries:dictionaries=[]}){const _0x25cf0c=_0x4266,_0x33c57e={'IrWfY':_0x25cf0c(0x16c),'HOklT':function(_0x1e3dda,_0x2ee71b){return _0x1e3dda===_0x2ee71b;},'QWpav':function(_0x546ba0,_0x402ded){return _0x546ba0===_0x402ded;},'UniMA':_0x25cf0c(0x16e),'rkcUN':function(_0x519a7f,_0x33a6f6){return _0x519a7f===_0x33a6f6;},'hzoqD':_0x25cf0c(0x157),'xqODo':function(_0x38ee94,_0x4fea47){return _0x38ee94!==_0x4fea47;},'YzsIj':_0x25cf0c(0x154),'JmmpW':function(_0x2d2075,_0xc4ffd2){return _0x2d2075!==_0xc4ffd2;},'lbkBk':_0x25cf0c(0x150),'xAqqR':_0x25cf0c(0x149),'zvNvb':function(_0x18efd2,_0x45bba9){return _0x18efd2===_0x45bba9;},'LXDoJ':_0x25cf0c(0x15e),'rWiPp':_0x25cf0c(0x174),'sjnLr':_0x25cf0c(0x1c0),'QsZdi':function(_0x6b740e,_0x4a3e69){return _0x6b740e!==_0x4a3e69;},'OKFBv':_0x25cf0c(0x186),'IiClm':_0x25cf0c(0x16d),'PquLL':function(_0x209efb,_0x3c495e){return _0x209efb!==_0x3c495e;},'viADQ':_0x25cf0c(0x1a8),'jChAu':_0x25cf0c(0x183),'mIlrf':_0x25cf0c(0x19e),'opDxk':_0x25cf0c(0x1ac),'mFAbi':function(_0x2f6cf0){return _0x2f6cf0();},'YAtsM':_0x25cf0c(0x172),'ZfRgp':_0x25cf0c(0x19f),'dkwOU':_0x25cf0c(0x1b7),'WncPX':function(_0x22c786,_0x48efb3){return _0x22c786(_0x48efb3);},'iWbJO':function(_0x5f2d89,_0x48ab53){return _0x5f2d89!==_0x48ab53;},'TyGwy':_0x25cf0c(0x1bc),'gOnmG':_0x25cf0c(0x178),'DzqQS':function(_0x439e0e){return _0x439e0e();},'ZCXuP':_0x25cf0c(0x187),'KdcNT':_0x25cf0c(0x17c),'gLWJX':_0x25cf0c(0x14d),'TOfzb':function(_0x49b051,_0x242fbb){return _0x49b051===_0x242fbb;},'NgOcH':_0x25cf0c(0x148),'eWGda':_0x25cf0c(0x15b),'NPuWH':function(_0x40b09e,_0x35b45a){return _0x40b09e===_0x35b45a;},'twXXd':_0x25cf0c(0x158),'sNmXU':function(_0xfb3afa,_0x3e115f){return _0xfb3afa(_0x3e115f);},'nJPND':function(_0x2fdf4a,_0x5cc0f3){return _0x2fdf4a(_0x5cc0f3);},'ebmBs':_0x25cf0c(0x18b),'oWKaC':function(_0x53dc18){return _0x53dc18();},'QBWVC':function(_0x3f92fc,_0x4a6542){return _0x3f92fc===_0x4a6542;},'LLIBa':_0x25cf0c(0x164),'xszQr':_0x25cf0c(0x151)},_0x2a6dcc=new Map();let _0x2b431e,_0x49c23c;async function _0x2e6e89(){const _0x402c4f=_0x25cf0c;if(_0x33c57e[_0x402c4f(0x19a)](_0x33c57e[_0x402c4f(0x1b2)],_0x33c57e[_0x402c4f(0x1b2)]))return _0x4d205a[_0x402c4f(0x194)];else{if(_0x33c57e[_0x402c4f(0x19a)](_0x2b431e,undefined)){if(_0x33c57e[_0x402c4f(0x181)](_0x33c57e[_0x402c4f(0x193)],_0x402c4f(0x1be)))return _0x2b431e;else throw new _0x5c9044(_0x33c57e[_0x402c4f(0x15f)]);}if(!_0x46918f)throw new Error(_0x33c57e[_0x402c4f(0x15f)]);return _0x49c23c??=_0x46918f[_0x402c4f(0x17b)](_0x402c4f(0x1c4))[_0x402c4f(0x16a)](_0x2f73cb=>{const _0x1fc919=_0x402c4f,_0x2b0f8e={'hJAim':function(_0x2fa94a,_0x387756){const _0x5adf82=_0x4266;return _0x33c57e[_0x5adf82(0x17d)](_0x2fa94a,_0x387756);}};if(_0x33c57e[_0x1fc919(0x176)](_0x33c57e[_0x1fc919(0x19b)],_0x33c57e[_0x1fc919(0x19b)])){const _0x120d2a=_0x2f73cb[_0x1fc919(0x1c1)][0x0]?.[_0x1fc919(0x17a)];_0x2b431e=_0x33c57e[_0x1fc919(0x1a6)](_0x120d2a,_0x33c57e[_0x1fc919(0x15a)])?_0x120d2a:null;}else{const _0x2caade=_0x56400c[_0x1fc919(0x1c1)][0x0]?.[_0x1fc919(0x17a)];_0x3f8ecf=_0x2b0f8e[_0x1fc919(0x18e)](_0x2caade,_0x1fc919(0x157))?_0x2caade:null;}}),await _0x49c23c,_0x2b431e;}}function _0x173d99(_0x225064){const _0x48de7f=_0x25cf0c;if(_0x33c57e[_0x48de7f(0x15c)](_0x48de7f(0x175),_0x33c57e[_0x48de7f(0x16f)]))throw new _0x147c8f(_0x33c57e[_0x48de7f(0x1c7)]);else{if(!dictionaryName[_0x48de7f(0x1ab)](_0x225064)){if(_0x33c57e[_0x48de7f(0x15c)](_0x33c57e[_0x48de7f(0x168)],_0x33c57e[_0x48de7f(0x1c3)]))throw new _0x2c4f5c(_0x48de7f(0x1b5)+_0x3724e1);else throw new ValidationError(_0x48de7f(0x1b5)+_0x225064);}}}function _0x524d2e(_0x2c8162){const _0x5dee2e=_0x25cf0c,_0x514677={};_0x514677[_0x5dee2e(0x1b9)]=_0x5dee2e(0x16c);const _0x3ae7c4=_0x514677;if(_0x33c57e[_0x5dee2e(0x197)](_0x33c57e[_0x5dee2e(0x1b8)],_0x33c57e[_0x5dee2e(0x1b3)]))for(const _0x507dcd of Array[_0x5dee2e(0x198)](_0x2c8162)?_0x2c8162:[_0x2c8162]){if(_0x33c57e[_0x5dee2e(0x166)](_0x33c57e[_0x5dee2e(0x1ad)],_0x33c57e[_0x5dee2e(0x1ad)]))_0x9a5b33[_0x5dee2e(0x190)](_0x1c9eed);else{_0x173d99(_0x507dcd[_0x5dee2e(0x153)]);if(!Array[_0x5dee2e(0x198)](_0x507dcd[_0x5dee2e(0x194)])){if(_0x33c57e[_0x5dee2e(0x1a0)]===_0x33c57e[_0x5dee2e(0x1a0)])throw new ValidationError(_0x5dee2e(0x161)+_0x507dcd[_0x5dee2e(0x153)]);else throw new _0x38c07c(_0x5dee2e(0x149));}if(_0x2a6dcc[_0x5dee2e(0x1b4)](_0x507dcd[_0x5dee2e(0x153)])){if(_0x33c57e[_0x5dee2e(0x14e)]!==_0x5dee2e(0x160))throw new ConflictError(_0x5dee2e(0x1c6)+_0x507dcd[_0x5dee2e(0x153)]);else throw new _0x34ef03(_0x3ae7c4[_0x5dee2e(0x1b9)]);}_0x2a6dcc[_0x5dee2e(0x19c)](_0x507dcd[_0x5dee2e(0x153)],{..._0x507dcd,'source':_0x5dee2e(0x18b)});}}else{if(!_0x471c55[_0x5dee2e(0x1ab)](_0x23d10d))throw new _0x1b74fa(_0x5dee2e(0x1b5)+_0x51cb95);}}async function _0xaba5e5(_0x123e5f){const _0x1c61ef=_0x25cf0c;if(_0x33c57e[_0x1c61ef(0x166)](_0x1c61ef(0x17f),_0x33c57e[_0x1c61ef(0x171)])){_0x173d99(_0x123e5f);const _0x7e8a29=_0x2a6dcc[_0x1c61ef(0x188)](_0x123e5f);if(_0x7e8a29)return _0x7e8a29[_0x1c61ef(0x194)];const _0x1eadd3=await _0x33c57e[_0x1c61ef(0x177)](_0x2e6e89);if(!_0x1eadd3)throw new NotFoundError(_0x33c57e[_0x1c61ef(0x1c7)]);if(!_0x46918f)throw new Error(_0x33c57e[_0x1c61ef(0x15f)]);const _0x190273=await _0x46918f[_0x1c61ef(0x17b)](_0x1c61ef(0x156),[_0x123e5f]);if(!_0x190273[_0x1c61ef(0x1c1)][_0x1c61ef(0x1a3)]){if(_0x33c57e[_0x1c61ef(0x176)](_0x33c57e[_0x1c61ef(0x191)],_0x33c57e[_0x1c61ef(0x191)]))throw new NotFoundError(_0x1c61ef(0x1bb)+_0x123e5f);else throw new _0x2e1623(_0x1c61ef(0x1bb)+_0x51e956);}const _0x23fc52=_0x190273[_0x1c61ef(0x1c1)];return _0x2a6dcc[_0x1c61ef(0x19c)](_0x123e5f,{'code':_0x123e5f,'name':_0x123e5f,'items':_0x23fc52,'source':_0x33c57e[_0x1c61ef(0x17e)]}),_0x23fc52;}else _0x2622a0[_0x1c61ef(0x18f)]();}async function _0x2227ef(_0x3a7445,_0xed1bcc){const _0x1ea0c9=_0x25cf0c,_0x2d8973={};_0x2d8973[_0x1ea0c9(0x185)]=_0x33c57e[_0x1ea0c9(0x1a5)];const _0x59dd29=_0x2d8973;if(_0x33c57e[_0x1ea0c9(0x166)](_0x1ea0c9(0x1b6),_0x1ea0c9(0x1b6)))return _0x572bea;else{_0x33c57e[_0x1ea0c9(0x19d)](_0x173d99,_0x3a7445);if(!Array[_0x1ea0c9(0x198)](_0xed1bcc)){if(_0x33c57e[_0x1ea0c9(0x1b0)](_0x33c57e[_0x1ea0c9(0x18d)],_0x33c57e[_0x1ea0c9(0x1a2)]))throw new ValidationError(_0x33c57e[_0x1ea0c9(0x1a5)]);else throw new _0x575bb5(_0x59dd29[_0x1ea0c9(0x185)]);}const _0x35e157=await _0x33c57e[_0x1ea0c9(0x180)](_0x2e6e89);if(!_0x35e157)throw new NotFoundError(_0x33c57e[_0x1ea0c9(0x1c7)]);if(!_0x46918f)throw new Error(_0x33c57e[_0x1ea0c9(0x15f)]);const _0x4f2e34=await _0x46918f[_0x1ea0c9(0x1af)]();try{await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x1b1)]);const _0x3726d2=await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x16b),[_0x3a7445,_0x3a7445,_0x33c57e[_0x1ea0c9(0x1a1)],_0x1ea0c9(0x184),!![]]),_0x18b124=_0x3726d2[_0x1ea0c9(0x1c1)][0x0]['id'];await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x162)],[_0x18b124]);for(const _0x4a6bb7 of _0xed1bcc){await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x165),[_0x18b124,_0x4a6bb7[_0x1ea0c9(0x153)],_0x4a6bb7[_0x1ea0c9(0x1a4)],_0x4a6bb7[_0x1ea0c9(0x1c2)]??null]);}await _0x4f2e34[_0x1ea0c9(0x17b)](_0x1ea0c9(0x163));}catch(_0x1a714a){if(_0x33c57e[_0x1ea0c9(0x1bf)](_0x1ea0c9(0x14a),_0x33c57e[_0x1ea0c9(0x1a9)]))throw new _0x438b9a(_0x1ea0c9(0x161)+_0x22f7d9[_0x1ea0c9(0x153)]);else{await _0x4f2e34[_0x1ea0c9(0x17b)](_0x33c57e[_0x1ea0c9(0x152)]);throw _0x1a714a;}}finally{if(_0x33c57e[_0x1ea0c9(0x1bd)](_0x1ea0c9(0x158),_0x33c57e[_0x1ea0c9(0x14c)]))_0x4f2e34[_0x1ea0c9(0x18f)]();else throw new _0x1ce61b(_0x1ea0c9(0x16c));}_0x33c57e[_0x1ea0c9(0x19d)](_0x4a5858,_0x3a7445);}}function _0x4a5858(_0x5938e1){const _0x3bdafb=_0x25cf0c;return _0x33c57e[_0x3bdafb(0x1a7)](_0x173d99,_0x5938e1),_0x2a6dcc[_0x3bdafb(0x167)](_0x5938e1);}async function _0x3aa563(){const _0x4938c8=_0x25cf0c,_0x598a84=[..._0x2a6dcc[_0x4938c8(0x1aa)]()][_0x4938c8(0x15d)](({code:_0x2089c6,name:_0x500cb5,source:_0x1ae24b})=>({'code':_0x2089c6,'name':_0x500cb5??_0x2089c6,'source':_0x1ae24b})),_0x40fc0f=await _0x33c57e[_0x4938c8(0x182)](_0x2e6e89);if(!_0x40fc0f)return _0x598a84;if(!_0x46918f)throw new Error(_0x33c57e[_0x4938c8(0x15f)]);const _0x322f9f=await _0x46918f[_0x4938c8(0x17b)](_0x4938c8(0x196));for(const _0x5d068e of _0x322f9f[_0x4938c8(0x1c1)]){if(_0x33c57e[_0x4938c8(0x195)](_0x33c57e[_0x4938c8(0x159)],_0x33c57e[_0x4938c8(0x147)])){_0x33c57e[_0x4938c8(0x169)](_0x4fd6df,_0x1213ee[_0x4938c8(0x153)]);if(!_0x28dbcc[_0x4938c8(0x198)](_0x483535[_0x4938c8(0x194)]))throw new _0x4c8a7b(_0x4938c8(0x161)+_0x17ee2e[_0x4938c8(0x153)]);if(_0x46a5cb[_0x4938c8(0x1b4)](_0x49fcb3[_0x4938c8(0x153)]))throw new _0x435cf1(_0x4938c8(0x1c6)+_0x20cc90[_0x4938c8(0x153)]);const _0x441eda={..._0x3543c3};_0x441eda[_0x4938c8(0x1ae)]=_0x33c57e[_0x4938c8(0x18c)],_0x4177b7[_0x4938c8(0x19c)](_0x36b6b1[_0x4938c8(0x153)],_0x441eda);}else!_0x2a6dcc[_0x4938c8(0x1b4)](_0x5d068e[_0x4938c8(0x153)])&&_0x598a84[_0x4938c8(0x190)](_0x5d068e);}return _0x598a84;}_0x524d2e(dictionaries);const _0x284d31={};return _0x284d31[_0x25cf0c(0x192)]=_0x524d2e,_0x284d31[_0x25cf0c(0x188)]=_0xaba5e5,_0x284d31[_0x25cf0c(0x1c5)]=_0x2227ef,_0x284d31[_0x25cf0c(0x199)]=_0x4a5858,_0x284d31[_0x25cf0c(0x173)]=_0x3aa563,_0x284d31;}
@@ -1 +1 @@
1
- (function(_0x170629,_0x517c8a){const _0x22fe08=_0x2127,_0x38d98a=_0x170629();while(!![]){try{const _0x2ddeca=-parseInt(_0x22fe08(0x1a5))/0x1*(-parseInt(_0x22fe08(0x165))/0x2)+-parseInt(_0x22fe08(0x196))/0x3*(-parseInt(_0x22fe08(0x1a2))/0x4)+-parseInt(_0x22fe08(0x185))/0x5+parseInt(_0x22fe08(0x181))/0x6*(parseInt(_0x22fe08(0x19b))/0x7)+parseInt(_0x22fe08(0x17b))/0x8+-parseInt(_0x22fe08(0x17e))/0x9*(-parseInt(_0x22fe08(0x1a7))/0xa)+-parseInt(_0x22fe08(0x18f))/0xb;if(_0x2ddeca===_0x517c8a)break;else _0x38d98a['push'](_0x38d98a['shift']());}catch(_0x41a0e0){_0x38d98a['push'](_0x38d98a['shift']());}}}(_0x26b8,0x69cac));import{DeleteObjectCommand,GetObjectCommand,HeadObjectCommand,PutObjectCommand,S3Client}from'@aws-sdk/client-s3';import _0x49977c from'node:crypto';import{ValidationError}from'../errors.js';function _0x26b8(){const _0x573ff9=['RiHVD','base64url','floor','createHmac','SBhuZ','yvQVd','PscyG','from','iGplT','toString','PbTHE','bqpdN','exp','HvMym','oOQyH','startsWith','Invalid\x20file\x20token','secretAccessKey','399192QGnzbs','aOqNQ','bucket','transformToByteArray','update','folder','ZgXIt','$metadata','send','jRmIu','NKsut','tokenTtl','NotFound','CvJiD','KOBlH','PAdnq','length','accessKeyId','region','VvFOo','push','forcePathStyle','2875536UFooZx','Body','jeanm','9cExWyM','Invalid\x20file\x20path','randomBytes','18lTqyiO','AMSpy','QtgeR','isInteger','39205QzDGRM','bOQGs','tokenSecret','endpoint','utf8','hex','accessKey','now','name','Cogmd','10425998xdnTzD','timingSafeEqual','gbQyk','IryZa','secretKey','pyGpK','includes','57bzKuRT','credentials','vuAGD','NfCjC','ZxUgV','356398bSExaG','yobmw','digest','pcxrW','IhMQy','Btpye','ZtSWX','118848pFqkHa','sha256','qYZeG','1yjBPrj','tvTiA','1126750daKXZE','stringify','function','parse','GxPLJ','RZJIc','mJveH','gjHqd','lZQlC','kruBB','alloc','us-east-1','split','replace','httpStatusCode','FIYYn','xkGpS','File\x20token\x20expired','concat'];_0x26b8=function(){return _0x573ff9;};return _0x26b8();}import{UnauthorizedError}from'../errors.js';function keyFor(_0x39ab19,_0x6b52aa){const _0x48c209=_0x2127,_0x57af20={};_0x57af20[_0x48c209(0x1a0)]=function(_0x30e4e4,_0x235880){return _0x30e4e4===_0x235880;},_0x57af20[_0x48c209(0x1a4)]=_0x48c209(0x171),_0x57af20[_0x48c209(0x1b0)]=function(_0x536cf2,_0x149c98){return _0x536cf2===_0x149c98;},_0x57af20[_0x48c209(0x160)]=_0x48c209(0x17f),_0x57af20[_0x48c209(0x15d)]=function(_0x32efa8,_0x28f3ad){return _0x32efa8??_0x28f3ad;};const _0x44fe3f=_0x57af20;if(!_0x6b52aa||_0x6b52aa[_0x48c209(0x162)]('/')||_0x6b52aa[_0x48c209(0x195)]('..')){if(_0x44fe3f[_0x48c209(0x1b0)](_0x48c209(0x1a6),_0x48c209(0x1a6)))throw new ValidationError(_0x44fe3f[_0x48c209(0x160)]);else{const _0x44603b=_0xa96d3f;if(_0x44fe3f[_0x48c209(0x1a0)](_0x44603b[_0x48c209(0x16c)]?.[_0x48c209(0x1b5)],0x194)||_0x44603b[_0x48c209(0x18d)]===_0x44fe3f[_0x48c209(0x1a4)])return![];throw _0x35366a;}}const _0x927e32=_0x6b52aa[_0x48c209(0x1b4)](/\\/g,'/')[_0x48c209(0x1b4)](/^\/+/,''),_0x19c3e5=_0x44fe3f[_0x48c209(0x15d)](_0x39ab19,'')[_0x48c209(0x1b4)](/^\/+|\/+$/g,'');return _0x19c3e5?_0x19c3e5+'/'+_0x927e32:_0x927e32;}function _0x2127(_0x191ba8,_0x16f178){_0x191ba8=_0x191ba8-0x15d;const _0x26b82d=_0x26b8();let _0x212717=_0x26b82d[_0x191ba8];return _0x212717;}async function bodyToBuffer(_0xc904d6){const _0x820117=_0x2127,_0x1f3f2a={};_0x1f3f2a[_0x820117(0x194)]=_0x820117(0x1bb),_0x1f3f2a[_0x820117(0x18e)]=function(_0x364e7c,_0x11d54c){return _0x364e7c===_0x11d54c;},_0x1f3f2a[_0x820117(0x186)]=_0x820117(0x199),_0x1f3f2a[_0x820117(0x1c0)]=_0x820117(0x1a9);const _0x247e62=_0x1f3f2a;if(!_0xc904d6){if(_0x247e62[_0x820117(0x18e)](_0x820117(0x19a),_0x247e62[_0x820117(0x186)])){const _0x3a16a7={'p':_0x61d8bb,'exp':_0x4b3db0[_0x820117(0x1bc)](_0x2177f4[_0x820117(0x18c)]()/0x3e8)+_0xf5022c},_0x4532d6=_0x4832ed[_0x820117(0x1c1)](_0x3872a1[_0x820117(0x1a8)](_0x3a16a7))[_0x820117(0x1c3)](_0x247e62[_0x820117(0x194)]),_0x1fe4a0=_0x55336e[_0x820117(0x1bd)](_0x820117(0x1a3),_0x5a2d55)[_0x820117(0x169)](_0x4532d6)[_0x820117(0x19d)](_0x820117(0x1bb));return _0x4532d6+'.'+_0x1fe4a0;}else return Buffer[_0x820117(0x1b1)](0x0);}const _0x52c9ff=_0xc904d6;if(_0x247e62[_0x820117(0x18e)](typeof _0x52c9ff[_0x820117(0x168)],_0x247e62[_0x820117(0x1c0)]))return Buffer[_0x820117(0x1c1)](await _0x52c9ff[_0x820117(0x168)]());const _0x1394ee=[];for await(const _0x3216c4 of _0xc904d6){_0x1394ee[_0x820117(0x179)](Buffer[_0x820117(0x1c1)](_0x3216c4));}return Buffer[_0x820117(0x1b9)](_0x1394ee);}export function createFileS3(_0x508366){const _0x463b11=_0x2127,_0x36141b={'VvFOo':function(_0x8ca697,_0x161971){return _0x8ca697(_0x161971);},'yvQVd':function(_0x2f8a7e,_0x1b8332){return _0x2f8a7e!==_0x1b8332;},'pcxrW':_0x463b11(0x174),'GxPLJ':_0x463b11(0x1bb),'QtgeR':function(_0x45aa88,_0x5973fb){return _0x45aa88!==_0x5973fb;},'ZgXIt':_0x463b11(0x1be),'KOBlH':function(_0x49c1e0,_0x495d4a){return _0x49c1e0===_0x495d4a;},'jeanm':_0x463b11(0x19f),'CvJiD':_0x463b11(0x1ae),'yobmw':_0x463b11(0x171),'jRmIu':function(_0x1d8b76,_0x56a723){return _0x1d8b76+_0x56a723;},'xkGpS':_0x463b11(0x1a3),'mJveH':_0x463b11(0x163),'ZtSWX':function(_0x23f21d,_0x20f111){return _0x23f21d!==_0x20f111;},'IryZa':_0x463b11(0x1ac),'iGplT':_0x463b11(0x182),'oOQyH':function(_0x57280e,_0x5b4838){return _0x57280e||_0x5b4838;},'bqpdN':_0x463b11(0x166),'lZQlC':_0x463b11(0x189),'gbQyk':function(_0x186744,_0x4f6033){return _0x186744/_0x4f6033;},'vuAGD':_0x463b11(0x1b8),'FIYYn':_0x463b11(0x18a)},_0x1b1f01=_0x508366[_0x463b11(0x187)]??process.env.FILE_TOKEN_SECRET??_0x49977c[_0x463b11(0x180)](0x20)[_0x463b11(0x1c3)](_0x36141b[_0x463b11(0x1b6)]),_0x2d9049={};_0x2d9049[_0x463b11(0x188)]=_0x508366[_0x463b11(0x188)],_0x2d9049[_0x463b11(0x177)]=_0x508366[_0x463b11(0x177)]??_0x463b11(0x1b2),_0x2d9049[_0x463b11(0x17a)]=_0x508366[_0x463b11(0x17a)]??!![],_0x2d9049[_0x463b11(0x197)]=_0x508366[_0x463b11(0x176)]||_0x508366[_0x463b11(0x18b)]?{'accessKeyId':_0x508366[_0x463b11(0x176)]??_0x508366[_0x463b11(0x18b)],'secretAccessKey':_0x508366[_0x463b11(0x164)]??_0x508366[_0x463b11(0x193)]}:undefined;const _0x28d49d=new S3Client(_0x2d9049),_0x4170b8=_0x351ceb=>keyFor(_0x508366[_0x463b11(0x16a)],_0x351ceb);return{async 'put'(_0x516b00,_0x52a6fa){const _0x1eefb0=_0x463b11;await _0x28d49d[_0x1eefb0(0x16d)](new PutObjectCommand({'Bucket':_0x508366[_0x1eefb0(0x167)],'Key':_0x36141b[_0x1eefb0(0x178)](_0x4170b8,_0x516b00),'Body':_0x52a6fa}));},async 'get'(_0x36886d){const _0x417aa3=_0x463b11;if(_0x36141b[_0x417aa3(0x1bf)](_0x417aa3(0x174),_0x36141b[_0x417aa3(0x19e)]))return![];else{const _0x526029=await _0x28d49d[_0x417aa3(0x16d)](new GetObjectCommand({'Bucket':_0x508366[_0x417aa3(0x167)],'Key':_0x36141b[_0x417aa3(0x178)](_0x4170b8,_0x36886d)}));return bodyToBuffer(_0x526029[_0x417aa3(0x17c)]);}},async 'exists'(_0x1c2882){const _0x5313d1=_0x463b11,_0x4865db={};_0x4865db[_0x5313d1(0x1ba)]=_0x5313d1(0x163),_0x4865db[_0x5313d1(0x16f)]=_0x36141b[_0x5313d1(0x1ab)];const _0x241712=_0x4865db;if(_0x36141b[_0x5313d1(0x183)](_0x5313d1(0x1be),_0x36141b[_0x5313d1(0x16b)]))throw new _0x455185(_0x241712[_0x5313d1(0x1ba)]);else try{if(_0x36141b[_0x5313d1(0x173)](_0x36141b[_0x5313d1(0x17d)],_0x36141b[_0x5313d1(0x172)]))_0x1fd575=_0x1fbb4b[_0x5313d1(0x1aa)](_0x5b9931[_0x5313d1(0x1c1)](_0x14a81e,_0x241712[_0x5313d1(0x16f)])[_0x5313d1(0x1c3)](_0x5313d1(0x189)));else return await _0x28d49d[_0x5313d1(0x16d)](new HeadObjectCommand({'Bucket':_0x508366[_0x5313d1(0x167)],'Key':_0x36141b[_0x5313d1(0x178)](_0x4170b8,_0x1c2882)})),!![];}catch(_0x23a7be){const _0x4d3486=_0x23a7be;if(_0x36141b[_0x5313d1(0x173)](_0x4d3486[_0x5313d1(0x16c)]?.[_0x5313d1(0x1b5)],0x194)||_0x36141b[_0x5313d1(0x173)](_0x4d3486[_0x5313d1(0x18d)],_0x36141b[_0x5313d1(0x19c)]))return![];throw _0x23a7be;}},async 'delete'(_0x3ce011){const _0x482a14=_0x463b11;await _0x28d49d[_0x482a14(0x16d)](new DeleteObjectCommand({'Bucket':_0x508366[_0x482a14(0x167)],'Key':_0x4170b8(_0x3ce011)}));},'create'(_0xb99fff,_0x5a62e6=_0x508366[_0x463b11(0x170)]??0xe10){const _0x45abe6=_0x463b11,_0x4e2702={'p':_0xb99fff,'exp':_0x36141b[_0x45abe6(0x16e)](Math[_0x45abe6(0x1bc)](Date[_0x45abe6(0x18c)]()/0x3e8),_0x5a62e6)},_0x1604be=Buffer[_0x45abe6(0x1c1)](JSON[_0x45abe6(0x1a8)](_0x4e2702))[_0x45abe6(0x1c3)](_0x36141b[_0x45abe6(0x1ab)]),_0xb7774e=_0x49977c[_0x45abe6(0x1bd)](_0x36141b[_0x45abe6(0x1b7)],_0x1b1f01)[_0x45abe6(0x169)](_0x1604be)[_0x45abe6(0x19d)](_0x36141b[_0x45abe6(0x1ab)]);return _0x1604be+'.'+_0xb7774e;},'verify'(_0x512a90){const _0x347899=_0x463b11;if(_0x36141b[_0x347899(0x1a1)](_0x36141b[_0x347899(0x192)],_0x36141b[_0x347899(0x1c2)])){const [_0x3e8a40,_0xe50b00]=_0x512a90[_0x347899(0x1b3)]('.');if(_0x36141b[_0x347899(0x161)](!_0x3e8a40,!_0xe50b00))throw new UnauthorizedError(_0x36141b[_0x347899(0x1ad)]);const _0x113520=_0x49977c[_0x347899(0x1bd)](_0x347899(0x1a3),_0x1b1f01)[_0x347899(0x169)](_0x3e8a40)[_0x347899(0x19d)](),_0x12ba40=Buffer[_0x347899(0x1c1)](_0xe50b00,_0x347899(0x1bb));if(_0x36141b[_0x347899(0x183)](_0x113520[_0x347899(0x175)],_0x12ba40[_0x347899(0x175)])||!_0x49977c[_0x347899(0x190)](_0x113520,_0x12ba40))throw new UnauthorizedError(_0x36141b[_0x347899(0x1ad)]);let _0x46ab03;try{if(_0x36141b[_0x347899(0x15e)]===_0x36141b[_0x347899(0x15e)])_0x46ab03=JSON[_0x347899(0x1aa)](Buffer[_0x347899(0x1c1)](_0x3e8a40,_0x36141b[_0x347899(0x1ab)])[_0x347899(0x1c3)](_0x36141b[_0x347899(0x1af)]));else return _0x1d99f1[_0x347899(0x1b1)](0x0);}catch{throw new UnauthorizedError(_0x347899(0x163));}if(!_0x46ab03['p']||!Number[_0x347899(0x184)](_0x46ab03[_0x347899(0x15f)]))throw new UnauthorizedError(_0x36141b[_0x347899(0x1ad)]);if(_0x46ab03[_0x347899(0x15f)]<Math[_0x347899(0x1bc)](_0x36141b[_0x347899(0x191)](Date[_0x347899(0x18c)](),0x3e8)))throw new UnauthorizedError(_0x36141b[_0x347899(0x198)]);return _0x46ab03;}else throw new _0x595c4a(_0x36141b[_0x347899(0x1ad)]);}};}
1
+ (function(_0x760e97,_0x32ffbf){const _0x5af28a=_0x20de,_0x34d5c3=_0x760e97();while(!![]){try{const _0x423d9c=-parseInt(_0x5af28a(0x1d7))/0x1+-parseInt(_0x5af28a(0x211))/0x2+-parseInt(_0x5af28a(0x210))/0x3*(-parseInt(_0x5af28a(0x20c))/0x4)+parseInt(_0x5af28a(0x1ca))/0x5*(-parseInt(_0x5af28a(0x1e2))/0x6)+parseInt(_0x5af28a(0x1cd))/0x7*(parseInt(_0x5af28a(0x1ec))/0x8)+parseInt(_0x5af28a(0x215))/0x9+parseInt(_0x5af28a(0x1d4))/0xa;if(_0x423d9c===_0x32ffbf)break;else _0x34d5c3['push'](_0x34d5c3['shift']());}catch(_0x53476f){_0x34d5c3['push'](_0x34d5c3['shift']());}}}(_0x252f,0x1c028));import{DeleteObjectCommand,GetObjectCommand,HeadObjectCommand,PutObjectCommand,S3Client}from'@aws-sdk/client-s3';import _0x2dba6e from'node:crypto';function _0x20de(_0xdbe19c,_0x2d875e){_0xdbe19c=_0xdbe19c-0x1bc;const _0x252f5d=_0x252f();let _0x20de0e=_0x252f5d[_0xdbe19c];return _0x20de0e;}import{ValidationError}from'../errors.js';import{UnauthorizedError}from'../errors.js';function _0x252f(){const _0x2aa696=['randomBytes','toString','188833skejYu','kgEVx','alloc','name','length','PYojj','transformToByteArray','floor','secretAccessKey','OboTK','ZYhoQ','6LUvXjc','from','pptPY','XRvtO','startsWith','SeuMI','parse','LTfBh','split','XPYVT','8jbuFMM','VIojj','iEGye','XtxZH','mXCzv','dYdIB','accessKeyId','EpjHr','wrZoC','httpStatusCode','OVMPX','TlAul','Kzvvw','endpoint','push','HuXYM','NotFound','forcePathStyle','Invalid\x20file\x20token','CFJWl','ZDzwi','File\x20token\x20expired','eJDVk','us-east-1','digest','folder','Zfush','includes','cZHFK','replace','stringify','ZlKzn','28vRpgpW','update','MtLNd','createHmac','47133jRlYIr','407464pZJCjH','jwYuE','sha256','bucket','370593woXLtI','isInteger','voSoS','HPziO','Invalid\x20file\x20path','BcbBK','bHMDB','utf8','tokenSecret','hex','send','concat','gsPOd','Body','MUPNL','EODTq','UbDyU','iCWqD','xTWdH','$metadata','exp','bjKrK','fQbtZ','now','region','KpvGU','timingSafeEqual','fYiRg','748675OAwuTX','accessKey','function','785526ZofiSL','credentials','tokenTtl','secretKey','KeDND','FUKGS','base64url','3936560zqOnkQ'];_0x252f=function(){return _0x2aa696;};return _0x252f();}function keyFor(_0x16b603,_0x1903e3){const _0x4b3246=_0x20de,_0x41e4bd={};_0x41e4bd[_0x4b3246(0x1f3)]=_0x4b3246(0x219),_0x41e4bd[_0x4b3246(0x206)]=function(_0x937867,_0x576c73){return _0x937867??_0x576c73;};const _0x134402=_0x41e4bd;if(!_0x1903e3||_0x1903e3[_0x4b3246(0x1e6)]('/')||_0x1903e3[_0x4b3246(0x207)]('..'))throw new ValidationError(_0x134402[_0x4b3246(0x1f3)]);const _0x2b8b3e=_0x1903e3[_0x4b3246(0x209)](/\\/g,'/')[_0x4b3246(0x209)](/^\/+/,''),_0x324652=_0x134402[_0x4b3246(0x206)](_0x16b603,'')[_0x4b3246(0x209)](/^\/+|\/+$/g,'');return _0x324652?_0x324652+'/'+_0x2b8b3e:_0x2b8b3e;}async function bodyToBuffer(_0x2af573){const _0x3c8066=_0x20de,_0x111feb={};_0x111feb[_0x3c8066(0x1eb)]=_0x3c8066(0x1fe),_0x111feb[_0x3c8066(0x1d8)]=function(_0x59308e,_0x2ae6f7){return _0x59308e===_0x2ae6f7;},_0x111feb[_0x3c8066(0x1e5)]=_0x3c8066(0x1cc),_0x111feb[_0x3c8066(0x1e4)]=function(_0x2305ff,_0x7b2286){return _0x2305ff!==_0x7b2286;},_0x111feb[_0x3c8066(0x217)]=_0x3c8066(0x1c4);const _0x3b747c=_0x111feb;if(!_0x2af573)return Buffer[_0x3c8066(0x1d9)](0x0);const _0x29afe2=_0x2af573;if(_0x3b747c[_0x3c8066(0x1d8)](typeof _0x29afe2[_0x3c8066(0x1dd)],_0x3b747c[_0x3c8066(0x1e5)]))return Buffer[_0x3c8066(0x1e3)](await _0x29afe2[_0x3c8066(0x1dd)]());const _0x141c82=[];for await(const _0x5d0ba0 of _0x2af573){if(_0x3b747c[_0x3c8066(0x1e4)](_0x3c8066(0x1c4),_0x3b747c[_0x3c8066(0x217)]))throw new _0xdc0e24(_0x3b747c[_0x3c8066(0x1eb)]);else _0x141c82[_0x3c8066(0x1fa)](Buffer[_0x3c8066(0x1e3)](_0x5d0ba0));}return Buffer[_0x3c8066(0x220)](_0x141c82);}export function createFileS3(_0x3c37be){const _0x234e4d=_0x20de,_0x55082b={'KeDND':function(_0xcc8b7c,_0x5b2d8a){return _0xcc8b7c(_0x5b2d8a);},'MtLNd':function(_0xcf8685,_0x419045){return _0xcf8685(_0x419045);},'mXCzv':function(_0x47746b,_0x29e816){return _0x47746b===_0x29e816;},'Kzvvw':_0x234e4d(0x1fc),'dYdIB':function(_0x59dc8e,_0x545401){return _0x59dc8e===_0x545401;},'PYojj':_0x234e4d(0x1c3),'fYiRg':_0x234e4d(0x1fe),'VIojj':function(_0x30cadf,_0x232548){return _0x30cadf===_0x232548;},'cZHFK':_0x234e4d(0x212),'OVMPX':function(_0x405039,_0x305feb){return _0x405039+_0x305feb;},'ZDzwi':_0x234e4d(0x1d3),'HuXYM':_0x234e4d(0x213),'MUPNL':_0x234e4d(0x21c),'OboTK':function(_0x37a8c2,_0x2925e2){return _0x37a8c2===_0x2925e2;},'ZlKzn':_0x234e4d(0x1e1),'HPziO':function(_0x4a3f95,_0x1b4ee6){return _0x4a3f95||_0x1b4ee6;},'bHMDB':function(_0x2754fe,_0x33f3c2){return _0x2754fe!==_0x33f3c2;},'FUKGS':_0x234e4d(0x221),'LTfBh':function(_0x46dc07,_0x1a50f3){return _0x46dc07!==_0x1a50f3;},'wrZoC':_0x234e4d(0x1bd),'eJDVk':_0x234e4d(0x1c0),'BcbBK':function(_0x1f7159,_0x313a92){return _0x1f7159<_0x313a92;},'iEGye':function(_0x3a63b2,_0x22f008){return _0x3a63b2/_0x22f008;},'XtxZH':_0x234e4d(0x201),'UbDyU':_0x234e4d(0x21e),'SeuMI':_0x234e4d(0x203)},_0x4869b7=_0x3c37be[_0x234e4d(0x21d)]??process.env.FILE_TOKEN_SECRET??_0x2dba6e[_0x234e4d(0x1d5)](0x20)[_0x234e4d(0x1d6)](_0x55082b[_0x234e4d(0x1be)]),_0x5bf9c9={};_0x5bf9c9[_0x234e4d(0x1f9)]=_0x3c37be[_0x234e4d(0x1f9)],_0x5bf9c9[_0x234e4d(0x1c6)]=_0x3c37be[_0x234e4d(0x1c6)]??_0x55082b[_0x234e4d(0x1e7)],_0x5bf9c9[_0x234e4d(0x1fd)]=_0x3c37be[_0x234e4d(0x1fd)]??!![],_0x5bf9c9[_0x234e4d(0x1ce)]=_0x3c37be[_0x234e4d(0x1f2)]||_0x3c37be[_0x234e4d(0x1cb)]?{'accessKeyId':_0x3c37be[_0x234e4d(0x1f2)]??_0x3c37be[_0x234e4d(0x1cb)],'secretAccessKey':_0x3c37be[_0x234e4d(0x1df)]??_0x3c37be[_0x234e4d(0x1d0)]}:undefined;const _0x4a6920=new S3Client(_0x5bf9c9),_0x4d8882=_0x52a7d8=>keyFor(_0x3c37be[_0x234e4d(0x205)],_0x52a7d8);return{async 'put'(_0xf18a01,_0x2950f2){const _0x2f2701=_0x234e4d;await _0x4a6920[_0x2f2701(0x21f)](new PutObjectCommand({'Bucket':_0x3c37be[_0x2f2701(0x214)],'Key':_0x55082b[_0x2f2701(0x1d1)](_0x4d8882,_0xf18a01),'Body':_0x2950f2}));},async 'get'(_0x5c3364){const _0xc23412=_0x234e4d,_0x118dbf=await _0x4a6920[_0xc23412(0x21f)](new GetObjectCommand({'Bucket':_0x3c37be[_0xc23412(0x214)],'Key':_0x4d8882(_0x5c3364)}));return _0x55082b[_0xc23412(0x1d1)](bodyToBuffer,_0x118dbf[_0xc23412(0x222)]);},async 'exists'(_0x2e349a){const _0x591baa=_0x234e4d;try{return await _0x4a6920[_0x591baa(0x21f)](new HeadObjectCommand({'Bucket':_0x3c37be[_0x591baa(0x214)],'Key':_0x55082b[_0x591baa(0x20e)](_0x4d8882,_0x2e349a)})),!![];}catch(_0x2ee13c){const _0x8f2d7a=_0x2ee13c;if(_0x55082b[_0x591baa(0x1f0)](_0x8f2d7a[_0x591baa(0x1c1)]?.[_0x591baa(0x1f5)],0x194)||_0x55082b[_0x591baa(0x1f0)](_0x8f2d7a[_0x591baa(0x1da)],_0x55082b[_0x591baa(0x1f8)]))return![];throw _0x2ee13c;}},async 'delete'(_0x281adb){const _0x13d119=_0x234e4d,_0x3cbe93={'iCWqD':function(_0xae4ee1,_0x51ee39){const _0xa61f57=_0x20de;return _0x55082b[_0xa61f57(0x1f1)](_0xae4ee1,_0x51ee39);}};if(_0x55082b[_0x13d119(0x1f0)](_0x55082b[_0x13d119(0x1dc)],_0x13d119(0x1c3)))await _0x4a6920[_0x13d119(0x21f)](new DeleteObjectCommand({'Bucket':_0x3c37be[_0x13d119(0x214)],'Key':_0x55082b[_0x13d119(0x20e)](_0x4d8882,_0x281adb)}));else{const _0x50d51d=_0x257b7b;if(feYlDO[_0x13d119(0x1bf)](_0x50d51d[_0x13d119(0x1c1)]?.[_0x13d119(0x1f5)],0x194)||feYlDO[_0x13d119(0x1bf)](_0x50d51d[_0x13d119(0x1da)],_0x13d119(0x1fc)))return![];throw _0x36d3b5;}},'create'(_0x96b36,_0x486443=_0x3c37be[_0x234e4d(0x1cf)]??0xe10){const _0x3f07f2=_0x234e4d,_0x34ed40={};_0x34ed40[_0x3f07f2(0x1f7)]=_0x55082b[_0x3f07f2(0x1c9)];const _0x24b7ba=_0x34ed40;if(_0x55082b[_0x3f07f2(0x1ed)](_0x55082b[_0x3f07f2(0x208)],_0x55082b[_0x3f07f2(0x208)])){const _0x3d6323={'p':_0x96b36,'exp':_0x55082b[_0x3f07f2(0x1f6)](Math[_0x3f07f2(0x1de)](Date[_0x3f07f2(0x1c5)]()/0x3e8),_0x486443)},_0x251856=Buffer[_0x3f07f2(0x1e3)](JSON[_0x3f07f2(0x20a)](_0x3d6323))[_0x3f07f2(0x1d6)](_0x55082b[_0x3f07f2(0x200)]),_0x24c8e4=_0x2dba6e[_0x3f07f2(0x20f)](_0x55082b[_0x3f07f2(0x1fb)],_0x4869b7)[_0x3f07f2(0x20d)](_0x251856)[_0x3f07f2(0x204)](_0x55082b[_0x3f07f2(0x200)]);return _0x251856+'.'+_0x24c8e4;}else throw new _0x2f2a72(_0x24b7ba[_0x3f07f2(0x1f7)]);},'verify'(_0x582337){const _0x35e5e8=_0x234e4d,_0x5471ac={};_0x5471ac[_0x35e5e8(0x1ff)]=_0x55082b[_0x35e5e8(0x200)],_0x5471ac[_0x35e5e8(0x1c7)]=_0x55082b[_0x35e5e8(0x1bc)];const _0x10f955=_0x5471ac;if(_0x55082b[_0x35e5e8(0x1e0)](_0x55082b[_0x35e5e8(0x20b)],_0x55082b[_0x35e5e8(0x20b)])){const [_0x17d252,_0x421bff]=_0x582337[_0x35e5e8(0x1ea)]('.');if(_0x55082b[_0x35e5e8(0x218)](!_0x17d252,!_0x421bff)){if(_0x55082b[_0x35e5e8(0x21b)](_0x55082b[_0x35e5e8(0x1d2)],_0x55082b[_0x35e5e8(0x1d2)]))throw new _0x134586(_0x35e5e8(0x1fe));else throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);}const _0x5807ff=_0x2dba6e[_0x35e5e8(0x20f)](_0x55082b[_0x35e5e8(0x1fb)],_0x4869b7)[_0x35e5e8(0x20d)](_0x17d252)[_0x35e5e8(0x204)](),_0x2a0c4e=Buffer[_0x35e5e8(0x1e3)](_0x421bff,_0x55082b[_0x35e5e8(0x200)]);if(_0x55082b[_0x35e5e8(0x21b)](_0x5807ff[_0x35e5e8(0x1db)],_0x2a0c4e[_0x35e5e8(0x1db)])||!_0x2dba6e[_0x35e5e8(0x1c8)](_0x5807ff,_0x2a0c4e))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);let _0x5007df;try{_0x55082b[_0x35e5e8(0x1e9)](_0x55082b[_0x35e5e8(0x1f4)],_0x55082b[_0x35e5e8(0x202)])?_0x5007df=JSON[_0x35e5e8(0x1e8)](Buffer[_0x35e5e8(0x1e3)](_0x17d252,_0x55082b[_0x35e5e8(0x200)])[_0x35e5e8(0x1d6)](_0x35e5e8(0x21c))):_0x2f0243=_0x15ec30[_0x35e5e8(0x1e8)](_0x5dd1df[_0x35e5e8(0x1e3)](_0x3c5ef4,_0x10f955[_0x35e5e8(0x1ff)])[_0x35e5e8(0x1d6)](_0x10f955[_0x35e5e8(0x1c7)]));}catch{throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);}if(!_0x5007df['p']||!Number[_0x35e5e8(0x216)](_0x5007df[_0x35e5e8(0x1c2)]))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1c9)]);if(_0x55082b[_0x35e5e8(0x21a)](_0x5007df[_0x35e5e8(0x1c2)],Math[_0x35e5e8(0x1de)](_0x55082b[_0x35e5e8(0x1ee)](Date[_0x35e5e8(0x1c5)](),0x3e8))))throw new UnauthorizedError(_0x55082b[_0x35e5e8(0x1ef)]);return _0x5007df;}else _0x4b0d5d[_0x35e5e8(0x1fa)](_0x3c323d[_0x35e5e8(0x1e3)](_0xe66809));}};}
@@ -4,6 +4,7 @@
4
4
  export * from "./logger/index.js";
5
5
  export * from "./redis.js";
6
6
  export * from "./pg.js";
7
+ export * from "./auth/index.js";
7
8
  export * from "./file.js";
8
9
  export * from "./dictionary.js";
9
10
  export * from "./audit/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- (function(_0x41af54,_0x505003){var _0x3cfe68=_0x2477,_0x318699=_0x41af54();while(!![]){try{var _0x10fdfe=parseInt(_0x3cfe68(0x1c7))/0x1*(parseInt(_0x3cfe68(0x1c4))/0x2)+parseInt(_0x3cfe68(0x1c9))/0x3*(-parseInt(_0x3cfe68(0x1c3))/0x4)+-parseInt(_0x3cfe68(0x1bf))/0x5+parseInt(_0x3cfe68(0x1c6))/0x6+parseInt(_0x3cfe68(0x1c1))/0x7*(-parseInt(_0x3cfe68(0x1be))/0x8)+parseInt(_0x3cfe68(0x1c2))/0x9*(-parseInt(_0x3cfe68(0x1c0))/0xa)+-parseInt(_0x3cfe68(0x1c8))/0xb*(parseInt(_0x3cfe68(0x1c5))/0xc);if(_0x10fdfe===_0x505003)break;else _0x318699['push'](_0x318699['shift']());}catch(_0x4e97e7){_0x318699['push'](_0x318699['shift']());}}}(_0x2e34,0x4dacc));export*from'./logger/index.js';export*from'./redis.js';export*from'./pg.js';export*from'./file.js';export*from'./dictionary.js';function _0x2477(_0x49f3e7,_0x56bb23){_0x49f3e7=_0x49f3e7-0x1be;var _0x2e3496=_0x2e34();var _0x2477ea=_0x2e3496[_0x49f3e7];return _0x2477ea;}export*from'./audit/index.js';export*from'./resource/index.js';function _0x2e34(){var _0x56aac7=['12jUbIiG','3690150aFkKDz','123YFfKYM','2448666LSVial','15wHWgsg','8912xeLHHo','371100iMLYFl','10ikGyaL','126DnoysN','1663911rlAYoU','278004MxLIgS','8982nOSFCC'];_0x2e34=function(){return _0x56aac7;};return _0x2e34();}
1
+ (function(_0x501972,_0x2a517a){var _0x2649ac=_0x32c3,_0x536156=_0x501972();while(!![]){try{var _0x37bd10=parseInt(_0x2649ac(0xb3))/0x1*(parseInt(_0x2649ac(0xae))/0x2)+parseInt(_0x2649ac(0xb2))/0x3*(-parseInt(_0x2649ac(0xad))/0x4)+-parseInt(_0x2649ac(0xb1))/0x5*(parseInt(_0x2649ac(0xb0))/0x6)+parseInt(_0x2649ac(0xb5))/0x7+parseInt(_0x2649ac(0xb4))/0x8+-parseInt(_0x2649ac(0xaf))/0x9+parseInt(_0x2649ac(0xb6))/0xa;if(_0x37bd10===_0x2a517a)break;else _0x536156['push'](_0x536156['shift']());}catch(_0x11ebd3){_0x536156['push'](_0x536156['shift']());}}}(_0x4226,0x92693));function _0x32c3(_0x25b483,_0x15cd30){_0x25b483=_0x25b483-0xad;var _0x4226c2=_0x4226();var _0x32c37a=_0x4226c2[_0x25b483];return _0x32c37a;}export*from'./logger/index.js';function _0x4226(){var _0x2464a3=['3222927JASsLr','52518rXHuqF','335DYZKnF','2862GjenJB','13FdkBCC','2736944PRwGmA','5888610YGzUes','3314380NHSUpR','232CMSAGR','13046dBvlsC'];_0x4226=function(){return _0x2464a3;};return _0x4226();}export*from'./redis.js';export*from'./pg.js';export*from'./auth/index.js';export*from'./file.js';export*from'./dictionary.js';export*from'./audit/index.js';export*from'./resource/index.js';
@@ -1 +1 @@
1
- function _0x3579(_0x334a23,_0x43b499){_0x334a23=_0x334a23-0x1cb;const _0x546c1e=_0x546c();let _0x3579ba=_0x546c1e[_0x334a23];return _0x3579ba;}(function(_0xe2bc59,_0x53b63f){const _0x22c54d=_0x3579,_0x107cad=_0xe2bc59();while(!![]){try{const _0x4957c2=parseInt(_0x22c54d(0x1d4))/0x1*(-parseInt(_0x22c54d(0x1ee))/0x2)+-parseInt(_0x22c54d(0x1e5))/0x3+parseInt(_0x22c54d(0x1df))/0x4+-parseInt(_0x22c54d(0x1eb))/0x5*(parseInt(_0x22c54d(0x1e8))/0x6)+parseInt(_0x22c54d(0x1d0))/0x7+parseInt(_0x22c54d(0x1e7))/0x8+-parseInt(_0x22c54d(0x1cc))/0x9*(-parseInt(_0x22c54d(0x1cf))/0xa);if(_0x4957c2===_0x53b63f)break;else _0x107cad['push'](_0x107cad['shift']());}catch(_0x1ecd0d){_0x107cad['push'](_0x107cad['shift']());}}}(_0x546c,0x18799));function _0x546c(){const _0x135727=['assign','transport','refreshToken','req.headers.authorization','app','PoUnI','password','hrQaO','accessToken','service','49252pYDUHi','ZfLrM','target','YVNCt','bind','Fdosz','566688gpRglE','cLGfv','1105320WvOldP','18FhqmBp','token','isoTime','318650HOOKpz','info','./transport.js','60bwKnci','IshqR','2151AMRVYT','jedEg','[REDACTED]','18410wCuSEd','527646ynKAjS','tSFnz','end','stdTimeFunctions','6184ktaiVh'];_0x546c=function(){return _0x135727;};return _0x546c();}import _0x4088df from'pino';export function createLogger(){const _0x45b02d=_0x3579,_0x18eb3={};_0x18eb3[_0x45b02d(0x1e2)]=function(_0x3665f1,_0x56555e){return _0x3665f1===_0x56555e;},_0x18eb3[_0x45b02d(0x1e0)]=function(_0x1e1afa,_0x25a7ec){return _0x1e1afa??_0x25a7ec;},_0x18eb3[_0x45b02d(0x1d1)]=_0x45b02d(0x1ed),_0x18eb3[_0x45b02d(0x1da)]=_0x45b02d(0x1ec),_0x18eb3[_0x45b02d(0x1e4)]=_0x45b02d(0x1d8),_0x18eb3[_0x45b02d(0x1e6)]=_0x45b02d(0x1db),_0x18eb3[_0x45b02d(0x1cb)]=_0x45b02d(0x1dd),_0x18eb3[_0x45b02d(0x1cd)]=_0x45b02d(0x1d7),_0x18eb3[_0x45b02d(0x1dc)]=_0x45b02d(0x1ce);const _0x3ba0bf=_0x18eb3,_0x2cab72={};_0x2cab72[_0x45b02d(0x1e1)]=_0x3ba0bf[_0x45b02d(0x1d1)];const _0xa20faa=_0x4088df[_0x45b02d(0x1d6)](_0x2cab72),_0x2580cc={};_0x2580cc[_0x45b02d(0x1de)]=_0x45b02d(0x1d9);const _0x1b4318=_0x4088df({'level':_0x3ba0bf[_0x45b02d(0x1da)],'timestamp':_0x4088df[_0x45b02d(0x1d3)][_0x45b02d(0x1ea)],'base':_0x2580cc,'redact':{'paths':[_0x3ba0bf[_0x45b02d(0x1e4)],_0x3ba0bf[_0x45b02d(0x1e6)],_0x45b02d(0x1e9),_0x3ba0bf[_0x45b02d(0x1cb)],_0x3ba0bf[_0x45b02d(0x1cd)]],'censor':_0x3ba0bf[_0x45b02d(0x1dc)]}},_0xa20faa),_0x5ad139={};function _0xe286f3(_0x4ec1b6,_0x53c7ac){const _0x23ad6f=_0x45b02d;if(_0x3ba0bf[_0x23ad6f(0x1e2)](_0x4ec1b6,undefined)){const _0x4091d7={..._0x5ad139};return _0x4091d7;}_0x5ad139[_0x4ec1b6]=(_0x5ad139[_0x4ec1b6]??0x0)+_0x3ba0bf[_0x23ad6f(0x1e0)](_0x53c7ac,0x1);}return Object[_0x45b02d(0x1d5)](_0x1b4318,{'close':async()=>_0xa20faa[_0x45b02d(0x1d2)](),'metrics':_0xe286f3,'file':()=>_0x1b4318[_0x45b02d(0x1ec)][_0x45b02d(0x1e3)](_0x1b4318)});}
1
+ function _0x19c3(){const _0x2d70dc=['refreshToken','JKuxH','qDhNi','pgeuj','125wBlVsW','BaKwc','end','401223kKGldk','target','info','56202DcAfbU','[REDACTED]','assign','password','accessToken','714380fHYoeY','stdTimeFunctions','transport','YVhXD','isoTime','1093624znBlVw','FFRpt','app','9btGDLr','MKAvv','44bTwLaE','nrgHD','service','834384rHdKTh','151QzoeuA','jrFWM','bind','token','req.headers.authorization','1406930ylizSK','WVpOe','MJdBw','1704YZgcxu','./transport.js'];_0x19c3=function(){return _0x2d70dc;};return _0x19c3();}(function(_0x5dec40,_0x4244d8){const _0x1150cf=_0x1d0c,_0x3057ee=_0x5dec40();while(!![]){try{const _0x459f03=-parseInt(_0x1150cf(0x112))/0x1*(parseInt(_0x1150cf(0x11a))/0x2)+-parseInt(_0x1150cf(0x123))/0x3+-parseInt(_0x1150cf(0x12b))/0x4+-parseInt(_0x1150cf(0x120))/0x5*(parseInt(_0x1150cf(0x126))/0x6)+parseInt(_0x1150cf(0x109))/0x7+-parseInt(_0x1150cf(0x111))/0x8*(-parseInt(_0x1150cf(0x10c))/0x9)+-parseInt(_0x1150cf(0x117))/0xa*(-parseInt(_0x1150cf(0x10e))/0xb);if(_0x459f03===_0x4244d8)break;else _0x3057ee['push'](_0x3057ee['shift']());}catch(_0x2a3330){_0x3057ee['push'](_0x3057ee['shift']());}}}(_0x19c3,0x242ab));import _0x73eef4 from'pino';function _0x1d0c(_0x16851f,_0xdccbf4){_0x16851f=_0x16851f-0x108;const _0x19c329=_0x19c3();let _0x1d0c9d=_0x19c329[_0x16851f];return _0x1d0c9d;}export function createLogger(){const _0x1d85b8=_0x1d0c,_0x2f843a={'MJdBw':function(_0xe1683c,_0x3a137b){return _0xe1683c===_0x3a137b;},'nrgHD':function(_0x47782c,_0xdd25ec){return _0x47782c+_0xdd25ec;},'jrFWM':function(_0x4f689a,_0x31b22b){return _0x4f689a??_0x31b22b;},'YVhXD':function(_0x15f5f7,_0x1ceb2c,_0x46c20d){return _0x15f5f7(_0x1ceb2c,_0x46c20d);},'WVpOe':_0x1d85b8(0x125),'JKuxH':_0x1d85b8(0x116),'FFRpt':_0x1d85b8(0x129),'pgeuj':_0x1d85b8(0x115),'qDhNi':_0x1d85b8(0x12a),'BaKwc':_0x1d85b8(0x11c),'MKAvv':_0x1d85b8(0x127)},_0x47bf40={};_0x47bf40[_0x1d85b8(0x124)]=_0x1d85b8(0x11b);const _0x5d0f53=_0x73eef4[_0x1d85b8(0x12d)](_0x47bf40),_0xaafba5={};_0xaafba5[_0x1d85b8(0x110)]=_0x1d85b8(0x10b);const _0x15f643=_0x2f843a[_0x1d85b8(0x12e)](_0x73eef4,{'level':_0x2f843a[_0x1d85b8(0x118)],'timestamp':_0x73eef4[_0x1d85b8(0x12c)][_0x1d85b8(0x108)],'base':_0xaafba5,'redact':{'paths':[_0x2f843a[_0x1d85b8(0x11d)],_0x2f843a[_0x1d85b8(0x10a)],_0x2f843a[_0x1d85b8(0x11f)],_0x2f843a[_0x1d85b8(0x11e)],_0x2f843a[_0x1d85b8(0x121)]],'censor':_0x2f843a[_0x1d85b8(0x10d)]}},_0x5d0f53),_0x1b497b={};function _0x98c8a1(_0x11d87d,_0x39488d){const _0x22a9a9=_0x1d85b8;if(_0x2f843a[_0x22a9a9(0x119)](_0x11d87d,undefined)){const _0x2d339f={..._0x1b497b};return _0x2d339f;}_0x1b497b[_0x11d87d]=_0x2f843a[_0x22a9a9(0x10f)](_0x1b497b[_0x11d87d]??0x0,_0x2f843a[_0x22a9a9(0x113)](_0x39488d,0x1));}return Object[_0x1d85b8(0x128)](_0x15f643,{'close':async()=>_0x5d0f53[_0x1d85b8(0x122)](),'metrics':_0x98c8a1,'file':()=>_0x15f643[_0x1d85b8(0x125)][_0x1d85b8(0x114)](_0x15f643)});}