@fluid-app/portal-sdk 0.1.131 → 0.1.133

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 (146) hide show
  1. package/dist/{AlertWidget-WQ_XPDRo.mjs → AlertWidget-BYbcGyNr.mjs} +3 -3
  2. package/dist/{AlertWidget-WQ_XPDRo.mjs.map → AlertWidget-BYbcGyNr.mjs.map} +1 -1
  3. package/dist/{AppDownloadScreen-zNP4k8ht.cjs → AppDownloadScreen-B-i6Rydi.cjs} +1 -1
  4. package/dist/{AppDownloadScreen-BOfG3cqC.mjs → AppDownloadScreen-BpExiJat.mjs} +3 -3
  5. package/dist/{AppDownloadScreen-BOfG3cqC.mjs.map → AppDownloadScreen-BpExiJat.mjs.map} +1 -1
  6. package/dist/{AppDownloadScreen-BjCtTMPU.cjs → AppDownloadScreen-CIqSvpV0.cjs} +1 -1
  7. package/dist/{AppDownloadScreen-BjCtTMPU.cjs.map → AppDownloadScreen-CIqSvpV0.cjs.map} +1 -1
  8. package/dist/{BulletListWidget-BYcaQnVH.mjs → BulletListWidget-Bo5Kj1W-.mjs} +2 -2
  9. package/dist/{BulletListWidget-BYcaQnVH.mjs.map → BulletListWidget-Bo5Kj1W-.mjs.map} +1 -1
  10. package/dist/{CalendarWidget-Qb-utCFD.mjs → CalendarWidget-CCsceh_0.mjs} +2 -2
  11. package/dist/{CalendarWidget-Qb-utCFD.mjs.map → CalendarWidget-CCsceh_0.mjs.map} +1 -1
  12. package/dist/{CardWidget-zVxobZDH.mjs → CardWidget-BkOMSBQ-.mjs} +2 -2
  13. package/dist/{CardWidget-zVxobZDH.mjs.map → CardWidget-BkOMSBQ-.mjs.map} +1 -1
  14. package/dist/{CarouselWidget-dpRCljEx.mjs → CarouselWidget-B9LsTYUF.mjs} +2 -2
  15. package/dist/{CarouselWidget-dpRCljEx.mjs.map → CarouselWidget-B9LsTYUF.mjs.map} +1 -1
  16. package/dist/{CatchUpWidget-CSIXsR82.mjs → CatchUpWidget-CSJdJgs-.mjs} +2 -2
  17. package/dist/{CatchUpWidget-CSIXsR82.mjs.map → CatchUpWidget-CSJdJgs-.mjs.map} +1 -1
  18. package/dist/{ChartWidget-88hpX7ft.mjs → ChartWidget-Cpzqi6W4.mjs} +2 -2
  19. package/dist/{ChartWidget-88hpX7ft.mjs.map → ChartWidget-Cpzqi6W4.mjs.map} +1 -1
  20. package/dist/{ContactsScreen-BvoMicyB.mjs → ContactsScreen-BRmYDosJ.mjs} +5 -5
  21. package/dist/{ContactsScreen-BvoMicyB.mjs.map → ContactsScreen-BRmYDosJ.mjs.map} +1 -1
  22. package/dist/{ContainerWidget-DNS7ynby.mjs → ContainerWidget-DTchKDKw.mjs} +3 -3
  23. package/dist/{ContainerWidget-DNS7ynby.mjs.map → ContainerWidget-DTchKDKw.mjs.map} +1 -1
  24. package/dist/{CustomersScreen-xAauAB-B.mjs → CustomersScreen-Cnn-Wcza.mjs} +2 -2
  25. package/dist/{CustomersScreen-xAauAB-B.mjs.map → CustomersScreen-Cnn-Wcza.mjs.map} +1 -1
  26. package/dist/{EmbedWidget-BQYixJLj.mjs → EmbedWidget-Du9DMpSo.mjs} +2 -2
  27. package/dist/{EmbedWidget-BQYixJLj.mjs.map → EmbedWidget-Du9DMpSo.mjs.map} +1 -1
  28. package/dist/{FluidProvider-B-f_JVal.mjs → FluidProvider-BUdNsR8f.mjs} +49 -49
  29. package/dist/{FluidProvider-B-f_JVal.mjs.map → FluidProvider-BUdNsR8f.mjs.map} +1 -1
  30. package/dist/FluidProvider-CQoQjYxU.cjs.map +1 -1
  31. package/dist/{ImageWidget-DE9Fp_oH.mjs → ImageWidget-B1Mx3qKN.mjs} +2 -2
  32. package/dist/{ImageWidget-DE9Fp_oH.mjs.map → ImageWidget-B1Mx3qKN.mjs.map} +1 -1
  33. package/dist/{LayoutWidget-BFO_PHWw.mjs → LayoutWidget-Bgodl7eR.mjs} +2 -2
  34. package/dist/{LayoutWidget-BFO_PHWw.mjs.map → LayoutWidget-Bgodl7eR.mjs.map} +1 -1
  35. package/dist/{LinkWidget-JSoDi-ag.mjs → LinkWidget-B5PlWJHe.mjs} +2 -2
  36. package/dist/{LinkWidget-JSoDi-ag.mjs.map → LinkWidget-B5PlWJHe.mjs.map} +1 -1
  37. package/dist/{ListWidget-CBLZ8CjD.mjs → ListWidget-BWfsmVoc.mjs} +2 -2
  38. package/dist/{ListWidget-CBLZ8CjD.mjs.map → ListWidget-BWfsmVoc.mjs.map} +1 -1
  39. package/dist/{MessagingScreen-COWASb0E.mjs → MessagingScreen-CQwR5WA1.mjs} +9 -6
  40. package/dist/{MessagingScreen-COWASb0E.mjs.map → MessagingScreen-CQwR5WA1.mjs.map} +1 -1
  41. package/dist/{MySiteScreen-BasZFpx7.cjs → MySiteScreen-C00HjZdl.cjs} +1 -1
  42. package/dist/{MySiteScreen-B5-bV1-O.mjs → MySiteScreen-CcxWz0IH.mjs} +4 -4
  43. package/dist/{MySiteScreen-B5-bV1-O.mjs.map → MySiteScreen-CcxWz0IH.mjs.map} +1 -1
  44. package/dist/{MySiteScreen-DURa034X.cjs → MySiteScreen-D56qESn0.cjs} +1 -1
  45. package/dist/{MySiteScreen-DURa034X.cjs.map → MySiteScreen-D56qESn0.cjs.map} +1 -1
  46. package/dist/{MySiteWidget-BqtLSExC.mjs → MySiteWidget-mK0Mj3DS.mjs} +2 -2
  47. package/dist/{MySiteWidget-BqtLSExC.mjs.map → MySiteWidget-mK0Mj3DS.mjs.map} +1 -1
  48. package/dist/{NestedWidget-DIwW-wM7.mjs → NestedWidget-B6cUOyI3.mjs} +2 -2
  49. package/dist/{NestedWidget-DIwW-wM7.mjs.map → NestedWidget-B6cUOyI3.mjs.map} +1 -1
  50. package/dist/{OrdersScreen-BcFvAtJ_.mjs → OrdersScreen-CpOywVHJ.mjs} +4 -4
  51. package/dist/{OrdersScreen-BcFvAtJ_.mjs.map → OrdersScreen-CpOywVHJ.mjs.map} +1 -1
  52. package/dist/{PointsWidget-DgLGU995.mjs → PointsWidget-BlEzqgbK.mjs} +2 -2
  53. package/dist/{PointsWidget-DgLGU995.mjs.map → PointsWidget-BlEzqgbK.mjs.map} +1 -1
  54. package/dist/{ProductsScreen-Mu8doz5F.cjs → ProductsScreen-BPNdpsYm.cjs} +2 -2
  55. package/dist/{src-CMByt6YP.cjs → ProductsScreen-BY285fh-.cjs} +90 -31
  56. package/dist/ProductsScreen-BY285fh-.cjs.map +1 -0
  57. package/dist/ProductsScreen-DMldTDPg.mjs +42 -0
  58. package/dist/{src-DryOJTBW.mjs → ProductsScreen-jdy2j9_J.mjs} +86 -28
  59. package/dist/ProductsScreen-jdy2j9_J.mjs.map +1 -0
  60. package/dist/{ProfileScreen-CnQqdYBE.mjs → ProfileScreen-mAUuAFhe.mjs} +5 -5
  61. package/dist/{ProfileScreen-CnQqdYBE.mjs.map → ProfileScreen-mAUuAFhe.mjs.map} +1 -1
  62. package/dist/{QuickShareWidget-CajKauDa.mjs → QuickShareWidget-Lpox79Cq.mjs} +2 -2
  63. package/dist/{QuickShareWidget-CajKauDa.mjs.map → QuickShareWidget-Lpox79Cq.mjs.map} +1 -1
  64. package/dist/{RecentActivityWidget-BZYB21eR.mjs → RecentActivityWidget-BdPmAQq4.mjs} +2 -2
  65. package/dist/{RecentActivityWidget-BZYB21eR.mjs.map → RecentActivityWidget-BdPmAQq4.mjs.map} +1 -1
  66. package/dist/{SeparatorWidget-Lsd6juu7.mjs → SeparatorWidget-BS966Lk4.mjs} +2 -2
  67. package/dist/{SeparatorWidget-Lsd6juu7.mjs.map → SeparatorWidget-BS966Lk4.mjs.map} +1 -1
  68. package/dist/ShareablesScreen-B6tMQzuX.mjs +1314 -0
  69. package/dist/ShareablesScreen-B6tMQzuX.mjs.map +1 -0
  70. package/dist/{ShareablesScreen-oZhW2jGu.cjs → ShareablesScreen-DMBXIMMj.cjs} +2 -2
  71. package/dist/ShareablesScreen-d_ThfnNQ.mjs +42 -0
  72. package/dist/ShareablesScreen-znVUD_OK.cjs +1332 -0
  73. package/dist/ShareablesScreen-znVUD_OK.cjs.map +1 -0
  74. package/dist/{ShopScreen-B1UzSmK8.cjs → ShopScreen-BVIT_QS-.cjs} +6 -4
  75. package/dist/ShopScreen-BVIT_QS-.cjs.map +1 -0
  76. package/dist/{ShopScreen-7HWz_B6R.cjs → ShopScreen-Bsjdn-E9.cjs} +1 -1
  77. package/dist/{ShopScreen-D1N3RWm9.mjs → ShopScreen-C1bnhxpj.mjs} +9 -7
  78. package/dist/ShopScreen-C1bnhxpj.mjs.map +1 -0
  79. package/dist/{SpacerWidget-B3zkEePP.mjs → SpacerWidget-BimE1fjJ.mjs} +2 -2
  80. package/dist/{SpacerWidget-B3zkEePP.mjs.map → SpacerWidget-BimE1fjJ.mjs.map} +1 -1
  81. package/dist/{SubscriptionsScreen-Bw3xkq7t.mjs → SubscriptionsScreen-QHf54yD7.mjs} +5 -5
  82. package/dist/{SubscriptionsScreen-Bw3xkq7t.mjs.map → SubscriptionsScreen-QHf54yD7.mjs.map} +1 -1
  83. package/dist/{TableWidget-Xz0d4UH5.mjs → TableWidget-CfSqeNQj.mjs} +2 -2
  84. package/dist/{TableWidget-Xz0d4UH5.mjs.map → TableWidget-CfSqeNQj.mjs.map} +1 -1
  85. package/dist/{TextWidget-CzUlNmCl.mjs → TextWidget-DYpbUtQh.mjs} +2 -2
  86. package/dist/{TextWidget-CzUlNmCl.mjs.map → TextWidget-DYpbUtQh.mjs.map} +1 -1
  87. package/dist/{ToDoWidget-qyFLHU_o.mjs → ToDoWidget-DaxkgCEl.mjs} +2 -2
  88. package/dist/{ToDoWidget-qyFLHU_o.mjs.map → ToDoWidget-DaxkgCEl.mjs.map} +1 -1
  89. package/dist/{UpgradeScreen-CIiEjeTZ.cjs → UpgradeScreen--eiiE1rX.cjs} +1 -1
  90. package/dist/{UpgradeScreen-IaYxGm7M.cjs → UpgradeScreen-7on9GOgu.cjs} +1 -1
  91. package/dist/{UpgradeScreen-IaYxGm7M.cjs.map → UpgradeScreen-7on9GOgu.cjs.map} +1 -1
  92. package/dist/{UpgradeScreen-BZdJQxb9.mjs → UpgradeScreen-p7aAXWFM.mjs} +2 -2
  93. package/dist/{UpgradeScreen-BZdJQxb9.mjs.map → UpgradeScreen-p7aAXWFM.mjs.map} +1 -1
  94. package/dist/{VideoWidget-CpUPsOI7.mjs → VideoWidget-CHktk3hs.mjs} +2 -2
  95. package/dist/{VideoWidget-CpUPsOI7.mjs.map → VideoWidget-CHktk3hs.mjs.map} +1 -1
  96. package/dist/{dist-B1HwSrso.mjs → dist-CayuD99K.mjs} +1 -1
  97. package/dist/{dist-B1HwSrso.mjs.map → dist-CayuD99K.mjs.map} +1 -1
  98. package/dist/{es-BcjHf1ZX.mjs → es-CTLNkiWp.mjs} +38 -3
  99. package/dist/{es-BcjHf1ZX.mjs.map → es-CTLNkiWp.mjs.map} +1 -1
  100. package/dist/index.cjs +19 -19
  101. package/dist/index.d.cts.map +1 -1
  102. package/dist/index.d.mts.map +1 -1
  103. package/dist/index.mjs +70 -70
  104. package/dist/index.mjs.map +1 -1
  105. package/dist/{order-status-badge-OZ1InBwZ.mjs → order-status-badge-Bt2gMEPZ.mjs} +1 -1
  106. package/dist/{order-status-badge-OZ1InBwZ.mjs.map → order-status-badge-Bt2gMEPZ.mjs.map} +1 -1
  107. package/dist/{sortable.esm-DSrWP4x9.mjs → sortable.esm-BzPsVjTI.mjs} +1 -1
  108. package/dist/{sortable.esm-DSrWP4x9.mjs.map → sortable.esm-BzPsVjTI.mjs.map} +1 -1
  109. package/dist/{src-DIcd2_ex.cjs → src-C5GUPE_i.cjs} +37 -26
  110. package/dist/src-C5GUPE_i.cjs.map +1 -0
  111. package/dist/{src-k03GJfKt.mjs → src-DcIV4Mpe.mjs} +41 -30
  112. package/dist/src-DcIV4Mpe.mjs.map +1 -0
  113. package/dist/{use-account-clients-CZw8FqxD.mjs → use-account-clients-BjK5QVYl.mjs} +2 -2
  114. package/dist/{use-account-clients-CZw8FqxD.mjs.map → use-account-clients-BjK5QVYl.mjs.map} +1 -1
  115. package/dist/{use-current-user-C6af9r0B.mjs → use-current-user-BP_GJuQe.mjs} +3 -3
  116. package/dist/{use-current-user-C6af9r0B.mjs.map → use-current-user-BP_GJuQe.mjs.map} +1 -1
  117. package/dist/{use-fluid-api-R0Qybt_F.mjs → use-fluid-api-UtVBk6E-.mjs} +2 -2
  118. package/dist/{use-fluid-api-R0Qybt_F.mjs.map → use-fluid-api-UtVBk6E-.mjs.map} +1 -1
  119. package/dist/{use-fluid-auth-_pnjCu2c.mjs → use-fluid-auth-DrPeCmW-.mjs} +2 -2
  120. package/dist/{use-fluid-auth-_pnjCu2c.mjs.map → use-fluid-auth-DrPeCmW-.mjs.map} +1 -1
  121. package/dist/{use-portal-products-client-Bl-yd0Tl.cjs → use-portal-products-client-CIrRGIxC.cjs} +5 -14
  122. package/dist/use-portal-products-client-CIrRGIxC.cjs.map +1 -0
  123. package/dist/{use-portal-products-client-tJi4q54S.mjs → use-portal-products-client-dV5jIXpp.mjs} +6 -15
  124. package/dist/use-portal-products-client-dV5jIXpp.mjs.map +1 -0
  125. package/package.json +18 -18
  126. package/dist/MessagingScreen-CWm4iQnk.mjs +0 -38
  127. package/dist/ProductsScreen-BHeRiKUM.cjs +0 -101
  128. package/dist/ProductsScreen-BHeRiKUM.cjs.map +0 -1
  129. package/dist/ProductsScreen-C_1ghW3w.mjs +0 -42
  130. package/dist/ProductsScreen-DJOPzE9v.mjs +0 -89
  131. package/dist/ProductsScreen-DJOPzE9v.mjs.map +0 -1
  132. package/dist/ShareablesScreen-BSRbPf6u.cjs +0 -414
  133. package/dist/ShareablesScreen-BSRbPf6u.cjs.map +0 -1
  134. package/dist/ShareablesScreen-COyBtpDy.mjs +0 -42
  135. package/dist/ShareablesScreen-kBJFUklJ.mjs +0 -396
  136. package/dist/ShareablesScreen-kBJFUklJ.mjs.map +0 -1
  137. package/dist/ShopScreen-B1UzSmK8.cjs.map +0 -1
  138. package/dist/ShopScreen-D1N3RWm9.mjs.map +0 -1
  139. package/dist/chunk-ByhMGyNw.mjs +0 -37
  140. package/dist/src-CMByt6YP.cjs.map +0 -1
  141. package/dist/src-DIcd2_ex.cjs.map +0 -1
  142. package/dist/src-DryOJTBW.mjs.map +0 -1
  143. package/dist/src-k03GJfKt.mjs.map +0 -1
  144. package/dist/use-portal-products-client-Bl-yd0Tl.cjs.map +0 -1
  145. package/dist/use-portal-products-client-tJi4q54S.mjs.map +0 -1
  146. /package/dist/{src-DAC9DwXZ.mjs → src-6SxtfYk9.mjs} +0 -0
