@strapi/admin 4.10.0-beta.1 → 4.10.0

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 (77) hide show
  1. package/admin/src/content-manager/components/RepeatableComponent/components/Component.js +8 -2
  2. package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +3 -1
  3. package/admin/src/content-manager/pages/EditSettingsView/reducer.js +8 -2
  4. package/admin/src/content-manager/pages/EditViewLayoutManager/reducer.js +4 -4
  5. package/admin/src/content-manager/sharedReducers/crudReducer/actions.js +0 -6
  6. package/admin/src/content-manager/sharedReducers/crudReducer/constants.js +0 -1
  7. package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +0 -5
  8. package/admin/src/hooks/useFetchPermissionsLayout/index.js +24 -15
  9. package/admin/src/hooks/useFetchRole/index.js +37 -30
  10. package/admin/src/hooks/useModels/index.js +22 -12
  11. package/admin/src/hooks/useSettingsForm/index.js +14 -6
  12. package/admin/src/pages/App/index.js +19 -24
  13. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/PendingLogoDialog.js +1 -3
  14. package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js +6 -12
  15. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +6 -10
  16. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/index.js +18 -33
  17. package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +41 -41
  18. package/admin/src/translations/en.json +1 -1
  19. package/admin/src/translations/fr.json +89 -1
  20. package/build/{Admin-authenticatedApp.52c88751.chunk.js → Admin-authenticatedApp.b036fe95.chunk.js} +2 -2
  21. package/build/{Admin_settingsPage.257b3477.chunk.js → Admin_settingsPage.4604a16c.chunk.js} +1 -1
  22. package/build/admin-app.014adc27.chunk.js +110 -0
  23. package/build/admin-edit-roles-page.8a4063f7.chunk.js +280 -0
  24. package/build/content-manager.84f81966.chunk.js +1130 -0
  25. package/build/{content-type-builder-translation-de-json.0979cccb.chunk.js → content-type-builder-translation-de-json.393a76c0.chunk.js} +1 -1
  26. package/build/{content-type-builder-translation-dk-json.e05583e9.chunk.js → content-type-builder-translation-dk-json.fbd39bb7.chunk.js} +1 -1
  27. package/build/{content-type-builder-translation-en-json.510e88ca.chunk.js → content-type-builder-translation-en-json.446b611d.chunk.js} +1 -1
  28. package/build/{content-type-builder-translation-es-json.fe4daad8.chunk.js → content-type-builder-translation-es-json.9288474b.chunk.js} +1 -1
  29. package/build/{content-type-builder-translation-fr-json.b1eb52f6.chunk.js → content-type-builder-translation-fr-json.d35e269c.chunk.js} +1 -1
  30. package/build/{content-type-builder-translation-id-json.ee3b36bb.chunk.js → content-type-builder-translation-id-json.f0513929.chunk.js} +1 -1
  31. package/build/{content-type-builder-translation-it-json.13b3c26a.chunk.js → content-type-builder-translation-it-json.aaf16753.chunk.js} +1 -1
  32. package/build/{content-type-builder-translation-ko-json.8a274be5.chunk.js → content-type-builder-translation-ko-json.8fe21a7f.chunk.js} +1 -1
  33. package/build/{content-type-builder-translation-ms-json.2d29c1e0.chunk.js → content-type-builder-translation-ms-json.3b5d2d3e.chunk.js} +1 -1
  34. package/build/{content-type-builder-translation-nl-json.40bbc562.chunk.js → content-type-builder-translation-nl-json.225ef5d3.chunk.js} +1 -1
  35. package/build/{content-type-builder-translation-pl-json.24a34349.chunk.js → content-type-builder-translation-pl-json.92f36be2.chunk.js} +1 -1
  36. package/build/{content-type-builder-translation-pt-BR-json.97f71a9d.chunk.js → content-type-builder-translation-pt-BR-json.3bd10f89.chunk.js} +1 -1
  37. package/build/{content-type-builder-translation-ru-json.54d11230.chunk.js → content-type-builder-translation-ru-json.9bfe47ce.chunk.js} +1 -1
  38. package/build/{content-type-builder-translation-sk-json.626c9493.chunk.js → content-type-builder-translation-sk-json.d03cc18a.chunk.js} +1 -1
  39. package/build/{content-type-builder-translation-sv-json.59f5e1e5.chunk.js → content-type-builder-translation-sv-json.d23dcd32.chunk.js} +1 -1
  40. package/build/{content-type-builder-translation-th-json.6fe3ed55.chunk.js → content-type-builder-translation-th-json.7ad256e2.chunk.js} +1 -1
  41. package/build/{content-type-builder-translation-tr-json.cea4d226.chunk.js → content-type-builder-translation-tr-json.926f6191.chunk.js} +1 -1
  42. package/build/{content-type-builder-translation-uk-json.c4524247.chunk.js → content-type-builder-translation-uk-json.7bf19546.chunk.js} +1 -1
  43. package/build/{content-type-builder-translation-zh-json.faedd610.chunk.js → content-type-builder-translation-zh-json.ad24dbeb.chunk.js} +1 -1
  44. package/build/content-type-builder.68af11d2.chunk.js +126 -0
  45. package/build/en-json.c7fc79af.chunk.js +1 -0
  46. package/build/fr-json.5947cf63.chunk.js +1 -0
  47. package/build/i18n-settings-page.d95b32df.chunk.js +60 -0
  48. package/build/index.html +1 -1
  49. package/build/{main.120be100.js → main.841e0dcb.js} +194 -194
  50. package/build/{review-workflows-settings.9092ed72.chunk.js → review-workflows-settings.f7890c40.chunk.js} +1 -1
  51. package/build/{runtime~main.112b3101.js → runtime~main.965f8af8.js} +2 -2
  52. package/build/users-roles-settings-page.20656f92.chunk.js +30 -0
  53. package/build/webhook-edit-page.a3b62049.chunk.js +75 -0
  54. package/build/webhook-list-page.ca38eeef.chunk.js +71 -0
  55. package/ee/admin/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn.js +3 -1
  56. package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +7 -4
  57. package/ee/admin/hooks/useAuthProviders/index.js +28 -29
  58. package/ee/admin/pages/AuthResponse/index.js +7 -3
  59. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ReviewWorkflows.js +1 -1
  60. package/ee/server/controllers/authentication/middlewares.js +2 -1
  61. package/ee/server/services/index.js +1 -0
  62. package/ee/server/services/review-workflows/metrics.js +24 -0
  63. package/ee/server/services/review-workflows/review-workflows.js +25 -11
  64. package/ee/server/services/review-workflows/stages.js +28 -10
  65. package/ee/server/utils/persisted-tables.js +7 -5
  66. package/package.json +10 -10
  67. package/server/strategies/api-token.js +8 -1
  68. package/build/admin-app.dfaeea5d.chunk.js +0 -110
  69. package/build/admin-edit-roles-page.4f1858e9.chunk.js +0 -280
  70. package/build/content-manager.def692c2.chunk.js +0 -1130
  71. package/build/content-type-builder.5e1f4afc.chunk.js +0 -126
  72. package/build/en-json.08303b37.chunk.js +0 -1
  73. package/build/fr-json.f66c3211.chunk.js +0 -1
  74. package/build/i18n-settings-page.7d80aae0.chunk.js +0 -60
  75. package/build/users-roles-settings-page.2f85dcec.chunk.js +0 -30
  76. package/build/webhook-edit-page.213f0075.chunk.js +0 -75
  77. package/build/webhook-list-page.5beb2a5c.chunk.js +0 -71
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ const sendDidCreateStage = async () => {
4
+ strapi.telemetry.send('didCreateStage', {});
5
+ };
6
+
7
+ const sendDidEditStage = async () => {
8
+ strapi.telemetry.send('didEditStage', {});
9
+ };
10
+
11
+ const sendDidDeleteStage = async () => {
12
+ strapi.telemetry.send('didDeleteStage', {});
13
+ };
14
+
15
+ const sendDidChangeEntryStage = async () => {
16
+ strapi.telemetry.send('didChangeEntryStage', {});
17
+ };
18
+
19
+ module.exports = {
20
+ sendDidCreateStage,
21
+ sendDidEditStage,
22
+ sendDidDeleteStage,
23
+ sendDidChangeEntryStage,
24
+ };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { set, forEach, pipe } = require('lodash/fp');
3
+ const { set, forEach, pipe, map } = require('lodash/fp');
4
4
  const { mapAsync } = require('@strapi/utils');
5
5
  const { getService } = require('../../utils');
6
6
  const { getContentTypeUIDsWithActivatedReviewWorkflows } = require('../../utils/review-workflows');
@@ -10,7 +10,7 @@ const defaultWorkflow = require('../../constants/default-workflow.json');
10
10
  const { ENTITY_STAGE_ATTRIBUTE } = require('../../constants/workflows');
11
11
 
12
12
  const { getDefaultWorkflow } = require('../../utils/review-workflows');
13
- const { persistTable, removePersistedTablesWithSuffix } = require('../../utils/persisted-tables');
13
+ const { persistTables, removePersistedTablesWithSuffix } = require('../../utils/persisted-tables');
14
14
 
15
15
  async function initDefaultWorkflow({ workflowsService, stagesService, strapi }) {
16
16
  const wfCount = await workflowsService.count();
@@ -72,12 +72,7 @@ function enableReviewWorkflow({ strapi }) {
72
72
  const firstStage = defaultWorkflow.stages[0];
73
73
  const stagesService = getService('stages', { strapi });
74
74
 
75
- const up = async (contentTypeUID) => {
76
- // Persist the stage join table
77
- const { attributes, tableName } = strapi.db.metadata.get(contentTypeUID);
78
- const joinTableName = attributes[ENTITY_STAGE_ATTRIBUTE].joinTable.name;
79
- await persistTable(joinTableName, [tableName]);
80
-
75
+ const updateEntitiesStage = async (contentTypeUID) => {
81
76
  // Update CT entities stage
82
77
  return stagesService.updateEntitiesStage(contentTypeUID, {
83
78
  fromStageId: null,
@@ -85,16 +80,34 @@ function enableReviewWorkflow({ strapi }) {
85
80
  });
86
81
  };
87
82
 
88
- await removePersistedTablesWithSuffix('_strapi_review_workflows_stage_links');
89
-
90
83
  return pipe([
91
84
  getContentTypeUIDsWithActivatedReviewWorkflows,
92
85
  // Iterate over UIDs to extend the content-type
93
- (contentTypesUIDs) => mapAsync(contentTypesUIDs, up),
86
+ (contentTypesUIDs) => mapAsync(contentTypesUIDs, updateEntitiesStage),
94
87
  ])(contentTypes);
95
88
  };
96
89
  }
97
90
 
91
+ function persistStagesJoinTables({ strapi }) {
92
+ return async ({ contentTypes }) => {
93
+ const getStageTableToPersist = (contentTypeUID) => {
94
+ // Persist the stage join table
95
+ const { attributes, tableName } = strapi.db.metadata.get(contentTypeUID);
96
+ const joinTableName = attributes[ENTITY_STAGE_ATTRIBUTE].joinTable.name;
97
+ return { name: joinTableName, dependsOn: { name: tableName } };
98
+ };
99
+
100
+ const joinTablesToPersist = pipe([
101
+ getContentTypeUIDsWithActivatedReviewWorkflows,
102
+ map(getStageTableToPersist),
103
+ ])(contentTypes);
104
+
105
+ // TODO: Instead of removing all the tables, we should only remove the ones that are not in the joinTablesToPersist
106
+ await removePersistedTablesWithSuffix('_strapi_review_workflows_stage_links');
107
+ await persistTables(joinTablesToPersist);
108
+ };
109
+ }
110
+
98
111
  module.exports = ({ strapi }) => {
99
112
  const workflowsService = getService('workflows', { strapi });
100
113
  const stagesService = getService('stages', { strapi });
@@ -106,6 +119,7 @@ module.exports = ({ strapi }) => {
106
119
  async register() {
107
120
  extendReviewWorkflowContentTypes({ strapi });
108
121
  strapi.hook('strapi::content-types.afterSync').register(enableReviewWorkflow({ strapi }));
122
+ strapi.hook('strapi::content-types.afterSync').register(persistStagesJoinTables({ strapi }));
109
123
  },
110
124
  };
111
125
  };
@@ -12,6 +12,7 @@ const { getContentTypeUIDsWithActivatedReviewWorkflows } = require('../../utils/
12
12
 
13
13
  module.exports = ({ strapi }) => {
14
14
  const workflowsService = getService('workflows', { strapi });
15
+ const metrics = getService('review-workflows-metrics', { strapi });
15
16
 
16
17
  return {
17
18
  find({ workflowId, populate }) {
@@ -29,23 +30,36 @@ module.exports = ({ strapi }) => {
29
30
  return strapi.entityService.findOne(STAGE_MODEL_UID, id, params);
30
31
  },
31
32
 
32
- createMany(stagesList, { fields }) {
33
- const params = {
34
- select: fields,
35
- };
36
- return Promise.all(
33
+ async createMany(stagesList, { fields }) {
34
+ const params = { select: fields };
35
+
36
+ const stages = await Promise.all(
37
37
  stagesList.map((stage) =>
38
38
  strapi.entityService.create(STAGE_MODEL_UID, { data: stage, ...params })
39
39
  )
40
40
  );
41
+
42
+ metrics.sendDidCreateStage();
43
+
44
+ return stages;
41
45
  },
42
46
 
43
- update(stageId, stageData) {
44
- return strapi.entityService.update(STAGE_MODEL_UID, stageId, { data: stageData });
47
+ async update(stageId, stageData) {
48
+ const stage = await strapi.entityService.update(STAGE_MODEL_UID, stageId, {
49
+ data: stageData,
50
+ });
51
+
52
+ metrics.sendDidEditStage();
53
+
54
+ return stage;
45
55
  },
46
56
 
47
- delete(stageId) {
48
- return strapi.entityService.delete(STAGE_MODEL_UID, stageId);
57
+ async delete(stageId) {
58
+ const stage = await strapi.entityService.delete(STAGE_MODEL_UID, stageId);
59
+
60
+ metrics.sendDidDeleteStage();
61
+
62
+ return stage;
49
63
  },
50
64
 
51
65
  count() {
@@ -115,10 +129,14 @@ module.exports = ({ strapi }) => {
115
129
  throw new ApplicationError(`Selected stage does not exist`);
116
130
  }
117
131
 
118
- return strapi.entityService.update(entityInfo.modelUID, entityInfo.id, {
132
+ const entity = await strapi.entityService.update(entityInfo.modelUID, entityInfo.id, {
119
133
  data: { [ENTITY_STAGE_ATTRIBUTE]: stageId },
120
134
  populate: [ENTITY_STAGE_ATTRIBUTE],
121
135
  });
136
+
137
+ metrics.sendDidChangeEntryStage();
138
+
139
+ return entity;
122
140
  },
123
141
 
124
142
  /**
@@ -127,15 +127,17 @@ const removePersistedTablesWithSuffix = async (tableNameSuffix) => {
127
127
  await removePersistedTables({ strapi }, tableNames);
128
128
  };
129
129
 
130
- const persistTable = async (tableName, dependsOn) => {
131
- await addPersistTables({ strapi }, [
132
- { name: tableName, dependsOn: dependsOn?.map((depTableName) => ({ name: depTableName })) },
133
- ]);
130
+ /**
131
+ * Add tables to the reserved tables in core store
132
+ * @param {Array<string|{ table: string; dependsOn?: Array<{ table: string;}> }} tables
133
+ */
134
+ const persistTables = async (tables) => {
135
+ await addPersistTables({ strapi }, tables);
134
136
  };
135
137
 
136
138
  module.exports = {
137
139
  persistTablesWithPrefix,
138
140
  removePersistedTablesWithSuffix,
139
- persistTable,
141
+ persistTables,
140
142
  findTables,
141
143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/admin",
3
- "version": "4.10.0-beta.1",
3
+ "version": "4.10.0",
4
4
  "description": "Strapi Admin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,15 +48,15 @@
48
48
  "@casl/ability": "^5.4.3",
49
49
  "@fingerprintjs/fingerprintjs": "3.3.6",
50
50
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
51
- "@strapi/babel-plugin-switch-ee-ce": "4.10.0-beta.1",
52
- "@strapi/data-transfer": "4.10.0-beta.1",
51
+ "@strapi/babel-plugin-switch-ee-ce": "4.10.0",
52
+ "@strapi/data-transfer": "4.10.0",
53
53
  "@strapi/design-system": "1.6.6",
54
- "@strapi/helper-plugin": "4.10.0-beta.1",
54
+ "@strapi/helper-plugin": "4.10.0",
55
55
  "@strapi/icons": "1.6.6",
56
- "@strapi/permissions": "4.10.0-beta.1",
57
- "@strapi/provider-audit-logs-local": "4.10.0-beta.1",
58
- "@strapi/typescript-utils": "4.10.0-beta.1",
59
- "@strapi/utils": "4.10.0-beta.1",
56
+ "@strapi/permissions": "4.10.0",
57
+ "@strapi/provider-audit-logs-local": "4.10.0",
58
+ "@strapi/typescript-utils": "4.10.0",
59
+ "@strapi/utils": "4.10.0",
60
60
  "axios": "1.3.4",
61
61
  "babel-loader": "^9.1.2",
62
62
  "babel-plugin-styled-components": "2.0.2",
@@ -133,7 +133,7 @@
133
133
  "sift": "16.0.1",
134
134
  "style-loader": "3.3.1",
135
135
  "styled-components": "5.3.3",
136
- "typescript": "4.6.2",
136
+ "typescript": "5.0.4",
137
137
  "webpack": "^5.76.0",
138
138
  "webpack-cli": "^5.0.1",
139
139
  "webpack-dev-server": "^4.13.1",
@@ -168,5 +168,5 @@
168
168
  }
169
169
  }
170
170
  },
171
- "gitHead": "95d581b31bee464af42e5d8db408fa578d8532c7"
171
+ "gitHead": "9b5519778faaedfb837879f9c6f7e28fdfd6750d"
172
172
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { castArray, isNil } = require('lodash/fp');
3
+ const { castArray, isNil, isEmpty } = require('lodash/fp');
4
4
  const { UnauthorizedError, ForbiddenError } = require('@strapi/utils').errors;
5
5
  const constants = require('../services/constants');
6
6
  const { getService } = require('../utils');
@@ -78,6 +78,13 @@ const authenticate = async (ctx) => {
78
78
  const verify = (auth, config) => {
79
79
  const { credentials: apiToken, ability } = auth;
80
80
 
81
+ strapi.telemetry.send('didReceiveAPIRequest', {
82
+ eventProperties: {
83
+ authenticationMethod: auth?.strategy?.name || 'api-token',
84
+ isAuthenticated: !isEmpty(apiToken),
85
+ },
86
+ });
87
+
81
88
  if (!apiToken) {
82
89
  throw new UnauthorizedError('Token not found');
83
90
  }
@@ -1,110 +0,0 @@
1
- (self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5538],{78834:function(O,f,t){"use strict";t.d(f,{Z:function(){return et}});var e=t(24346),l=t(43383),o=t(32735),v=t(67879),h=t(60216),g=t.n(h),T=t(27649),A=t(72850),M=t(49372),Z=t(87933),b=t(10369),E=t(41415),k=t(92802),P=t(954),w=t(10190);const R=({onSubmit:W,schema:$e})=>{const{formatMessage:H}=(0,v.Z)();return o.createElement(P.ZP,null,o.createElement(T.o,null,o.createElement(P.bU,null,o.createElement(k.J9,{enableReinitialize:!0,initialValues:{email:""},onSubmit:W,validationSchema:$e,validateOnChange:!1},({values:Ne,errors:Re,handleChange:ze})=>o.createElement(l.l0,{noValidate:!0},o.createElement(P.sg,null,o.createElement(w.Z,null),o.createElement(A.x,{paddingTop:6,paddingBottom:7},o.createElement(M.Z,{as:"h1",variant:"alpha"},H({id:"Auth.form.button.password-recovery",defaultMessage:"Password Recovery"}))),Re.errorMessage&&o.createElement(M.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},H({id:Re.errorMessage,defaultMessage:"An error occurred"}))),o.createElement(Z.k,{direction:"column",alignItems:"stretch",gap:6},o.createElement(b.o,{error:Re.email?H({id:Re.email,defaultMessage:"This email is invalid."}):"",value:Ne.email,onChange:ze,label:H({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:H({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),o.createElement(E.z,{type:"submit",fullWidth:!0},H({id:"Auth.form.button.forgot-password",defaultMessage:"Send Email"})))))),o.createElement(Z.k,{justifyContent:"center"},o.createElement(A.x,{paddingTop:4},o.createElement(l.rU,{to:"/auth/login"},H({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};R.defaultProps={onSubmit:W=>W.preventDefault()},R.propTypes={onSubmit:g().func,schema:g().shape({type:g().string.isRequired}).isRequired};var I=R,B=()=>{const{formatMessage:W}=(0,v.Z)();return o.createElement(P.ZP,null,o.createElement(T.o,null,o.createElement(P.bU,null,o.createElement(P.sg,null,o.createElement(w.Z,null),o.createElement(A.x,{paddingTop:6,paddingBottom:7},o.createElement(M.Z,{as:"h1",variant:"alpha"},W({id:"app.containers.AuthPage.ForgotPasswordSuccess.title",defaultMessage:"Email sent"}))),o.createElement(M.Z,null,W({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.email",defaultMessage:"It can take a few minutes to receive your password recovery link."})),o.createElement(A.x,{paddingTop:4},o.createElement(M.Z,null,W({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin",defaultMessage:"If you do not receive this link, please contact your administrator."}))))),o.createElement(Z.k,{justifyContent:"center"},o.createElement(A.x,{paddingTop:4},o.createElement(l.rU,{to:"/auth/login"},W({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},de=()=>{const{formatMessage:W}=(0,v.Z)(),H=(0,l.aM)().get("info")||W({id:"Auth.components.Oops.text",defaultMessage:"Your account has been suspended."});return o.createElement(P.ZP,null,o.createElement(T.o,null,o.createElement(P.bU,null,o.createElement(P.sg,null,o.createElement(w.Z,null),o.createElement(A.x,{paddingTop:6,paddingBottom:7},o.createElement(M.Z,{as:"h1",variant:"alpha"},W({id:"Auth.components.Oops.title",defaultMessage:"Oops..."}))),o.createElement(M.Z,null,H),o.createElement(A.x,{paddingTop:4},o.createElement(M.Z,null,W({id:"Auth.components.Oops.text.admin",defaultMessage:"If this is a mistake, please contact your administrator."}))))),o.createElement(Z.k,{justifyContent:"center"},o.createElement(A.x,{paddingTop:4},o.createElement(l.rU,{to:"/auth/login"},W({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},L=t(8471),m=t(9086),$=t.n(m),ee=t(53038),ie=t(84306),se=t(15335),a=t(5803),ye=t(8284),Pe=t(54894),Te=t(60492),we=t(72218);const Se=L.ZP.a`
2
- color: ${({theme:W})=>W.colors.primary600};
3
- `,Ye=(0,L.ZP)(b.o)`
4
- ::-ms-reveal {
5
- display: none;
6
- }
7
- `,qe=({authType:W,fieldsToDisable:$e,noSignin:H,onSubmit:Ne,schema:Re})=>{const ze=(0,l.lm)(),{push:re}=(0,ee.k6)(),[he,Ue]=(0,o.useState)(!1),[Ce,je]=(0,o.useState)(!1),[De,tt]=(0,o.useState)(0),[Ge,pt]=(0,o.useState)({}),{trackUsage:lt}=(0,l.rS)(),{formatMessage:F}=(0,v.Z)(),ut=(0,l.aM)(),{formatAPIError:st}=(0,l.So)(),Ze=ut.get("registrationToken");(0,o.useEffect)(()=>{Ze&&(async()=>{try{const{data:{data:X}}=await ie.Z.get(`${strapi.backendURL}/admin/registration-info?registrationToken=${Ze}`);X&&pt(X)}catch(X){const ne=st(X);ze({type:"warning",message:ne}),re(`/auth/oops?info=${encodeURIComponent(ne)}`)}})()},[Ze]);function Ae(le){return Object.entries(le).reduce((X,[ne,Ee])=>{let Me=Ee;return!["password","confirmPassword"].includes(ne)&&typeof Ee=="string"&&(Me=Me.trim()),X[ne]=Me,X},{})}return o.createElement(P.ZP,null,o.createElement(P.bU,null,o.createElement(k.J9,{enableReinitialize:!0,initialValues:{firstname:Ge.firstname||"",lastname:Ge.lastname||"",email:Ge.email||"",password:"",confirmPassword:"",registrationToken:Ze||void 0,news:!1},onSubmit:async(le,X)=>{const ne=Ae(le);try{await Re.validate(ne,{abortEarly:!1}),De>0&&W==="register-admin"&&lt("didSubmitWithErrorsFirstAdmin",{count:De.toString()}),Ne(Ze?{userInfo:$()(ne,["registrationToken"]),registrationToken:Ze}:ne,X)}catch(Ee){const Me=(0,l.CJ)(Ee);tt(De+1),X.setErrors(Me)}},validateOnChange:!1},({values:le,errors:X,handleChange:ne})=>o.createElement(l.l0,{noValidate:!0},o.createElement(T.o,null,o.createElement(Z.k,{direction:"column",alignItems:"stretch",gap:3},o.createElement(w.Z,null),o.createElement(M.Z,{as:"h1",variant:"alpha",textAlign:"center"},F({id:"Auth.form.welcome.title",defaultMessage:"Welcome to Strapi!"})),o.createElement(M.Z,{variant:"epsilon",textColor:"neutral600",textAlign:"center"},F({id:"Auth.form.register.subtitle",defaultMessage:"Credentials are only used to authenticate in Strapi. All saved data will be stored in your database."}))),o.createElement(Z.k,{direction:"column",alignItems:"stretch",gap:6,marginTop:7},o.createElement(se.r,{gap:4},o.createElement(a.P,{col:6},o.createElement(b.o,{name:"firstname",required:!0,value:le.firstname,error:X.firstname?F(X.firstname):void 0,onChange:ne,label:F({id:"Auth.form.firstname.label",defaultMessage:"Firstname"})})),o.createElement(a.P,{col:6},o.createElement(b.o,{name:"lastname",value:le.lastname,onChange:ne,label:F({id:"Auth.form.lastname.label",defaultMessage:"Lastname"})}))),o.createElement(b.o,{name:"email",disabled:$e.includes("email"),value:le.email,onChange:ne,error:X.email?F(X.email):void 0,required:!0,label:F({id:"Auth.form.email.label",defaultMessage:"Email"}),type:"email"}),o.createElement(Ye,{name:"password",onChange:ne,value:le.password,error:X.password?F(X.password):void 0,endAction:o.createElement(we.Z,{onClick:Ee=>{Ee.preventDefault(),Ue(Me=>!Me)},label:F(he?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},he?o.createElement(Pe.Z,null):o.createElement(Te.Z,null)),hint:F({id:"Auth.form.password.hint",defaultMessage:"Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"}),required:!0,label:F({id:"global.password",defaultMessage:"Password"}),type:he?"text":"password"}),o.createElement(Ye,{name:"confirmPassword",onChange:ne,value:le.confirmPassword,error:X.confirmPassword?F(X.confirmPassword):void 0,endAction:o.createElement(we.Z,{onClick:Ee=>{Ee.preventDefault(),je(Me=>!Me)},label:F(Ce?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Ce?o.createElement(Pe.Z,null):o.createElement(Te.Z,null)),required:!0,label:F({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:Ce?"text":"password"}),o.createElement(ye.X,{onValueChange:Ee=>{ne({target:{value:Ee,name:"news"}})},value:le.news,name:"news","aria-label":"news"},F({id:"Auth.form.register.news.label",defaultMessage:"Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy})."},{terms:o.createElement(Se,{target:"_blank",href:"https://strapi.io/terms",rel:"noreferrer"},F({id:"Auth.privacy-policy-agreement.terms",defaultMessage:"terms"})),policy:o.createElement(Se,{target:"_blank",href:"https://strapi.io/privacy",rel:"noreferrer"},F({id:"Auth.privacy-policy-agreement.policy",defaultMessage:"policy"}))})),o.createElement(E.z,{fullWidth:!0,size:"L",type:"submit"},F({id:"Auth.form.button.register",defaultMessage:"Let's start"})))))),!H&&o.createElement(A.x,{paddingTop:4},o.createElement(Z.k,{justifyContent:"center"},o.createElement(l.rU,{label:"Auth.link.signin",to:"/auth/login"},F({id:"Auth.link.signin.account",defaultMessage:"Already have an account?"}))))))};qe.defaultProps={fieldsToDisable:[],noSignin:!1,onSubmit:W=>W.preventDefault()},qe.propTypes={authType:g().string.isRequired,fieldsToDisable:g().array,noSignin:g().bool,onSubmit:g().func,schema:g().shape({validate:g().func.isRequired,type:g().string.isRequired}).isRequired};var me=qe;const rt=(0,L.ZP)(b.o)`
8
- ::-ms-reveal {
9
- display: none;
10
- }
11
- `,We=({onSubmit:W,schema:$e})=>{const[H,Ne]=(0,o.useState)(!1),[Re,ze]=(0,o.useState)(!1),{formatMessage:re}=(0,v.Z)();return o.createElement(P.ZP,null,o.createElement(T.o,null,o.createElement(P.bU,null,o.createElement(k.J9,{enableReinitialize:!0,initialValues:{password:"",confirmPassword:""},onSubmit:W,validationSchema:$e,validateOnChange:!1},({values:he,errors:Ue,handleChange:Ce})=>o.createElement(l.l0,{noValidate:!0},o.createElement(P.sg,null,o.createElement(w.Z,null),o.createElement(A.x,{paddingTop:6,paddingBottom:7},o.createElement(M.Z,{as:"h1",variant:"alpha"},re({id:"global.reset-password",defaultMessage:"Reset password"}))),Ue.errorMessage&&o.createElement(M.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},re({id:Ue.errorMessage,defaultMessage:"An error occurred"}))),o.createElement(Z.k,{direction:"column",alignItems:"stretch",gap:6},o.createElement(rt,{name:"password",onChange:Ce,value:he.password,error:Ue.password?re({id:Ue.password,defaultMessage:"This field is required."}):void 0,endAction:o.createElement(we.Z,{onClick:je=>{je.preventDefault(),Ne(De=>!De)},label:re(H?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},H?o.createElement(Pe.Z,null):o.createElement(Te.Z,null)),hint:re({id:"Auth.form.password.hint",defaultMessage:"Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number"}),required:!0,label:re({id:"global.password",defaultMessage:"Password"}),type:H?"text":"password"}),o.createElement(rt,{name:"confirmPassword",onChange:Ce,value:he.confirmPassword,error:Ue.confirmPassword?re({id:Ue.confirmPassword,defaultMessage:"This value is required."}):void 0,endAction:o.createElement(we.Z,{onClick:je=>{je.preventDefault(),ze(De=>!De)},label:re(H?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Re?o.createElement(Pe.Z,null):o.createElement(Te.Z,null)),required:!0,label:re({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:Re?"text":"password"}),o.createElement(E.z,{fullwidth:!0,type:"submit"},re({id:"global.change-password",defaultMessage:"Change password"})))))),o.createElement(Z.k,{justifyContent:"center"},o.createElement(A.x,{paddingTop:4},o.createElement(l.rU,{to:"/auth/login"},re({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};We.defaultProps={onSubmit:W=>W.preventDefault()},We.propTypes={onSubmit:g().func,schema:g().shape({type:g().string.isRequired}).isRequired};var Je=We;const He=(()=>window&&window.strapi&&window.strapi.isEE?t(98768).Z:t(5365).Z)();var et={"forgot-password":{Component:I,endPoint:"forgot-password",fieldsToDisable:[],fieldsToOmit:[],schema:e.Ry().shape({email:e.Z_().email(l.I0.email).required(l.I0.required)}),inputsPrefix:""},"forgot-password-success":{Component:B,endPoint:"",fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},login:{Component:He,endPoint:"login",fieldsToDisable:[],fieldsToOmit:["rememberMe"],schema:e.Ry().shape({email:e.Z_().email(l.I0.email).required(l.I0.required),password:e.Z_().required(l.I0.required),rememberMe:e.Xg().nullable()}),inputsPrefix:""},oops:{Component:de,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},register:{Component:me,endPoint:"register",fieldsToDisable:["email"],fieldsToOmit:["userInfo.confirmPassword","userInfo.news","userInfo.email"],schema:e.Ry().shape({firstname:e.Z_().trim().required(l.I0.required),lastname:e.Z_(),password:e.Z_().min(8,l.I0.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(l.I0.required),confirmPassword:e.Z_().oneOf([e.iH("password"),null],"components.Input.error.password.noMatch").required(l.I0.required),registrationToken:e.Z_().required(l.I0.required)}),inputsPrefix:"userInfo."},"register-admin":{Component:me,endPoint:"register-admin",noSignin:!0,fieldsToDisable:[],fieldsToOmit:["confirmPassword","news"],schema:e.Ry().shape({firstname:e.Z_().trim().required(l.I0.required),lastname:e.Z_(),password:e.Z_().min(8,l.I0.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(l.I0.required),email:e.Z_().email(l.I0.email).strict().lowercase(l.I0.lowercase).required(l.I0.required),confirmPassword:e.Z_().oneOf([e.iH("password"),null],"components.Input.error.password.noMatch").required(l.I0.required)}),inputsPrefix:""},"reset-password":{Component:Je,endPoint:"reset-password",fieldsToDisable:[],fieldsToOmit:["confirmPassword"],schema:e.Ry().shape({password:e.Z_().min(8,l.I0.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(l.I0.required),confirmPassword:e.Z_().oneOf([e.iH("password"),null],"components.Input.error.password.noMatch").required(l.I0.required)})}}},83983:function(O,f,t){"use strict";t.d(f,{Z:function(){return T}});var e=t(86349),l=t.n(e),v={contentManager:{main:[],collectionTypesConfigurations:[{action:"plugin::content-manager.collection-types.configure-view",subject:null}],componentsConfigurations:[{action:"plugin::content-manager.components.configure-layout",subject:null}],singleTypesConfigurations:[{action:"plugin::content-manager.single-types.configure-view",subject:null}]},marketplace:{main:[{action:"admin::marketplace.read",subject:null}],read:[{action:"admin::marketplace.read",subject:null}]},settings:{roles:{main:[{action:"admin::roles.create",subject:null},{action:"admin::roles.update",subject:null},{action:"admin::roles.read",subject:null},{action:"admin::roles.delete",subject:null}],create:[{action:"admin::roles.create",subject:null}],delete:[{action:"admin::roles.delete",subject:null}],read:[{action:"admin::roles.read",subject:null}],update:[{action:"admin::roles.update",subject:null}]},users:{main:[{action:"admin::users.create",subject:null},{action:"admin::users.read",subject:null},{action:"admin::users.update",subject:null},{action:"admin::users.delete",subject:null}],create:[{action:"admin::users.create",subject:null}],delete:[{action:"admin::users.delete",subject:null}],read:[{action:"admin::users.read",subject:null}],update:[{action:"admin::users.update",subject:null}]},webhooks:{main:[{action:"admin::webhooks.create",subject:null},{action:"admin::webhooks.read",subject:null},{action:"admin::webhooks.update",subject:null},{action:"admin::webhooks.delete",subject:null}],create:[{action:"admin::webhooks.create",subject:null}],delete:[{action:"admin::webhooks.delete",subject:null}],read:[{action:"admin::webhooks.read",subject:null},{action:"admin::webhooks.update",subject:null},{action:"admin::webhooks.delete",subject:null}],update:[{action:"admin::webhooks.update",subject:null}]},"api-tokens":{main:[{action:"admin::api-tokens.access",subject:null}],create:[{action:"admin::api-tokens.create",subject:null}],delete:[{action:"admin::api-tokens.delete",subject:null}],read:[{action:"admin::api-tokens.read",subject:null}],update:[{action:"admin::api-tokens.update",subject:null}],regenerate:[{action:"admin::api-tokens.regenerate",subject:null}]},"transfer-tokens":{main:[{action:"admin::transfer.tokens.access",subject:null}],create:[{action:"admin::transfer.tokens.create",subject:null}],delete:[{action:"admin::transfer.tokens.delete",subject:null}],read:[{action:"admin::transfer.tokens.read",subject:null}],update:[{action:"admin::transfer.tokens.update",subject:null}],regenerate:[{action:"admin::transfer.tokens.regenerate",subject:null}]},"project-settings":{read:[{action:"admin::project-settings.read",subject:null}],update:[{action:"admin::project-settings.update",subject:null}]}}};const h=(()=>window&&window.strapi&&window.strapi.isEE?t(99568).Z:t(26123).Z)();var T=l()(v,h)},12402:function(O,f,t){"use strict";t.r(f),t.d(f,{default:function(){return xs}});var e=t(32735),l=t(14911),o=t(12301),v=t(65810),h=t(86349),g=t.n(h),T=t(88423),A=t.n(T),M=t(93839),Z=t.n(M),b=t(56784),E=t.n(b),k=t(74758),P=t(78246),R=()=>{const u=[];return{register(s){u.push(s)},delete(s){u.splice(u.indexOf(s),1)},runWaterfall(s,n){return u.reduce((r,c)=>c(r,n),s)},async runWaterfallAsync(s,n){let r=s;for(const c of u)r=await c(r,n);return r},runSeries(...s){return u.map(n=>n(...s))},async runSeriesAsync(...s){const n=[];for(const r of u)n.push(await r(...s));return n},runParallel(...s){return Promise.all(u.map(n=>n(...s)))}}},I=t(6680);const K=(u,s)=>{let n=I.compose;const r=[];u.forEach(y=>{r.push(y())});const c=(0,I.createStore)(B(s,{}),{},n((0,I.applyMiddleware)(...r)));return c.asyncReducers={},c.injectReducer=(y,C)=>{c.asyncReducers[y]=C,c.replaceReducer(B(s,c.asyncReducers))},c},B=(u,s)=>(0,I.combineReducers)({...u,...s});var ae=K,de=t(20284),L=t(53038),m=t(43383),$=t(84306),ee=t(10728),ie=t(67879),se=t(60216),a=t.n(se);const ye=({component:u,path:s,...n})=>{const{pathname:r,search:c}=(0,L.TH)();return e.createElement(L.AW,{path:s,render:y=>m.I8.getToken()!==null?e.createElement(u,{...n,...y}):e.createElement(L.l_,{to:{pathname:"/auth/login",search:r!=="/"&&`?redirectTo=${encodeURIComponent(`${r}${c}`)}`}})})};ye.propTypes={component:a().any.isRequired,path:a().string.isRequired};var Pe=(0,e.memo)(ye),Te=t(8997),we=t(20011),Se=t(39935),Ye=t.n(Se),qe=t(33795),me=t.n(qe),rt=t(9086),We=t.n(rt);const Je="GUIDED_TOUR_CURRENT_STEP",He="GUIDED_TOUR_COMPLETED_STEPS",gt="GUIDED_TOUR_SKIPPED",et=JSON.parse,W=JSON.stringify;var H={clear(){localStorage.removeItem(Je),localStorage.removeItem(He)},addCompletedStep(u){const s=et(localStorage.getItem(He))?.slice()||[];s.includes(u)||(s.push(u),localStorage.setItem(He,W(s)))},addCurrentStep(u){localStorage.setItem(Je,W(u))},setSkipped(u){localStorage.setItem(gt,W(u))},get(u){return et(localStorage.getItem(u))}},Ne=t(20139),Re=t(41832),re=u=>u,he=t(97889),Ue=t(3040),Ce=t.n(Ue);const je={formErrors:{},modifiedData:{},requestError:null},De=(u,s)=>(0,he.ZP)(u,n=>{switch(s.type){case"ON_CHANGE":{Ce()(n.modifiedData,s.keys.split("."),s.value);break}case"RESET_PROPS":return je;case"SET_DATA":{n.modifiedData=s.data;break}case"SET_ERRORS":{n.formErrors=s.errors;break}case"SET_REQUEST_ERROR":{n.requestError={errorMessage:s.errorMessage,errorStatus:s.errorStatus};break}default:return n}}),tt=(()=>window&&window.strapi&&window.strapi.isEE?t(7277).Z:t(78834).Z)(),Ge=u=>{let{hasAdmin:s,setHasAdmin:n}=u;const{push:r,location:{search:c}}=(0,L.k6)(),{changeLocale:y}=(0,Ne.Z)(),{setSkipped:C}=(0,m.c1)(),{trackUsage:D}=(0,m.rS)(),{params:{authType:j}}=(0,L.$B)("/auth/:authType"),Y=(0,m.aM)(),{Component:V,endPoint:U,fieldsToDisable:_,fieldsToOmit:Q,inputsPrefix:te,schema:G,...ge}=me()(tt,j,{}),[{formErrors:be,modifiedData:dt,requestError:mt},_e]=(0,e.useReducer)(De,je,re),Qe=$.Z.CancelToken.source();(0,e.useEffect)(()=>()=>{Qe.cancel("Component unmounted")},[]),(0,e.useEffect)(()=>{_e({type:"RESET_PROPS"})},[j]);const Bs=oe=>{let{target:{name:Le,value:fe}}=oe;_e({type:"ON_CHANGE",keys:Le,value:fe})},Ws=async(oe,Le)=>{let{setSubmitting:fe,setErrors:ke}=Le;fe(!0);const Be=We()(oe,Q),q=`/admin/${U}`;j==="login"&&await Gs(oe,q,{setSubmitting:fe,setErrors:ke}),(j==="register"||j==="register-admin")&&await Ks(oe,q,{setSubmitting:fe,setErrors:ke}),j==="forgot-password"&&await Ns(Be,q,{setSubmitting:fe,setErrors:ke}),j==="reset-password"&&await Fs(Be,q,{setSubmitting:fe,setErrors:ke})},Ns=async(oe,Le,fe)=>{let{setSubmitting:ke,setErrors:Be}=fe;try{await(0,$.Z)({method:"POST",url:`${strapi.backendURL}${Le}`,data:oe,cancelToken:Qe.token}),r("/auth/forgot-password-success")}catch(q){console.error(q),Be({errorMessage:"notification.error"})}finally{ke(!1)}},Gs=async(oe,Le,fe)=>{let{setSubmitting:ke,setErrors:Be}=fe;try{const{data:{data:{token:q,user:pe}}}=await(0,$.Z)({method:"POST",url:`${strapi.backendURL}${Le}`,data:We()(oe,Q),cancelToken:Qe.token});pe.preferedLanguage&&y(pe.preferedLanguage),m.I8.setToken(q,oe.rememberMe),m.I8.setUserInfo(pe,oe.rememberMe),rs()}catch(q){if(q.response){const pe=me()(q,["response","data","error","message"],"Something went wrong");if(Ye()(pe).toLowerCase()==="usernotactive"){r("/auth/oops"),_e({type:"RESET_PROPS"});return}Be({errorMessage:pe})}}finally{ke(!1)}},Ks=async(oe,Le,fe)=>{let{setSubmitting:ke,setErrors:Be}=fe;try{D("willCreateFirstAdmin");const{data:{data:{token:q,user:pe}}}=await(0,$.Z)({method:"POST",url:`${strapi.backendURL}${Le}`,data:We()(oe,Q),cancelToken:Qe.token});m.I8.setToken(q,!1),m.I8.setUserInfo(pe,!1),ke(!1),n(!0);const{roles:it}=pe;if(it&&it.find(Hs=>{let{code:$s}=Hs;return $s==="strapi-super-admin"})&&(H.setSkipped(!1),C(!1),D("didLaunchGuidedtour")),j==="register"&&oe.userInfo.news===!0||j==="register-admin"&&oe.news===!0){r({pathname:"/usecase",search:`?hasAdmin=${s}`});return}rs()}catch(q){if(D("didNotCreateFirstAdmin"),q.response){const{data:pe}=q.response,it=(0,Re.Z)(pe);Be({apiErrors:it})}}},Fs=async(oe,Le,fe)=>{let{setErrors:ke,setSubmitting:Be}=fe;try{const{data:{data:{token:q,user:pe}}}=await(0,$.Z)({method:"POST",url:`${strapi.backendURL}${Le}`,data:{...oe,resetPasswordToken:Y.get("code")},cancelToken:Qe.token});m.I8.setToken(q,!1),m.I8.setUserInfo(pe,!1),r("/")}catch(q){if(q.response){const pe=me()(q,["response","data","message"],"Something went wrong"),it=me()(q,["response","data","statusCode"],400);_e({type:"SET_REQUEST_ERROR",errorMessage:pe,errorStatus:it}),ke({errorMessage:pe})}}finally{Be(!1)}},rs=()=>{if(j==="login"){const oe=Y.get("redirectTo"),Le=oe?decodeURIComponent(oe):"/";r(Le)}else r("/")};return!tt[j]||s&&j==="register-admin"||m.I8.getToken()?e.createElement(L.l_,{to:"/"}):!s&&j!=="register-admin"?e.createElement(L.l_,{to:{pathname:"/auth/register-admin",search:c}}):e.createElement(V,(0,we.Z)({},ge,{authType:j,fieldsToDisable:_,formErrors:be,inputsPrefix:te,modifiedData:dt,onChange:Bs,onSubmit:Ws,requestError:mt,schema:G}))};Ge.defaultProps={hasAdmin:!1},Ge.propTypes={hasAdmin:a().bool,setHasAdmin:a().func.isRequired};var pt=Ge,lt=t(53951),F=t(8471),ut=t(33348),st=t(49372),Ze=t(27649),Ae=t(87933),le=t(72850),X=t(80084),ne=t(84967),Ee=t(10369),Me=t(41415),Zt=t(7563),At=t(10190),Mt=t(954);const Lt=[{intlLabel:{id:"Usecase.front-end",defaultMessage:"Front-end developer"},value:"front_end_developer"},{intlLabel:{id:"Usecase.back-end",defaultMessage:"Back-end developer"},value:"back_end_developer"},{intlLabel:{id:"Usecase.full-stack",defaultMessage:"Full-stack developer"},value:"full_stack_developer"},{intlLabel:{id:"global.content-manager",defaultMessage:"Content Manager"},value:"content_manager"},{intlLabel:{id:"Usecase.content-creator",defaultMessage:"Content Creator"},value:"content_creator"},{intlLabel:{id:"Usecase.other",defaultMessage:"Other"},value:"other"}],ft=(0,F.ZP)(st.Z)`
12
- text-align: center;
13
- `;var nt=()=>{const u=(0,m.lm)(),{push:s,location:n}=(0,L.k6)(),{formatMessage:r}=(0,ie.Z)(),[c,y]=(0,e.useState)(),[C,D]=(0,e.useState)(""),{firstname:j,email:Y}=m.I8.getUserInfo(),{hasAdmin:V}=(0,ut.parse)(n?.search,{ignoreQueryPrefix:!0}),U=c==="other",_=Q=>{try{(0,$.Z)({method:"POST",url:"https://analytics.strapi.io/register",data:{email:Y,username:j,firstAdmin:Boolean(!V),persona:{role:Q?void 0:c,otherRole:Q?void 0:C}}}),u({type:"success",message:{id:"Usecase.notification.success.project-created",defaultMessage:"Project has been successfully created"}}),s("/")}catch{}};return e.createElement(Mt.ZP,null,e.createElement(Ze.o,{labelledBy:"usecase-title"},e.createElement(Mt.bU,null,e.createElement("form",{onSubmit:()=>_(!1)},e.createElement(Ae.k,{direction:"column",paddingBottom:7},e.createElement(At.Z,null),e.createElement(le.x,{paddingTop:6,paddingBottom:1,width:(0,m.Q1)(250)},e.createElement(ft,{variant:"alpha",as:"h1",id:"usecase-title"},r({id:"Usecase.title",defaultMessage:"Tell us a bit more about yourself"})))),e.createElement(Ae.k,{direction:"column",alignItems:"stretch",gap:6},e.createElement(X.P,{id:"usecase","data-testid":"usecase",label:r({id:"Usecase.input.work-type",defaultMessage:"What type of work do you do?"}),onChange:y,value:c},Lt.map(({intlLabel:Q,value:te})=>e.createElement(ne.W,{key:te,value:te},r(Q)))),U&&e.createElement(Ee.o,{name:"other",label:r({id:"Usecase.other",defaultMessage:"Other"}),value:C,onChange:Q=>D(Q.target.value),"data-testid":"other"}),e.createElement(Me.z,{type:"submit",size:"L",fullWidth:!0,disabled:!c},r({id:"global.finish",defaultMessage:"Finish"}))))),e.createElement(Ae.k,{justifyContent:"center"},e.createElement(le.x,{paddingTop:4},e.createElement(Zt.A,{onClick:()=>_(!0)},r({id:"Usecase.button.skip",defaultMessage:"Skip this question"}))))))},St=t(26322),ht=async()=>`web-fingerprint-${(await(await St.ZP.load()).get()).visitorId}`,Nt=[],Kt=[...(()=>window&&window.strapi&&window.strapi.isEE?t(68944).Z:t(56761).Z)(),...Nt],Et=t(67927);const Ft=(0,e.lazy)(()=>Promise.all([t.e(3081),t.e(801)]).then(t.bind(t,29761)));function Dt(){const u=(0,m.lm)(),{updateProjectSettings:s}=(0,Et.um)(),{formatMessage:n}=(0,ie.Z)(),[{isLoading:r,hasAdmin:c,uuid:y,deviceId:C},D]=(0,e.useState)({isLoading:!0,hasAdmin:!1}),j=(0,m.QI)(),{get:Y}=(0,m.kY)(),V=(0,e.useMemo)(()=>(0,Te.WW)(Kt.map(({to:G,Component:ge,exact:be})=>(0,Te.ot)(ge,G,be))),[]),[U,_]=(0,e.useState)(null);(0,e.useEffect)(()=>{const G=m.I8.getToken();G&&(async()=>{try{const{data:{token:be}}=await(0,m.WY)("/admin/renew-token",{method:"POST",body:{token:G}});m.I8.updateToken(be)}catch{m.I8.clearAppStorage(),window.location.reload()}})()},[]),(0,e.useEffect)(()=>{(async()=>{try{const{data:{data:{hasAdmin:ge,uuid:be,menuLogo:dt,authLogo:mt}}}=await $.Z.get(`${strapi.backendURL}/admin/init`);s({menuLogo:(0,m.CR)(dt),authLogo:(0,m.CR)(mt)});const _e=await ht();if(be){const{data:{data:jt}}=await Y("/admin/telemetry-properties",{validateStatus:Qe=>Qe<500});_(jt);try{await fetch("https://analytics.strapi.io/api/v2/track",{method:"POST",body:JSON.stringify({event:"didInitializeAdministration",userId:"",deviceId:_e,eventPropeties:{},userProperties:{environment:j.currentEnvironment},groupProperties:{...jt,projectId:be}}),headers:{"Content-Type":"application/json"}})}catch{}}D({isLoading:!1,hasAdmin:ge,uuid:be,deviceId:_e})}catch{u({type:"warning",message:{id:"app.containers.App.notification.error.init"}})}})()},[u,s]);const Q=G=>D(ge=>({...ge,hasAdmin:G})),te=(0,e.useMemo)(()=>({uuid:y,telemetryProperties:U,deviceId:C}),[y,U,C]);return r?e.createElement(m.dO,null):e.createElement(e.Suspense,{fallback:e.createElement(m.dO,null)},e.createElement(ee.z,null,n({id:"skipToContent"})),e.createElement(m.L8,{value:te},e.createElement(L.rs,null,V,e.createElement(L.AW,{path:"/auth/:authType",render:G=>e.createElement(pt,{...G,setHasAdmin:Q,hasAdmin:c}),exact:!0}),e.createElement(Pe,{path:"/usecase",component:nt}),e.createElement(Pe,{path:"/",component:Ft}),e.createElement(L.AW,{path:"",component:lt.default}))))}var It=Dt,Ot=t(47750),Ht=t(86113),$t=t(20108),bt=t(15062),vt=t(66694);const yt={menuLogo:null,authLogo:null};var d=(u=yt,s)=>(0,he.ZP)(u,n=>{switch(s.type){case"UPDATE_PROJECT_SETTINGS":{Object.assign(n,s.values);break}default:return n}});const i=({children:u,authLogo:s,menuLogo:n,showReleaseNotification:r,showTutorials:c})=>{const[{menuLogo:y,authLogo:C},D]=(0,e.useReducer)(d,yt),j=(0,e.useCallback)(({menuLogo:V,authLogo:U})=>D({type:"UPDATE_PROJECT_SETTINGS",values:{menuLogo:V||n,authLogo:U||s}}),[s,n]),Y=(0,e.useMemo)(()=>({logos:{menu:{custom:y,default:n},auth:{custom:C,default:s}},updateProjectSettings:j,showReleaseNotification:r,showTutorials:c}),[y,n,C,s,j,r,c]);return e.createElement(vt._5.Provider,{value:Y},u)};i.propTypes={authLogo:a().string.isRequired,children:a().element.isRequired,menuLogo:a().string.isRequired,showReleaseNotification:a().bool.isRequired,showTutorials:a().bool.isRequired};var S=i,x=t(78023),N=t(58732),z=t.n(N),J=t(5985);const ue=({changeLocale:u,children:s,localeNames:n})=>e.createElement(J.Z.Provider,{value:{changeLocale:u,localeNames:n}},s);ue.propTypes={changeLocale:a().func.isRequired,children:a().element.isRequired,localeNames:a().object.isRequired};var Ie=ue,Oe="strapi-admin-language",Xe=u=>{const s=window.localStorage.getItem(Oe);return{locale:u[s]?s:"en",localeNames:u}};const ot={localeNames:{en:"English"},locale:"en"};var Pt=(u=ot,s)=>{switch(s.type){case"CHANGE_LOCALE":{const{locale:n}=s;return u.localeNames[n]?{...u,locale:n}:u}default:return u}};const at=({children:u,localeNames:s,messages:n})=>{const[{locale:r},c]=(0,e.useReducer)(Pt,ot,()=>Xe(s));(0,e.useEffect)(()=>{window.localStorage.setItem(Oe,r),document.documentElement.setAttribute("lang",r)},[r]);const y=D=>{c({type:"CHANGE_LOCALE",locale:D})},C=z()(n[r],n.en);return e.createElement(x.Z,{locale:r,defaultLocale:"en",messages:C,textComponent:"span"},e.createElement(Ie,{changeLocale:y,localeNames:s},u))};at.propTypes={children:a().element.isRequired,localeNames:a().objectOf(a().string).isRequired,messages:a().object.isRequired};var Ke=at,xe=(u,s)=>{const n=Object.entries(s),r=n.findIndex(([y])=>y===u);return n.slice(0,r).every(([,y])=>Object.values(y).every(Boolean))},ct=(u,s)=>{const n=u.split("."),r=n[1],c=Object.entries(s[n[0]]),y=c.findIndex(([D])=>D===r);return c.slice(0,y).every(([,D])=>D)};const zt={currentStep:null,guidedTourState:{contentTypeBuilder:{create:!1,success:!1},contentManager:{create:!1,success:!1},apiTokens:{create:!1,success:!1}},isGuidedTourVisible:!1,isSkipped:!0};var ls=(u=zt,s)=>(0,he.ZP)(u,n=>{switch(s.type){case"SET_CURRENT_STEP":{n.currentStep=s.step;break}case"SET_STEP_STATE":{const[r,c]=s.currentStep.split(".");n.guidedTourState[r][c]=s.value;break}case"SET_SKIPPED":{n.isSkipped=s.value;break}case"SET_GUIDED_TOUR_VISIBILITY":{n.isGuidedTourVisible=s.value;break}default:return n}}),us=u=>{const s={...u},n=H.get(He),r=H.get(Je),c=H.get(gt);if(n&&n.forEach(y=>{const[C,D]=y.split(".");Ce()(s,["guidedTourState",C,D],!0)}),r){const[y,C]=r.split(".");Ce()(s,["guidedTourState",y,C],!0),H.addCompletedStep(r),H.addCurrentStep(null)}return c!==null&&Ce()(s,"isSkipped",c),s};const Vt=({children:u})=>{const[{currentStep:s,guidedTourState:n,isGuidedTourVisible:r,isSkipped:c},y]=(0,e.useReducer)(ls,zt,us),C=U=>{if(U!==null){const _=me()(n,U),Q=ct(U,n);if(_||c||!Q)return null}return H.addCurrentStep(U),y({type:"SET_CURRENT_STEP",step:U})},D=U=>{y({type:"SET_GUIDED_TOUR_VISIBILITY",value:U})},j=(U,_)=>{H.addCompletedStep(U),y({type:"SET_STEP_STATE",currentStep:U,value:_})},Y=U=>{const _=n[U];if(_){const Q=xe(U,n),te=Object.keys(_)[0],G=_[te];if(Q&&!s&&!G)return C(`${U}.${te}`)}return null},V=U=>{H.setSkipped(U),y({type:"SET_SKIPPED",value:U})};return e.createElement(m.Zc,{guidedTourState:n,currentStep:s,setCurrentStep:C,setGuidedTourVisibility:D,setSkipped:V,setStepState:j,startSection:Y,isGuidedTourVisible:r,isSkipped:c},u)};Vt.propTypes={children:a().element.isRequired};var cs=Vt,Qt=t(12788),ds=t(44647),ms=t(72536),Yt=t(41502);const gs=(0,F.ZP)(le.x)`
14
- position: fixed;
15
- top: 0;
16
- right: 0;
17
- bottom: 0;
18
- left: 0;
19
- z-index: 1140;
20
- &:before {
21
- content: '';
22
- position: fixed;
23
- top: 0;
24
- right: 0;
25
- bottom: 0;
26
- left: 0;
27
- background: ${({theme:u})=>u.colors.neutral0};
28
- opacity: 0.9;
29
- }
30
- `,ps=(0,F.ZP)(Ae.k)`
31
- position: fixed;
32
- top: 0;
33
- right: 0;
34
- bottom: 0;
35
- left: 0;
36
- padding-top: ${(0,m.Q1)(160)};
37
- `,Jt=(0,F.ZP)(le.x)`
38
- border-radius: 50%;
39
- svg {
40
- > path {
41
- fill: ${({theme:u})=>u.colors.primary600} !important;
42
- }
43
- }
44
- `,Tt=document.createElement("div"),fs="autoReloadOverlayBlocker";Tt.setAttribute("id",fs);const hs=F.F4`
45
- from {
46
- transform: rotate(0deg);
47
- }
48
- to {
49
- transform: rotate(359deg);
50
- }
51
- `,Es=(0,F.ZP)(ds.Z)`
52
- animation: ${hs} 1s infinite linear;
53
- `,Xt=({displayedIcon:u,description:s,title:n,isOpen:r})=>{const{formatMessage:c}=(0,ie.Z)();return(0,e.useEffect)(()=>(document.body.appendChild(Tt),()=>{document.body.removeChild(Tt)}),[]),r?Qt.createPortal(e.createElement(gs,null,e.createElement(ps,{direction:"column",alignItems:"stretch",gap:6},e.createElement(Ae.k,{direction:"column",alignItems:"stretch",gap:2},e.createElement(Ae.k,{justifyContent:"center"},e.createElement(st.Z,{as:"h1",variant:"alpha"},c(n))),e.createElement(Ae.k,{justifyContent:"center"},e.createElement(st.Z,{as:"h2",textColor:"neutral600",fontSize:4,fontWeight:"regular"},c(s)))),e.createElement(Ae.k,{justifyContent:"center"},u==="reload"&&e.createElement(Jt,{padding:6,background:"primary100",borderColor:"primary200"},e.createElement(Es,{width:(0,m.Q1)(36),height:(0,m.Q1)(36)})),u==="time"&&e.createElement(Jt,{padding:6,background:"primary100",borderColor:"primary200"},e.createElement(ms.Z,{width:(0,m.Q1)(40),height:(0,m.Q1)(40)}))),e.createElement(Ae.k,{justifyContent:"center"},e.createElement(le.x,{paddingTop:2},e.createElement(Yt.r,{href:"https://docs.strapi.io",isExternal:!0},c({id:"global.documentation",defaultMessage:"Read the documentation"})))))),Tt):null};Xt.propTypes={displayedIcon:a().oneOfType([a().string,a().array]).isRequired,description:a().object.isRequired,isOpen:a().bool.isRequired,title:a().object.isRequired};var vs=Xt;const _t=30,qt=({children:u})=>{const[s,n]=(0,e.useState)(!1),[{elapsed:r},c]=(0,e.useState)({elapsed:0,start:0}),[y,C]=(0,e.useState)(void 0),D=(G=void 0)=>{n(!0),C(G),c(ge=>({...ge,start:Date.now()}))},j=()=>{n(!1),c({start:0,elapsed:0}),C(void 0)},Y=(0,e.useRef)(D),V=(0,e.useRef)(j);(0,e.useEffect)(()=>{let G=null;return s?G=setInterval(()=>r>_t?(clearInterval(G),null):(c(ge=>({...ge,elapsed:Math.round(Date.now()-ge.start)/1e3})),null),1e3):clearInterval(G),()=>{clearInterval(G)}},[s,r]);let U=y?.icon||"reload",_={id:y?.description||"components.OverlayBlocker.description",defaultMessage:"You're using a feature that needs the server to restart. Please wait until the server is up."},Q={id:y?.title||"components.OverlayBlocker.title",defaultMessage:"Waiting for restart"};r>_t&&(U="time",_={id:"components.OverlayBlocker.description.serverError",defaultMessage:"The server should have restarted, please check your logs in the terminal."},Q={id:"components.OverlayBlocker.title.serverError",defaultMessage:"The restart is taking longer than expected"});const te=(0,e.useMemo)(()=>({lockApp:Y.current,unlockApp:V.current}),[Y,V]);return e.createElement(m.Uu.Provider,{value:te},e.createElement(vs,{displayedIcon:U,isOpen:s,description:_,title:Q}),u)};qt.propTypes={children:a().element.isRequired};var ys=qt,Ps=t(25855);const Ut=({dispatch:u,notification:s})=>{const{formatMessage:n}=(0,ie.Z)(),{message:r,link:c,type:y,id:C,onClose:D,timeout:j,blockTransition:Y,title:V}=s,U=G=>typeof G=="string"?G:n(G,G.values),_=(0,e.useCallback)(()=>{D&&D(),u({type:"HIDE_NOTIFICATION",id:C})},[C]);(0,e.useEffect)(()=>{let G;return Y||(G=setTimeout(()=>{_()},j||2500)),()=>clearTimeout(G)},[Y,_,j]);let Q,te;return y==="info"?(Q="default",te=n({id:"notification.default.title",defaultMessage:"Information:"})):y==="warning"?(Q="danger",te=n({id:"notification.warning.title",defaultMessage:"Warning:"})):y==="softWarning"?(Q="warning",te=n({id:"notification.warning.title",defaultMessage:"Warning:"})):(Q="success",te=n({id:"notification.success.title",defaultMessage:"Success:"})),V&&(te=typeof V=="string"?V:U({id:V?.id||V,defaultMessage:V?.defaultMessage||V?.id||V,values:V?.values})),e.createElement(Ps.b,{action:c?e.createElement(Yt.r,{href:c.url,isExternal:!0},n({id:c.label?.id||c.label,defaultMessage:c.label?.defaultMessage||c.label?.id||c.label})):void 0,onClose:_,closeLabel:"Close",title:te,variant:Q},U({id:r?.id||r,defaultMessage:r?.defaultMessage||r?.id||r,values:r?.values}))};Ut.defaultProps={notification:{id:1,type:"success",message:{id:"notification.success.saved",defaultMessage:"Saved"},onClose:()=>null,timeout:2500,blockTransition:!1}},Ut.propTypes={dispatch:a().func.isRequired,notification:a().shape({id:a().number,message:a().oneOfType([a().string,a().shape({id:a().string.isRequired,defaultMessage:a().string,values:a().object})]),link:a().shape({target:a().string,url:a().string.isRequired,label:a().oneOfType([a().string,a().shape({id:a().string.isRequired,defaultMessage:a().string,values:a().object})]).isRequired}),type:a().string,onClose:a().func,timeout:a().number,blockTransition:a().bool,title:a().oneOfType([a().string,a().shape({id:a().string.isRequired,defaultMessage:a().string,values:a().object})])})};var Ts=Ut;const es={notifId:0,notifications:[]};var Rs=(u=es,s)=>(0,he.ZP)(u,n=>{switch(s.type){case"SHOW_NOTIFICATION":{n.notifications.push({id:u.notifId,type:me()(s,["config","type"],"success"),message:me()(s,["config","message"],{id:"notification.success.saved",defaultMessage:"Saved"}),link:me()(s,["config","link"],null),timeout:me()(s,["config","timeout"],2500),blockTransition:me()(s,["config","blockTransition"],!1),onClose:me()(s,["config","onClose"],null),title:me()(s,["config","title"],null)}),n.notifId=u.notifId+1;break}case"HIDE_NOTIFICATION":{const r=u.notifications.findIndex(c=>c.id===s.id);r!==-1&&n.notifications.splice(r,1);break}default:return n}});const ts=({children:u})=>{const[{notifications:s},n]=(0,e.useReducer)(Rs,es),r=c=>{n({type:"SHOW_NOTIFICATION",config:c})};return e.createElement(m.N$,{toggleNotification:r},e.createElement(Ae.k,{left:"50%",marginLeft:"-250px",position:"fixed",direction:"column",alignItems:"stretch",gap:2,top:`${46/16}rem`,width:`${500/16}rem`,zIndex:10},s.map(c=>e.createElement(Ts,{key:c.id,dispatch:n,notification:c}))),u)};ts.propTypes={children:a().element.isRequired};var Cs=ts;const Rt=document.createElement("div");Rt.setAttribute("id","overlayBlocker");const As=F.ZP.div`
54
- position: fixed;
55
- top: 0;
56
- right: 0;
57
- bottom: 0;
58
- left: 0;
59
- z-index: 1140;
60
- `,ss=({isOpen:u})=>((0,e.useEffect)(()=>(document.body.appendChild(Rt),()=>{document.body.removeChild(Rt)}),[]),u?Qt.createPortal(e.createElement(As,null),Rt):null);ss.propTypes={isOpen:a().bool.isRequired};const ns=({children:u})=>{const[s,n]=(0,e.useState)(!1),r=()=>{n(!0)},c=()=>{n(!1)};return e.createElement(m.vG.Provider,{value:{lockApp:r,unlockApp:c}},u,e.createElement(ss,{isOpen:s}))};ns.propTypes={children:a().node.isRequired};var Ms=ns;const wt="STRAPI_THEME",Ls=()=>{const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",s=localStorage.getItem(wt);return s||localStorage.setItem(wt,u),s||u},os=({children:u,themes:s})=>{const[n,r]=(0,e.useState)(Ls()),c=(0,e.useCallback)(C=>{r(C),localStorage.setItem(wt,C)},[r]),y=(0,e.useMemo)(()=>({currentTheme:n,onChangeTheme:c,themes:s}),[n,c,s]);return e.createElement(vt.Rj.Provider,{value:y},u)};os.propTypes={children:a().node.isRequired,themes:a().shape({light:a().shape({colors:a().object.isRequired,shadows:a().object.isRequired,sizes:a().object.isRequired,zIndices:a().array.isRequired,spaces:a().array.isRequired,borderRadius:a().string.isRequired,mediaQueries:a().object.isRequired,fontSizes:a().array.isRequired,lineHeights:a().array.isRequired,fontWeights:a().object.isRequired}).isRequired,dark:a().shape({colors:a().object.isRequired,shadows:a().object.isRequired,sizes:a().object.isRequired,zIndices:a().array.isRequired,spaces:a().array.isRequired,borderRadius:a().string.isRequired,mediaQueries:a().object.isRequired,fontSizes:a().array.isRequired,lineHeights:a().array.isRequired,fontWeights:a().object.isRequired}).isRequired,custom:a().object}).isRequired};var Ss=os,Ds=t(86861),Is=F.vJ`
61
- body {
62
- background: ${({theme:u})=>u.colors.neutral100};
63
- }
64
- `;const as=({children:u})=>{const{currentTheme:s,themes:n}=(0,Et.M1)();return e.createElement(Ds.f,{theme:n[s]||n.light},u,e.createElement(Is,null))};as.propTypes={children:a().element.isRequired};var Os=as;const bs=new Ht.S({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),is=({authLogo:u,children:s,components:n,customFields:r,fields:c,getAdminInjectedComponents:y,getPlugin:C,localeNames:D,menu:j,menuLogo:Y,messages:V,plugins:U,runHookParallel:_,runHookSeries:Q,runHookWaterfall:te,settings:G,showReleaseNotification:ge,showTutorials:be,store:dt,themes:mt})=>e.createElement(Ss,{themes:mt},e.createElement(Os,null,e.createElement($t.QueryClientProvider,{client:bs},e.createElement(bt.zt,{store:dt},e.createElement(vt.ux.Provider,{value:{getAdminInjectedComponents:y}},e.createElement(S,{authLogo:u,menuLogo:Y,showReleaseNotification:ge,showTutorials:be},e.createElement(m._Y,{getPlugin:C,menu:j,plugins:U,runHookParallel:_,runHookWaterfall:te,runHookSeries:Q,settings:G},e.createElement(m.rt,{components:n,fields:c},e.createElement(m.MG,{customFields:r},e.createElement(Ke,{messages:V,localeNames:D},e.createElement(ys,null,e.createElement(Ms,null,e.createElement(cs,null,e.createElement(Cs,null,s))))))))))))));is.propTypes={authLogo:a().oneOfType([a().string,a().any]).isRequired,children:a().element.isRequired,components:a().object.isRequired,customFields:a().object.isRequired,fields:a().object.isRequired,getAdminInjectedComponents:a().func.isRequired,getPlugin:a().func.isRequired,localeNames:a().objectOf(a().string).isRequired,menu:a().arrayOf(a().shape({to:a().string.isRequired,icon:a().func.isRequired,intlLabel:a().shape({id:a().string.isRequired,defaultMessage:a().string.isRequired}).isRequired,permissions:a().array,Component:a().func})).isRequired,menuLogo:a().oneOfType([a().string,a().any]).isRequired,messages:a().object.isRequired,plugins:a().object.isRequired,runHookParallel:a().func.isRequired,runHookWaterfall:a().func.isRequired,runHookSeries:a().func.isRequired,settings:a().object.isRequired,showReleaseNotification:a().bool.isRequired,showTutorials:a().bool.isRequired,store:a().object.isRequired,themes:a().shape({light:a().shape({colors:a().object.isRequired,shadows:a().object.isRequired,sizes:a().object.isRequired,zIndices:a().array.isRequired,spaces:a().array.isRequired,borderRadius:a().string.isRequired,mediaQueries:a().object.isRequired,fontSizes:a().array.isRequired,lineHeights:a().array.isRequired,fontWeights:a().object.isRequired}).isRequired,dark:a().shape({colors:a().object.isRequired,shadows:a().object.isRequired,sizes:a().object.isRequired,zIndices:a().array.isRequired,spaces:a().array.isRequired,borderRadius:a().string.isRequired,mediaQueries:a().object.isRequired,fontSizes:a().array.isRequired,lineHeights:a().array.isRequired,fontWeights:a().object.isRequired}).isRequired,custom:a().object}).isRequired};var ks=is,Us={ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",ca:"Catal\xE0",cs:"\u010Ce\u0161tina",de:"Deutsch",dk:"Dansk",en:"English",es:"Espa\xF1ol",eu:"Euskara",fr:"Fran\xE7ais",gu:"Gujarati",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",hu:"Magyar",id:"Indonesian",it:"Italiano",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4",ml:"Malayalam",ms:"Melayu",nl:"Nederlands",no:"Norwegian",pl:"Polski","pt-BR":"Portugu\xEAs (Brasil)",pt:"Portugu\xEAs (Portugal)",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",sk:"Sloven\u010Dina",sv:"Swedish",th:"\u0E44\u0E17\u0E22",tr:"T\xFCrk\xE7e",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",vi:"Ti\u1EBFng Vi\u1EC7t","zh-Hans":"\u4E2D\u6587 (\u7B80\u4F53)",zh:"\u4E2D\u6587 (\u7E41\u9AD4)",sa:"\u0938\u0902\u0938\u094D\u0915\u0943\u0924",hi:"\u0939\u093F\u0928\u094D\u0926\u0940"},Ct=t(46339),ws={admin:{tutorials:{links:[]}},contentManager:{editView:{informations:[],"right-links":[]},listView:{actions:[],deleteModalAdditionalInfos:[]}}},js="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAXVBMVEUAAABIRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9IRP9JRf9IRf9IRP5IRP5JRP9JRf////+Vk/+zsv++vf9mY/9taf9/fP+Jh//c3P9RTf/Ibar2AAAAFHRSTlMA/MJX+fPt48cahaff1dMaGqcahSpTPmAAAAEvSURBVFjD7dfNTsMwEATgXcf5cdKEtixtcYH3f0xEibIguba1g8Slc+58iqUedmhNaMbJzX3Xema5G2bfdv3iprE50s80g7Yqw0Oz1Z+cmOL2a38nxuy+BSfmuNv7BUhDRAMCDESBEYCDvsD6hmcMGGnCgIkcBjhaMGCmHgN66jCgoxYDWvIY4IkxgHFAkrmeU7kmfpkG4uUllXMtEE82QPs2QPs2QPs2QPs2QPsAoH0DoH0LoH0QeN3ydtnyXg38ok76MQ/gAfwf8JH8V18LQOljomBAFAyIkga4CGT7XAtEuQf4IpDri6e2BoiZA6OrAGLuxOnLQMweWXMRyPVlwQ/NAwZMNGLACJ/76ODYo5MHHl3o7EOHZ6BbjtbpG/5kfOv8P7ilbv7PX/M/rMVPqrI3XI3nd3sAAAAASUVORK5CYII=";class Zs{constructor({adminConfig:s,appPlugins:n,library:r,middlewares:c,reducers:y}){this.customConfigurations=s.config,this.customBootstrapConfiguration=s.bootstrap,this.configurations={authLogo:Ot,head:{favicon:js},locales:["en"],menuLogo:Ot,notifications:{releases:!0},themes:{light:o.W,dark:v.$},translations:{},tutorials:!0},this.appPlugins=n||{},this.library=r,this.middlewares=c,this.plugins={},this.reducers=y,this.translations={},this.hooksDict={},this.admin={injectionZones:ws},this.customFields=de.rh,this.menu=[],this.settings={global:{id:"global",intlLabel:{id:"Settings.global",defaultMessage:"Global Settings"},links:[]}}}addComponents=s=>{Array.isArray(s)?s.map(n=>this.library.components.add(n)):this.library.components.add(s)};addCorePluginMenuLink=s=>{const n=JSON.stringify(s);E()(s.to,`link.to should be defined for ${n}`),E()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),E()(["/plugins/content-type-builder","/plugins/upload"].includes(s.to),"This method is not available for your plugin"),E()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${n}`),this.menu.push(s)};addFields=s=>{Array.isArray(s)?s.map(n=>this.library.fields.add(n)):this.library.fields.add(s)};addMenuLink=s=>{const n=JSON.stringify(s);E()(s.to,`link.to should be defined for ${n}`),E()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),E()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${n}`),E()(s.Component&&typeof s.Component=="function","link.Component should be a valid React Component"),E()(s.icon&&typeof s.icon=="function","link.Icon should be a valid React Component"),this.menu.push(s)};addMiddlewares=s=>{s.forEach(n=>{this.middlewares.add(n)})};addReducers=s=>{Object.keys(s).forEach(n=>{this.reducers.add(n,s[n])})};addSettingsLink=(s,n)=>{E()(this.settings[s],"The section does not exist");const r=JSON.stringify(n);E()(n.id,`link.id should be defined for ${r}`),E()(n.intlLabel?.id&&n.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${r}`),E()(n.to,`link.to should be defined for ${r}`),E()(n.Component&&typeof n.Component=="function","link.Component should be a valid React Component"),this.settings[s].links.push(n)};addSettingsLinks=(s,n)=>{E()(this.settings[s],"The section does not exist"),E()(Array.isArray(n),"TypeError expected links to be an array"),n.forEach(r=>{this.addSettingsLink(s,r)})};async bootstrap(){Object.keys(this.appPlugins).forEach(s=>{const n=this.appPlugins[s].bootstrap;n&&n({addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}),Z()(this.customBootstrapConfiguration)&&this.customBootstrapConfiguration({addComponents:this.addComponents,addFields:this.addFields,addMenuLink:this.addMenuLink,addReducers:this.addReducers,addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}bootstrapAdmin=async()=>(await this.createCustomConfigurations(),this.createHook(Ct.No),this.createHook(Ct.LK),this.createHook(Ct.dV),this.createHook(Ct.Eo),Promise.resolve());createCustomConfigurations=async()=>{if(this.customConfigurations?.locales&&(this.configurations.locales=["en",...this.customConfigurations.locales?.filter(s=>s!=="en")||[]]),this.customConfigurations?.auth?.logo&&(this.configurations.authLogo=this.customConfigurations.auth.logo),this.customConfigurations?.menu?.logo&&(this.configurations.menuLogo=this.customConfigurations.menu.logo),this.customConfigurations?.head?.favicon&&(this.configurations.head.favicon=this.customConfigurations.head.favicon),this.customConfigurations?.theme){const s=this.customConfigurations.theme.dark,n=this.customConfigurations.theme.light;!s&&!n&&(console.warn("[deprecated] In future versions, Strapi will stop supporting this theme customization syntax. The theme configuration accepts a light and a dark key to customize each theme separately. See https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#theme-extension."),g()(this.configurations.themes.light,this.customConfigurations.theme)),n&&g()(this.configurations.themes.light,n),s&&g()(this.configurations.themes.dark,s)}this.customConfigurations?.notifications?.releases!==void 0&&(this.configurations.notifications.releases=this.customConfigurations.notifications.releases),this.customConfigurations?.tutorials!==void 0&&(this.configurations.tutorials=this.customConfigurations.tutorials)};createHook=s=>{this.hooksDict[s]=R()};createSettingSection=(s,n)=>{E()(s.id,"section.id should be defined"),E()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,"section.intlLabel should be defined"),E()(Array.isArray(n),"TypeError expected links to be an array"),E()(this.settings[s.id]===void 0,"A similar section already exists"),this.settings[s.id]={...s,links:[]},n.forEach(r=>{this.addSettingsLink(s.id,r)})};createStore=()=>ae(this.middlewares.middlewares,this.reducers.reducers);getAdminInjectedComponents=(s,n,r)=>{try{return this.admin.injectionZones[s][n][r]||[]}catch(c){return console.error("Cannot get injected component",c),c}};getPlugin=s=>this.plugins[s];async initialize(){Object.keys(this.appPlugins).forEach(s=>{this.appPlugins[s].register(this)})}injectContentManagerComponent=(s,n,r)=>{E()(this.admin.injectionZones.contentManager[s]?.[n],`The ${s} ${n} zone is not defined in the content manager`),E()(r,"A Component must be provided"),this.admin.injectionZones.contentManager[s][n].push(r)};injectAdminComponent=(s,n,r)=>{E()(this.admin.injectionZones.admin[s]?.[n],`The ${s} ${n} zone is not defined in the admin`),E()(r,"A Component must be provided"),this.admin.injectionZones.admin[s][n].push(r)};async loadAdminTrads(){const s=this.configurations.locales.map(c=>t(48224)(`./${c}.json`).then(({default:y})=>({data:y,locale:c})).catch(()=>({data:null,locale:c})));return(await Promise.all(s)).reduce((c,y)=>(y.data&&(c[y.locale]=y.data),c),{})}async loadTrads(){const s=await this.loadAdminTrads(),n=Object.keys(this.appPlugins).map(C=>{const D=this.appPlugins[C].registerTrads;return D?D({locales:this.configurations.locales}):null}).filter(C=>C),c=(await Promise.all(n)).reduce((C,D)=>{const j=D.reduce((Y,V)=>(Y[V.locale]=V.data,Y),{});return Object.keys(j).forEach(Y=>{C[Y]={...C[Y],...j[Y]}}),C},{}),y=this.configurations.locales.reduce((C,D)=>(C[D]={...s[D],...c[D]||{},...this.customConfigurations?.translations?.[D]},C),{});return this.configurations.translations=y,Promise.resolve()}registerHook=(s,n)=>{E()(this.hooksDict[s],`The hook ${s} is not defined. You are trying to register a hook that does not exist in the application.`),this.hooksDict[s].register(n)};registerPlugin=s=>{const n=(0,de.Sy)(s);this.plugins[n.pluginId]=n};runHookSeries=(s,n=!1)=>n?this.hooksDict[s].runSeriesAsync():this.hooksDict[s].runSeries();runHookWaterfall=(s,n,r=!1,c)=>r?this.hooksDict[s].runWaterfallAsync(n,c):this.hooksDict[s].runWaterfall(n,c);runHookParallel=s=>this.hooksDict[s].runParallel();render(){const s=this.createStore(),n=A()(Us,this.configurations.locales||[]),{components:{components:r},fields:{fields:c}}=this.library;return e.createElement(ks,{authLogo:this.configurations.authLogo,components:r,fields:c,customFields:this.customFields,localeNames:n,getAdminInjectedComponents:this.getAdminInjectedComponents,getPlugin:this.getPlugin,messages:this.configurations.translations,menu:this.menu,menuLogo:this.configurations.menuLogo,plugins:this.plugins,runHookParallel:this.runHookParallel,runHookWaterfall:(y,C,D=!1)=>this.runHookWaterfall(y,C,D,s),runHookSeries:this.runHookSeries,themes:this.configurations.themes,settings:this.settings,showTutorials:this.configurations.tutorials,showReleaseNotification:this.configurations.notifications.releases,store:s},e.createElement(e.Fragment,null,e.createElement(k.q,{link:[{rel:"icon",type:"image/png",href:this.configurations.head.favicon}],htmlAttributes:{lang:localStorage.getItem(Oe)||"en"}}),e.createElement(l.VK,{basename:P.Z},e.createElement(It,{store:s}))))}}var xs=({adminConfig:u={},appPlugins:s,library:n,middlewares:r,reducers:c})=>new Zs({adminConfig:u,appPlugins:s,library:n,middlewares:r,reducers:c})},5985:function(O,f,t){"use strict";var e=t(32735);const l=(0,e.createContext)();f.Z=l},20139:function(O,f,t){"use strict";var e=t(32735),l=t(5985);const o=()=>{const{changeLocale:v,localeNames:h,messages:g}=(0,e.useContext)(l.Z);return{changeLocale:v,localeNames:h,messages:g}};f.Z=o},10190:function(O,f,t){"use strict";var e=t(32735),l=t(8471),o=t(67927);const v=l.ZP.img`
65
- height: ${72/16}rem;
66
- `,h=()=>{const{logos:{auth:g}}=(0,o.um)();return e.createElement(v,{src:g?.custom??g.default,"aria-hidden":!0,alt:""})};f.Z=h},66694:function(O,f,t){"use strict";t.d(f,{ux:function(){return o},_5:function(){return h},$l:function(){return T},Rj:function(){return M}});var e=t(32735),o=(0,e.createContext)({}),h=(0,e.createContext)({}),T=(0,e.createContext)({}),M=(0,e.createContext)({})},78246:function(O,f){"use strict";const t="/admin/".replace(window.location.origin,"");f.Z=t},46339:function(O,f,t){"use strict";t.d(f,{Eo:function(){return o},LK:function(){return l},No:function(){return e},dV:function(){return v}});const e="Admin/CM/pages/ListView/inject-column-in-table",l="Admin/CM/pages/App/mutate-collection-types-links",o="Admin/CM/pages/EditView/mutate-edit-view-layout",v="Admin/CM/pages/App/mutate-single-types-links"},67927:function(O,f,t){"use strict";t.d(f,{um:function(){return v},U_:function(){return R},Dq:function(){return de},H9:function(){return We},bP:function(){return b},$_:function(){return Dt},rW:function(){return yt},bF:function(){return Re},G4:function(){return Et},Te:function(){return Lt},M1:function(){return bt}});var e=t(32735),l=t(66694),v=()=>(0,e.useContext)(l._5),h=t(43383),g=t(97889);const T={collectionTypes:[],components:[],isLoading:!0,singleTypes:[]};var M=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"GET_MODELS":{i.collectionTypes=T.collectionTypes,i.singleTypes=T.singleTypes,i.components=T.components,i.isLoading=!0;break}case"GET_MODELS_ERROR":{i.collectionTypes=T.collectionTypes,i.singleTypes=T.singleTypes,i.components=T.components,i.isLoading=!1;break}case"GET_MODELS_SUCCEDED":{const S=x=>d.contentTypes.filter(N=>N.isDisplayed&&N.kind===x);i.isLoading=!1,i.collectionTypes=S("collectionType"),i.singleTypes=S("singleType"),i.components=d.components;break}default:return i}}),b=()=>{const p=(0,h.lm)(),[d,i]=(0,e.useReducer)(M,T);(0,e.useEffect)(()=>{S()},[]);const S=async()=>{i({type:"GET_MODELS"});try{const[{data:x},{data:N}]=await Promise.all(["components","content-types"].map(z=>(0,h.WY)(`/content-manager/${z}`,{method:"GET"})));i({type:"GET_MODELS_SUCCEDED",contentTypes:N,components:x})}catch{i({type:"GET_MODELS_ERROR"}),p({type:"warning",message:{id:"notification.error"}})}};return{...d,getData:S}};const E={data:{},error:null,isLoading:!0};var P=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"GET_DATA":{i.isLoading=!0,i.data={},i.error=null;break}case"GET_DATA_SUCCEEDED":{i.data=d.data,i.isLoading=!1,i.error=null;break}case"GET_DATA_ERROR":{i.isLoading=!1,i.error=d.error;break}default:return i}}),R=p=>{const[{data:d,error:i,isLoading:S},x]=(0,e.useReducer)(P,E);return(0,e.useEffect)(()=>{(async()=>{x({type:"GET_DATA"});const{data:z}=await(0,h.WY)("/admin/permissions",{method:"GET",params:{role:p}});x({type:"GET_DATA_SUCCEEDED",data:z})})()},[p]),{data:d,error:i,isLoading:S}};const I={role:{},permissions:{},isLoading:!0};var B=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"GET_DATA_SUCCEEDED":{i.role=d.role,i.permissions=d.permissions,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}case"ON_SUBMIT_SUCCEEDED":{i.role.name=d.name,i.role.description=d.description;break}default:return i}}),de=p=>{const d=(0,h.lm)(),[i,S]=(0,e.useReducer)(B,I);(0,e.useEffect)(()=>{p?x(p):S({type:"GET_DATA_SUCCEEDED",role:{},permissions:[]})},[p]);const x=async z=>{try{const[{data:J},{data:ue}]=await Promise.all([`roles/${z}`,`roles/${z}/permissions`].map(Ie=>(0,h.WY)(`/admin/${Ie}`,{method:"GET"})));S({type:"GET_DATA_SUCCEEDED",role:J,permissions:ue})}catch(J){console.error(J),S({type:"GET_DATA_ERROR"}),d({type:"warning",message:{id:"notification.error"}})}},N=(0,e.useCallback)(z=>{S({type:"ON_SUBMIT_SUCCEEDED",...z})},[]);return{...i,onSubmitSucceeded:N}},m=(p,d)=>d.map(({permissions:i})=>(0,h.qX)(p,i)),ee=async(p,d)=>{const i=m(p,d),S=await Promise.all(i);return d.filter((N,z)=>S[z])},ie=t(99381),se=t.n(ie),ye=async(p,d,i)=>{const S=m(p,d),x=await Promise.all(S),N=d.filter((ue,Ie)=>x[Ie]),z=N.findIndex(ue=>ue.to==="/settings");if(z===-1)return[];const J=se()(N);return J[z].notificationsCount=i?1:0,J},Pe=t(2287),Te=t(36919),we=t(45112),Se=t(83983);const Ye={generalSectionLinks:[{icon:Pe.Z,intlLabel:{id:"global.plugins",defaultMessage:"Plugins"},to:"/list-plugins",permissions:Se.Z.marketplace.main},{icon:Te.Z,intlLabel:{id:"global.marketplace",defaultMessage:"Marketplace"},to:"/marketplace",permissions:Se.Z.marketplace.main},{icon:we.Z,intlLabel:{id:"global.settings",defaultMessage:"Settings"},to:"/settings",permissions:[],notificationsCount:0}],pluginsSectionLinks:[],isLoading:!0};var me=(p=Ye,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"SET_SECTION_LINKS":{const{authorizedGeneralSectionLinks:S,authorizedPluginSectionLinks:x}=d.data;i.generalSectionLinks=S,i.pluginsSectionLinks=x;break}case"UNSET_IS_LOADING":{i.isLoading=!1;break}default:return i}}),We=()=>{const[p,d]=(0,e.useReducer)(me,Ye),{allPermissions:i}=(0,h.vn)(),{shouldUpdateStrapi:S}=(0,h.QI)(),{menu:x}=(0,h.j1)(),N=(0,e.useRef)(p.generalSectionLinks),z=(0,e.useRef)(S),J=async(Ie=i)=>{const Oe=await ee(Ie,x),Ve=await ye(Ie,N.current,z.current);d({type:"SET_SECTION_LINKS",data:{authorizedGeneralSectionLinks:Ve,authorizedPluginSectionLinks:Oe}}),d({type:"UNSET_IS_LOADING"})},ue=(0,e.useRef)(J);return(0,e.useEffect)(()=>{ue.current(i)},[i,d]),p},Je=t(33795),He=t.n(Je),et=(p,d)=>({...p,isLoading:d});const W={roles:[],isLoading:!0};var H=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"GET_DATA":{i.isLoading=!0,i.roles=[];break}case"GET_DATA_SUCCEEDED":{i.roles=d.data,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}default:return i}}),Re=(p=!0)=>{const d=(0,h.lm)(),[{roles:i,isLoading:S},x]=(0,e.useReducer)(H,W,()=>et(W,p));(0,e.useEffect)(()=>{p&&N()},[p]);const N=(0,e.useCallback)(async()=>{const z=(0,h.tg)();try{x({type:"GET_DATA"});const{data:{data:J}}=await z.get("/admin/roles");x({type:"GET_DATA_SUCCEEDED",data:J})}catch(J){const ue=He()(J,["response","payload","message"],"An error occured");x({type:"GET_DATA_ERROR"}),ue!=="Forbidden"&&d({type:"warning",message:ue})}},[d]);return{roles:i,isLoading:S,getData:N}},ze=t(3040),re=t.n(ze);const he={menu:[],isLoading:!0};var Ce=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"CHECK_PERMISSIONS_SUCCEEDED":{d.data.forEach(S=>{S.hasPermission&&re()(i,["menu",...S.path.split("."),"isDisplayed"],S.hasPermission)}),i.menu.forEach((S,x)=>{i.menu[x].links=S.links.filter(N=>N.isDisplayed===!0)}),i.isLoading=!1;break}default:return i}}),je=t(9086),De=t.n(je),tt=t(98978),Ge=t.n(tt),lt=p=>Ge()(p,d=>d.id),ut=p=>p.map(d=>{const i=d.links.map(S=>({...S,isDisplayed:!1}));return{...d,links:i}}),Ze=[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},to:"/settings/roles",id:"roles",isDisplayed:!1,permissions:Se.Z.settings.roles.main},{intlLabel:{id:"global.users"},to:"/settings/users?pageSize=10&page=1&sort=firstname",id:"users",isDisplayed:!1,permissions:Se.Z.settings.users.main}],le=[...(()=>window&&window.strapi&&window.strapi.isEE?t(66334).Z:t(47950).Z)(),...Ze],ne=[{intlLabel:{id:"Settings.application.title",defaultMessage:"Overview"},to:"/settings/application-infos",id:"000-application-infos",isDisplayed:!1,permissions:[]},{intlLabel:{id:"Settings.webhooks.title",defaultMessage:"Webhooks"},to:"/settings/webhooks",id:"webhooks",isDisplayed:!1,permissions:Se.Z.settings.webhooks.main},{intlLabel:{id:"Settings.apiTokens.title",defaultMessage:"API Tokens"},to:"/settings/api-tokens?sort=name:ASC",id:"api-tokens",isDisplayed:!1,permissions:Se.Z.settings["api-tokens"].main},{intlLabel:{id:"Settings.transferTokens.title",defaultMessage:"Transfer Tokens"},to:"/settings/transfer-tokens?sort=name:ASC",id:"transfer-tokens",isDisplayed:!1,permissions:Se.Z.settings["transfer-tokens"].main}];const Ee=(()=>window&&window.strapi&&window.strapi.isEE?t(11545).Z:t(73086).Z)();var Me=[...ne,...Ee],At=(p,{settings:d,shouldUpdateStrapi:i})=>{const S=d.global.links,x=lt([...S,...Me]).map(J=>({...J,hasNotification:J.id==="000-application-infos"&&i})),N=Object.values(De()(d,"global")),z=[{...d.global,links:x},{id:"permissions",intlLabel:{id:"Settings.permissions",defaultMessage:"Administration Panel"},links:le},...N];return{...p,menu:ut(z)}},Lt=(p=!1)=>{const{allPermissions:d}=(0,h.vn)(),{shouldUpdateStrapi:i}=(0,h.QI)(),{settings:S}=(0,h.j1)(),[{isLoading:x,menu:N},z]=(0,e.useReducer)(Ce,he,()=>At(he,{settings:S,shouldUpdateStrapi:i}));return(0,e.useEffect)(()=>{p||(async()=>{const ue=async(Ve,Xe)=>({hasPermission:await(0,h.qX)(d,Ve),path:Xe}),ce=(Ve=>Ve.reduce((Xe,ot,kt)=>{const Pt=at=>at.map((Ke,ve)=>ue(at[ve].permissions,`${kt}.links.${ve}`));return[...Xe,...Pt(ot.links)]},[]))(N),Oe=await Promise.all(ce);z({type:"CHECK_PERMISSIONS_SUCCEEDED",data:Oe})})()},[d,p]),{isLoading:x,menu:N}},ft=t(8997),xt=t(88423),nt=t.n(xt),St=t(56236),Bt=t.n(St);const ht={fieldsToPick:[],formErrors:{},initialData:{},isLoading:!0,modifiedData:{},showHeaderButtonLoader:!1,showHeaderLoader:!0},Wt=(p,d)=>(0,g.ZP)(p,i=>{switch(d.type){case"GET_DATA_SUCCEEDED":{i.isLoading=!1,i.showHeaderLoader=!1,i.initialData=nt()(d.data,p.fieldsToPick),i.modifiedData=nt()(d.data,p.fieldsToPick);break}case"ON_CANCEL":{i.modifiedData=p.initialData,i.formErrors={};break}case"ON_CHANGE":{d.inputType==="password"&&!d.value?Bt()(i.modifiedData,d.keys.split(".")):d.keys.includes("username")&&!d.value?re()(i.modifiedData,d.keys.split("."),null):re()(i.modifiedData,d.keys.split("."),d.value);break}case"ON_SUBMIT":{i.showHeaderButtonLoader=!0;break}case"ON_SUBMIT_SUCCEEDED":{i.initialData=nt()(d.data,p.fieldsToPick),i.modifiedData=nt()(d.data,p.fieldsToPick),i.showHeaderButtonLoader=!1;break}case"SET_ERRORS":{i.formErrors=d.errors,i.showHeaderButtonLoader=!1;break}default:return i}});var Gt=(p,d)=>({...p,fieldsToPick:d}),Et=(p,d,i,S)=>{const[{formErrors:x,initialData:N,isLoading:z,modifiedData:J,showHeaderButtonLoader:ue,showHeaderLoader:Ie},ce]=(0,e.useReducer)(Wt,ht,()=>Gt(ht,S)),Oe=(0,h.lm)(),{lockApp:Ve,unlockApp:Xe}=(0,h.o1)();return(0,e.useEffect)(()=>{p&&(async()=>{try{const{data:ve}=await(0,h.WY)(p,{method:"GET"});ce({type:"GET_DATA_SUCCEEDED",data:ve,fieldsToPick:S})}catch(ve){console.error(ve.response),Oe({type:"warning",message:{id:"notification.error"}})}})()},[p]),[{formErrors:x,initialData:N,isLoading:z,modifiedData:J,showHeaderButtonLoader:ue,showHeaderLoader:Ie},ce,{handleCancel:()=>{ce({type:"ON_CANCEL"})},handleChange:({target:{name:Ke,value:ve,type:xe}})=>{ce({type:"ON_CHANGE",inputType:xe,keys:Ke,value:ve})},handleSubmit:async Ke=>{Ke.preventDefault();const ve=await(0,ft.R6)(J,d);if(ce({type:"SET_ERRORS",errors:ve||{}}),!ve)try{Ve(),ce({type:"ON_SUBMIT"});const xe=De()(J,["confirmPassword","registrationToken"]);xe.roles&&(xe.roles=xe.roles.map(ct=>ct.id));const{data:Fe}=await(0,h.WY)(p,{method:"PUT",body:xe});i(Fe),ce({type:"ON_SUBMIT_SUCCEEDED",data:Fe}),Oe({type:"success",message:{id:"notification.success.saved"}})}catch(xe){const Fe=xe?.response?.payload??{data:{}};Fe?.data&&typeof Fe.data=="string"?Oe({type:"warning",message:Fe.data}):Oe({type:"warning",message:Fe.message});const ct=(0,ft.Iz)(Fe);ce({type:"SET_ERRORS",errors:ct})}finally{Xe()}},setField:(Ke,ve)=>{ce({type:"ON_CHANGE",keys:Ke,value:ve})}}]},Dt=()=>(0,e.useContext)(l.$l);const It=!JSON.parse(localStorage.getItem("STRAPI_UPDATE_NOTIF")),Ot=()=>{const{latestStrapiReleaseTag:p,shouldUpdateStrapi:d}=useAppInfos(),i=useNotification();return useEffect(()=>{d&&It&&i({type:"info",message:{id:"notification.version.update.message"},link:{url:`https://github.com/strapi/strapi/releases/tag/${p}`,label:{id:"global.see-more"}},blockTransition:!0,onClose:()=>localStorage.setItem("STRAPI_UPDATE_NOTIF",!0)})},[p,d,i]),null};var Ht=null,bt=()=>(0,e.useContext)(l.Rj),yt=(p,d,i,S)=>{const[x,N]=(0,e.useState)(!1),z=(0,h.lm)(),{post:J}=(0,h.kY)(),{formatAPIError:ue}=(0,h.So)();return{regenerateData:async()=>{try{const{data:{data:{accessKey:ce}}}=await J(`${p}${d}/regenerate`);N(!1),i(ce)}catch(ce){N(!1),S?S(ce):z({type:"warning",message:ue(ce)})}},isLoadingConfirmation:x}}},47950:function(O,f){"use strict";f.Z=[]},73086:function(O,f){"use strict";f.Z=[]},954:function(O,f,t){"use strict";t.d(f,{sg:function(){return k},bU:function(){return P},ZP:function(){return R}});var e=t(32735),l=t(8471),o=t(60216),v=t.n(o),h=t(72850),g=t(87933),T=t(67879),A=t(34853),M=t(20139),b=()=>{const{changeLocale:I,localeNames:K}=(0,M.Z)(),{locale:B}=(0,T.Z)();return e.createElement(A.O,{label:K[B]},Object.keys(K).map(ae=>e.createElement(A.s,{onClick:()=>I(ae),key:ae},K[ae])))};const E=(0,l.ZP)(h.x)`
67
- margin: 0 auto;
68
- width: 552px;
69
- `,k=(0,l.ZP)(g.k)`
70
- flex-direction: column;
71
- `,P=({children:I})=>e.createElement(E,{shadow:"tableShadow",hasRadius:!0,paddingTop:9,paddingBottom:9,paddingLeft:10,paddingRight:10,background:"neutral0",justifyContent:"center"},I);P.propTypes={children:v().node.isRequired};const w=({children:I})=>e.createElement("div",null,e.createElement(g.k,{as:"header",justifyContent:"flex-end"},e.createElement(h.x,{paddingTop:6,paddingRight:8},e.createElement(b,null))),e.createElement(h.x,{paddingTop:2,paddingBottom:11},I));w.propTypes={children:v().node.isRequired};var R=w},56761:function(O,f){"use strict";const t=[];f.Z=t},72218:function(O,f,t){"use strict";var e=t(8471),l=t(63642);const o=(0,e.ZP)(l.E)`
72
- svg {
73
- height: 1rem;
74
- width: 1rem;
75
- path {
76
- fill: ${({theme:v})=>v.colors.neutral600};
77
- }
78
- }
79
- `;f.Z=o},1115:function(O,f,t){"use strict";var e=t(32735),l=t(43383),o=t(54894),v=t(60492),h=t(10369),g=t(27649),T=t(72850),A=t(49372),M=t(87933),Z=t(8284),b=t(41415),E=t(60216),k=t.n(E),P=t(67879),w=t(8471),R=t(92802),I=t(954),K=t(10190),B=t(72218);const ae=(0,w.ZP)(h.o)`
80
- ::-ms-reveal {
81
- display: none;
82
- }
83
- `,de=({onSubmit:L,schema:m,children:$})=>{const[ee,ie]=(0,e.useState)(!1),{formatMessage:se}=(0,P.Z)();return e.createElement(g.o,null,e.createElement(I.bU,null,e.createElement(R.J9,{enableReinitialize:!0,initialValues:{email:"",password:"",rememberMe:!1},onSubmit:L,validationSchema:m,validateOnChange:!1},({values:a,errors:ye,handleChange:Pe})=>e.createElement(l.l0,{noValidate:!0},e.createElement(I.sg,null,e.createElement(K.Z,null),e.createElement(T.x,{paddingTop:6,paddingBottom:1},e.createElement(A.Z,{variant:"alpha",as:"h1"},se({id:"Auth.form.welcome.title",defaultMessage:"Welcome!"}))),e.createElement(T.x,{paddingBottom:7},e.createElement(A.Z,{variant:"epsilon",textColor:"neutral600"},se({id:"Auth.form.welcome.subtitle",defaultMessage:"Log in to your Strapi account"}))),ye.errorMessage&&e.createElement(A.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},ye.errorMessage)),e.createElement(M.k,{direction:"column",alignItems:"stretch",gap:6},e.createElement(h.o,{error:ye.email?se({id:ye.email,defaultMessage:"This value is required."}):"",value:a.email,onChange:Pe,label:se({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:se({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),e.createElement(ae,{error:ye.password?se({id:ye.password,defaultMessage:"This value is required."}):"",onChange:Pe,value:a.password,label:se({id:"global.password",defaultMessage:"Password"}),name:"password",type:ee?"text":"password",endAction:e.createElement(B.Z,{onClick:Te=>{Te.stopPropagation(),ie(we=>!we)},label:se(ee?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},ee?e.createElement(o.Z,null):e.createElement(v.Z,null)),required:!0}),e.createElement(Z.X,{onValueChange:Te=>{Pe({target:{value:Te,name:"rememberMe"}})},value:a.rememberMe,"aria-label":"rememberMe",name:"rememberMe"},se({id:"Auth.form.rememberMe.label",defaultMessage:"Remember me"})),e.createElement(b.z,{fullWidth:!0,type:"submit"},se({id:"Auth.form.button.login",defaultMessage:"Login"}))))),$),e.createElement(M.k,{justifyContent:"center"},e.createElement(T.x,{paddingTop:4},e.createElement(l.rU,{to:"/auth/forgot-password"},se({id:"Auth.link.forgot-password",defaultMessage:"Forgot your password?"})))))};de.defaultProps={children:null,onSubmit(){}},de.propTypes={children:k().node,onSubmit:k().func,schema:k().shape({type:k().string.isRequired}).isRequired},f.Z=de},5365:function(O,f,t){"use strict";var e=t(32735),l=t(60216),o=t.n(l),v=t(1115),h=t(954);const g=T=>e.createElement(h.ZP,null,e.createElement(v.Z,{...T}));g.defaultProps={onSubmit:T=>T.preventDefault()},g.propTypes={onSubmit:o().func},f.Z=g},53951:function(O,f,t){"use strict";t.r(f);var e=t(32735),l=t(43383),o=t(27649),v=t(82055),h=t(17e3),g=t(9695),T=t(8482),A=t(25386),M=t(67879);const Z=()=>{const{formatMessage:b}=(0,M.Z)();return(0,l.go)(),e.createElement(o.o,{labelledBy:"title"},e.createElement(v.T,{id:"title",title:b({id:"content-manager.pageNotFound",defaultMessage:"Page not found"})}),e.createElement(h.D,null,e.createElement(g.x,{action:e.createElement(l.Qj,{variant:"secondary",endIcon:e.createElement(T.Z,null),to:"/"},b({id:"app.components.NotFoundPage.back",defaultMessage:"Back to homepage"})),content:b({id:"app.page.not.found",defaultMessage:"Oops! We can't seem to find the page you're looging for..."}),hasRadius:!0,icon:e.createElement(A.Z,{width:"10rem"}),shadow:"tableShadow"})))};f.default=Z},26123:function(O,f){"use strict";f.Z={}},41832:function(O,f){"use strict";const t=({data:e})=>{try{return Object.keys(e).reduce((l,o)=>{const v=e[o][0];return l[o]={id:v,defaultMessage:v},l},{})}catch{return{}}};f.Z=t},8997:function(O,f,t){"use strict";t.d(f,{R6:function(){return o},ot:function(){return Z},Iz:function(){return b.Z},Pp:function(){return B},IF:function(){return K},Qy:function(){return de},WW:function(){return k}});var e=t(43383),o=async(L,m)=>{let $=null;try{await m.validate(L,{abortEarly:!1})}catch(ee){$=(0,e.CJ)(ee)}return $},v=t(32735),h=t(60216),g=t.n(h),T=t(53038);const A=({loadComponent:L})=>{const[m,$]=(0,v.useState)(null);return(0,v.useEffect)(()=>{(async()=>{try{const ie=await L();$(()=>ie.default)}catch(ie){console.log(ie)}})()},[L]),m?v.createElement(m,null):v.createElement(e.dO,null)},M=(L,m,$)=>v.createElement(T.AW,{render:()=>v.createElement(A,{loadComponent:L}),key:m,path:m,exact:$||!1});A.propTypes={loadComponent:g().func.isRequired};var Z=M,b=t(41832),k=L=>L.filter((m,$,ee)=>ee.findIndex(ie=>ie.key===m.key)===$),P=t(98978);const w=L=>sortBy(L,m=>m.name);var R=null,K=L=>`/admin/${L}`,B=(L,m="")=>[L,m].filter($=>$).join(" ");const ae={bufferToHex(L){return[...new Uint8Array(L)].map(m=>m.toString(16).padStart(2,"0")).join("")},async digestMessage(L){const m=new TextEncoder().encode(L),$=await crypto.subtle.digest("SHA-256",m);return this.bufferToHex($)}};async function de(L){if(!L)return null;try{return await ae.digestMessage(L.email)}catch{return null}}},58414:function(O,f,t){"use strict";t.d(f,{pl:function(){return M},q5:function(){return b.Z}});var e=t(32735),l=t(43383),o=t(8997),v=t(97889);const h={data:[],isLoading:!0};var T=(E,k)=>(0,v.ZP)(E,P=>{switch(k.type){case"GET_DATA_SUCCEEDED":{P.data=k.data,P.isLoading=!1;break}case"GET_DATA_ERROR":{P.isLoading=!1;break}default:return P}}),M=({ssoEnabled:E})=>{const[k,P]=(0,e.useReducer)(T,h),w=(0,l.lm)();(0,e.useEffect)(()=>{R()},[]);const R=async()=>{try{if(!E){P({type:"GET_DATA_SUCCEEDED",data:[]});return}const I=(0,o.IF)("providers"),K=await(0,l.WY)(I,{method:"GET"});P({type:"GET_DATA_SUCCEEDED",data:K})}catch(I){console.error(I),P({type:"GET_DATA_ERROR"}),w({type:"warning",message:{id:"notification.error"}})}};return k},Z=t(21306),b=t(2690)},21306:function(O,f,t){"use strict";var e=t(32735),l=t(67879),o=t(53038),v=t(43383),h=t(36866),g=t.n(h),T=t(2690);const A="strapi-notification-seat-limit",M="https://cloud.strapi.io/profile/billing",Z="https://strapi.io/billing/request-seats",b=()=>{const{formatMessage:E}=(0,l.Z)();let{license:k}=(0,T.Z)();const P=(0,v.lm)(),{pathname:w}=(0,o.TH)();(0,e.useEffect)(()=>{if(!k?.data)return;const{enforcementUserCount:R,permittedSeats:I,licenseLimitStatus:K,isHostedOnStrapiCloud:B}=k?.data??{},ae=!g()(I)&&!window.sessionStorage.getItem(`${A}-${w}`)&&(K==="AT_LIMIT"||K==="OVER_LIMIT");let de;K==="OVER_LIMIT"?de="warning":K==="AT_LIMIT"&&(de="softWarning"),ae&&P({type:de,message:E({id:"notification.ee.warning.over-.message",defaultMessage:"Add seats to {licenseLimitStatus, select, OVER_LIMIT {invite} other {re-enable}} Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app."},{licenseLimitStatus:K}),title:E({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:K,enforcementUserCount:R,permittedSeats:I}),link:{url:B?M:Z,label:E({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:B})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${A}-${w}`,!0)}})},[P,k.data,w,E])};f.Z=b},2690:function(O,f,t){"use strict";var e=t(43383),l=t(20108),o=t(83983);const v=()=>{const h=(0,e.ss)(o.Z.settings.users),{isLoading:g,allowedActions:{canRead:T,canCreate:A,canUpdate:M,canDelete:Z}}=h,b=T&&A&&M&&Z,{get:E}=(0,e.kY)(),k=async()=>{const{data:{data:w}}=await E("/admin/license-limit-information");return w};return{license:(0,l.useQuery)(["ee","license-limit-info"],k,{enabled:!g&&b})}};f.Z=v},66334:function(O,f,t){"use strict";var e=t(83983);const l=[];window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS)&&l.push({intlLabel:{id:"global.auditLogs",defaultMessage:"Audit Logs"},to:"/settings/audit-logs?pageSize=50&page=1&sort=date:DESC",id:"auditLogs",isDisplayed:!1,permissions:e.Z.settings.auditLogs.main});const o=l;f.Z=o},11545:function(O,f,t){"use strict";var e=t(83983);const l=[];window.strapi.features.isEnabled(window.strapi.features.SSO)&&l.push({intlLabel:{id:"Settings.sso.title",defaultMessage:"Single Sign-On"},to:"/settings/single-sign-on",id:"sso",isDisplayed:!1,permissions:e.Z.settings.sso.main}),window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)&&l.push({intlLabel:{id:"Settings.review-workflows.page.title",defaultMessage:"Review Workflows"},to:"/settings/review-workflows",id:"review-workflows",isDisplayed:!1,permissions:e.Z.settings["review-workflows"].main}),f.Z=l},68944:function(O,f,t){"use strict";t.d(f,{Z:function(){return b}});var e=t(32735),l=t(53038),o=t(67879),v=t(49189),h=t.n(v),g=t(43383),T=t(8997),M=()=>{const{params:{authResponse:E}}=(0,l.$B)("/auth/login/:authResponse"),{formatMessage:k}=(0,o.Z)(),{push:P}=(0,l.k6)(),w=(0,e.useRef)(k);let R=(0,e.useCallback)(()=>{P(`/auth/oops?info=${encodeURIComponent(w.current({id:"Auth.form.button.login.providers.error",defaultMessage:"We cannot connect you through the selected provider."}))}`)},[P]);const I=(0,e.useCallback)(async()=>{try{const K=h().get("jwtToken");if(g.I8.clearAppStorage(),K){g.I8.setToken(K,!0);const B=(0,T.IF)("users/me"),{data:ae}=await(0,g.WY)(B,{method:"GET"});g.I8.setUserInfo(ae,!0),h().remove("jwtToken"),P("/auth/login")}}catch{R()}},[P,R]);return(0,e.useEffect)(()=>{E==="error"&&R(),E==="success"&&I()},[E,I,R]),e.createElement(g.dO,null)},b=[{Component:()=>({default:M}),to:"/auth/login/:authResponse",exact:!0}]},98768:function(O,f,t){"use strict";var e=t(32735),l=t(60216),o=t.n(l),v=t(8471),h=t(9026),g=t(72850),T=t(87933),A=t(49372),M=t(67879),Z=t(1115),b=t(58414),E=t(954),k=t(33205);const P=(0,v.ZP)(h.i)`
84
- flex: 1;
85
- `,w=R=>{const I=strapi.features.isEnabled(strapi.features.SSO),{isLoading:K,data:B}=(0,b.pl)({ssoEnabled:I}),{formatMessage:ae}=(0,M.Z)();return!I||!K&&B.length===0?e.createElement(E.ZP,null,e.createElement(Z.Z,{...R})):e.createElement(E.ZP,null,e.createElement(Z.Z,{...R},e.createElement(g.x,{paddingTop:7},e.createElement(T.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(T.k,null,e.createElement(P,null),e.createElement(g.x,{paddingLeft:3,paddingRight:3},e.createElement(A.Z,{variant:"sigma",textColor:"neutral600"},ae({id:"Auth.login.sso.divider"}))),e.createElement(P,null)),e.createElement(k.Z,{providers:B,displayAllProviders:!1})))))};w.defaultProps={onSubmit:R=>R.preventDefault(),requestError:null},w.propTypes={formErrors:o().object.isRequired,modifiedData:o().object.isRequired,onChange:o().func.isRequired,onSubmit:o().func,requestError:o().object},f.Z=w},33205:function(O,f,t){"use strict";var e=t(32735),l=t(60216),o=t.n(l),v=t(87933),h=t(63919),g=t(49372),T=t(15335),A=t(5803),M=t(8471),Z=t(67879),b=t(14911);const E=M.ZP.a`
86
- width: ${136/16}rem;
87
- display: flex;
88
- justify-content: center;
89
- align-items: center;
90
- height: ${48/16}rem;
91
- border: 1px solid ${({theme:R})=>R.colors.neutral150};
92
- border-radius: ${({theme:R})=>R.borderRadius};
93
- text-decoration: inherit;
94
- &:link {
95
- text-decoration: none;
96
- }
97
- color: ${({theme:R})=>R.colors.neutral600};
98
- `,k=(0,M.ZP)(v.k)`
99
- & a:not(:first-child):not(:last-child) {
100
- margin: 0 ${({theme:R})=>R.spaces[2]};
101
- }
102
- & a:first-child {
103
- margin-right: ${({theme:R})=>R.spaces[2]};
104
- }
105
- & a:last-child {
106
- margin-left: ${({theme:R})=>R.spaces[2]};
107
- }
108
- `,P=({provider:R})=>e.createElement(h.u,{label:R.displayName},e.createElement(E,{href:`${strapi.backendURL}/admin/connect/${R.uid}`},R.icon?e.createElement("img",{src:R.icon,"aria-hidden":!0,alt:"",height:"32px"}):e.createElement(g.Z,null,R.displayName)));P.propTypes={provider:o().shape({icon:o().string,displayName:o().string.isRequired,uid:o().string.isRequired}).isRequired};const w=({providers:R,displayAllProviders:I})=>{const{formatMessage:K}=(0,Z.Z)();return I?e.createElement(T.r,{gap:4},R.map(B=>e.createElement(A.P,{key:B.uid,col:4},e.createElement(P,{provider:B})))):R.length>2&&!I?e.createElement(T.r,{gap:4},R.slice(0,2).map(B=>e.createElement(A.P,{key:B.uid,col:4},e.createElement(P,{provider:B}))),e.createElement(A.P,{col:4},e.createElement(h.u,{label:K({id:"global.see-more"})},e.createElement(E,{as:b.rU,to:"/auth/providers"},e.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):e.createElement(k,{justifyContent:"center"},R.map(B=>e.createElement(P,{key:B.uid,provider:B})))};w.defaultProps={displayAllProviders:!0},w.propTypes={providers:o().arrayOf(o().object).isRequired,displayAllProviders:o().bool},f.Z=w},7277:function(O,f,t){"use strict";t.d(f,{Z:function(){return L}});var e=t(32735),l=t(53038),o=t(8471),v=t(43383),h=t(9026),g=t(27649),T=t(72850),A=t(49372),M=t(87933),Z=t(97405),b=t(41415),E=t(67879),k=t(58414),P=t(954),w=t(33205),R=t(10190);const I=(0,o.ZP)(h.i)`
109
- flex: 1;
110
- `;var B=()=>{const m=strapi.features.isEnabled(strapi.features.SSO),{push:$}=(0,l.k6)(),{formatMessage:ee}=(0,E.Z)(),{isLoading:ie,data:se}=(0,k.pl)({ssoEnabled:m}),a=()=>{$("/auth/login")};return!m||!ie&&se.length===0?e.createElement(l.l_,{to:"/auth/login"}):e.createElement(P.ZP,null,e.createElement(g.o,null,e.createElement(P.bU,null,e.createElement(P.sg,null,e.createElement(R.Z,null),e.createElement(T.x,{paddingTop:6,paddingBottom:1},e.createElement(A.Z,{as:"h1",variant:"alpha"},ee({id:"Auth.form.welcome.title"}))),e.createElement(T.x,{paddingBottom:7},e.createElement(A.Z,{variant:"epsilon",textColor:"neutral600"},ee({id:"Auth.login.sso.subtitle"})))),e.createElement(M.k,{direction:"column",alignItems:"stretch",gap:7},ie?e.createElement(M.k,{justifyContent:"center"},e.createElement(Z.a,null,ee({id:"Auth.login.sso.loading"}))):e.createElement(w.Z,{providers:se}),e.createElement(M.k,null,e.createElement(I,null),e.createElement(T.x,{paddingLeft:3,paddingRight:3},e.createElement(A.Z,{variant:"sigma",textColor:"neutral600"},ee({id:"or"}))),e.createElement(I,null)),e.createElement(b.z,{fullWidth:!0,size:"L",onClick:a},ee({id:"Auth.form.button.login.strapi"})))),e.createElement(M.k,{justifyContent:"center"},e.createElement(T.x,{paddingTop:4},e.createElement(v.rU,{to:"/auth/forgot-password"},e.createElement(A.Z,{variant:"pi"},ee({id:"Auth.link.forgot-password"})))))))},ae=t(78834),L={...ae.Z,providers:{Component:B,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}},99568:function(O,f){"use strict";const t={settings:{auditLogs:{main:[{action:"admin::audit-logs.read",subject:null}],read:[{action:"admin::audit-logs.read",subject:null}]},"review-workflows":{main:[{action:"admin::review-workflows.read",subject:null}]},sso:{main:[{action:"admin::provider-login.read",subject:null}],read:[{action:"admin::provider-login.read",subject:null}],update:[{action:"admin::provider-login.update",subject:null}]}}};f.Z=t},48224:function(O,f,t){var e={"./ar.json":[38677,7958],"./ca.json":[90169,3516],"./cs.json":[43186,7519],"./de.json":[8343,6901],"./dk.json":[65668,7898],"./en.json":[10329,320],"./es.json":[45445,8367],"./eu.json":[69511,8360],"./fr.json":[8399,8006],"./gu.json":[10182,2248],"./he.json":[21757,830],"./hi.json":[43206,6332],"./hu.json":[72320,5894],"./id.json":[74221,8897],"./it.json":[90685,6817],"./ja.json":[21727,1312],"./ko.json":[30986,1377],"./ml.json":[11309,9903],"./ms.json":[75973,3025],"./nl.json":[80381,2671],"./no.json":[82446,562],"./pl.json":[84008,7846],"./pt-BR.json":[91417,9647],"./pt.json":[41830,3340],"./ru.json":[57098,123],"./sa.json":[92900,9726],"./sk.json":[52204,606],"./sv.json":[43211,9303],"./th.json":[49582,749],"./tr.json":[99154,395],"./uk.json":[2987,7403],"./vi.json":[50576,3278],"./zh-Hans.json":[35964,2553],"./zh.json":[91999,1011]};function l(o){if(!t.o(e,o))return Promise.resolve().then(function(){var g=new Error("Cannot find module '"+o+"'");throw g.code="MODULE_NOT_FOUND",g});var v=e[o],h=v[0];return t.e(v[1]).then(function(){return t.t(h,19)})}l.keys=function(){return Object.keys(e)},l.id=48224,O.exports=l},47750:function(O,f,t){"use strict";O.exports=t.p+"70674f63fc3904c20de0.svg"}}]);