@@ -0,0 +1,1332 @@
1
+ require("./chunk-9hOWP6kD.cjs");
2
+ const require_FluidProvider = require("./FluidProvider-CQoQjYxU.cjs");
3
+ const require_use_fluid_auth = require("./use-fluid-auth-B7lF_1HS.cjs");
4
+ const require_use_current_user = require("./use-current-user-DISrPz9d.cjs");
5
+ const require_AppNavigationContext = require("./AppNavigationContext-Agp0UkCQ.cjs");
6
+ const require_use_account_clients = require("./use-account-clients-CH92XyHh.cjs");
7
+ const require_src = require("./src-C5GUPE_i.cjs");
8
+ const require_use_portal_products_client = require("./use-portal-products-client-CIrRGIxC.cjs");
9
+ let react = require("react");
10
+ let react_jsx_runtime = require("react/jsx-runtime");
11
+ let zod = require("zod");
12
+ //#region src/hooks/use-user-type.ts
13
+ /**
14
+ * Convenience hook for user-type checks in the portal SDK.
15
+ */
16
+ function useUserType() {
17
+ const { user } = require_use_fluid_auth.useFluidAuth();
18
+ return (0, react.useMemo)(() => {
19
+ const userType = user?.user_type ?? null;
20
+ return {
21
+ userType,
22
+ isCustomer: userType === require_FluidProvider.USER_TYPES.customer,
23
+ isRep: userType === require_FluidProvider.USER_TYPES.rep,
24
+ isAdmin: userType === require_FluidProvider.USER_TYPES.admin || userType === require_FluidProvider.USER_TYPES.root_admin
25
+ };
26
+ }, [user?.user_type]);
27
+ }
28
+ //#endregion
29
+ //#region ../../file-picker/core/src/schemas/dam.ts
30
+ const damVariantSchema = zod.z.object({
31
+ id: zod.z.string(),
32
+ url: zod.z.string().nullable(),
33
+ file_name: zod.z.string(),
34
+ mime_type: zod.z.string(),
35
+ content: zod.z.any().nullable(),
36
+ created_at: zod.z.string(),
37
+ updated_at: zod.z.string(),
38
+ default: zod.z.boolean(),
39
+ is_original: zod.z.boolean(),
40
+ is_text: zod.z.boolean(),
41
+ media_type: zod.z.string(),
42
+ processing_status: zod.z.string(),
43
+ tags: zod.z.array(zod.z.string())
44
+ });
45
+ const damAssetSchema = zod.z.object({
46
+ id: zod.z.number(),
47
+ canonical_path: zod.z.string(),
48
+ category: zod.z.string(),
49
+ code: zod.z.string(),
50
+ company: zod.z.string(),
51
+ created_at: zod.z.string(),
52
+ default_variant_id: zod.z.string(),
53
+ default_variant_url: zod.z.string().optional(),
54
+ description: zod.z.string(),
55
+ name: zod.z.string(),
56
+ updated_at: zod.z.string(),
57
+ variants: zod.z.array(damVariantSchema).optional()
58
+ });
59
+ const damTreeFolderNodeSchema = zod.z.object({
60
+ asset_code: zod.z.union([zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown())]).optional(),
61
+ name: zod.z.union([zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown())]).optional(),
62
+ category: zod.z.union([zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown())]).optional(),
63
+ variants: zod.z.union([zod.z.array(zod.z.unknown()), zod.z.record(zod.z.string(), zod.z.unknown())]).optional()
64
+ }).passthrough();
65
+ const damTreeSchema = zod.z.record(zod.z.string(), zod.z.union([
66
+ zod.z.lazy(() => damTreeSchema),
67
+ damAssetSchema,
68
+ damTreeFolderNodeSchema
69
+ ]));
70
+ const damQueryResponseSchema = zod.z.object({
71
+ path: zod.z.string(),
72
+ tree: damTreeSchema,
73
+ meta: zod.z.object({ next_cursor: zod.z.string().optional() }).optional()
74
+ });
75
+ zod.z.object({ asset: zod.z.object({
76
+ file: zod.z.any(),
77
+ name: zod.z.string(),
78
+ description: zod.z.string().optional(),
79
+ tags: zod.z.string().optional()
80
+ }) });
81
+ const damAssetCreateResponseSchema = zod.z.object({
82
+ asset: damAssetSchema,
83
+ meta: zod.z.object({
84
+ request_id: zod.z.string(),
85
+ timestamp: zod.z.string()
86
+ })
87
+ });
88
+ zod.z.object({
89
+ placeholder_asset: zod.z.object({
90
+ mime_type: zod.z.string(),
91
+ name: zod.z.string().optional(),
92
+ description: zod.z.string().optional()
93
+ }),
94
+ skip_autotagging: zod.z.boolean().optional()
95
+ });
96
+ zod.z.object({
97
+ asset: zod.z.object({
98
+ file: zod.z.any(),
99
+ name: zod.z.string(),
100
+ description: zod.z.string().optional(),
101
+ tags: zod.z.string().optional()
102
+ }).optional(),
103
+ text_asset: zod.z.object({
104
+ file_name: zod.z.string(),
105
+ mime_type: zod.z.string(),
106
+ text: zod.z.string(),
107
+ name: zod.z.string().optional(),
108
+ description: zod.z.string().optional(),
109
+ tags: zod.z.string().optional()
110
+ }).optional(),
111
+ placeholder_asset: zod.z.object({
112
+ mime_type: zod.z.string(),
113
+ name: zod.z.string().optional(),
114
+ description: zod.z.string().optional()
115
+ }).optional(),
116
+ skip_autotagging: zod.z.boolean().optional()
117
+ });
118
+ const damAssetPathCreateResponseSchema = zod.z.object({
119
+ asset: zod.z.object({
120
+ id: zod.z.number(),
121
+ canonical_path: zod.z.string(),
122
+ name: zod.z.string()
123
+ }),
124
+ meta: zod.z.object({
125
+ request_id: zod.z.string(),
126
+ timestamp: zod.z.string()
127
+ })
128
+ });
129
+ //#endregion
130
+ //#region ../../api-clients/portal-tenant-content/src/namespaces/portal_tenant_content.ts
131
+ /**
132
+ * List media (own uploads and company media)
133
+ * Returns a paginated list of the member's own uploads and company-owned media.
134
+ *
135
+ * @param client - Fetch client instance
136
+ * @param [params] - params
137
+ */
138
+ async function media_list(client, params) {
139
+ return client.get(`/api/content/media`, params);
140
+ }
141
+ /**
142
+ * Create a new media item
143
+ * Creates a new media item record.
144
+ *
145
+ * @param client - Fetch client instance
146
+ * @param body - body
147
+ */
148
+ async function media_create(client, body) {
149
+ return client.post(`/api/content/media`, body);
150
+ }
151
+ /**
152
+ * Get a specific media item
153
+ * Returns a single media item by ID.
154
+ *
155
+ * @param client - Fetch client instance
156
+ * @param id - id
157
+ */
158
+ async function media_show(client, id) {
159
+ return client.get(`/api/content/media/${id}`);
160
+ }
161
+ /**
162
+ * Update a media item (own uploads only)
163
+ * Updates a media item's title or description.
164
+ *
165
+ * @param client - Fetch client instance
166
+ * @param id - id
167
+ * @param body - body
168
+ */
169
+ async function media_update(client, id, body) {
170
+ return client.patch(`/api/content/media/${id}`, body);
171
+ }
172
+ /**
173
+ * Delete a media item (own uploads only)
174
+ * Removes a media item.
175
+ *
176
+ * @param client - Fetch client instance
177
+ * @param id - id
178
+ */
179
+ async function media_destroy(client, id) {
180
+ return client.delete(`/api/content/media/${id}`);
181
+ }
182
+ /**
183
+ * List playlists with cursor pagination
184
+ * Returns a paginated list of playlists.
185
+ *
186
+ * @param client - Fetch client instance
187
+ * @param [params] - params
188
+ */
189
+ async function playlists_list(client, params) {
190
+ return client.get(`/api/content/playlists`, params);
191
+ }
192
+ /**
193
+ * Create a new playlist
194
+ * Creates a new playlist.
195
+ *
196
+ * @param client - Fetch client instance
197
+ * @param body - body
198
+ */
199
+ async function playlists_create(client, body) {
200
+ return client.post(`/api/content/playlists`, body);
201
+ }
202
+ /**
203
+ * Get a specific playlist
204
+ * Returns a single playlist by ID.
205
+ *
206
+ * @param client - Fetch client instance
207
+ * @param id - id
208
+ */
209
+ async function playlists_show(client, id) {
210
+ return client.get(`/api/content/playlists/${id}`);
211
+ }
212
+ /**
213
+ * Update a playlist
214
+ * Updates a playlist's title or metadata.
215
+ *
216
+ * @param client - Fetch client instance
217
+ * @param id - id
218
+ * @param body - body
219
+ */
220
+ async function playlists_update(client, id, body) {
221
+ return client.patch(`/api/content/playlists/${id}`, body);
222
+ }
223
+ /**
224
+ * Delete a playlist
225
+ * Removes a playlist.
226
+ *
227
+ * @param client - Fetch client instance
228
+ * @param id - id
229
+ */
230
+ async function playlists_destroy(client, id) {
231
+ return client.delete(`/api/content/playlists/${id}`);
232
+ }
233
+ /**
234
+ * List items in a playlist
235
+ * Returns a paginated list of items in a playlist.
236
+ *
237
+ * @param client - Fetch client instance
238
+ * @param playlist_id - playlist_id
239
+ * @param [params] - params
240
+ */
241
+ async function playlists_items_list(client, playlist_id, params) {
242
+ return client.get(`/api/content/playlists/${playlist_id}/items`, params);
243
+ }
244
+ /**
245
+ * Add an item to a playlist
246
+ * Adds a media item to a playlist.
247
+ *
248
+ * @param client - Fetch client instance
249
+ * @param playlist_id - playlist_id
250
+ * @param body - body
251
+ */
252
+ async function playlists_items_add(client, playlist_id, body) {
253
+ return client.post(`/api/content/playlists/${playlist_id}/items`, body);
254
+ }
255
+ /**
256
+ * Remove an item from a playlist
257
+ * Removes a single item from a playlist.
258
+ *
259
+ * @param client - Fetch client instance
260
+ * @param playlist_id - playlist_id
261
+ * @param id - id
262
+ */
263
+ async function playlists_items_remove(client, playlist_id, id) {
264
+ return client.delete(`/api/content/playlists/${playlist_id}/items/${id}`);
265
+ }
266
+ /**
267
+ * List share links for the current user
268
+ * Returns a paginated list of share links.
269
+ *
270
+ * @param client - Fetch client instance
271
+ * @param [params] - params
272
+ */
273
+ async function shares_list(client, params) {
274
+ return client.get(`/api/shares`, params);
275
+ }
276
+ /**
277
+ * Create a share link
278
+ * Creates a new share link for content.
279
+ *
280
+ * @param client - Fetch client instance
281
+ * @param body - body
282
+ */
283
+ async function shares_create(client, body) {
284
+ return client.post(`/api/shares`, body);
285
+ }
286
+ /**
287
+ * List DAM assets
288
+ * Returns a paginated list of DAM assets for the company.
289
+ *
290
+ * @param client - Fetch client instance
291
+ * @param [params] - params
292
+ */
293
+ async function dam_assets_list(client, params) {
294
+ return client.get(`/api/content/dam/assets`, params);
295
+ }
296
+ /**
297
+ * Create a DAM asset placeholder
298
+ * Creates a new DAM asset placeholder record with a canonical path.
299
+ *
300
+ * @param client - Fetch client instance
301
+ * @param body - body
302
+ */
303
+ async function dam_assets_create(client, body) {
304
+ return client.post(`/api/content/dam/assets`, body);
305
+ }
306
+ /**
307
+ * List paths for a DAM asset
308
+ * Returns a paginated list of path aliases for a DAM asset.
309
+ *
310
+ * @param client - Fetch client instance
311
+ * @param asset_code - asset_code
312
+ * @param [params] - params
313
+ */
314
+ async function dam_asset_paths_list(client, asset_code, params) {
315
+ return client.get(`/api/content/dam/assets/${asset_code}/paths`, params);
316
+ }
317
+ /**
318
+ * Create a path alias for a DAM asset
319
+ * Creates a new path alias for an existing DAM asset.
320
+ *
321
+ * @param client - Fetch client instance
322
+ * @param asset_code - asset_code
323
+ * @param body - body
324
+ */
325
+ async function dam_asset_paths_create(client, asset_code, body) {
326
+ return client.post(`/api/content/dam/assets/${asset_code}/paths`, body);
327
+ }
328
+ //#endregion
329
+ //#region ../../shareables/api-client/src/portal-tenant-media-adapter.ts
330
+ /**
331
+ * Maps a BFF media object to the port's Media shape, providing defaults
332
+ * for optional fields returned by the generated client.
333
+ */
334
+ function mapMedia(raw) {
335
+ return {
336
+ id: raw.id ?? 0,
337
+ title: raw.title ?? "",
338
+ description: raw.description ?? null,
339
+ media_type: raw.media_type ?? "",
340
+ url: raw.url ?? null,
341
+ thumbnail_url: raw.thumbnail_url ?? null,
342
+ owner_type: raw.owner_type ?? "",
343
+ created_at: raw.created_at ?? "",
344
+ updated_at: raw.updated_at ?? ""
345
+ };
346
+ }
347
+ /**
348
+ * Maps the BFF meta envelope to the port's ApiMeta shape.
349
+ */
350
+ function mapMeta$3(raw) {
351
+ return {
352
+ request_id: raw?.request_id ?? null,
353
+ timestamp: raw?.timestamp ?? "",
354
+ pagination: raw?.pagination ? {
355
+ cursor: raw.pagination.cursor ?? null,
356
+ limit: raw.pagination.limit,
357
+ next_cursor: raw.pagination.next_cursor ?? null,
358
+ prev_cursor: raw.pagination.prev_cursor ?? null
359
+ } : void 0
360
+ };
361
+ }
362
+ /**
363
+ * Creates a ContentMediaApi adapter backed by the portal-tenant content BFF.
364
+ *
365
+ * Maps the generated portal-tenant-content namespace functions to the abstract
366
+ * ContentMediaApi port, closing over the FetchClient so consumers don't need
367
+ * to pass it per-call.
368
+ */
369
+ function createPortalTenantMediaAdapter(client) {
370
+ return {
371
+ listMedia: async (params) => {
372
+ const response = await media_list(client, {
373
+ "page[cursor]": params?.cursor,
374
+ "page[limit]": params?.limit,
375
+ media_type: params?.media_type,
376
+ "filter[title]": params?.["filter[title]"],
377
+ sort: params?.sort
378
+ });
379
+ return {
380
+ media: (response.media ?? []).map(mapMedia),
381
+ meta: mapMeta$3(response.meta)
382
+ };
383
+ },
384
+ createMedia: async (body) => {
385
+ const response = await media_create(client, { media: body });
386
+ return {
387
+ media: mapMedia(response.media ?? {}),
388
+ meta: mapMeta$3(response.meta)
389
+ };
390
+ },
391
+ getMedia: async (id) => {
392
+ const response = await media_show(client, id);
393
+ return {
394
+ media: mapMedia(response.media ?? {}),
395
+ meta: mapMeta$3(response.meta)
396
+ };
397
+ },
398
+ updateMedia: async (id, body) => {
399
+ const response = await media_update(client, id, { media: body });
400
+ return {
401
+ media: mapMedia(response.media ?? {}),
402
+ meta: mapMeta$3(response.meta)
403
+ };
404
+ },
405
+ deleteMedia: async (id) => {
406
+ const response = await media_destroy(client, id);
407
+ return {
408
+ media: { id: response.media?.id ?? 0 },
409
+ meta: mapMeta$3(response.meta)
410
+ };
411
+ }
412
+ };
413
+ }
414
+ function mediaKindFromType$1(mediaType) {
415
+ if (mediaType === "video") return "video";
416
+ if (mediaType === "image") return "image";
417
+ if (mediaType === "document" || mediaType === "pdf") return "pdf";
418
+ return null;
419
+ }
420
+ function toBffMediumResponse(bff) {
421
+ const kind = mediaKindFromType$1(bff.media_type);
422
+ const isVideo = bff.media_type === "video";
423
+ const isPdf = bff.media_type === "pdf" || bff.media_type === "document";
424
+ return {
425
+ id: bff.id,
426
+ user_id: null,
427
+ media_type: bff.media_type,
428
+ media_format: bff.media_type,
429
+ image_url: !isVideo && !isPdf ? bff.url ?? bff.thumbnail_url ?? null : bff.thumbnail_url ?? null,
430
+ video_url: isVideo ? bff.url ?? null : null,
431
+ pdf_url: isPdf ? bff.url ?? null : null,
432
+ title: bff.title,
433
+ description: {
434
+ id: null,
435
+ name: null,
436
+ body: bff.description ?? null,
437
+ record_type: null,
438
+ record_id: null,
439
+ created_at: bff.created_at ?? null,
440
+ updated_at: bff.updated_at ?? null,
441
+ locale: null
442
+ },
443
+ stripped: bff.description ?? null,
444
+ kind,
445
+ active: true,
446
+ visibility: null,
447
+ share_link: null,
448
+ views: 0,
449
+ leads: 0,
450
+ watch: null,
451
+ video_status: null,
452
+ duration: null,
453
+ cta_url: null,
454
+ cta_button_text: null,
455
+ cta_enabled: false,
456
+ cta_action_type: null,
457
+ video_shopping_enabled: false,
458
+ prompts_enabled: false,
459
+ ranks: [],
460
+ preview_link: null,
461
+ attached_shareables: [],
462
+ created_at: bff.created_at
463
+ };
464
+ }
465
+ /**
466
+ * Creates a ShareablesApi["media"]-compatible adapter backed by the
467
+ * portal-tenant content BFF. Includes cursor-to-page-number caching
468
+ * for bridging the legacy UI's page-number pagination.
469
+ */
470
+ function createPortalTenantMediaShareablesAdapter(client) {
471
+ const portAdapter = createPortalTenantMediaAdapter(client);
472
+ const cursorByPage = /* @__PURE__ */ new Map();
473
+ let lastFilterKey = "";
474
+ return {
475
+ getMedia: async (options) => {
476
+ const pageNumber = options?.page ?? 1;
477
+ const filterKey = `${options?.search_query ?? ""}|${options?.sorted_by ?? ""}|${options?.media_type ?? options?.with_type ?? ""}`;
478
+ if (filterKey !== lastFilterKey) {
479
+ cursorByPage.clear();
480
+ lastFilterKey = filterKey;
481
+ }
482
+ const cursor = pageNumber > 1 ? cursorByPage.get(pageNumber) : void 0;
483
+ const rawSort = options?.sorted_by;
484
+ let bffSort;
485
+ if (rawSort === "title_asc") bffSort = "title_asc";
486
+ else if (rawSort === "title_desc") bffSort = "title_desc";
487
+ const response = await portAdapter.listMedia({
488
+ cursor,
489
+ limit: options?.per_page,
490
+ media_type: options?.media_type ?? options?.with_type,
491
+ "filter[title]": options?.search_query,
492
+ sort: bffSort
493
+ });
494
+ const nextCursor = response.meta.pagination?.next_cursor;
495
+ if (nextCursor) cursorByPage.set(pageNumber + 1, nextCursor);
496
+ const transformedItems = response.media.map(toBffMediumResponse);
497
+ return {
498
+ data: transformedItems,
499
+ status: "success",
500
+ media: transformedItems,
501
+ meta: {
502
+ total_count: transformedItems.length,
503
+ current: pageNumber,
504
+ per_page: options?.per_page ?? 24,
505
+ pages: nextCursor ? pageNumber + 1 : pageNumber,
506
+ next: nextCursor ? pageNumber + 1 : null,
507
+ previous: pageNumber > 1 ? pageNumber - 1 : null
508
+ }
509
+ };
510
+ },
511
+ getMediaById: async (id) => {
512
+ const medium = toBffMediumResponse((await portAdapter.getMedia(id)).media);
513
+ return {
514
+ data: medium,
515
+ status: "success",
516
+ media: medium
517
+ };
518
+ },
519
+ createMedia: async (mediaData) => {
520
+ return toBffMediumResponse((await portAdapter.createMedia({
521
+ title: mediaData.title ?? "",
522
+ description: mediaData.description,
523
+ media_type: mediaData.media_type ?? "image",
524
+ url: mediaData.image_url ?? mediaData.video_url ?? mediaData.pdf_url ?? void 0
525
+ })).media);
526
+ },
527
+ updateMedia: async (id, mediaData) => {
528
+ return toBffMediumResponse((await portAdapter.updateMedia(id, {
529
+ title: mediaData.title,
530
+ description: mediaData.description
531
+ })).media);
532
+ },
533
+ deleteMedia: async (id) => {
534
+ await portAdapter.deleteMedia(id);
535
+ return { success: true };
536
+ }
537
+ };
538
+ }
539
+ //#endregion
540
+ //#region ../../shareables/api-client/src/portal-tenant-playlists-adapter.ts
541
+ /**
542
+ * Maps a BFF playlist object to the port's Playlist shape.
543
+ */
544
+ function mapPlaylist(raw) {
545
+ return {
546
+ id: raw.id ?? 0,
547
+ title: raw.title ?? "",
548
+ description: raw.description ?? null,
549
+ items_count: raw.items_count ?? 0,
550
+ user_id: raw.user_id,
551
+ is_favorited: raw.is_favorited,
552
+ image_url: raw.image_url ?? null,
553
+ created_at: raw.created_at ?? "",
554
+ updated_at: raw.updated_at ?? ""
555
+ };
556
+ }
557
+ /**
558
+ * Maps a BFF playlist item to the port's PlaylistItem shape.
559
+ */
560
+ function mapPlaylistItem(raw) {
561
+ return {
562
+ id: raw.id ?? 0,
563
+ media_id: raw.media_id ?? 0,
564
+ position: raw.position ?? null,
565
+ title: raw.title,
566
+ image_url: raw.image_url ?? null,
567
+ media_type: raw.media_type,
568
+ video_url: raw.video_url ?? null,
569
+ duration: raw.duration ?? null,
570
+ created_at: raw.created_at ?? ""
571
+ };
572
+ }
573
+ /**
574
+ * Maps the BFF meta envelope to the port's ApiMeta shape.
575
+ */
576
+ function mapMeta$2(raw) {
577
+ return {
578
+ request_id: raw?.request_id ?? null,
579
+ timestamp: raw?.timestamp ?? "",
580
+ pagination: raw?.pagination ? {
581
+ cursor: raw.pagination.cursor ?? null,
582
+ limit: raw.pagination.limit,
583
+ next_cursor: raw.pagination.next_cursor ?? null,
584
+ prev_cursor: raw.pagination.prev_cursor ?? null
585
+ } : void 0
586
+ };
587
+ }
588
+ /**
589
+ * Creates a ContentPlaylistsApi adapter backed by the portal-tenant content BFF.
590
+ *
591
+ * Maps the generated portal-tenant-content namespace functions to the abstract
592
+ * ContentPlaylistsApi port, closing over the FetchClient so consumers don't
593
+ * need to pass it per-call.
594
+ */
595
+ function createPortalTenantPlaylistsAdapter(client) {
596
+ return {
597
+ listPlaylists: async (params) => {
598
+ const response = await playlists_list(client, {
599
+ "page[cursor]": params?.cursor,
600
+ "page[limit]": params?.limit,
601
+ "filter[title]": params?.["filter[title]"],
602
+ sort: params?.sort
603
+ });
604
+ return {
605
+ playlists: (response.playlists ?? []).map(mapPlaylist),
606
+ meta: mapMeta$2(response.meta)
607
+ };
608
+ },
609
+ createPlaylist: async (body) => {
610
+ const response = await playlists_create(client, { playlist: body });
611
+ return {
612
+ playlist: mapPlaylist(response.playlist ?? {}),
613
+ meta: mapMeta$2(response.meta)
614
+ };
615
+ },
616
+ getPlaylist: async (id) => {
617
+ const response = await playlists_show(client, id);
618
+ return {
619
+ playlist: mapPlaylist(response.playlist ?? {}),
620
+ meta: mapMeta$2(response.meta)
621
+ };
622
+ },
623
+ updatePlaylist: async (id, body) => {
624
+ const response = await playlists_update(client, id, { playlist: body });
625
+ return {
626
+ playlist: mapPlaylist(response.playlist ?? {}),
627
+ meta: mapMeta$2(response.meta)
628
+ };
629
+ },
630
+ deletePlaylist: async (id) => {
631
+ const response = await playlists_destroy(client, id);
632
+ return {
633
+ playlist: { id: response.playlist?.id ?? 0 },
634
+ meta: mapMeta$2(response.meta)
635
+ };
636
+ },
637
+ listPlaylistItems: async (playlistId, params) => {
638
+ const response = await playlists_items_list(client, playlistId, {
639
+ "page[cursor]": params?.cursor,
640
+ "page[limit]": params?.limit
641
+ });
642
+ return {
643
+ playlist_items: (response.playlist_items ?? []).map(mapPlaylistItem),
644
+ meta: mapMeta$2(response.meta)
645
+ };
646
+ },
647
+ addPlaylistItem: async (playlistId, body) => {
648
+ const response = await playlists_items_add(client, playlistId, { item: body });
649
+ return {
650
+ playlist_item: mapPlaylistItem(response.playlist_item ?? {}),
651
+ meta: mapMeta$2(response.meta)
652
+ };
653
+ },
654
+ removePlaylistItem: async (playlistId, itemId) => {
655
+ const response = await playlists_items_remove(client, playlistId, itemId);
656
+ return {
657
+ playlist_item: { id: response.playlist_item?.id ?? 0 },
658
+ meta: mapMeta$2(response.meta)
659
+ };
660
+ }
661
+ };
662
+ }
663
+ function mediaKindFromType(mediaType) {
664
+ if (mediaType === "video") return "video";
665
+ if (mediaType === "image") return "image";
666
+ if (mediaType === "document" || mediaType === "pdf") return "pdf";
667
+ return null;
668
+ }
669
+ function toBffPlaylist(bff, items) {
670
+ return {
671
+ id: bff.id,
672
+ title: bff.title,
673
+ description: bff.description ?? null,
674
+ image_url: bff.image_url ?? null,
675
+ slug: null,
676
+ active: true,
677
+ user_id: bff.user_id ?? null,
678
+ is_favorited: bff.is_favorited ?? false,
679
+ items: items ?? [],
680
+ items_count: bff.items_count
681
+ };
682
+ }
683
+ /**
684
+ * Creates a ShareablesApi["playlists"]-compatible adapter backed by the
685
+ * portal-tenant content BFF. Fetches playlist + items in parallel for
686
+ * detail views and maps enriched flat fields onto playlist items.
687
+ */
688
+ function createPortalTenantPlaylistsShareablesAdapter(client) {
689
+ const portAdapter = createPortalTenantPlaylistsAdapter(client);
690
+ return {
691
+ getPlaylists: async (options) => {
692
+ const rawSort = options?.sort;
693
+ let bffSort;
694
+ if (rawSort === "title_asc" || rawSort === "title") bffSort = "title_asc";
695
+ else if (rawSort === "title_desc" || rawSort === "-title") bffSort = "title_desc";
696
+ else if (rawSort === "created_at_asc" || rawSort === "created_at") bffSort = "created_at_asc";
697
+ else if (rawSort === "created_at_desc" || rawSort === "-created_at") bffSort = "created_at_desc";
698
+ const response = await portAdapter.listPlaylists({
699
+ cursor: options?.["page[cursor]"],
700
+ limit: options?.["page[limit]"],
701
+ "filter[title]": options?.["filter[title]"],
702
+ sort: bffSort
703
+ });
704
+ return {
705
+ playlists: response.playlists.map((p) => toBffPlaylist(p)),
706
+ meta: {
707
+ request_id: response.meta.request_id ?? "",
708
+ timestamp: response.meta.timestamp ?? "",
709
+ pagination: {
710
+ cursor: response.meta.pagination?.cursor ?? null,
711
+ limit: response.meta.pagination?.limit ?? 12,
712
+ prev_cursor: response.meta.pagination?.prev_cursor ?? null,
713
+ next_cursor: response.meta.pagination?.next_cursor ?? null,
714
+ total_count: 0,
715
+ total_pages: 0
716
+ }
717
+ }
718
+ };
719
+ },
720
+ getPlaylistById: async (id) => {
721
+ const response = await portAdapter.getPlaylist(id);
722
+ const allItems = [];
723
+ let cursor;
724
+ const MAX_PAGES = 50;
725
+ for (let i = 0; i < MAX_PAGES; i++) {
726
+ const page = await portAdapter.listPlaylistItems(id, {
727
+ cursor,
728
+ limit: 100
729
+ });
730
+ allItems.push(...page.playlist_items);
731
+ cursor = page.meta.pagination?.next_cursor ?? void 0;
732
+ if (!cursor) break;
733
+ }
734
+ const items = allItems.map((item) => ({
735
+ id: item.id,
736
+ order: item.position ?? void 0,
737
+ relateable_type: "Medium",
738
+ relateable: { id: item.media_id },
739
+ title: item.title ?? "Untitled",
740
+ image_url: item.image_url ?? null,
741
+ kind: mediaKindFromType(item.media_type ?? ""),
742
+ video_url: item.video_url ?? null,
743
+ duration: item.duration ?? null,
744
+ media_format: item.media_type ?? null
745
+ }));
746
+ return {
747
+ playlist: toBffPlaylist(response.playlist, items),
748
+ meta: {
749
+ request_id: response.meta.request_id ?? "",
750
+ timestamp: response.meta.timestamp ?? ""
751
+ }
752
+ };
753
+ },
754
+ createPlaylist: async (data) => {
755
+ const response = await portAdapter.createPlaylist({
756
+ title: data.playlist.title,
757
+ description: data.playlist.description
758
+ });
759
+ return {
760
+ playlist: toBffPlaylist(response.playlist),
761
+ meta: {
762
+ request_id: response.meta.request_id ?? "",
763
+ timestamp: response.meta.timestamp ?? ""
764
+ }
765
+ };
766
+ },
767
+ updatePlaylist: async (id, data) => {
768
+ const response = await portAdapter.updatePlaylist(id, {
769
+ title: data.playlist.title,
770
+ description: data.playlist.description
771
+ });
772
+ return {
773
+ playlist: toBffPlaylist(response.playlist),
774
+ meta: {
775
+ request_id: response.meta.request_id ?? "",
776
+ timestamp: response.meta.timestamp ?? ""
777
+ }
778
+ };
779
+ },
780
+ addItemToPlaylist: async (id, data) => {
781
+ await Promise.all(data.items.map((item) => portAdapter.addPlaylistItem(id, {
782
+ media_id: item.relateable_id,
783
+ position: typeof item.order === "number" ? item.order : Number(item.order)
784
+ })));
785
+ return toBffPlaylist((await portAdapter.getPlaylist(id)).playlist);
786
+ },
787
+ removeItemsFromPlaylist: async (playlistId, data) => {
788
+ await Promise.all(data.item_ids.map((itemId) => portAdapter.removePlaylistItem(playlistId, itemId)));
789
+ return toBffPlaylist((await portAdapter.getPlaylist(playlistId)).playlist);
790
+ }
791
+ };
792
+ }
793
+ //#endregion
794
+ //#region ../../shareables/api-client/src/portal-tenant-dam-assets-adapter.ts
795
+ /**
796
+ * Maps a BFF DAM asset to the port's DamAsset shape.
797
+ */
798
+ function mapDamAsset(raw) {
799
+ return {
800
+ id: raw.id ?? 0,
801
+ code: raw.code ?? "",
802
+ name: raw.name ?? "",
803
+ content_type: raw.content_type ?? null,
804
+ byte_size: raw.byte_size ?? null,
805
+ url: raw.url ?? null,
806
+ created_at: raw.created_at ?? "",
807
+ updated_at: raw.updated_at ?? ""
808
+ };
809
+ }
810
+ /**
811
+ * Maps a BFF DAM asset path to the port's DamAssetPath shape.
812
+ */
813
+ function mapDamAssetPath(raw) {
814
+ return {
815
+ id: raw.id ?? 0,
816
+ asset_code: raw.asset_code ?? "",
817
+ path: raw.path ?? "",
818
+ created_at: raw.created_at ?? ""
819
+ };
820
+ }
821
+ /**
822
+ * Maps the BFF meta envelope to the port's ApiMeta shape.
823
+ */
824
+ function mapMeta$1(raw) {
825
+ return {
826
+ request_id: raw?.request_id ?? null,
827
+ timestamp: raw?.timestamp ?? "",
828
+ pagination: raw?.pagination ? {
829
+ cursor: raw.pagination.cursor ?? null,
830
+ limit: raw.pagination.limit,
831
+ next_cursor: raw.pagination.next_cursor ?? null,
832
+ prev_cursor: raw.pagination.prev_cursor ?? null
833
+ } : void 0
834
+ };
835
+ }
836
+ /**
837
+ * Creates a ContentDamAssetsApi adapter backed by the portal-tenant content BFF.
838
+ *
839
+ * Maps the generated portal-tenant-content namespace functions to the abstract
840
+ * ContentDamAssetsApi port, closing over the FetchClient so consumers don't
841
+ * need to pass it per-call.
842
+ */
843
+ function createPortalTenantDamAssetsAdapter(client) {
844
+ return {
845
+ listAssets: async (params) => {
846
+ const response = await dam_assets_list(client, {
847
+ "page[cursor]": params?.cursor,
848
+ "page[limit]": params?.limit
849
+ });
850
+ return {
851
+ assets: (response.assets ?? []).map(mapDamAsset),
852
+ meta: mapMeta$1(response.meta)
853
+ };
854
+ },
855
+ createAsset: async (body) => {
856
+ const response = await dam_assets_create(client, { asset: body });
857
+ return {
858
+ asset: mapDamAsset(response.asset ?? {}),
859
+ meta: mapMeta$1(response.meta)
860
+ };
861
+ },
862
+ listAssetPaths: async (assetCode, params) => {
863
+ const response = await dam_asset_paths_list(client, assetCode, {
864
+ "page[cursor]": params?.cursor,
865
+ "page[limit]": params?.limit
866
+ });
867
+ return {
868
+ asset_paths: (response.asset_paths ?? []).map(mapDamAssetPath),
869
+ meta: mapMeta$1(response.meta)
870
+ };
871
+ },
872
+ createAssetPath: async (assetCode, body) => {
873
+ const response = await dam_asset_paths_create(client, assetCode, { asset_path: body });
874
+ return {
875
+ asset_path: mapDamAssetPath(response.asset_path ?? {}),
876
+ meta: mapMeta$1(response.meta)
877
+ };
878
+ }
879
+ };
880
+ }
881
+ /**
882
+ * Creates a ShareablesApi["fileResources"]-compatible adapter backed by the
883
+ * portal-tenant content BFF. Maps DamAsset to FileResource shape and
884
+ * includes cursor-to-page-number caching for legacy UI pagination.
885
+ */
886
+ function createPortalTenantFilesShareablesAdapter(client) {
887
+ const portAdapter = createPortalTenantDamAssetsAdapter(client);
888
+ const cursorByPage = /* @__PURE__ */ new Map();
889
+ return { getFileResources: async (params) => {
890
+ const pageNumber = params?.pageParam ? Number(params.pageParam) : 1;
891
+ const pageSize = params?.pageSize ? Number(params.pageSize) : 25;
892
+ const cursor = pageNumber > 1 ? cursorByPage.get(pageNumber) : void 0;
893
+ const response = await portAdapter.listAssets({
894
+ cursor,
895
+ limit: pageSize
896
+ });
897
+ const nextCursor = response.meta.pagination?.next_cursor;
898
+ if (nextCursor) cursorByPage.set(pageNumber + 1, nextCursor);
899
+ const fileResources = response.assets.map((asset) => ({
900
+ id: asset.id,
901
+ alt_text: asset.name,
902
+ url: asset.url ?? "",
903
+ filename: asset.name,
904
+ content_type: asset.content_type ?? "application/octet-stream",
905
+ content_size: asset.byte_size ?? 0,
906
+ handle: asset.code,
907
+ dam_asset_code: asset.code,
908
+ preview_image_url: asset.url ?? "",
909
+ created_at: asset.created_at,
910
+ updated_at: asset.updated_at,
911
+ relateable_type: null,
912
+ relateable_id: null,
913
+ content: null
914
+ }));
915
+ const hasNextPage = !!nextCursor;
916
+ return {
917
+ file_resources: fileResources,
918
+ meta: {
919
+ total_count: fileResources.length,
920
+ per_page: pageSize,
921
+ current_page: pageNumber,
922
+ total_pages: hasNextPage ? pageNumber + 1 : pageNumber
923
+ }
924
+ };
925
+ } };
926
+ }
927
+ //#endregion
928
+ //#region ../../shareables/api-client/src/portal-tenant-shares-adapter.ts
929
+ /**
930
+ * Narrows an unknown string to a valid ShareableType at runtime.
931
+ */
932
+ function isShareableType(value) {
933
+ return value === "media" || value === "product" || value === "library" || value === "page";
934
+ }
935
+ /**
936
+ * Maps a BFF share to the port's Share shape.
937
+ */
938
+ function mapShare(raw) {
939
+ return {
940
+ id: raw.id ?? 0,
941
+ url: raw.url ?? "",
942
+ shareable_type: isShareableType(raw.shareable_type) ? raw.shareable_type : "media",
943
+ shareable_id: raw.shareable_id ?? 0,
944
+ created_at: raw.created_at ?? ""
945
+ };
946
+ }
947
+ /**
948
+ * Maps the BFF meta envelope to the port's ApiMeta shape.
949
+ */
950
+ function mapMeta(raw) {
951
+ return {
952
+ request_id: raw?.request_id ?? null,
953
+ timestamp: raw?.timestamp ?? "",
954
+ pagination: raw?.pagination ? {
955
+ cursor: raw.pagination.cursor ?? null,
956
+ limit: raw.pagination.limit,
957
+ next_cursor: raw.pagination.next_cursor ?? null,
958
+ prev_cursor: raw.pagination.prev_cursor ?? null
959
+ } : void 0
960
+ };
961
+ }
962
+ /**
963
+ * Creates a ContentSharesApi adapter backed by the portal-tenant content BFF.
964
+ *
965
+ * Maps the generated portal-tenant-content namespace functions to the abstract
966
+ * ContentSharesApi port, closing over the FetchClient so consumers don't need
967
+ * to pass it per-call.
968
+ */
969
+ function createPortalTenantSharesAdapter(client) {
970
+ return {
971
+ listShares: async (params) => {
972
+ const response = await shares_list(client, {
973
+ "page[cursor]": params?.cursor,
974
+ "page[limit]": params?.limit
975
+ });
976
+ return {
977
+ shares: (response.shares ?? []).map(mapShare),
978
+ meta: mapMeta(response.meta)
979
+ };
980
+ },
981
+ createShare: async (body) => {
982
+ const response = await shares_create(client, { share: body });
983
+ return {
984
+ share: mapShare(response.share ?? {}),
985
+ meta: mapMeta(response.meta)
986
+ };
987
+ }
988
+ };
989
+ }
990
+ /**
991
+ * Maps legacy Rails model names (used by the UI) to BFF shareable_type values.
992
+ */
993
+ const SHAREABLE_TYPE_MAP = {
994
+ Medium: "media",
995
+ media: "media",
996
+ Product: "product",
997
+ product: "product",
998
+ Library: "library",
999
+ library: "library",
1000
+ Page: "page",
1001
+ page: "page"
1002
+ };
1003
+ /**
1004
+ * Creates a ShareablesApi["share"]-compatible adapter backed by the
1005
+ * portal-tenant content BFF. Maps legacy model names to BFF shareable types.
1006
+ */
1007
+ function createPortalTenantSharesShareablesAdapter(client) {
1008
+ const portAdapter = createPortalTenantSharesAdapter(client);
1009
+ return { createShareLink: async (input) => {
1010
+ if (!input.relateableId) throw new Error("Cannot create share link without a relateableId");
1011
+ const shareableType = SHAREABLE_TYPE_MAP[input.relateableType];
1012
+ if (!shareableType) throw new Error(`Unknown shareable type: "${input.relateableType}"`);
1013
+ return (await portAdapter.createShare({
1014
+ shareable_type: shareableType,
1015
+ shareable_id: input.relateableId
1016
+ })).share.url;
1017
+ } };
1018
+ }
1019
+ //#endregion
1020
+ //#region ../../file-picker/api-client/src/client.ts
1021
+ function createFilePickerClient(config) {
1022
+ return {
1023
+ fetchClient: config.fetchClient,
1024
+ uploadStrategy: config.uploadStrategy,
1025
+ unsplashAccessKey: config.unsplashAccessKey,
1026
+ proxyEndpoint: config.proxyEndpoint ?? "/api/proxy-url"
1027
+ };
1028
+ }
1029
+ //#endregion
1030
+ //#region ../../file-picker/api-client/src/api/dam-assets.ts
1031
+ /**
1032
+ * Create a DAM asset. Text files use FormData upload; non-text files
1033
+ * delegate to the provided uploadStrategy (e.g. ImageKit).
1034
+ * If no uploadStrategy is provided, all files use FormData upload.
1035
+ */
1036
+ async function createDamAsset(fetchClient, params, uploadStrategy) {
1037
+ const mimeType = require_src.getFileMimeType(params.file);
1038
+ if (mimeType.startsWith("text/") || mimeType === "application/json" || mimeType === "application/xml" || params.file.name.endsWith(".txt") || params.file.name.endsWith(".json") || params.file.name.endsWith(".xml") || params.file.name.endsWith(".csv")) return createDamAssetViaFormData(fetchClient, params);
1039
+ if (uploadStrategy) return uploadStrategy.uploadFile(params);
1040
+ return createDamAssetViaFormData(fetchClient, params);
1041
+ }
1042
+ async function createDamAssetViaFormData(fetchClient, params) {
1043
+ const formData = new FormData();
1044
+ formData.append("asset[file]", params.file);
1045
+ formData.append("asset[name]", params.name);
1046
+ if (params.description) formData.append("asset[description]", params.description);
1047
+ if (params.tags && params.tags.length > 0) formData.append("asset[tags]", params.tags.join(","));
1048
+ const response = await fetchClient.requestWithFormData("/dam/assets", formData, { method: "POST" });
1049
+ return damAssetCreateResponseSchema.parse(response);
1050
+ }
1051
+ async function createDamAssetPathForAssets(fetchClient, { asset_paths, code }) {
1052
+ const response = await fetchClient.post(`/dam/assets/${code}/asset_paths`, { asset_paths });
1053
+ return damAssetPathCreateResponseSchema.parse(response);
1054
+ }
1055
+ //#endregion
1056
+ //#region ../../file-picker/api-client/src/api/dam-query.ts
1057
+ async function queryDamAssets(fetchClient, params) {
1058
+ const response = await fetchClient.post("/dam/query", params);
1059
+ return damQueryResponseSchema.parse(response);
1060
+ }
1061
+ async function deleteDamAsset(fetchClient, code) {
1062
+ return fetchClient.delete(`/dam/assets/${code}`);
1063
+ }
1064
+ async function discardDamAsset(fetchClient, code) {
1065
+ return fetchClient.patch(`/dam/assets/${code}/discard`);
1066
+ }
1067
+ //#endregion
1068
+ //#region ../../file-picker/api-client/src/api/unsplash.ts
1069
+ const unsplashImageSchema = zod.z.object({
1070
+ id: zod.z.string(),
1071
+ urls: zod.z.object({
1072
+ raw: zod.z.string(),
1073
+ full: zod.z.string(),
1074
+ regular: zod.z.string(),
1075
+ small: zod.z.string(),
1076
+ thumb: zod.z.string()
1077
+ }),
1078
+ alt_description: zod.z.string().nullable(),
1079
+ description: zod.z.string().nullable(),
1080
+ user: zod.z.object({
1081
+ name: zod.z.string(),
1082
+ username: zod.z.string()
1083
+ }),
1084
+ width: zod.z.number(),
1085
+ height: zod.z.number()
1086
+ });
1087
+ const unsplashSearchResponseSchema = zod.z.object({
1088
+ results: zod.z.array(unsplashImageSchema),
1089
+ total: zod.z.number(),
1090
+ total_pages: zod.z.number()
1091
+ });
1092
+ /**
1093
+ * Search Unsplash for photos matching a query.
1094
+ */
1095
+ async function searchUnsplash(query, accessKey, page = 1, perPage = 20) {
1096
+ const response = await fetch(`https://api.unsplash.com/search/photos?query=${encodeURIComponent(query)}&page=${page}&per_page=${perPage}&client_id=${accessKey}`);
1097
+ if (!response.ok) throw new Error("Failed to search Unsplash");
1098
+ return unsplashSearchResponseSchema.parse(await response.json());
1099
+ }
1100
+ //#endregion
1101
+ //#region ../../file-picker/api-client/src/api/url-proxy.ts
1102
+ const urlProxyResponseSchema = zod.z.object({
1103
+ data: zod.z.string(),
1104
+ contentType: zod.z.string(),
1105
+ size: zod.z.number()
1106
+ });
1107
+ /**
1108
+ * Proxy a URL fetch through the backend to bypass CORS restrictions.
1109
+ * The backend fetches the file and returns it as base64-encoded data.
1110
+ *
1111
+ * @param url - The URL to fetch
1112
+ * @param proxyEndpoint - The proxy endpoint (defaults to "/api/proxy-url")
1113
+ */
1114
+ async function proxyUrlFetch(url, proxyEndpoint = "/api/proxy-url") {
1115
+ const response = await fetch(proxyEndpoint, {
1116
+ method: "POST",
1117
+ headers: { "Content-Type": "application/json" },
1118
+ body: JSON.stringify({ url })
1119
+ });
1120
+ if (!response.ok) {
1121
+ const errorData = await response.json().catch(() => ({ error: "Failed to proxy URL fetch" }));
1122
+ throw new Error(errorData.error || `HTTP ${response.status}`);
1123
+ }
1124
+ const data = await response.json();
1125
+ return urlProxyResponseSchema.parse(data);
1126
+ }
1127
+ //#endregion
1128
+ //#region ../../file-picker/api-client/src/create-file-picker-api.ts
1129
+ /**
1130
+ * Creates a FilePickerApi-compatible adapter backed by the real API client
1131
+ * functions. The returned object satisfies the FilePickerApi interface
1132
+ * from @fluid-app/file-picker-core via structural typing.
1133
+ */
1134
+ function createFilePickerApi(client) {
1135
+ return {
1136
+ createDamAsset: (params) => createDamAsset(client.fetchClient, params, client.uploadStrategy),
1137
+ queryDamAssets: (params) => queryDamAssets(client.fetchClient, params),
1138
+ searchUnsplash: (query, page, perPage) => {
1139
+ if (!client.unsplashAccessKey) throw new Error("Unsplash access key not configured");
1140
+ return searchUnsplash(query, client.unsplashAccessKey, page, perPage);
1141
+ },
1142
+ deleteDamAsset: (code) => deleteDamAsset(client.fetchClient, code),
1143
+ discardDamAsset: (code) => discardDamAsset(client.fetchClient, code),
1144
+ createDamAssetPathForAssets: (params) => createDamAssetPathForAssets(client.fetchClient, params),
1145
+ proxyUrlFetch: (url) => proxyUrlFetch(url, client.proxyEndpoint)
1146
+ };
1147
+ }
1148
+ //#endregion
1149
+ //#region src/screens/ShareablesScreen.tsx
1150
+ /**
1151
+ * Parse the current shareables sub-route from the full slug.
1152
+ *
1153
+ * System nav slugs are "share/products", "share/media", "share/playlists".
1154
+ * Detail pages append an ID: "share/products/123", "share/media/456".
1155
+ *
1156
+ * "share/products" → screen="products", detailId=null
1157
+ * "share/products/123" → screen="products", detailId="123"
1158
+ * "share/media/456" → screen="media", detailId="456"
1159
+ * "share/playlists" → screen="playlists", detailId=null
1160
+ * "share/playlists/789" → screen="playlists", detailId="789"
1161
+ * "share/files" → screen="files", detailId=null
1162
+ * "share" → screen=null (default to products)
1163
+ */
1164
+ function parseShareablesRoute(currentSlug) {
1165
+ const slugWithoutPrefix = currentSlug.replace(/^share\/?/, "");
1166
+ if (!slugWithoutPrefix) return {
1167
+ screen: null,
1168
+ detailId: null,
1169
+ action: null
1170
+ };
1171
+ const parts = slugWithoutPrefix.split("/");
1172
+ return {
1173
+ screen: parts[0] || null,
1174
+ detailId: parts[1] || null,
1175
+ action: parts[2] || null
1176
+ };
1177
+ }
1178
+ function ShareablesScreen({ background, textColor, accentColor, padding, borderRadius, ...divProps }) {
1179
+ const domainClient = require_use_account_clients.useSdkClient();
1180
+ const portalProductsApi = require_use_portal_products_client.usePortalProductsClient();
1181
+ const portalTenantClient = require_FluidProvider.usePortalTenantClient();
1182
+ const { data: userData } = require_use_current_user.useCurrentUser();
1183
+ const { currentSlug, navigate } = require_AppNavigationContext.useAppNavigation();
1184
+ const { isCustomer } = useUserType();
1185
+ const fetchProducts = (0, react.useCallback)(async (search, cursor, limit) => {
1186
+ if (search) return portalProductsApi.searchProducts(search, {
1187
+ cursor,
1188
+ limit
1189
+ });
1190
+ return portalProductsApi.listProducts({
1191
+ cursor,
1192
+ limit
1193
+ });
1194
+ }, [portalProductsApi]);
1195
+ const fetchProduct = (0, react.useCallback)(async (id) => portalProductsApi.getProduct(id), [portalProductsApi]);
1196
+ const { screen, detailId, action } = parseShareablesRoute(currentSlug);
1197
+ const handleNavigate = (0, react.useCallback)((subScreen, id) => {
1198
+ navigate(id ? `share/${subScreen}/${id}` : `share/${subScreen}`);
1199
+ }, [navigate]);
1200
+ const handleBack = (0, react.useCallback)(() => {
1201
+ if (detailId && screen) navigate(`share/${screen}`);
1202
+ else navigate("share/products");
1203
+ }, [
1204
+ navigate,
1205
+ detailId,
1206
+ screen
1207
+ ]);
1208
+ const coreConfig = (0, react.useMemo)(() => ({
1209
+ client: domainClient,
1210
+ user: userData ? { id: userData.id } : null,
1211
+ repContext: true
1212
+ }), [domainClient, userData]);
1213
+ const playlistsAdapter = (0, react.useMemo)(() => createPortalTenantPlaylistsAdapter(portalTenantClient), [portalTenantClient]);
1214
+ const shareablesApi = (0, react.useMemo)(() => ({
1215
+ media: createPortalTenantMediaShareablesAdapter(portalTenantClient),
1216
+ playlists: createPortalTenantPlaylistsShareablesAdapter(portalTenantClient),
1217
+ fileResources: createPortalTenantFilesShareablesAdapter(portalTenantClient),
1218
+ share: createPortalTenantSharesShareablesAdapter(portalTenantClient),
1219
+ productMedia: { getProductMedia: async (productId) => {
1220
+ return { media: ((await portalProductsApi.getProductMedia(productId)).media ?? []).map((item) => {
1221
+ const isVideo = item.media_type === "video";
1222
+ const isPdf = item.media_type === "pdf" || item.media_type === "document";
1223
+ return {
1224
+ id: item.id ?? 0,
1225
+ slug: null,
1226
+ title: item.title ?? "",
1227
+ kind: isVideo ? "video" : isPdf ? "pdf" : "image",
1228
+ media_type: item.media_type ?? "image",
1229
+ media_format: item.media_type ?? "image",
1230
+ image_url: !isVideo && !isPdf ? item.url ?? null : null,
1231
+ video_url: isVideo ? item.url ?? null : null,
1232
+ pdf_url: isPdf ? item.url ?? null : null,
1233
+ powerpoint_url: null,
1234
+ duration: 0,
1235
+ description: null,
1236
+ subtitles: {},
1237
+ comments_count: 0
1238
+ };
1239
+ }) };
1240
+ } }
1241
+ }), [portalTenantClient, portalProductsApi]);
1242
+ const filePickerApi = (0, react.useMemo)(() => createFilePickerApi(createFilePickerClient({ fetchClient: domainClient })), [domainClient]);
1243
+ const uiConfig = (0, react.useMemo)(() => ({
1244
+ user: userData ? {
1245
+ id: userData.id,
1246
+ company: userData.company ? { logo_url: userData.company.logo_url } : null
1247
+ } : void 0,
1248
+ affiliateId: userData?.affiliate_id ?? null,
1249
+ basePath: "",
1250
+ navigate: (path) => {
1251
+ const cleanPath = path.replace(/^\//, "");
1252
+ navigate(cleanPath.startsWith("share/") ? cleanPath : `share/${cleanPath}`);
1253
+ },
1254
+ showToast: (opts) => {
1255
+ console.warn(`[Shareables] ${opts.type}: ${opts.title}`);
1256
+ },
1257
+ filePickerApi,
1258
+ onToggleFavorite: async (params) => {
1259
+ const affiliateId = userData?.affiliate_id;
1260
+ if (!affiliateId) throw new Error("No affiliate ID");
1261
+ return domainClient.post(`/user_companies/${affiliateId}/favorites/toggle.json`, {
1262
+ favoriteable_id: params.favoriteableId,
1263
+ favoriteable_type: params.favoriteableType
1264
+ });
1265
+ },
1266
+ onDeletePlaylist: isCustomer ? void 0 : async (playlistId) => {
1267
+ await playlistsAdapter.deletePlaylist(playlistId);
1268
+ },
1269
+ readOnly: isCustomer
1270
+ }), [
1271
+ userData,
1272
+ navigate,
1273
+ filePickerApi,
1274
+ domainClient,
1275
+ isCustomer,
1276
+ playlistsAdapter
1277
+ ]);
1278
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1279
+ ...divProps,
1280
+ className: `h-full ${divProps.className ?? ""}`,
1281
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ShareablesCoreProvider, {
1282
+ config: coreConfig,
1283
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ShareablesApiProvider, {
1284
+ api: shareablesApi,
1285
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ShareablesUIProvider, {
1286
+ config: uiConfig,
1287
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ShareablesApp, {
1288
+ screen,
1289
+ detailId,
1290
+ action,
1291
+ companyLogoUrl: userData?.company?.logo_url,
1292
+ countryCode: userData?.country?.iso,
1293
+ fetchProducts,
1294
+ fetchProduct,
1295
+ onNavigate: handleNavigate,
1296
+ onBack: handleBack
1297
+ })
1298
+ })
1299
+ })
1300
+ })
1301
+ });
1302
+ }
1303
+ const shareablesScreenPropertySchema = {
1304
+ widgetType: "ShareablesScreen",
1305
+ displayName: "Shareables Screen",
1306
+ tabsConfig: [{
1307
+ id: "styling",
1308
+ label: "Styling"
1309
+ }],
1310
+ fields: []
1311
+ };
1312
+ //#endregion
1313
+ Object.defineProperty(exports, "ShareablesScreen", {
1314
+ enumerable: true,
1315
+ get: function() {
1316
+ return ShareablesScreen;
1317
+ }
1318
+ });
1319
+ Object.defineProperty(exports, "shareablesScreenPropertySchema", {
1320
+ enumerable: true,
1321
+ get: function() {
1322
+ return shareablesScreenPropertySchema;
1323
+ }
1324
+ });
1325
+ Object.defineProperty(exports, "useUserType", {
1326
+ enumerable: true,
1327
+ get: function() {
1328
+ return useUserType;
1329
+ }
1330
+ });
1331
+
1332
+ //# sourceMappingURL=ShareablesScreen-znVUD_OK.cjs.map