@strapi/admin 4.11.0-exp.9xg4-3qfm-9w8f → 4.11.0-exp.push-transfer-push-stuck
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.
- package/admin/src/hooks/useContentTypes/useContentTypes.js +2 -0
- package/admin/src/translations/ar.json +1 -684
- package/admin/src/translations/en.json +0 -1
- package/build/{1657.3f2b2c11.chunk.js → 1657.ca8562dd.chunk.js} +9 -1
- package/build/3081.c2cdfac8.chunk.js +108 -0
- package/build/3816.60f858cf.chunk.js +211 -0
- package/build/462.a073ff1f.chunk.js +71 -0
- package/build/5542.002522eb.chunk.js +71 -0
- package/build/617.87b2fe96.chunk.js +155 -0
- package/build/{Admin-authenticatedApp.0f366684.chunk.js → Admin-authenticatedApp.d425b485.chunk.js} +1 -1
- package/build/{Admin_homePage.94dc81b1.chunk.js → Admin_homePage.107a9fe0.chunk.js} +16 -16
- package/build/Admin_marketplace.717bd7ca.chunk.js +55 -0
- package/build/Admin_pluginsPage.7df6b5a9.chunk.js +6 -0
- package/build/Admin_settingsPage.1394aaf2.chunk.js +79 -0
- package/build/admin-app.ac5b1f59.chunk.js +63 -0
- package/build/admin-roles-list.e8bf9685.chunk.js +31 -0
- package/build/admin-users.751b28b2.chunk.js +34 -0
- package/build/ar-json.39e54aba.chunk.js +1 -0
- package/build/audit-logs-settings-page.3c6cea81.chunk.js +129 -0
- package/build/content-type-builder-list-view.1e821eb9.chunk.js +215 -0
- package/build/email-settings-page.dba83275.chunk.js +11 -0
- package/build/{en-json.ba3290b8.chunk.js → en-json.d965e364.chunk.js} +1 -1
- package/build/i18n-settings-page.55628f74.chunk.js +114 -0
- package/build/index.html +1 -1
- package/build/main.d9d9ed10.js +2630 -0
- package/build/{runtime~main.b22be595.js → runtime~main.adbe36a4.js} +2 -2
- package/build/upload-settings.63d99bf5.chunk.js +14 -0
- package/build/upload.c50d8c7a.chunk.js +34 -0
- package/build/users-advanced-settings-page.4f49ca57.chunk.js +9 -0
- package/build/users-email-settings-page.d2429d0a.chunk.js +24 -0
- package/build/users-providers-settings-page.50c5ba27.chunk.js +29 -0
- package/build/webhook-list-page.e2fca9f8.chunk.js +71 -0
- package/package.json +15 -15
- package/build/3081.7e9329cb.chunk.js +0 -105
- package/build/462.6f8cbd19.chunk.js +0 -71
- package/build/5542.64b623c9.chunk.js +0 -63
- package/build/617.1591eeb0.chunk.js +0 -155
- package/build/9036.f7ce35cc.chunk.js +0 -211
- package/build/Admin_marketplace.1b0c3d3b.chunk.js +0 -55
- package/build/Admin_pluginsPage.a28b96d5.chunk.js +0 -6
- package/build/Admin_settingsPage.ee76d19e.chunk.js +0 -79
- package/build/admin-app.bd209f08.chunk.js +0 -63
- package/build/admin-roles-list.af53b372.chunk.js +0 -23
- package/build/admin-users.004d5c68.chunk.js +0 -26
- package/build/ar-json.f530bc3f.chunk.js +0 -1
- package/build/audit-logs-settings-page.dc07596e.chunk.js +0 -121
- package/build/content-type-builder-list-view.26aab6f3.chunk.js +0 -215
- package/build/email-settings-page.63f269ff.chunk.js +0 -11
- package/build/i18n-settings-page.f84c4782.chunk.js +0 -114
- package/build/main.4016f4ad.js +0 -2630
- package/build/upload-settings.1d187578.chunk.js +0 -14
- package/build/upload.bc340679.chunk.js +0 -26
- package/build/users-advanced-settings-page.7b4bf63a.chunk.js +0 -9
- package/build/users-email-settings-page.035a026c.chunk.js +0 -24
- package/build/users-providers-settings-page.6873dce9.chunk.js +0 -29
- package/build/webhook-list-page.0861d3e9.chunk.js +0 -63
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5516],{75536:function(A,b,n){var e=n(32735);const f=(y,c)=>{const[D,N]=(0,e.useState)(y);return(0,e.useEffect)(()=>{const R=setTimeout(()=>{N(y)},c);return()=>{clearTimeout(R)}},[y,c]),D};b.Z=f},77571:function(A,b,n){n.r(b),n.d(b,{MarketPlacePage:function(){return he},default:function(){return bt}});var e=n(32735),f=n(67879),y=n(74758),c=n(24989),D=n(96709),N=n(27649),R=n(17e3),F=n(91215),P=n(87933),V=n(90980),v=n(72850),Me=n(61774),z=n(3653),ye=n(60216),t=n.n(ye),ke=n(82055),_=n(95489),T=n(74512);const be=a=>(0,T.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 25",...a,children:(0,T.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M13.571 18.272H10.43v-8.47H2.487a.2.2 0 0 1-.14-.343L11.858.058a.2.2 0 0 1 .282 0l9.513 9.4a.2.2 0 0 1-.14.343H13.57v8.47ZM2.2 21.095a.2.2 0 0 0-.2.2v2.424c0 .11.09.2.2.2h19.6a.2.2 0 0 0 .2-.2v-2.424a.2.2 0 0 0-.2-.2H2.2Z",clipRule:"evenodd"})}),Re=be,H=({isOnline:a,npmPackageType:s})=>{const{formatMessage:r}=(0,f.Z)(),{trackUsage:l}=(0,c.rS)(),i=s==="provider"?"didSubmitProvider":"didSubmitPlugin";return e.createElement(ke.T,{title:r({id:"global.marketplace",defaultMessage:"Marketplace"}),subtitle:r({id:"admin.pages.MarketPlacePage.subtitle",defaultMessage:"Get more out of Strapi"}),primaryAction:a&&e.createElement(_.Q,{startIcon:e.createElement(Re,null),variant:"tertiary",href:`https://market.strapi.io/submit-${s}`,onClick:()=>l(i),isExternal:!0},r({id:`admin.pages.MarketPlacePage.submit.${s}.link`,defaultMessage:`Submit ${s}`}))})};var ee=H;H.defaultProps={npmPackageType:"plugin"},H.propTypes={isOnline:t().bool.isRequired,npmPackageType:t().string};var Ce=n(83983),xe=()=>{const a=typeof navigator<"u"&&typeof navigator.onLine=="boolean"?navigator.onLine:!0,[s,r]=(0,e.useState)(a),l=()=>r(!0),i=()=>r(!1);return(0,e.useEffect)(()=>(window.addEventListener("online",l),window.addEventListener("offline",i),()=>{window.removeEventListener("online",l),window.removeEventListener("offline",i)}),[]),s};const Se=a=>(0,T.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 32",...a,children:[(0,T.jsx)("path",{fill:"#AC73E6",d:"M0 4a4 4 0 0 1 4-4h24a4 4 0 0 1 4 4v24a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4Z"}),(0,T.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M15.027 13.839c-3.19-.836-6.305-1.064-10.18-.608-1.215.152-1.063 1.975.076 2.203.304.836.456 2.355.912 3.267.987 2.279 5.622 1.975 7.369.835 1.14-.683 1.443-2.279 1.9-3.494.227-.684 1.595-.684 1.822 0 .38 1.215.76 2.81 1.9 3.494 1.747 1.14 6.381 1.444 7.369-.835.456-.912.607-2.431.911-3.267 1.14-.228 1.216-2.051.076-2.203-3.874-.456-6.989-.228-10.18.608-.455.075-1.519.075-1.975 0Z",clipRule:"evenodd"})]}),Te=Se;var te=n(47361),w=n(99140),we=()=>{const{formatMessage:a}=(0,f.Z)(),{trackUsage:s}=(0,c.rS)();return e.createElement("a",{href:"https://strapi.canny.io/plugin-requests",target:"_blank",rel:"noopener noreferrer nofollow",style:{textDecoration:"none"},onClick:()=>s("didMissMarketplacePlugin")},e.createElement(c.Y_,{title:a({id:"admin.pages.MarketPlacePage.missingPlugin.title",defaultMessage:"Documentation"}),subtitle:a({id:"admin.pages.MarketPlacePage.missingPlugin.description",defaultMessage:"Tell us what plugin you are looking for and we'll let our community plugin developers know in case they are in search for inspiration!"}),icon:e.createElement(Te,null),iconBackground:"alternative100",endAction:e.createElement(w.J,{as:te.Z,color:"neutral600",width:3,height:3,marginLeft:2})}))},Ze=n(23866),De=n(15335),Ne=n(5803),Z=n(8471),Le=n(24443),Oe=n.n(Le),C=n(49372),U=n(63919),je=n(38705),Be=n(47750),Ie=n(66456),$e=n(54770),ae=n.n($e),Q=n(41415),ne=n(47765);const O=({description:a,installMessage:s,disabled:r,handleCopy:l,pluginName:i})=>e.createElement(U.u,{"data-testid":`tooltip-${i}`,description:a},e.createElement(v.x,null,e.createElement(Q.z,{size:"S",startIcon:e.createElement(ne.Z,null),variant:"secondary",disabled:r,onClick:l},s))),G=({strapiPeerDepVersion:a,strapiAppVersion:s,handleCopy:r,pluginName:l})=>{const{formatMessage:i}=(0,f.Z)(),g=ae().validRange(a),o=ae().satisfies(s,g),d=i({id:"admin.pages.MarketPlacePage.plugin.copy",defaultMessage:"Copy install command"});if(s){if(!g)return e.createElement(O,{installMessage:d,pluginName:l,description:i({id:"admin.pages.MarketPlacePage.plugin.version.null",defaultMessage:'Unable to verify compatibility with your Strapi version: "{strapiAppVersion}"'},{strapiAppVersion:s}),handleCopy:r});if(!o)return e.createElement(O,{installMessage:d,pluginName:l,description:i({id:"admin.pages.MarketPlacePage.plugin.version",defaultMessage:'Update your Strapi version: "{strapiAppVersion}" to: "{versionRange}"'},{strapiAppVersion:s,versionRange:g}),disabled:!0})}return e.createElement(Q.z,{size:"S",startIcon:e.createElement(ne.Z,null),variant:"secondary",onClick:r},d)};O.defaultProps={disabled:!1,handleCopy:null},O.propTypes={description:t().string.isRequired,installMessage:t().string.isRequired,disabled:t().bool,handleCopy:t().func,pluginName:t().string.isRequired},G.defaultProps={strapiAppVersion:null,strapiPeerDepVersion:null},G.propTypes={strapiAppVersion:t().string,strapiPeerDepVersion:t().string,handleCopy:t().func.isRequired,pluginName:t().string.isRequired};var Ae=G;const W=({isInstalled:a,isInDevelopmentMode:s,commandToCopy:r,strapiAppVersion:l,strapiPeerDepVersion:i,pluginName:g})=>{const o=(0,c.lm)(),{formatMessage:d}=(0,f.Z)(),{trackUsage:u}=(0,c.rS)(),{copy:m}=(0,c.VP)(),h=async()=>{await m(r)&&(u("willInstallPlugin"),o({type:"success",message:{id:"admin.pages.MarketPlacePage.plugin.copy.success"}}))};return a?e.createElement(v.x,{paddingLeft:4},e.createElement(w.J,{as:Ie.Z,marginRight:2,width:12,height:12,color:"success600"}),e.createElement(C.Z,{variant:"omega",textColor:"success600",fontWeight:"bold"},d({id:"admin.pages.MarketPlacePage.plugin.installed",defaultMessage:"Installed"}))):s?e.createElement(Ae,{strapiAppVersion:l,strapiPeerDepVersion:i,handleCopy:h,pluginName:g}):null};W.defaultProps={strapiAppVersion:null,strapiPeerDepVersion:null},W.propTypes={isInstalled:t().bool.isRequired,isInDevelopmentMode:t().bool.isRequired,commandToCopy:t().string.isRequired,strapiAppVersion:t().string,strapiPeerDepVersion:t().string,pluginName:t().string.isRequired};var Fe=W,Ve=n(9026),ze=n(33904);const He=a=>(0,T.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...a,children:(0,T.jsx)("path",{fill:"#212134",d:"m12 18.26-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26Z"})}),Ue=He;var Qe=n(33844);const Ge=(0,Z.ZP)(Ve.i)`
|
|
2
|
-
width: ${(0,c.Q1)(12)};
|
|
3
|
-
transform: rotate(90deg);
|
|
4
|
-
`,J=({githubStars:a,npmDownloads:s,npmPackageType:r})=>{const{formatMessage:l}=(0,f.Z)();return e.createElement(P.k,{gap:1},!!a&&e.createElement(e.Fragment,null,e.createElement(w.J,{as:ze.Z,height:(0,c.Q1)(12),width:(0,c.Q1)(12),"aria-hidden":!0}),e.createElement(w.J,{as:Ue,height:(0,c.Q1)(12),width:(0,c.Q1)(12),color:"warning500","aria-hidden":!0}),e.createElement("p",{"aria-label":l({id:`admin.pages.MarketPlacePage.${r}.githubStars`,defaultMessage:"This {package} was starred {starsCount} on GitHub"},{starsCount:a,package:r})},e.createElement(C.Z,{variant:"pi",textColor:"neutral800",lineHeight:16},a)),e.createElement(Ge,{unsetMargin:!1,background:"neutral200"})),e.createElement(w.J,{as:Qe.Z,height:(0,c.Q1)(12),width:(0,c.Q1)(12),"aria-hidden":!0}),e.createElement("p",{"aria-label":l({id:`admin.pages.MarketPlacePage.${r}.downloads`,defaultMessage:"This {package} has {downloadsCount} weekly downloads"},{downloadsCount:s,package:r})},e.createElement(C.Z,{variant:"pi",textColor:"neutral800",lineHeight:16},s)))};J.defaultProps={githubStars:0,npmDownloads:0},J.propTypes={githubStars:t().number,npmDownloads:t().number,npmPackageType:t().string.isRequired};var We=J;const Je=(0,Z.ZP)(C.Z)`
|
|
5
|
-
/* stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
6
|
-
display: -webkit-box;
|
|
7
|
-
-webkit-box-orient: vertical;
|
|
8
|
-
-webkit-line-clamp: 2;
|
|
9
|
-
/* stylelint-enable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
`,q=({npmPackage:a,isInstalled:s,useYarn:r,isInDevelopmentMode:l,npmPackageType:i,strapiAppVersion:g})=>{const{attributes:o}=a,{formatMessage:d}=(0,f.Z)(),{trackUsage:u}=(0,c.rS)(),m=r?`yarn add ${o.npmPackageName}`:`npm install ${o.npmPackageName}`,h=d({id:"admin.pages.MarketPlacePage.plugin.tooltip.madeByStrapi",defaultMessage:"Made by Strapi"}),E=`https://market.strapi.io/${Oe().plural(i)}/${o.slug}`;return e.createElement(P.k,{direction:"column",justifyContent:"space-between",paddingTop:4,paddingRight:4,paddingBottom:4,paddingLeft:4,hasRadius:!0,background:"neutral0",shadow:"tableShadow",height:"100%",alignItems:"normal","data-testid":"npm-package-card"},e.createElement(v.x,null,e.createElement(P.k,{direction:"row",justifyContent:"space-between",alignItems:"flex-start"},e.createElement(v.x,{as:"img",src:o.logo.url,alt:`${o.name} logo`,hasRadius:!0,width:11,height:11}),e.createElement(We,{githubStars:o.githubStars,npmDownloads:o.npmDownloads,npmPackageType:i})),e.createElement(v.x,{paddingTop:4},e.createElement(C.Z,{as:"h3",variant:"delta"},e.createElement(P.k,{alignItems:"center"},o.name,o.validated&&!o.madeByStrapi&&e.createElement(U.u,{description:d({id:"admin.pages.MarketPlacePage.plugin.tooltip.verified",defaultMessage:"Plugin verified by Strapi"})},e.createElement(P.k,null,e.createElement(w.J,{as:je.Z,marginLeft:2,color:"success600"}))),o.madeByStrapi&&e.createElement(U.u,{description:h},e.createElement(P.k,null,e.createElement(v.x,{as:"img",src:Be,alt:h,marginLeft:1,width:6,height:"auto"})))))),e.createElement(v.x,{paddingTop:2},e.createElement(Je,{as:"p",variant:"omega",textColor:"neutral600"},o.description))),e.createElement(P.k,{gap:2,style:{alignSelf:"flex-end"},paddingTop:6},e.createElement(_.Q,{size:"S",href:E,isExternal:!0,endIcon:e.createElement(te.Z,null),"aria-label":d({id:"admin.pages.MarketPlacePage.plugin.info.label",defaultMessage:"Learn more about {pluginName}"},{pluginName:o.name}),variant:"tertiary",onClick:()=>u("didPluginLearnMore")},d({id:"admin.pages.MarketPlacePage.plugin.info.text",defaultMessage:"More"})),e.createElement(Fe,{isInstalled:s,isInDevelopmentMode:l,commandToCopy:m,strapiAppVersion:g,strapiPeerDepVersion:o.strapiVersion,pluginName:o.name})))};q.defaultProps={isInDevelopmentMode:!1,strapiAppVersion:null},q.propTypes={npmPackage:t().shape({id:t().string.isRequired,attributes:t().shape({name:t().string.isRequired,description:t().string.isRequired,slug:t().string.isRequired,npmPackageName:t().string.isRequired,npmPackageUrl:t().string.isRequired,repositoryUrl:t().string.isRequired,logo:t().object.isRequired,developerName:t().string.isRequired,validated:t().bool.isRequired,madeByStrapi:t().bool.isRequired,strapiCompatibility:t().oneOf(["v3","v4"]),strapiVersion:t().string,githubStars:t().number,npmDownloads:t().number}).isRequired}).isRequired,isInstalled:t().bool.isRequired,useYarn:t().bool.isRequired,isInDevelopmentMode:t().bool,npmPackageType:t().string.isRequired,strapiAppVersion:t().string};var qe=q,Ke=n(54725);const Ye=Z.ZP.div`
|
|
12
|
-
display: grid;
|
|
13
|
-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
14
|
-
grid-gap: ${({theme:a})=>a.spaces[4]};
|
|
15
|
-
`,Xe=(0,Z.ZP)(v.x)`
|
|
16
|
-
background: ${({theme:a})=>`linear-gradient(180deg, rgba(234, 234, 239, 0) 0%, ${a.colors.neutral150} 100%)`};
|
|
17
|
-
opacity: 0.33;
|
|
18
|
-
`,_e=()=>e.createElement(Ye,null,Array(12).fill(null).map((a,s)=>e.createElement(Xe,{key:`empty-plugin-card-${s}`,height:"234px",hasRadius:!0}))),se=({content:a})=>e.createElement(v.x,{position:"relative","data-testid":"marketplace-results"},e.createElement(_e,null),e.createElement(v.x,{position:"absolute",top:11,width:"100%"},e.createElement(P.k,{alignItems:"center",justifyContent:"center",direction:"column"},e.createElement(w.J,{as:Ke.Z,color:"",width:"160px",height:"88px"}),e.createElement(v.x,{paddingTop:6},e.createElement(C.Z,{variant:"delta",as:"p",textColor:"neutral600"},a)))));se.propTypes={content:t().string.isRequired};var et=se;const K=({status:a,npmPackages:s,installedPackageNames:r,useYarn:l,isInDevelopmentMode:i,npmPackageType:g,strapiAppVersion:o,debouncedSearch:d})=>{const{formatMessage:u}=(0,f.Z)();if(a==="error")return e.createElement(P.k,{paddingTop:8},e.createElement(c.Hn,null));if(a==="loading")return e.createElement(P.k,{justifyContent:"center",paddingTop:8},e.createElement(Ze.a,null,"Loading content..."));const m=u({id:"admin.pages.MarketPlacePage.search.empty",defaultMessage:'No result for "{target}"'},{target:d});return s.length===0?e.createElement(et,{content:m}):e.createElement(De.r,{gap:4,"data-testid":"marketplace-results"},s.map(h=>e.createElement(Ne.P,{col:4,s:6,xs:12,style:{height:"100%"},key:h.id},e.createElement(qe,{npmPackage:h,isInstalled:r.includes(h.attributes.npmPackageName),useYarn:l,isInDevelopmentMode:i,npmPackageType:g,strapiAppVersion:o}))))};K.defaultProps={npmPackages:[],installedPackageNames:[],strapiAppVersion:null,debouncedSearch:""},K.propTypes={status:t().string.isRequired,npmPackages:t().array,installedPackageNames:t().arrayOf(t().string),useYarn:t().bool.isRequired,isInDevelopmentMode:t().bool.isRequired,npmPackageType:t().string.isRequired,strapiAppVersion:t().string,debouncedSearch:t().string};var re=K,ie=n(68465),le=n(84967);const tt=(0,Z.ZP)(v.x)`
|
|
19
|
-
font-weight: ${({theme:a})=>a.fontWeights.semiBold};
|
|
20
|
-
|
|
21
|
-
span {
|
|
22
|
-
font-size: ${({theme:a})=>a.fontSizes[1]};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Hide the label, every input needs a label. */
|
|
26
|
-
label {
|
|
27
|
-
border: 0;
|
|
28
|
-
clip: rect(0 0 0 0);
|
|
29
|
-
height: 1px;
|
|
30
|
-
margin: -1px;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
padding: 0;
|
|
33
|
-
position: absolute;
|
|
34
|
-
width: 1px;
|
|
35
|
-
}
|
|
36
|
-
`,oe=({sortQuery:a,handleSelectChange:s})=>{const{formatMessage:r}=(0,f.Z)(),l={"name:asc":{selected:{id:"admin.pages.MarketPlacePage.sort.alphabetical.selected",defaultMessage:"Sort by alphabetical order"},option:{id:"admin.pages.MarketPlacePage.sort.alphabetical",defaultMessage:"Alphabetical order"}},"submissionDate:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.newest.selected",defaultMessage:"Sort by newest"},option:{id:"admin.pages.MarketPlacePage.sort.newest",defaultMessage:"Newest"}},"githubStars:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.githubStars.selected",defaultMessage:"Sort by GitHub stars"},option:{id:"admin.pages.MarketPlacePage.sort.githubStars",defaultMessage:"Number of GitHub stars"}},"npmDownloads:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.npmDownloads.selected",defaultMessage:"Sort by npm downloads"},option:{id:"admin.pages.MarketPlacePage.sort.npmDownloads",defaultMessage:"Number of downloads"}}};return e.createElement(tt,null,e.createElement(ie.P,{size:"S",id:"sort-by-select",value:a,customizeContent:()=>r(l[a].selected),onChange:i=>{s({sort:i})},label:r({id:"admin.pages.MarketPlacePage.sort.label",defaultMessage:"Sort by"})},Object.entries(l).map(([i,g])=>e.createElement(le.W,{key:i,value:i},r(g.option)))))};oe.propTypes={sortQuery:t().string.isRequired,handleSelectChange:t().func.isRequired};var at=oe,nt=n(66995),st=n(35331),rt=n(5644),it=n(54015);const ce=({message:a,value:s,onChange:r,possibleFilters:l,onClear:i,customizeContent:g})=>{const o=(d,u)=>`${d} (${u})`;return e.createElement(ie.P,{"data-testid":`${a}-button`,label:a,placeholder:a,size:"M",onChange:r,onClear:i,value:s,customizeContent:g,multi:!0},Object.entries(l).map(([d,u])=>e.createElement(le.W,{"data-testid":`${d}-${u}`,key:d,value:d},o(d,u))))};ce.propTypes={message:t().string.isRequired,value:t().array.isRequired,onChange:t().func.isRequired,possibleFilters:t().object.isRequired,onClear:t().func.isRequired,customizeContent:t().func.isRequired};var de=ce;const ge=({source:a,onToggle:s,query:r,npmPackageType:l,possibleCategories:i,possibleCollections:g,handleSelectChange:o,handleSelectClear:d})=>{const{formatMessage:u}=(0,f.Z)();return e.createElement(it.J2,{source:a,onDismiss:s,padding:3,spacing:4},e.createElement(ot,{direction:"column",alignItems:"stretch",gap:1},e.createElement(de,{message:u({id:"admin.pages.MarketPlacePage.filters.collections",defaultMessage:"Collections"}),value:r?.collections||[],onChange:m=>{o({collections:m})},onClear:()=>d("collections"),possibleFilters:g,customizeContent:m=>u({id:"admin.pages.MarketPlacePage.filters.collectionsSelected",defaultMessage:"{count, plural, =0 {No collections} one {# collection} other {# collections}} selected"},{count:m.length})}),l==="plugin"&&e.createElement(de,{message:u({id:"admin.pages.MarketPlacePage.filters.categories",defaultMessage:"Categories"}),value:r?.categories||[],onChange:m=>{o({categories:m})},onClear:()=>d("categories"),possibleFilters:i,customizeContent:m=>u({id:"admin.pages.MarketPlacePage.filters.categoriesSelected",defaultMessage:"{count, plural, =0 {No categories} one {# category} other {# categories}} selected"},{count:m.length}),name:"categories"})))};ge.propTypes={onToggle:t().func.isRequired,source:t().shape({current:t().instanceOf(Element)}).isRequired,query:t().object.isRequired,npmPackageType:t().oneOf(["plugin","provider"]).isRequired,possibleCollections:t().object.isRequired,possibleCategories:t().object.isRequired,handleSelectChange:t().func.isRequired,handleSelectClear:t().func.isRequired};var lt=ge;const ot=(0,Z.ZP)(P.k)`
|
|
37
|
-
/* Hide the label, every input needs a label. */
|
|
38
|
-
label {
|
|
39
|
-
border: 0;
|
|
40
|
-
clip: rect(0 0 0 0);
|
|
41
|
-
height: 1px;
|
|
42
|
-
margin: -1px;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
padding: 0;
|
|
45
|
-
position: absolute;
|
|
46
|
-
width: 1px;
|
|
47
|
-
}
|
|
48
|
-
`,Y=({name:a,handleRemove:s})=>e.createElement(v.x,{padding:1},e.createElement(nt.V,{icon:e.createElement(st.Z,null),onClick:s},a)),ct=(0,Z.ZP)(Q.z)`
|
|
49
|
-
height: ${({theme:a})=>a.sizes.input.S};
|
|
50
|
-
`,pe=({possibleCollections:a,possibleCategories:s,npmPackageType:r,query:l,handleSelectClear:i,handleSelectChange:g})=>{const[o,d]=(0,e.useState)(!1),u=(0,e.useRef)(),{formatMessage:m}=(0,f.Z)(),h=()=>d(p=>!p),E=(p,M)=>{const x={[M]:l[M].filter(L=>L!==p)};g(x)};return e.createElement(e.Fragment,null,e.createElement(v.x,{paddingTop:1,paddingBottom:1},e.createElement(ct,{variant:"tertiary",ref:u,"data-testid":"filters-button",startIcon:e.createElement(rt.Z,null),onClick:h,size:"S"},m({id:"app.utils.filters",defaultMessage:"Filters"})),o&&e.createElement(lt,{onToggle:h,source:u,query:l,handleSelectClear:i,handleSelectChange:g,possibleCollections:a,possibleCategories:s,npmPackageType:r})),l.collections?.map(p=>e.createElement(Y,{name:p,key:p,handleRemove:()=>E(p,"collections")})),r==="plugin"&&l.categories?.map(p=>e.createElement(Y,{name:p,key:p,handleRemove:()=>E(p,"categories")})))};Y.propTypes={name:t().string.isRequired,handleRemove:t().func.isRequired},pe.propTypes={npmPackageType:t().oneOf(["plugin","provider"]).isRequired,possibleCollections:t().object.isRequired,possibleCategories:t().object.isRequired,query:t().object.isRequired,handleSelectChange:t().func.isRequired,handleSelectClear:t().func.isRequired};var dt=pe;const ue=({pagination:a})=>e.createElement(v.x,{paddingTop:4},e.createElement(P.k,{alignItems:"flex-end",justifyContent:"space-between"},e.createElement(c.v4,{options:["12","24","50","100"],defaultValue:"24"}),e.createElement(c.tU,{pagination:a})));ue.propTypes={pagination:t().shape({page:t().number.isRequired,pageCount:t().number.isRequired,pageSize:t().number.isRequired,total:t().number.isRequired}).isRequired};var gt=ue,pt=n(75536),ut=n.p+"9d5d788027e86620c234.svg",mt=()=>{const{formatMessage:a}=(0,f.Z)();return e.createElement(D.A,null,e.createElement(N.o,null,e.createElement(ee,{isOnline:!1}),e.createElement(P.k,{width:"100%",direction:"column",alignItems:"center",justifyContent:"center",paddingTop:(0,c.Q1)(120)},e.createElement(v.x,{paddingBottom:2},e.createElement(C.Z,{textColor:"neutral700",variant:"alpha"},a({id:"admin.pages.MarketPlacePage.offline.title",defaultMessage:"You are offline"}))),e.createElement(v.x,{paddingBottom:6},e.createElement(C.Z,{textColor:"neutral700",variant:"epsilon"},a({id:"admin.pages.MarketPlacePage.offline.subtitle",defaultMessage:"You need to be connected to the Internet to access Strapi Market."}))),e.createElement("img",{src:ut,alt:"offline",style:{width:"88px",height:"88px"}}))))},ft=n(94638),me=n(20108),ht=n(33348),j=n.n(ht);const fe="https://market-api.strapi.io",vt=async(a={})=>{try{const s=j().stringify(j().parse(a)),r=await fetch(`${fe}/plugins?${s}`);if(!r.ok)throw new Error("Failed to fetch marketplace plugins.");return await r.json()}catch(s){console.error(s)}return null};var Pt=(a,s)=>{const r=(0,c.lm)();return(0,me.useQuery)(["list-marketplace-plugins",s],()=>vt(s),{onSuccess(){a&&a()},onError(){r({type:"warning",message:{id:"notification.error",defaultMessage:"An error occured"}})}})};const Et=async(a={})=>{try{const s=j().stringify(j().parse(a)),r=await fetch(`${fe}/providers?${s}`);if(!r.ok)throw new Error("Failed to fetch marketplace providers.");return await r.json()}catch(s){console.error(s)}return null};var Mt=(a,s)=>{const r=(0,c.lm)();return(0,me.useQuery)(["list-marketplace-providers",s],()=>Et(s),{onSuccess(){a&&a()},onError(){r({type:"warning",message:{id:"notification.error",defaultMessage:"An error occured"}})}})};function yt({npmPackageType:a,debouncedSearch:s,query:r,tabQuery:l}){const{notifyStatus:i}=(0,ft.G)(),{formatMessage:g}=(0,f.Z)(),o=g({id:"global.marketplace",defaultMessage:"Marketplace"}),d=()=>{i(g({id:"app.utils.notify.data-loaded",defaultMessage:"The {target} has loaded"},{target:o}))},u={page:r?.page||1,pageSize:r?.pageSize||24},{data:m,status:h}=Pt(d,{...l.plugin,pagination:u,search:s}),{data:E,status:p}=Mt(d,{...l.provider,pagination:u,search:s}),M=a==="plugin"?m:E,x=a==="plugin"?h:p,[L,B]=(0,e.useState)({}),[I,$]=(0,e.useState)({});(0,e.useEffect)(()=>{x==="success"&&B(M.meta.collections),h==="success"&&$(m.meta.categories)},[m?.meta.categories,h,M?.meta.collections,x]);const{pagination:X}=x==="success"?M.meta:{};return{pluginsResponse:m,providersResponse:E,pluginsStatus:h,providersStatus:p,possibleCollections:L,possibleCategories:I,pagination:X}}var kt=yt;const he=()=>{const{formatMessage:a}=(0,f.Z)(),{trackUsage:s}=(0,c.rS)(),r=(0,e.useRef)(s),l=(0,c.lm)(),[{query:i},g]=(0,c.Kx)(),o=(0,pt.Z)(i?.search,500)||"",{autoReload:d,dependencies:u,useYarn:m,strapiVersion:h}=(0,c.L7)(),E=xe(),p=i?.npmPackageType||"plugin",[M,x]=(0,e.useState)({plugin:p==="plugin"?{...i}:{},provider:p==="provider"?{...i}:{}});(0,c.go)(),(0,e.useEffect)(()=>{r.current("didGoToMarketplace")},[]),(0,e.useEffect)(()=>{d||l({type:"info",message:{id:"admin.pages.MarketPlacePage.production",defaultMessage:"Manage plugins from the development environment"},blockTransition:!0})},[l,d]);const{pluginsResponse:L,providersResponse:B,pluginsStatus:I,providersStatus:$,possibleCollections:X,possibleCategories:Rt,pagination:ve}=kt({npmPackageType:p,debouncedSearch:o,query:i,tabQuery:M});if(!E)return e.createElement(mt,null);const Ct=S=>{const k=S===0?"plugin":"provider",St=M[k]&&Object.keys(M[k]).length;g(St?{...M[k],search:i?.search||"",npmPackageType:k,page:1}:{npmPackageType:k,collections:[],categories:[],sort:"name:asc",page:1,search:i?.search||""})},Pe=S=>{g({...S,page:1}),x(k=>({...k,[p]:{...k[p],...S}}))},xt=S=>{g({[S]:[],page:null},"remove"),x(k=>({...k,[p]:{}}))},Ee=Object.keys(u);return e.createElement(D.A,null,e.createElement(N.o,null,e.createElement(y.q,{title:a({id:"admin.pages.MarketPlacePage.helmet",defaultMessage:"Marketplace - Plugins"})}),e.createElement(ee,{isOnline:E,npmPackageType:p}),e.createElement(R.D,null,e.createElement(F.v,{label:a({id:"admin.pages.MarketPlacePage.tab-group.label",defaultMessage:"Plugins and Providers for Strapi"}),id:"tabs",variant:"simple",initialSelectedTabIndex:["plugin","provider"].indexOf(p),onTabChange:Ct},e.createElement(P.k,{justifyContent:"space-between",paddingBottom:4},e.createElement(V.m,null,e.createElement(V.O,null,a({id:"admin.pages.MarketPlacePage.plugins",defaultMessage:"Plugins"})," ",I==="success"?`(${L.meta.pagination.total})`:"..."),e.createElement(V.O,null,a({id:"admin.pages.MarketPlacePage.providers",defaultMessage:"Providers"})," ",$==="success"?`(${B.meta.pagination.total})`:"...")),e.createElement(v.x,{width:"25%"},e.createElement(Me.w,{name:"searchbar",onClear:()=>g({search:"",page:1}),value:i?.search,onChange:S=>g({search:S.target.value,page:1}),clearLabel:a({id:"admin.pages.MarketPlacePage.search.clear",defaultMessage:"Clear the search"}),placeholder:a({id:"admin.pages.MarketPlacePage.search.placeholder",defaultMessage:"Search"})},a({id:"admin.pages.MarketPlacePage.search.placeholder",defaultMessage:"Search"})))),e.createElement(P.k,{paddingBottom:4,gap:2},e.createElement(at,{sortQuery:i?.sort||"name:asc",handleSelectChange:Pe}),e.createElement(dt,{npmPackageType:p,possibleCollections:X,possibleCategories:Rt,query:i||{},handleSelectChange:Pe,handleSelectClear:xt})),e.createElement(z.n,null,e.createElement(z.x,null,e.createElement(re,{npmPackages:L?.data,status:I,installedPackageNames:Ee,useYarn:m,isInDevelopmentMode:d,npmPackageType:"plugin",strapiAppVersion:h,debouncedSearch:o})),e.createElement(z.x,null,e.createElement(re,{npmPackages:B?.data,status:$,installedPackageNames:Ee,useYarn:m,isInDevelopmentMode:d,npmPackageType:"provider",debouncedSearch:o})))),ve&&e.createElement(gt,{pagination:ve}),e.createElement(v.x,{paddingTop:8},e.createElement(we,null)))))};var bt=()=>e.createElement(c.O4,{permissions:Ce.Z.marketplace.main},e.createElement(he,null))},96709:function(A,b,n){n.d(b,{A:function(){return N}});var e=n(74512),f=n(8471),y=n(72850);const c=(0,f.ZP)(y.x)`
|
|
51
|
-
display: grid;
|
|
52
|
-
grid-template-columns: ${({hasSideNav:R})=>R?"auto 1fr":"1fr"};
|
|
53
|
-
`,D=(0,f.ZP)(y.x)`
|
|
54
|
-
overflow-x: hidden;
|
|
55
|
-
`,N=({sideNav:R,children:F})=>(0,e.jsxs)(c,{hasSideNav:!!R,children:[R,(0,e.jsx)(D,{paddingBottom:10,children:F})]})},33904:function(A,b,n){n.d(b,{Z:function(){return y}});var e=n(74512);const f=c=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...c,children:(0,e.jsx)("path",{fill:"#161614",d:"M12 0C5.373 0 0 5.501 0 12.288c0 5.43 3.438 10.035 8.206 11.66.6.114.82-.266.82-.59 0-.294-.01-1.262-.016-2.289-3.338.744-4.043-1.45-4.043-1.45-.546-1.42-1.332-1.797-1.332-1.797-1.089-.763.082-.747.082-.747 1.205.086 1.84 1.266 1.84 1.266 1.07 1.878 2.807 1.335 3.491 1.021.108-.794.42-1.336.762-1.643-2.665-.31-5.467-1.364-5.467-6.073 0-1.341.469-2.437 1.236-3.298-.124-.31-.535-1.56.117-3.252 0 0 1.007-.33 3.3 1.26A11.25 11.25 0 0 1 12 5.942c1.02.005 2.047.141 3.006.414 2.29-1.59 3.297-1.26 3.297-1.26.653 1.693.242 2.943.118 3.252.77.86 1.235 1.957 1.235 3.298 0 4.72-2.808 5.76-5.48 6.063.43.382.814 1.13.814 2.276 0 1.644-.014 2.967-.014 3.372 0 .327.216.71.825.59C20.566 22.32 24 17.715 24 12.288 24 5.501 18.627 0 12 0Z"})}),y=f}}]);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3677],{15415:function(p,o,t){t.r(o),t.d(o,{default:function(){return O}});var e=t(32735),l=t(24989),i=t(74758),r=t(67879),c=t(83983),m=t(94638),a=t(96709),u=t(27649),M=t(82055),T=t(17e3),y=t(56755),C=t(33827),f=t(94547),d=t(19786),g=t(49372),x=t(35658),L=t(20108);const Z=async()=>{const{get:n}=(0,l.tg)(),{data:s}=await n("/admin/plugins");return s};var A=n=>{const s=(0,l.lm)();return(0,L.useQuery)("list-enabled-plugins",()=>Z(),{onSuccess(){n&&n()},onError(){s({type:"warning",message:{id:"notification.error",defaultMessage:"An error occured"}})}})},I=()=>{const{formatMessage:n}=(0,r.Z)(),{notifyStatus:s}=(0,m.G)();(0,l.go)();const v=n({id:"global.plugins",defaultMessage:"Plugins"}),D=()=>{s(n({id:"app.utils.notify.data-loaded",defaultMessage:"The {target} has loaded"},{target:v}))},{status:P,data:h}=A(D);return P!=="success"&&P!=="error"?e.createElement(a.A,null,e.createElement(u.o,{"aria-busy":!0},e.createElement(l.dO,null))):e.createElement(a.A,null,e.createElement(u.o,null,e.createElement(M.T,{title:v,subtitle:n({id:"app.components.ListPluginsPage.description",defaultMessage:"List of the installed plugins in the project."})}),e.createElement(T.D,null,e.createElement(y.i,{colCount:2,rowCount:h?.plugins?.length??0+1},e.createElement(C.h,null,e.createElement(f.Tr,null,e.createElement(d.Th,null,e.createElement(g.Z,{variant:"sigma",textColor:"neutral600"},n({id:"global.name",defaultMessage:"Name"}))),e.createElement(d.Th,null,e.createElement(g.Z,{variant:"sigma",textColor:"neutral600"},n({id:"global.description",defaultMessage:"description"}))))),e.createElement(x.p,null,h.plugins.map(({name:E,displayName:B,description:N})=>e.createElement(f.Tr,{key:E},e.createElement(d.Td,null,e.createElement(g.Z,{textColor:"neutral800",variant:"omega",fontWeight:"bold"},n({id:`global.plugins.${E}`,defaultMessage:B}))),e.createElement(d.Td,null,e.createElement(g.Z,{textColor:"neutral800"},n({id:`global.plugins.${E}.description`,defaultMessage:N}))))))))))},O=()=>{const{formatMessage:n}=(0,r.Z)(),s=n({id:"global.plugins",defaultMessage:"Plugins"});return e.createElement(l.O4,{permissions:c.Z.marketplace.main},e.createElement(i.q,{title:s}),e.createElement(I,null))}},96709:function(p,o,t){t.d(o,{A:function(){return m}});var e=t(74512),l=t(8471),i=t(72850);const r=(0,l.ZP)(i.x)`
|
|
2
|
-
display: grid;
|
|
3
|
-
grid-template-columns: ${({hasSideNav:a})=>a?"auto 1fr":"1fr"};
|
|
4
|
-
`,c=(0,l.ZP)(i.x)`
|
|
5
|
-
overflow-x: hidden;
|
|
6
|
-
`,m=({sideNav:a,children:u})=>(0,e.jsxs)(r,{hasSideNav:!!a,children:[a,(0,e.jsx)(c,{paddingBottom:10,children:u})]})}}]);
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5895],{74750:function(D,p,t){"use strict";t.r(p),t.d(p,{SettingsPage:function(){return St},default:function(){return Re}});var e=t(32735),l=t(24989),u=t(53038),h=t(96709),r=t(67879),x=t(74758),g=t(32308),C=t(8997),T=t(20108),z=t(27649),Z=t(82055),P=t(41415),L=t(17e3),S=t(87933),d=t(49372),O=t(15335),y=t(5803),I=t(50428),B=t(66456),W=t(47361),H=t(83983),V=t(60216),s=t.n(V),U=t(72850);const Q=750,K=100,Y=["image/jpeg","image/png","image/svg+xml"];var w=t(23272),q=t(68387),X=t(50563),b=t(98779),_=t(19406),tt=t(44647),et=t(85025),nt=t(55225),$=t(97889);const ht={localImage:void 0};var Rt=(o=ht,n)=>(0,$.ZP)(o,a=>{switch(n.type){case"SET_LOCAL_IMAGE":{a.localImage=n.value;break}default:return a}});const ot=({onChangeLogo:o,customLogo:n,goTo:a,Component:i,modalTitle:m,next:E,prev:R,currentStep:v})=>{const[{localImage:f},c]=(0,e.useReducer)(Rt,ht),{formatMessage:A}=(0,r.Z)(),M=j=>{c({type:"SET_LOCAL_IMAGE",value:j})},F=()=>{a(null)};return v?e.createElement(et.P,{labelledBy:"modal",onClose:F},e.createElement(nt.x,null,e.createElement(d.Z,{fontWeight:"bold",as:"h2",id:"modal"},A(m))),e.createElement(i,{setLocalImage:M,goTo:a,next:E,prev:R,onClose:F,asset:f||n,onChangeLogo:o})):null};ot.defaultProps={Component:void 0,currentStep:void 0,customLogo:void 0,modalTitle:void 0,next:null,prev:null},ot.propTypes={Component:s().elementType,currentStep:s().string,customLogo:s().shape({name:s().string,url:s().string,width:s().number,height:s().number,ext:s().string}),goTo:s().func.isRequired,modalTitle:s().shape({id:s().string,defaultMessage:s().string}),next:s().string,onChangeLogo:s().func.isRequired,prev:s().string};var Tt=ot;const ft={currentStep:void 0};var Pt=(o=ft,n)=>(0,$.ZP)(o,a=>{switch(n.type){case"GO_TO":{a.currentStep=n.to;break}default:return a}}),Ot=t(91215),at=t(90980),It=t(9026),st=t(3653),Dt=t(8471),At=t(98275),Bt=t(87107),Ut=t(99140),jt=t(47851),it=t(11406),zt=t(47284);const Zt={id:"Settings.application.customization.modal.upload.error-format",defaultMessage:"Wrong format uploaded (accepted formats only: jpeg, jpg, png, svg)."},Et={id:"Settings.application.customization.modal.upload.error-size",defaultMessage:"The file uploaded is too large (max dimension: {dimension}x{dimension}, max file size: {size}KB)"},Ft=o=>new Promise(n=>{const a=new FileReader;a.onload=()=>{const i=new Image;i.onload=function(){n({width:i.width,height:i.height})},i.src=a.result},a.readAsDataURL(o)}),Wt=(o,n)=>({ext:o.name.split(".").pop(),size:o.size/1e3,name:o.name,url:URL.createObjectURL(o),rawFile:o,width:n.width,height:n.height}),vt=async o=>{let n;if(!Y.includes(o.type))throw n=new Error("File format"),n.displayMessage=Zt,n;const i=await Ft(o);if(!(i.width<=Q&&i.height<=Q))throw n=new Error("File sizing"),n.displayMessage=Et,n;const E=Wt(o,i);if(!(E.size<=K))throw n=new Error("File sizing"),n.displayMessage=Et,n;return E},Kt=(0,Dt.ZP)(At._)`
|
|
2
|
-
opacity: 0;
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
right: 0;
|
|
8
|
-
z-index: 1;
|
|
9
|
-
`,lt=({setLocalImage:o,goTo:n,next:a,onClose:i})=>{const{formatMessage:m}=(0,r.Z)(),[E,R]=(0,e.useState)(!1),[v,f]=(0,e.useState)(void 0),c=(0,e.useRef)(null),A=()=>R(!0),M=()=>R(!1),F=J=>{J.preventDefault(),c.current.click()},j=async()=>{M();const J=c.current.files[0];if(J)try{const N=await vt(J);o(N),n(a)}catch(N){if(N.displayMessage)f(m(N.displayMessage,{size:K,dimension:Q})),c.current.focus();else throw N}},G=()=>E?"primary500":v?"danger600":"neutral300";return e.createElement(e.Fragment,null,e.createElement("form",null,e.createElement(U.x,{paddingLeft:8,paddingRight:8,paddingTop:6,paddingBottom:6},e.createElement(Bt.g,{name:"logo-upload",error:v},e.createElement("label",{htmlFor:"logo-upload"},e.createElement(S.k,{direction:"column",alignItems:"stretch",gap:2},e.createElement(S.k,{paddingTop:9,paddingBottom:7,hasRadius:!0,justifyContent:"center",direction:"column",background:E?"primary100":"neutral100",borderColor:G(),borderStyle:"dashed",borderWidth:"1px",position:"relative",onDragEnter:A,onDragLeave:M},e.createElement(Ut.J,{color:"primary600",width:`${60/16}rem`,height:`${60/16}rem`,as:zt.Z,"aria-hidden":!0}),e.createElement(U.x,{paddingTop:3,paddingBottom:5},e.createElement(d.Z,{variant:"delta",as:"span"},m({id:"Settings.application.customization.modal.upload.drag-drop",defaultMessage:"Drag and Drop here or"}))),e.createElement(Kt,{accept:Y,cursor:"pointer",as:"input",type:"file",name:"files",tabIndex:-1,zIndex:1,onChange:j,ref:c,id:"logo-upload"}),e.createElement(P.z,{type:"button",onClick:F},m({id:"Settings.application.customization.modal.upload.cta.browse",defaultMessage:"Browse files"})),e.createElement(U.x,{paddingTop:6},e.createElement(d.Z,{variant:"pi",textColor:"neutral600"},m({id:"Settings.application.customization.modal.upload.file-validation",defaultMessage:"Max dimension: {dimension}x{dimension}, Max size: {size}KB"},{size:K,dimension:Q})))),e.createElement(jt.c,null)))))),e.createElement(it.m,{startActions:e.createElement(P.z,{onClick:i,variant:"tertiary"},m({id:"Settings.application.customization.modal.cancel",defaultMessage:"Cancel"}))}))};lt.defaultProps={next:null},lt.propTypes={goTo:s().func.isRequired,next:s().string,onClose:s().func.isRequired,setLocalImage:s().func.isRequired};var $t=lt,Nt=t(10369),Gt=async o=>{try{const{get:n}=(0,l.tg)(),a=await n(o,{responseType:"blob",timeout:8e3});return new File([a.data],a.config.url,{type:a.headers["content-type"]})}catch(n){throw n.displayMessage={id:"Settings.application.customization.modal.upload.error-network",defaultMessage:"Network error"},n}};const rt=({goTo:o,next:n,onClose:a,setLocalImage:i})=>{const{formatMessage:m}=(0,r.Z)(),[E,R]=(0,e.useState)(""),[v,f]=(0,e.useState)(null),c=M=>{R(M.target.value)},A=async()=>{try{const M=await Gt(E),F=await vt(M);i(F),o(n)}catch(M){if(M.displayMessage)f(m(M.displayMessage,{size:K,dimension:Q}));else throw M}};return e.createElement("form",{onSubmit:M=>{M.preventDefault(),A()}},e.createElement(U.x,{paddingLeft:8,paddingRight:8,paddingTop:6,paddingBottom:6},e.createElement(Nt.o,{label:m({id:"Settings.application.customization.modal.upload.from-url.input-label",defaultMessage:"URL"}),error:v,onChange:c,value:E,name:"logo-url"})),e.createElement(it.m,{startActions:e.createElement(P.z,{onClick:a,variant:"tertiary"},m({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endActions:e.createElement(P.z,{type:"submit"},m({id:"Settings.application.customization.modal.upload.next",defaultMessage:"Next"}))}))};rt.defaultProps={next:null},rt.propTypes={goTo:s().func.isRequired,next:s().string,onClose:s().func.isRequired,setLocalImage:s().func.isRequired};var Ht=rt;const dt=({setLocalImage:o,goTo:n,next:a,onClose:i})=>{const{formatMessage:m}=(0,r.Z)();return e.createElement(Ot.v,{label:m({id:"Settings.application.customization.modal.tab.label",defaultMessage:"How do you want to upload your assets?"}),variant:"simple"},e.createElement(U.x,{paddingLeft:8,paddingRight:8},e.createElement(at.m,null,e.createElement(at.O,null,m({id:"Settings.application.customization.modal.upload.from-computer",defaultMessage:"From computer"})),e.createElement(at.O,null,m({id:"Settings.application.customization.modal.upload.from-url",defaultMessage:"From url"}))),e.createElement(It.i,null)),e.createElement(st.n,null,e.createElement(st.x,null,e.createElement($t,{onClose:i,setLocalImage:o,goTo:n,next:a})),e.createElement(st.x,null,e.createElement(Ht,{onClose:i,setLocalImage:o,goTo:n,next:a}))))};dt.defaultProps={next:null},dt.propTypes={goTo:s().func.isRequired,next:s().string,onClose:s().func.isRequired,setLocalImage:s().func.isRequired};var Vt=dt,Qt=t(42466),Jt=t(20853),Xt=t(2800),Yt=t(26835),bt=t(41048),xt=t(37083),wt=t(11505);const Mt=({asset:o})=>{const{formatMessage:n}=(0,r.Z)();return e.createElement(Qt.Z,null,e.createElement(Jt.O,null,e.createElement(Xt.H,{size:"S",src:o.url})),e.createElement(Yt.e,null,e.createElement(bt.a,null,e.createElement(xt.l,null,o.name),e.createElement(xt._,null,`${o.ext.toUpperCase()} - ${o.width}\u2715${o.height}`)),e.createElement(wt.E,null,n({id:"Settings.application.customization.modal.pending.card-badge",defaultMessage:"image"}))))};Mt.propTypes={asset:s().shape({name:s().string,url:s().string,width:s().number,height:s().number,ext:s().string}).isRequired};var kt=Mt;const ct=({onClose:o,asset:n,prev:a,next:i,goTo:m,setLocalImage:E,onChangeLogo:R})=>{const{formatMessage:v}=(0,r.Z)(),f=()=>{E(void 0),m(a)},c=()=>{R(n),m(i)};return e.createElement(e.Fragment,null,e.createElement(U.x,{paddingLeft:8,paddingRight:8,paddingTop:6,paddingBottom:6},e.createElement(S.k,{justifyContent:"space-between",paddingBottom:6},e.createElement(S.k,{direction:"column",alignItems:"flex-start"},e.createElement(d.Z,{variant:"pi",fontWeight:"bold"},v({id:"Settings.application.customization.modal.pending.title",defaultMessage:"Logo ready to upload"})),e.createElement(d.Z,{variant:"pi",textColor:"neutral500"},v({id:"Settings.application.customization.modal.pending.subtitle",defaultMessage:"Manage the chosen logo before uploading it"}))),e.createElement(P.z,{onClick:f,variant:"secondary"},v({id:"Settings.application.customization.modal.pending.choose-another",defaultMessage:"Choose another logo"}))),e.createElement(U.x,{maxWidth:(0,l.Q1)(180)},n.url?e.createElement(kt,{asset:n}):null)),e.createElement(it.m,{startActions:e.createElement(P.z,{onClick:o,variant:"tertiary"},v({id:"Settings.application.customization.modal.cancel",defaultMessage:"Cancel"})),endActions:e.createElement(P.z,{onClick:c},v({id:"Settings.application.customization.modal.pending.upload",defaultMessage:"Upload logo"}))}))};ct.defaultProps={next:null,prev:null},ct.propTypes={goTo:s().func.isRequired,asset:s().shape({name:s().string,url:s().string,width:s().number,height:s().number,ext:s().string}).isRequired,next:s().string,onClose:s().func.isRequired,onChangeLogo:s().func.isRequired,prev:s().string,setLocalImage:s().func.isRequired};var qt=ct,_t={upload:{Component:Vt,modalTitle:{id:"Settings.application.customization.modal.upload",defaultMessage:"Upload logo"},next:"pending",prev:null},pending:{Component:qt,modalTitle:{id:"Settings.application.customization.modal.pending",defaultMessage:"Pending logo"},next:null,prev:"upload"}};const mt=({canUpdate:o,customLogo:n,defaultLogo:a,hint:i,label:m,onChangeLogo:E,onResetLogo:R})=>{const[{currentStep:v},f]=(0,e.useReducer)(Pt,ft),{Component:c,next:A,prev:M,modalTitle:F}=_t[v]||{},{formatMessage:j}=(0,r.Z)(),G=J=>{f({type:"GO_TO",to:J})};return e.createElement(e.Fragment,null,e.createElement(w.F,{label:m,selectedSlide:0,hint:i,previousLabel:"",nextLabel:"",onNext:()=>{},onPrevious:()=>{},secondaryLabel:n?.name||"logo.png",actions:e.createElement(q.b,null,e.createElement(X.h,{disabled:!o,onClick:()=>G(n?"pending":"upload"),label:j({id:"Settings.application.customization.carousel.change-action",defaultMessage:"Change logo"}),icon:e.createElement(_.Z,null)}),n&&e.createElement(X.h,{disabled:!o,onClick:R,label:j({id:"Settings.application.customization.carousel.reset-action",defaultMessage:"Reset logo"}),icon:e.createElement(tt.Z,null)}))},e.createElement(b.q,{label:j({id:"Settings.application.customization.carousel-slide.label",defaultMessage:"Logo slide"})},e.createElement(U.x,{maxHeight:"40%",maxWidth:"40%",as:"img",src:n?.url||a,alt:j({id:"Settings.application.customization.carousel.title",defaultMessage:"Logo"})}))),e.createElement(Tt,{Component:c,currentStep:v,onChangeLogo:E,customLogo:n,goTo:G,next:A,prev:M,modalTitle:F}))};mt.defaultProps={canUpdate:!1,customLogo:null,hint:null},mt.propTypes={canUpdate:s().bool,customLogo:s().shape({url:s().string,name:s().string}),label:s().string.isRequired,hint:s().string,defaultLogo:s().string.isRequired,onChangeLogo:s().func.isRequired,onResetLogo:s().func.isRequired};var Ct=mt;const ut={menuLogo:{display:null,submit:{rawFile:null,isReset:!1}},authLogo:{display:null,submit:{rawFile:null,isReset:!1}}};var te=(o=ut,n)=>(0,$.ZP)(o,a=>{switch(n.type){case"SET_CUSTOM_MENU_LOGO":{a.menuLogo.display=n.value,a.menuLogo.submit.rawFile=n.value.rawFile;break}case"SET_CUSTOM_AUTH_LOGO":{a.authLogo.display=n.value,a.authLogo.submit.rawFile=n.value.rawFile;break}case"RESET_CUSTOM_MENU_LOGO":{a.menuLogo.display=null,a.menuLogo.submit={rawFile:null,isReset:!0};break}case"RESET_CUSTOM_AUTH_LOGO":{a.authLogo.display=null,a.authLogo.submit={rawFile:null,isReset:!0};break}default:return a}}),ee=t(86349),ne=t.n(ee),oe=(o,n)=>ne()(o,{menuLogo:{display:n.menuLogo},authLogo:{display:n.authLogo}});const gt=(0,e.forwardRef)(({canUpdate:o,projectSettingsStored:n},a)=>{const{formatMessage:i}=(0,r.Z)(),{trackUsage:m}=(0,l.rS)(),{logos:{menu:E,auth:R}}=(0,g.um)(),[{menuLogo:v,authLogo:f},c]=(0,e.useReducer)(te,ut,()=>oe(ut,n)),A=G=>{c({type:"SET_CUSTOM_MENU_LOGO",value:G})},M=()=>{m("didClickResetLogo",{logo:"menu"}),c({type:"RESET_CUSTOM_MENU_LOGO"})},F=G=>{c({type:"SET_CUSTOM_AUTH_LOGO",value:G})},j=()=>{m("didClickResetLogo",{logo:"auth"}),c({type:"RESET_CUSTOM_AUTH_LOGO"})};return(0,e.useImperativeHandle)(a,()=>({getValues:()=>({menuLogo:v.submit,authLogo:f.submit})})),e.createElement(U.x,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",paddingTop:6,paddingBottom:6,paddingRight:7,paddingLeft:7},e.createElement(d.Z,{variant:"delta",as:"h3"},i({id:"Settings.application.customization",defaultMessage:"Customization"})),e.createElement(d.Z,{variant:"pi",textColor:"neutral600"},i({id:"Settings.application.customization.size-details",defaultMessage:"Max dimension: {dimension}\xD7{dimension}, Max file size: {size}KB"},{dimension:Q,size:K})),e.createElement(O.r,{paddingTop:4,gap:4},e.createElement(y.P,{col:6,s:12},e.createElement(Ct,{canUpdate:o,customLogo:v.display,defaultLogo:E.default,hint:i({id:"Settings.application.customization.menu-logo.carousel-hint",defaultMessage:"Replace the logo in the main navigation"}),label:i({id:"Settings.application.customization.carousel.menu-logo.title",defaultMessage:"Menu logo"}),onChangeLogo:A,onResetLogo:M})),e.createElement(y.P,{col:6,s:12},e.createElement(Ct,{canUpdate:o,customLogo:f.display,defaultLogo:R.default,hint:i({id:"Settings.application.customization.auth-logo.carousel-hint",defaultMessage:"Replace the logo in the authentication pages"}),label:i({id:"Settings.application.customization.carousel.auth-logo.title",defaultMessage:"Auth logo"}),onChangeLogo:F,onResetLogo:j}))))});gt.defaultProps={canUpdate:!1,projectSettingsStored:null},gt.propTypes={canUpdate:s().bool,projectSettingsStored:s().shape({menuLogo:s().shape({url:s().string,name:s().string})})};var ae=gt,se=t(48344),ie=t.n(se),Lt=o=>ie()(o,(n,a,i)=>{a&&a.url?n[i]={...a,url:(0,l.CR)(a.url)}:n[i]=a},{});const le=async()=>{const{get:o}=(0,l.tg)(),{data:n}=await o("/admin/project-settings");return Lt(n)},re=async o=>{const{post:n}=(0,l.tg)(),{data:a}=await n("/admin/project-settings",o,{headers:{"Content-Type":"multipart/form-data"}});return Lt(a)};var de=o=>{const n=new FormData;return Object.entries(o).forEach(([a,i])=>{i&&i.rawFile instanceof File&&n.append(a,i.rawFile),i&&i.isReset&&n.append(a,null)}),n};const ce=(()=>window&&window.strapi&&window.strapi.isEE?t(78999).Z:t(17891).Z)();var me=()=>{const o=(0,e.useRef)(),n=(0,l.lm)(),{trackUsage:a}=(0,l.rS)(),{formatMessage:i}=(0,r.Z)(),m=(0,T.useQueryClient)();(0,l.go)();const E=(0,l.L7)(),{latestStrapiReleaseTag:R,shouldUpdateStrapi:v,strapiVersion:f}=E,{updateProjectSettings:c}=(0,g.um)(),{allowedActions:{canRead:A,canUpdate:M}}=(0,l.ss)(H.Z.settings["project-settings"]),F=A&&M,{data:j}=(0,T.useQuery)("project-settings",le,{enabled:A}),G=(0,T.useMutation)(N=>re(N),{async onSuccess(N){let{menuLogo:k,authLogo:pt}=N;await m.invalidateQueries("project-settings",{refetchActive:!0}),c({menuLogo:k?.url,authLogo:pt?.url})}}),J=N=>{if(N.preventDefault(),!M)return;const k=o.current.getValues(),pt=de(k);G.mutate(pt,{onSuccess(){const{menuLogo:Te,authLogo:Pe}=k;Te.rawFile&&a("didChangeLogo",{logo:"menu"}),Pe.rawFile&&a("didChangeLogo",{logo:"auth"}),n({type:"success",message:i({id:"app",defaultMessage:"Saved"})})},onError(){n({type:"warning",message:{id:"notification.error",defaultMessage:"An error occurred"}})}})};return e.createElement(h.A,null,e.createElement(l.SL,{name:"Application"}),e.createElement(z.o,null,e.createElement("form",{onSubmit:J},e.createElement(Z.T,{title:i({id:"Settings.application.title",defaultMessage:"Overview"}),subtitle:i({id:"Settings.application.description",defaultMessage:"Administration panel\u2019s global information"}),primaryAction:F&&e.createElement(P.z,{type:"submit",startIcon:e.createElement(B.Z,null)},i({id:"global.save",defaultMessage:"Save"}))}),e.createElement(L.D,null,e.createElement(S.k,{direction:"column",alignItems:"stretch",gap:6},e.createElement(S.k,{direction:"column",alignItems:"stretch",gap:4,hasRadius:!0,background:"neutral0",shadow:"tableShadow",paddingTop:6,paddingBottom:6,paddingRight:7,paddingLeft:7},e.createElement(d.Z,{variant:"delta",as:"h3"},i({id:"global.details",defaultMessage:"Details"})),e.createElement(O.r,{gap:5,as:"dl"},e.createElement(y.P,{col:6,s:12},e.createElement(d.Z,{variant:"sigma",textColor:"neutral600",as:"dt"},i({id:"Settings.application.strapiVersion",defaultMessage:"strapi version"})),e.createElement(S.k,{gap:3,direction:"column",alignItems:"start",as:"dd"},e.createElement(d.Z,null,"v",f),v&&e.createElement(I.r,{href:`https://github.com/strapi/strapi/releases/tag/${R}`,isExternal:!0,endIcon:e.createElement(W.Z,null)},i({id:"Settings.application.link-upgrade",defaultMessage:"Upgrade your admin panel"})))),e.createElement(y.P,{col:6,s:12},e.createElement(d.Z,{variant:"sigma",textColor:"neutral600",as:"dt"},i({id:"Settings.application.edition-title",defaultMessage:"current plan"})),e.createElement(S.k,{gap:3,direction:"column",alignItems:"start",as:"dd"},e.createElement(d.Z,null,i({id:"Settings.application.ee-or-ce",defaultMessage:"{communityEdition, select, true {Community Edition} other {Enterprise Edition}}"},{communityEdition:E.communityEdition})),e.createElement(I.r,{href:"https://strapi.io/pricing-self-hosted",isExternal:!0,endIcon:e.createElement(W.Z,null)},i({id:"Settings.application.link-pricing",defaultMessage:"See all pricing plans"})))),e.createElement(y.P,{col:6,s:12},e.createElement(d.Z,{variant:"sigma",textColor:"neutral600",as:"dt"},i({id:"Settings.application.node-version",defaultMessage:"node version"})),e.createElement(d.Z,{as:"dd"},E.nodeVersion)),e.createElement(ce,null))),A&&j&&e.createElement(ae,{canUpdate:M,ref:o,projectSettingsStored:j}))))))},ue=t(3704),ge=t.n(ue),pe=o=>ge()(o,a=>a.links).map(a=>(0,C.ot)(a.Component,a.to,a.exact||!1)),he=o=>o.filter(n=>!n.links.every(a=>a.isDisplayed===!1)),fe=[{async Component(){return await t.e(3455).then(t.bind(t,67249))},to:"/settings/roles",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(2544)]).then(t.bind(t,92034))},to:"/settings/roles/duplicate/:id",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(2544)]).then(t.bind(t,92034))},to:"/settings/roles/new",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(2544)]).then(t.bind(t,33778))},to:"/settings/roles/:id",exact:!0},{async Component(){return await t.e(5199).then(t.bind(t,10108))},to:"/settings/users",exact:!0},{async Component(){return await t.e(4263).then(t.bind(t,40874))},to:"/settings/users/:id",exact:!0},{async Component(){return await t.e(5162).then(t.bind(t,33238))},to:"/settings/webhooks/create",exact:!0},{async Component(){return await t.e(5162).then(t.bind(t,59021))},to:"/settings/webhooks/:id",exact:!0},{async Component(){return await t.e(4121).then(t.bind(t,32393))},to:"/settings/webhooks",exact:!0},{async Component(){return await t.e(8056).then(t.bind(t,37168))},to:"/settings/api-tokens",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(4628),t.e(5563),t.e(4299)]).then(t.bind(t,3330))},to:"/settings/api-tokens/create",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(4628),t.e(5563),t.e(92)]).then(t.bind(t,97841))},to:"/settings/api-tokens/:id",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(4628),t.e(7259),t.e(4816)]).then(t.bind(t,76411))},to:"/settings/transfer-tokens/create",exact:!0},{async Component(){return await t.e(9600).then(t.bind(t,38286))},to:"/settings/transfer-tokens",exact:!0},{async Component(){return await Promise.all([t.e(1387),t.e(4628),t.e(7259),t.e(2492)]).then(t.bind(t,73607))},to:"/settings/transfer-tokens/:id",exact:!0}],Ee=[...(()=>window&&window.strapi&&window.strapi.isEE?t(63775).Z:t(75936).Z)(),...fe],ve=t(14911),xe=t(90700),Me=t(78090),Ce=t(77013),Le=t(79318),ye=t(66618);const yt=({menu:o})=>{const{formatMessage:n}=(0,r.Z)(),{trackUsage:a}=(0,l.rS)(),{pathname:i}=(0,u.TH)(),E=he(o).map(f=>({...f,title:f.intlLabel,links:f.links.map(c=>({...c,title:c.intlLabel,name:c.id}))})),R=n({id:"global.settings",defaultMessage:"Settings"}),v=(f=null)=>{a("willNavigate",{from:i,to:f})};return e.createElement(xe.m,{ariaLabel:R},e.createElement(Me.p,{label:R}),e.createElement(Ce.Z,null,E.map(f=>e.createElement(Le.D,{key:f.id,label:n(f.intlLabel)},f.links.map(c=>e.createElement(ye.E,{as:ve.OL,withBullet:c.hasNotification,to:c.to,onClick:()=>v(c.to),key:c.id},n(c.intlLabel)))))))};yt.propTypes={menu:s().array.isRequired};var Se=yt;function St(){const{settingId:o}=(0,u.UO)(),{settings:n}=(0,l.j1)(),{formatMessage:a}=(0,r.Z)(),{isLoading:i,menu:m}=(0,g.Te)(),E=(0,e.useMemo)(()=>(0,C.WW)(Ee.map(({to:f,Component:c,exact:A})=>(0,C.ot)(c,f,A))),[]),R=pe(n);if(i)return e.createElement(l.dO,null);if(!o)return e.createElement(u.l_,{to:"/settings/application-infos"});const v=a({id:"global.settings",defaultMessage:"Settings"});return e.createElement(h.A,{sideNav:e.createElement(Se,{menu:m})},e.createElement(x.q,{title:v}),e.createElement(u.rs,null,e.createElement(u.AW,{path:"/settings/application-infos",component:me,exact:!0}),E,R))}var Re=(0,e.memo)(St)},17891:function(D,p){"use strict";const t=()=>null;p.Z=t},75936:function(D,p){"use strict";const t=[];p.Z=t},78999:function(D,p,t){"use strict";var e=t(32735),l=t(67879),u=t(5803),h=t(49372),r=t(87933),x=t(63919),g=t(99140),C=t(41502),T=t(69932),z=t(47361),Z=t(24989),P=t(58414);const L="https://cloud.strapi.io/profile/billing",S="https://strapi.io/billing/request-seats",d=()=>{const{formatMessage:O}=(0,l.Z)(),{license:y}=(0,P.q5)(),{licenseLimitStatus:I,enforcementUserCount:B,permittedSeats:W,isHostedOnStrapiCloud:H}=y?.data??{};return W?e.createElement(u.P,{col:6,s:12},e.createElement(h.Z,{variant:"sigma",textColor:"neutral600"},O({id:"Settings.application.admin-seats",defaultMessage:"Admin seats"})),e.createElement(r.k,{gap:2},e.createElement(r.k,null,e.createElement(h.Z,{as:"p"},O({id:"Settings.application.ee.admin-seats.count",defaultMessage:"<text>{enforcementUserCount}</text>/{permittedSeats}"},{permittedSeats:W,enforcementUserCount:B,text:V=>e.createElement(h.Z,{fontWeight:"semiBold",textColor:B>W?"danger500":null},V)}))),I==="OVER_LIMIT"&&e.createElement(x.u,{description:O({id:"Settings.application.ee.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"})},e.createElement(g.J,{width:`${(0,Z.Q1)(14)}rem`,height:`${(0,Z.Q1)(14)}rem`,color:"danger500",as:T.Z}))),e.createElement(C.r,{href:H?L:S,isExternal:!0,endIcon:e.createElement(z.Z,null)},O({id:"Settings.application.ee.admin-seats.add-seats",defaultMessage:"{isHostedOnStrapiCloud, select, true {Add seats} other {Contact sales}}"},{isHostedOnStrapiCloud:H}))):null};p.Z=d},63775:function(D,p,t){"use strict";const e=[];window.strapi.features.isEnabled(window.strapi.features.SSO)&&e.push({async Component(){return await t.e(302).then(t.bind(t,26930))},to:"/settings/single-sign-on",exact:!0}),window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)&&e.push({async Component(){return await Promise.all([t.e(6858),t.e(6970),t.e(8155)]).then(t.bind(t,96594))},to:"/settings/review-workflows",exact:!0}),window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS)&&e.push({async Component(){return await t.e(2812).then(t.bind(t,71765))},to:"/settings/audit-logs",exact:!0}),p.Z=e},3704:function(D,p,t){var e=t(40314),l=t(37213);function u(h,r){return e(l(h,r),1)}D.exports=u},37213:function(D,p,t){var e=t(26460),l=t(88904),u=t(52920),h=t(77236);function r(x,g){var C=h(x)?e:u;return C(x,l(g,3))}D.exports=r},96709:function(D,p,t){"use strict";t.d(p,{A:function(){return x}});var e=t(74512),l=t(8471),u=t(72850);const h=(0,l.ZP)(u.x)`
|
|
10
|
-
display: grid;
|
|
11
|
-
grid-template-columns: ${({hasSideNav:g})=>g?"auto 1fr":"1fr"};
|
|
12
|
-
`,r=(0,l.ZP)(u.x)`
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
`,x=({sideNav:g,children:C})=>(0,e.jsxs)(h,{hasSideNav:!!g,children:[g,(0,e.jsx)(r,{paddingBottom:10,children:C})]})},90700:function(D,p,t){"use strict";t.d(p,{m:function(){return x}});var e=t(74512),l=t(8471),u=t(15335);const h=`${232/16}rem`,r=(0,l.ZP)(u.r)`
|
|
15
|
-
width: ${h};
|
|
16
|
-
background: ${({theme:g})=>g.colors.neutral100};
|
|
17
|
-
position: sticky;
|
|
18
|
-
top: 0;
|
|
19
|
-
height: 100vh;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
border-right: 1px solid ${({theme:g})=>g.colors.neutral200};
|
|
22
|
-
z-index: 1;
|
|
23
|
-
`,x=({ariaLabel:g,...C})=>(0,e.jsx)(r,{"aria-label":g,as:"nav",...C})},78090:function(D,p,t){"use strict";t.d(p,{p:function(){return O}});var e=t(74512),l=t(32735),u=t(6792),h=t(8471),r=t(94486),x=t(74971);const g=y=>{const I=(0,l.useRef)();return(0,l.useEffect)(()=>{I.current=y}),I.current};var C=t(9026),T=t(72850),z=t(89252),Z=t(61774),P=t(87933),L=t(49372),S=t(50563);const d=(0,h.ZP)(C.i)`
|
|
24
|
-
width: ${24/16}rem;
|
|
25
|
-
background-color: ${({theme:y})=>y.colors.neutral200};
|
|
26
|
-
`,O=({as:y="h2",label:I,searchLabel:B="",searchable:W=!1,onChange:H=()=>{},value:V="",onClear:s=()=>{},onSubmit:U=()=>{},id:Q})=>{const[K,Y]=(0,l.useState)(!1),w=g(K),q=(0,x.M)(Q),X=(0,l.useRef)(void 0),b=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{K&&X.current&&X.current.focus(),w&&!K&&b.current&&b.current.focus()},[K,w]);const _=()=>{Y($=>!$)},tt=$=>{s($),X.current.focus()},et=$=>{$.relatedTarget?.id!==q&&Y(!1)},nt=$=>{$.key===r.y.ESCAPE&&Y(!1)};return K?(0,e.jsxs)(T.x,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[(0,e.jsx)(z.U,{children:(0,e.jsx)(Z.w,{name:"searchbar",value:V,onChange:H,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:nt,ref:X,onBlur:et,onClear:tt,onSubmit:U,clearLabel:"Clear",size:"S",children:B})}),(0,e.jsx)(T.x,{paddingLeft:2,paddingTop:4,children:(0,e.jsx)(d,{})})]}):(0,e.jsxs)(T.x,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[(0,e.jsxs)(P.k,{justifyContent:"space-between",alignItems:"flex-start",children:[(0,e.jsx)(L.Z,{variant:"beta",as:y,children:I}),W&&(0,e.jsx)(S.h,{ref:b,onClick:_,label:B,icon:(0,e.jsx)(u.Z,{})})]}),(0,e.jsx)(T.x,{paddingTop:4,children:(0,e.jsx)(d,{})})]})}},66618:function(D,p,t){"use strict";t.d(p,{E:function(){return P}});var e=t(74512),l=t(32735),u=t(56243),h=t(8471),r=t(72850),x=t(49372),g=t(87933),C=t(62499);const T=(0,h.ZP)(r.x)`
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
color: ${({theme:L})=>L.colors.neutral800};
|
|
32
|
-
svg > * {
|
|
33
|
-
fill: ${({theme:L})=>L.colors.neutral600};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.active {
|
|
37
|
-
${({theme:L})=>`
|
|
38
|
-
background-color: ${L.colors.primary100};
|
|
39
|
-
border-right: 2px solid ${L.colors.primary600};
|
|
40
|
-
svg > * {
|
|
41
|
-
fill: ${L.colors.primary700};
|
|
42
|
-
}
|
|
43
|
-
${x.Z} {
|
|
44
|
-
color: ${L.colors.primary700};
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
}
|
|
47
|
-
`}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:focus-visible {
|
|
51
|
-
outline-offset: -2px;
|
|
52
|
-
}
|
|
53
|
-
`,z=(0,h.ZP)(u.Z)`
|
|
54
|
-
width: ${12/16}rem;
|
|
55
|
-
height: ${4/16}rem;
|
|
56
|
-
* {
|
|
57
|
-
fill: ${({theme:L,$active:S})=>S?L.colors.primary600:L.colors.neutral600};
|
|
58
|
-
}
|
|
59
|
-
`,Z=h.ZP.div`
|
|
60
|
-
svg {
|
|
61
|
-
height: ${12/16}rem;
|
|
62
|
-
width: ${12/16}rem;
|
|
63
|
-
}
|
|
64
|
-
`,P=l.forwardRef(({children:L,icon:S=null,withBullet:d=!1,as:O=C.f,isSubSectionChild:y=!1,...I},B)=>(0,e.jsxs)(T,{as:O,icon:S,background:"neutral100",paddingLeft:y?9:7,paddingBottom:2,paddingTop:2,ref:B,...I,children:[(0,e.jsxs)(g.k,{children:[S?(0,e.jsx)(Z,{children:S}):(0,e.jsx)(z,{}),(0,e.jsx)(r.x,{paddingLeft:2,children:(0,e.jsx)(x.Z,{as:"span",children:L})})]}),d&&(0,e.jsx)(r.x,{as:g.k,paddingRight:4,children:(0,e.jsx)(z,{$active:!0})})]}))},79318:function(D,p,t){"use strict";t.d(p,{D:function(){return S}});var e=t(74512),l=t(32735),u=t(8471),h=t(16899),r=t(87933),x=t(72850),g=t(49372);const C=(0,u.ZP)(r.k)`
|
|
65
|
-
border: none;
|
|
66
|
-
padding: 0;
|
|
67
|
-
background: transparent;
|
|
68
|
-
`,T=u.ZP.div`
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
transform: rotateX(${({rotated:d})=>d?"0deg":"180deg"});
|
|
72
|
-
`,z=({collapsable:d=!1,label:O,onClick:y=()=>{},ariaExpanded:I,ariaControls:B})=>d?(0,e.jsxs)(C,{as:"button",onClick:y,"aria-expanded":I,"aria-controls":B,textAlign:"left",children:[(0,e.jsx)(x.x,{paddingRight:1,children:(0,e.jsx)(g.Z,{variant:"sigma",textColor:"neutral600",children:O})}),d&&(0,e.jsx)(T,{rotated:I,children:(0,e.jsx)(h.Z,{"aria-hidden":!0})})]}):(0,e.jsx)(C,{children:(0,e.jsx)(x.x,{paddingRight:1,children:(0,e.jsx)(g.Z,{variant:"sigma",textColor:"neutral600",children:O})})});var Z=t(74971),P=t(6518);const L=(0,u.ZP)(x.x)`
|
|
73
|
-
svg {
|
|
74
|
-
height: ${4/16}rem;
|
|
75
|
-
path {
|
|
76
|
-
fill: ${({theme:d})=>d.colors.neutral500};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`,S=({collapsable:d=!1,label:O,badgeLabel:y,children:I,id:B})=>{const[W,H]=(0,l.useState)(!0),V=(0,Z.M)(B);return(0,e.jsxs)(r.k,{direction:"column",alignItems:"stretch",gap:1,children:[(0,e.jsx)(L,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:(0,e.jsxs)(x.x,{position:"relative",paddingRight:y?6:0,children:[(0,e.jsx)(z,{onClick:()=>{H(s=>!s)},ariaExpanded:W,ariaControls:V,collapsable:d,label:O}),y&&(0,e.jsx)(P.C,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:y})]})}),(!d||W)&&(0,e.jsx)("ol",{id:V,children:l.Children.map(I,(s,U)=>(0,e.jsx)("li",{children:s},U))})]})}},77013:function(D,p,t){"use strict";t.d(p,{Z:function(){return r}});var e=t(74512),l=t(32735),u=t(72850),h=t(87933);const r=({children:x,spacing:g=2,horizontal:C=!1,...T})=>(0,e.jsx)(u.x,{paddingTop:2,paddingBottom:4,children:(0,e.jsx)(h.k,{as:"ol",gap:g,direction:C?"row":"column",alignItems:C?"center":"stretch",...T,children:l.Children.map(x,(z,Z)=>(0,e.jsx)("li",{children:z},Z))})})},56243:function(D,p,t){"use strict";t.d(p,{Z:function(){return u}});var e=t(74512);const l=h=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 4 4",...h,children:(0,e.jsx)("rect",{width:4,height:4,fill:"#A5A5BA",rx:2})}),u=l}}]);
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5538],{78834:function(D,m,e){"use strict";e.d(m,{Z:function(){return nt}});var t=e(24346),i=e(24989),n=e(32735),E=e(67879),C=e(60216),u=e.n(C),P=e(27649),T=e(72850),R=e(49372),I=e(87933),O=e(10369),f=e(41415),L=e(92802),v=e(954),b=e(10190);const y=({onSubmit:N,schema:Ae})=>{const{formatMessage:ne}=(0,E.Z)();return n.createElement(v.ZP,null,n.createElement(P.o,null,n.createElement(v.bU,null,n.createElement(L.J9,{enableReinitialize:!0,initialValues:{email:""},onSubmit:N,validationSchema:Ae,validateOnChange:!1},({values:X,errors:fe,handleChange:He})=>n.createElement(i.l0,{noValidate:!0},n.createElement(v.sg,null,n.createElement(b.Z,null),n.createElement(T.x,{paddingTop:6,paddingBottom:7},n.createElement(R.Z,{as:"h1",variant:"alpha"},ne({id:"Auth.form.button.password-recovery",defaultMessage:"Password Recovery"}))),fe.errorMessage&&n.createElement(R.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},ne({id:fe.errorMessage,defaultMessage:"An error occurred"}))),n.createElement(I.k,{direction:"column",alignItems:"stretch",gap:6},n.createElement(O.o,{error:fe.email?ne({id:fe.email,defaultMessage:"This email is invalid."}):"",value:X.email,onChange:He,label:ne({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:ne({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),n.createElement(f.z,{type:"submit",fullWidth:!0},ne({id:"Auth.form.button.forgot-password",defaultMessage:"Send Email"})))))),n.createElement(I.k,{justifyContent:"center"},n.createElement(T.x,{paddingTop:4},n.createElement(i.rU,{to:"/auth/login"},ne({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};y.defaultProps={onSubmit:N=>N.preventDefault()},y.propTypes={onSubmit:u().func,schema:u().shape({type:u().string.isRequired}).isRequired};var k=y,U=()=>{const{formatMessage:N}=(0,E.Z)();return n.createElement(v.ZP,null,n.createElement(P.o,null,n.createElement(v.bU,null,n.createElement(v.sg,null,n.createElement(b.Z,null),n.createElement(T.x,{paddingTop:6,paddingBottom:7},n.createElement(R.Z,{as:"h1",variant:"alpha"},N({id:"app.containers.AuthPage.ForgotPasswordSuccess.title",defaultMessage:"Email sent"}))),n.createElement(R.Z,null,N({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.email",defaultMessage:"It can take a few minutes to receive your password recovery link."})),n.createElement(T.x,{paddingTop:4},n.createElement(R.Z,null,N({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin",defaultMessage:"If you do not receive this link, please contact your administrator."}))))),n.createElement(I.k,{justifyContent:"center"},n.createElement(T.x,{paddingTop:4},n.createElement(i.rU,{to:"/auth/login"},N({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},se=()=>{const{formatMessage:N}=(0,E.Z)(),ne=(0,i.aM)().get("info")||N({id:"Auth.components.Oops.text",defaultMessage:"Your account has been suspended."});return n.createElement(v.ZP,null,n.createElement(P.o,null,n.createElement(v.bU,null,n.createElement(v.sg,null,n.createElement(b.Z,null),n.createElement(T.x,{paddingTop:6,paddingBottom:7},n.createElement(R.Z,{as:"h1",variant:"alpha"},N({id:"Auth.components.Oops.title",defaultMessage:"Oops..."}))),n.createElement(R.Z,null,ne),n.createElement(T.x,{paddingTop:4},n.createElement(R.Z,null,N({id:"Auth.components.Oops.text.admin",defaultMessage:"If this is a mistake, please contact your administrator."}))))),n.createElement(I.k,{justifyContent:"center"},n.createElement(T.x,{paddingTop:4},n.createElement(i.rU,{to:"/auth/login"},N({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},M=e(8471),h=e(9086),Q=e.n(h),z=e(53038),oe=e(15335),o=e(5803),Re=e(8284),$=e(54894),pe=e(60492),Ie=e(72218);const Ge=M.ZP.a`
|
|
2
|
-
color: ${({theme:N})=>N.colors.primary600};
|
|
3
|
-
`,lt=(0,M.ZP)(O.o)`
|
|
4
|
-
::-ms-reveal {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
`,Ve=({authType:N,fieldsToDisable:Ae,noSignin:ne,onSubmit:X,schema:fe})=>{const He=(0,i.lm)(),{push:ie}=(0,z.k6)(),[Ue,me]=(0,n.useState)(!1),[je,Ce]=(0,n.useState)(!1),[Oe,ut]=(0,n.useState)(0),[Qe,Je]=(0,n.useState)({}),{trackUsage:pt}=(0,i.rS)(),{formatMessage:F}=(0,E.Z)(),dt=(0,i.aM)(),{formatAPIError:ct}=(0,i.So)(),{get:ft}=(0,i.kY)(),Ze=dt.get("registrationToken");(0,n.useEffect)(()=>{Ze&&(async()=>{try{const{data:{data:H}}=await ft(`/admin/registration-info?registrationToken=${Ze}`);H&&Je(H)}catch(H){const _=ct(H);He({type:"warning",message:_}),ie(`/auth/oops?info=${encodeURIComponent(_)}`)}})()},[Ze]);function Xe(re){return Object.entries(re).reduce((H,[_,ve])=>{let Pe=ve;return!["password","confirmPassword"].includes(_)&&typeof ve=="string"&&(Pe=Pe.trim()),H[_]=Pe,H},{})}return n.createElement(v.ZP,null,n.createElement(v.bU,null,n.createElement(L.J9,{enableReinitialize:!0,initialValues:{firstname:Qe.firstname||"",lastname:Qe.lastname||"",email:Qe.email||"",password:"",confirmPassword:"",registrationToken:Ze||void 0,news:!1},onSubmit:async(re,H)=>{const _=Xe(re);try{await fe.validate(_,{abortEarly:!1}),Oe>0&&N==="register-admin"&&pt("didSubmitWithErrorsFirstAdmin",{count:Oe.toString()}),X(Ze?{userInfo:Q()(_,["registrationToken"]),registrationToken:Ze}:_,H)}catch(ve){const Pe=(0,i.CJ)(ve);ut(Oe+1),H.setErrors(Pe)}},validateOnChange:!1},({values:re,errors:H,handleChange:_})=>n.createElement(i.l0,{noValidate:!0},n.createElement(P.o,null,n.createElement(I.k,{direction:"column",alignItems:"center",gap:3},n.createElement(b.Z,null),n.createElement(R.Z,{as:"h1",variant:"alpha",textAlign:"center"},F({id:"Auth.form.welcome.title",defaultMessage:"Welcome to Strapi!"})),n.createElement(R.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."}))),n.createElement(I.k,{direction:"column",alignItems:"stretch",gap:6,marginTop:7},n.createElement(oe.r,{gap:4},n.createElement(o.P,{col:6},n.createElement(O.o,{name:"firstname",required:!0,value:re.firstname,error:H.firstname?F(H.firstname):void 0,onChange:_,label:F({id:"Auth.form.firstname.label",defaultMessage:"Firstname"})})),n.createElement(o.P,{col:6},n.createElement(O.o,{name:"lastname",value:re.lastname,onChange:_,label:F({id:"Auth.form.lastname.label",defaultMessage:"Lastname"})}))),n.createElement(O.o,{name:"email",disabled:Ae.includes("email"),value:re.email,onChange:_,error:H.email?F(H.email):void 0,required:!0,label:F({id:"Auth.form.email.label",defaultMessage:"Email"}),type:"email"}),n.createElement(lt,{name:"password",onChange:_,value:re.password,error:H.password?F(H.password):void 0,endAction:n.createElement(Ie.Z,{onClick:ve=>{ve.preventDefault(),me(Pe=>!Pe)},label:F(Ue?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Ue?n.createElement($.Z,null):n.createElement(pe.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:Ue?"text":"password"}),n.createElement(lt,{name:"confirmPassword",onChange:_,value:re.confirmPassword,error:H.confirmPassword?F(H.confirmPassword):void 0,endAction:n.createElement(Ie.Z,{onClick:ve=>{ve.preventDefault(),Ce(Pe=>!Pe)},label:F(je?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},je?n.createElement($.Z,null):n.createElement(pe.Z,null)),required:!0,label:F({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:je?"text":"password"}),n.createElement(Re.X,{onValueChange:ve=>{_({target:{value:ve,name:"news"}})},value:re.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:n.createElement(Ge,{target:"_blank",href:"https://strapi.io/terms",rel:"noreferrer"},F({id:"Auth.privacy-policy-agreement.terms",defaultMessage:"terms"})),policy:n.createElement(Ge,{target:"_blank",href:"https://strapi.io/privacy",rel:"noreferrer"},F({id:"Auth.privacy-policy-agreement.policy",defaultMessage:"policy"}))})),n.createElement(f.z,{fullWidth:!0,size:"L",type:"submit"},F({id:"Auth.form.button.register",defaultMessage:"Let's start"})))))),!ne&&n.createElement(T.x,{paddingTop:4},n.createElement(I.k,{justifyContent:"center"},n.createElement(i.rU,{label:"Auth.link.signin",to:"/auth/login"},F({id:"Auth.link.signin.account",defaultMessage:"Already have an account?"}))))))};Ve.defaultProps={fieldsToDisable:[],noSignin:!1,onSubmit:N=>N.preventDefault()},Ve.propTypes={authType:u().string.isRequired,fieldsToDisable:u().array,noSignin:u().bool,onSubmit:u().func,schema:u().shape({validate:u().func.isRequired,type:u().string.isRequired}).isRequired};var et=Ve;const ke=(0,M.ZP)(O.o)`
|
|
8
|
-
::-ms-reveal {
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
`,tt=({onSubmit:N,schema:Ae})=>{const[ne,X]=(0,n.useState)(!1),[fe,He]=(0,n.useState)(!1),{formatMessage:ie}=(0,E.Z)();return n.createElement(v.ZP,null,n.createElement(P.o,null,n.createElement(v.bU,null,n.createElement(L.J9,{enableReinitialize:!0,initialValues:{password:"",confirmPassword:""},onSubmit:N,validationSchema:Ae,validateOnChange:!1},({values:Ue,errors:me,handleChange:je})=>n.createElement(i.l0,{noValidate:!0},n.createElement(v.sg,null,n.createElement(b.Z,null),n.createElement(T.x,{paddingTop:6,paddingBottom:7},n.createElement(R.Z,{as:"h1",variant:"alpha"},ie({id:"global.reset-password",defaultMessage:"Reset password"}))),me.errorMessage&&n.createElement(R.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},ie({id:me.errorMessage,defaultMessage:"An error occurred"}))),n.createElement(I.k,{direction:"column",alignItems:"stretch",gap:6},n.createElement(ke,{name:"password",onChange:je,value:Ue.password,error:me.password?ie({id:me.password,defaultMessage:"This field is required."}):void 0,endAction:n.createElement(Ie.Z,{onClick:Ce=>{Ce.preventDefault(),X(Oe=>!Oe)},label:ie(ne?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},ne?n.createElement($.Z,null):n.createElement(pe.Z,null)),hint:ie({id:"Auth.form.password.hint",defaultMessage:"Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number"}),required:!0,label:ie({id:"global.password",defaultMessage:"Password"}),type:ne?"text":"password"}),n.createElement(ke,{name:"confirmPassword",onChange:je,value:Ue.confirmPassword,error:me.confirmPassword?ie({id:me.confirmPassword,defaultMessage:"This value is required."}):void 0,endAction:n.createElement(Ie.Z,{onClick:Ce=>{Ce.preventDefault(),He(Oe=>!Oe)},label:ie(ne?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},fe?n.createElement($.Z,null):n.createElement(pe.Z,null)),required:!0,label:ie({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:fe?"text":"password"}),n.createElement(f.z,{fullwidth:!0,type:"submit"},ie({id:"global.change-password",defaultMessage:"Change password"})))))),n.createElement(I.k,{justifyContent:"center"},n.createElement(T.x,{paddingTop:4},n.createElement(i.rU,{to:"/auth/login"},ie({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};tt.defaultProps={onSubmit:N=>N.preventDefault()},tt.propTypes={onSubmit:u().func,schema:u().shape({type:u().string.isRequired}).isRequired};var Ye=tt;const Fe=(()=>window&&window.strapi&&window.strapi.isEE?e(98768).Z:e(5365).Z)();var nt={"forgot-password":{Component:k,endPoint:"forgot-password",fieldsToDisable:[],fieldsToOmit:[],schema:t.Ry().shape({email:t.Z_().email(i.I0.email).required(i.I0.required)}),inputsPrefix:""},"forgot-password-success":{Component:U,endPoint:"",fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},login:{Component:Fe,endPoint:"login",fieldsToDisable:[],fieldsToOmit:["rememberMe"],schema:t.Ry().shape({email:t.Z_().email(i.I0.email).required(i.I0.required),password:t.Z_().required(i.I0.required),rememberMe:t.Xg().nullable()}),inputsPrefix:""},oops:{Component:se,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},register:{Component:et,endPoint:"register",fieldsToDisable:["email"],fieldsToOmit:["userInfo.confirmPassword","userInfo.news","userInfo.email"],schema:t.Ry().shape({firstname:t.Z_().trim().required(i.I0.required),lastname:t.Z_(),password:t.Z_().min(8,i.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(i.I0.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(i.I0.required),registrationToken:t.Z_().required(i.I0.required)}),inputsPrefix:"userInfo."},"register-admin":{Component:et,endPoint:"register-admin",noSignin:!0,fieldsToDisable:[],fieldsToOmit:["confirmPassword","news"],schema:t.Ry().shape({firstname:t.Z_().trim().required(i.I0.required),lastname:t.Z_(),password:t.Z_().min(8,i.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(i.I0.required),email:t.Z_().email(i.I0.email).strict().lowercase(i.I0.lowercase).required(i.I0.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(i.I0.required)}),inputsPrefix:""},"reset-password":{Component:Ye,endPoint:"reset-password",fieldsToDisable:[],fieldsToOmit:["confirmPassword"],schema:t.Ry().shape({password:t.Z_().min(8,i.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(i.I0.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(i.I0.required)})}}},83983:function(D,m,e){"use strict";e.d(m,{Z:function(){return P}});var t=e(86349),i=e.n(t),E={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 C=(()=>window&&window.strapi&&window.strapi.isEE?e(99568).Z:e(26123).Z)();var P=i()(E,C)},39691:function(D,m,e){"use strict";e.r(m),e.d(m,{default:function(){return us}});var t=e(32735),i=e(14911),n=e(12301),E=e(65810),C=e(86349),u=e.n(C),P=e(88423),T=e.n(P),R=e(93839),I=e.n(R),O=e(56784),f=e.n(O),L=e(74758),v=e(78246),y=()=>{const c=[];return{register(s){c.push(s)},delete(s){c.splice(c.indexOf(s),1)},runWaterfall(s,a){return c.reduce((l,g)=>g(l,a),s)},async runWaterfallAsync(s,a){let l=s;for(const g of c)l=await g(l,a);return l},runSeries(...s){return c.map(a=>a(...s))},async runSeriesAsync(...s){const a=[];for(const l of c)a.push(await l(...s));return a},runParallel(...s){return Promise.all(c.map(a=>a(...s)))}}},k=e(6680);const Z=(c,s)=>{let a=k.compose;const l=[];c.forEach(A=>{l.push(A())});const g=(0,k.createStore)(U(s,{}),{},a((0,k.applyMiddleware)(...l)));return g.asyncReducers={},g.injectReducer=(A,S)=>{g.asyncReducers[A]=S,g.replaceReducer(U(s,g.asyncReducers))},g},U=(c,s)=>(0,k.combineReducers)({...c,...s});var te=Z,se=e(20284),M=e(53038),h=e(24989),Q=e(10728),z=e(67879),oe=e(60216),o=e.n(oe);const Re=({component:c,path:s,...a})=>{const{pathname:l,search:g}=(0,M.TH)();return t.createElement(M.AW,{path:s,render:A=>h.I8.getToken()!==null?t.createElement(c,{...a,...A}):t.createElement(M.l_,{to:{pathname:"/auth/login",search:l!=="/"&&`?redirectTo=${encodeURIComponent(`${l}${g}`)}`}})})};Re.propTypes={component:o().any.isRequired,path:o().string.isRequired};var $=(0,t.memo)(Re),pe=e(8997),Ie=e(20011),Ge=e(84306),lt=e(39935),Ve=e.n(lt),et=e(33795),ke=e.n(et),tt=e(9086),Ye=e.n(tt);const Fe="GUIDED_TOUR_CURRENT_STEP",st="GUIDED_TOUR_COMPLETED_STEPS",nt="GUIDED_TOUR_SKIPPED",N=JSON.parse,Ae=JSON.stringify;var X={clear(){localStorage.removeItem(Fe),localStorage.removeItem(st)},addCompletedStep(c){const s=N(localStorage.getItem(st))?.slice()||[];s.includes(c)||(s.push(c),localStorage.setItem(st,Ae(s)))},addCurrentStep(c){localStorage.setItem(Fe,Ae(c))},setSkipped(c){localStorage.setItem(nt,Ae(c))},get(c){return N(localStorage.getItem(c))}},fe=e(20139),He=e(41832),Ue=c=>c,me=e(97889),je=e(3040),Ce=e.n(je);const Oe={formErrors:{},modifiedData:{},requestError:null},ut=(c,s)=>(0,me.ZP)(c,a=>{switch(s.type){case"ON_CHANGE":{Ce()(a.modifiedData,s.keys.split("."),s.value);break}case"RESET_PROPS":return Oe;case"SET_DATA":{a.modifiedData=s.data;break}case"SET_ERRORS":{a.formErrors=s.errors;break}case"SET_REQUEST_ERROR":{a.requestError={errorMessage:s.errorMessage,errorStatus:s.errorStatus};break}default:return a}}),Qe=(()=>window&&window.strapi&&window.strapi.isEE?e(7277).Z:e(78834).Z)(),Je=c=>{let{hasAdmin:s,setHasAdmin:a}=c;const{push:l,location:{search:g}}=(0,M.k6)(),{changeLocale:A}=(0,fe.Z)(),{setSkipped:S}=(0,h.c1)(),{trackUsage:j}=(0,h.rS)(),{params:{authType:W}}=(0,M.$B)("/auth/:authType"),q=(0,h.aM)(),{Component:le,endPoint:K,fieldsToDisable:ue,fieldsToOmit:he,inputsPrefix:de,schema:ye,...Ee}=ke()(Qe,W,{}),[{formErrors:we,modifiedData:Se,requestError:gt},it]=(0,t.useReducer)(ut,Oe,Ue),$e=Ge.default.CancelToken.source();(0,t.useEffect)(()=>()=>{$e.cancel("Component unmounted")},[]);const{post:qe}=(0,h.kY)();(0,t.useEffect)(()=>{it({type:"RESET_PROPS"})},[W]);const ds=ee=>{let{target:{name:Te,value:ge}}=ee;it({type:"ON_CHANGE",keys:Te,value:ge})},cs=async(ee,Te)=>{let{setSubmitting:ge,setErrors:De}=Te;ge(!0);const Be=Ye()(ee,he),Y=`/admin/${K}`;W==="login"&&await gs(ee,Y,{setSubmitting:ge,setErrors:De}),(W==="register"||W==="register-admin")&&await ps(ee,Y,{setSubmitting:ge,setErrors:De}),W==="forgot-password"&&await ms(Be,Y,{setSubmitting:ge,setErrors:De}),W==="reset-password"&&await fs(Be,Y,{setSubmitting:ge,setErrors:De})},ms=async(ee,Te,ge)=>{let{setSubmitting:De,setErrors:Be}=ge;try{await qe(Te,ee,{cancelToken:$e.token}),l("/auth/forgot-password-success")}catch(Y){console.error(Y),Be({errorMessage:"notification.error"})}finally{De(!1)}},gs=async(ee,Te,ge)=>{let{setSubmitting:De,setErrors:Be}=ge;try{const{data:{data:{token:Y,user:ce}}}=await qe(Te,Ye()(ee,he),{cancelToken:$e.token});ce.preferedLanguage&&A(ce.preferedLanguage),h.I8.setToken(Y,ee.rememberMe),h.I8.setUserInfo(ce,ee.rememberMe),Vt()}catch(Y){if(Y.response){const ce=ke()(Y,["response","data","error","message"],"Something went wrong");if(Ve()(ce).toLowerCase()==="usernotactive"){l("/auth/oops"),it({type:"RESET_PROPS"});return}Be({errorMessage:ce})}}finally{De(!1)}},ps=async(ee,Te,ge)=>{let{setSubmitting:De,setErrors:Be}=ge;try{j("willCreateFirstAdmin");const{data:{data:{token:Y,user:ce}}}=await qe(Te,Ye()(ee,he),{cancelToken:$e.token});h.I8.setToken(Y,!1),h.I8.setUserInfo(ce,!1),De(!1),a(!0);const{roles:rt}=ce;if(rt&&rt.find(hs=>{let{code:Es}=hs;return Es==="strapi-super-admin"})&&(X.setSkipped(!1),S(!1),j("didLaunchGuidedtour")),W==="register"&&ee.userInfo.news===!0||W==="register-admin"&&ee.news===!0){l({pathname:"/usecase",search:`?hasAdmin=${s}`});return}Vt()}catch(Y){if(j("didNotCreateFirstAdmin"),Y.response){const{data:ce}=Y.response,rt=(0,He.Z)(ce);Be({apiErrors:rt})}}},fs=async(ee,Te,ge)=>{let{setErrors:De,setSubmitting:Be}=ge;try{const{data:{data:{token:Y,user:ce}}}=await qe(Te,{...ee,resetPasswordToken:q.get("code")},{cancelToken:$e.token});h.I8.setToken(Y,!1),h.I8.setUserInfo(ce,!1),l("/")}catch(Y){if(Y.response){const ce=ke()(Y,["response","data","message"],"Something went wrong"),rt=ke()(Y,["response","data","statusCode"],400);it({type:"SET_REQUEST_ERROR",errorMessage:ce,errorStatus:rt}),De({errorMessage:ce})}}finally{Be(!1)}},Vt=()=>{if(W==="login"){const ee=q.get("redirectTo"),Te=ee?decodeURIComponent(ee):"/";l(Te)}else l("/")};return!Qe[W]||s&&W==="register-admin"||h.I8.getToken()?t.createElement(M.l_,{to:"/"}):!s&&W!=="register-admin"?t.createElement(M.l_,{to:{pathname:"/auth/register-admin",search:g}}):t.createElement(le,(0,Ie.Z)({},Ee,{authType:W,fieldsToDisable:ue,formErrors:we,inputsPrefix:de,modifiedData:Se,onChange:ds,onSubmit:cs,requestError:gt,schema:ye}))};Je.defaultProps={hasAdmin:!1},Je.propTypes={hasAdmin:o().bool,setHasAdmin:o().func.isRequired};var pt=Je,F=e(53951),dt=e(8471),ct=e(33348),ft=e(49372),Ze=e(27649),Xe=e(87933),re=e(72850),H=e(68465),_=e(84967),ve=e(10369),Pe=e(41415),ht=e(7563),Rt=e(10190),_e=e(954);const At=[{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"}],Ct=(0,dt.ZP)(ft.Z)`
|
|
12
|
-
text-align: center;
|
|
13
|
-
`;var Mt=()=>{const c=(0,h.lm)(),{push:s,location:a}=(0,M.k6)(),{formatMessage:l}=(0,z.Z)(),[g,A]=(0,t.useState)(),[S,j]=(0,t.useState)(""),{post:W}=(0,h.kY)(),{firstname:q,email:le}=h.I8.getUserInfo(),{hasAdmin:K}=(0,ct.parse)(a?.search,{ignoreQueryPrefix:!0}),ue=g==="other",he=async(de,ye)=>{de.preventDefault();try{await W("https://analytics.strapi.io/register",{email:le,username:q,firstAdmin:Boolean(!K),persona:{role:ye?void 0:g,otherRole:ye?void 0:S}}),c({type:"success",message:{id:"Usecase.notification.success.project-created",defaultMessage:"Project has been successfully created"}}),s("/")}catch{}};return t.createElement(_e.ZP,null,t.createElement(Ze.o,{labelledBy:"usecase-title"},t.createElement(_e.bU,null,t.createElement("form",{onSubmit:de=>he(de,!1)},t.createElement(Xe.k,{direction:"column",paddingBottom:7},t.createElement(Rt.Z,null),t.createElement(re.x,{paddingTop:6,paddingBottom:1,width:(0,h.Q1)(250)},t.createElement(Ct,{variant:"alpha",as:"h1",id:"usecase-title"},l({id:"Usecase.title",defaultMessage:"Tell us a bit more about yourself"})))),t.createElement(Xe.k,{direction:"column",alignItems:"stretch",gap:6},t.createElement(H.P,{id:"usecase","data-testid":"usecase",label:l({id:"Usecase.input.work-type",defaultMessage:"What type of work do you do?"}),onChange:A,value:g},At.map(({intlLabel:de,value:ye})=>t.createElement(_.W,{key:ye,value:ye},l(de)))),ue&&t.createElement(ve.o,{name:"other",label:l({id:"Usecase.other",defaultMessage:"Other"}),value:S,onChange:de=>j(de.target.value),"data-testid":"other"}),t.createElement(Pe.z,{type:"submit",size:"L",fullWidth:!0,disabled:!g},l({id:"global.finish",defaultMessage:"Finish"}))))),t.createElement(Xe.k,{justifyContent:"center"},t.createElement(re.x,{paddingTop:4},t.createElement(ht.A,{onClick:()=>he(!0)},l({id:"Usecase.button.skip",defaultMessage:"Skip this question"}))))))},kt=e(73307),jt=async()=>`web-fingerprint-${(await(await kt.ZP.load()).get()).visitorId}`,xt=[],St=[...(()=>window&&window.strapi&&window.strapi.isEE?e(68944).Z:e(56761).Z)(),...xt],Dt=e(32308);const Wt=(0,t.lazy)(()=>Promise.all([e.e(3081),e.e(801)]).then(e.bind(e,29761)));function Nt(){const c=(0,h.lm)(),{updateProjectSettings:s}=(0,Dt.um)(),{formatMessage:a}=(0,z.Z)(),[{isLoading:l,hasAdmin:g,uuid:A,deviceId:S},j]=(0,t.useState)({isLoading:!0,hasAdmin:!1}),W=(0,h.L7)(),{get:q,post:le}=(0,h.kY)(),K=(0,t.useMemo)(()=>(0,pe.WW)(St.map(({to:Ee,Component:we,exact:Se})=>(0,pe.ot)(we,Ee,Se))),[]),[ue,he]=(0,t.useState)(null);(0,t.useEffect)(()=>{const Ee=h.I8.getToken();Ee&&(async()=>{try{const{data:{data:{token:Se}}}=await le("/admin/renew-token",{token:Ee});h.I8.updateToken(Se)}catch{h.I8.clearAppStorage(),window.location.reload()}})()},[le]),(0,t.useEffect)(()=>{(async()=>{try{const{data:{data:{hasAdmin:we,uuid:Se,menuLogo:gt,authLogo:it}}}=await q("/admin/init");s({menuLogo:(0,h.CR)(gt),authLogo:(0,h.CR)(it)});const wt=await jt();if(Se){const{data:{data:$e}}=await q("/admin/telemetry-properties",{validateStatus:qe=>qe<500});he($e);try{await le("https://analytics.strapi.io/api/v2/track",{event:"didInitializeAdministration",userId:"",deviceId:wt,eventPropeties:{},userProperties:{environment:W.currentEnvironment},groupProperties:{...$e,projectId:Se}})}catch{}}j({isLoading:!1,hasAdmin:we,uuid:Se,deviceId:wt})}catch{c({type:"warning",message:{id:"app.containers.App.notification.error.init"}})}})()},[c,s]);const de=Ee=>j(we=>({...we,hasAdmin:Ee})),ye=(0,t.useMemo)(()=>({uuid:A,telemetryProperties:ue,deviceId:S}),[A,ue,S]);return l?t.createElement(h.dO,null):t.createElement(t.Suspense,{fallback:t.createElement(h.dO,null)},t.createElement(Q.z,null,a({id:"skipToContent"})),t.createElement(h.L8,{value:ye},t.createElement(M.rs,null,K,t.createElement(M.AW,{path:"/auth/:authType",render:Ee=>t.createElement(pt,{...Ee,setHasAdmin:de,hasAdmin:g}),exact:!0}),t.createElement($,{path:"/usecase",component:Mt}),t.createElement($,{path:"/",component:Wt}),t.createElement(M.AW,{path:"",component:F.default}))))}var It=Nt,Ot=e(47750),Et=e(20108),p=e(15062),d=e(66694);const r={menuLogo:null,authLogo:null};var x=(c=r,s)=>(0,me.ZP)(c,a=>{switch(s.type){case"UPDATE_PROJECT_SETTINGS":{Object.assign(a,s.values);break}default:return a}});const B=({children:c,authLogo:s,menuLogo:a,showReleaseNotification:l,showTutorials:g})=>{const[{menuLogo:A,authLogo:S},j]=(0,t.useReducer)(x,r),W=(0,t.useCallback)(({menuLogo:le,authLogo:K})=>j({type:"UPDATE_PROJECT_SETTINGS",values:{menuLogo:le||a,authLogo:K||s}}),[s,a]),q=(0,t.useMemo)(()=>({logos:{menu:{custom:A,default:a},auth:{custom:S,default:s}},updateProjectSettings:W,showReleaseNotification:l,showTutorials:g}),[A,a,S,s,W,l,g]);return t.createElement(d._5.Provider,{value:q},c)};B.propTypes={authLogo:o().string.isRequired,children:o().element.isRequired,menuLogo:o().string.isRequired,showReleaseNotification:o().bool.isRequired,showTutorials:o().bool.isRequired};var V=B,G=e(78023),ae=e(58732),Le=e.n(ae),J=e(5985);const be=({changeLocale:c,children:s,localeNames:a})=>t.createElement(J.Z.Provider,{value:{changeLocale:c,localeNames:a}},s);be.propTypes={changeLocale:o().func.isRequired,children:o().element.isRequired,localeNames:o().object.isRequired};var We=be,ze="strapi-admin-language",Pt=c=>{const s=window.localStorage.getItem(ze);return{locale:c[s]?s:"en",localeNames:c}};const ot={localeNames:{en:"English"},locale:"en"};var mt=(c=ot,s)=>{switch(s.type){case"CHANGE_LOCALE":{const{locale:a}=s;return c.localeNames[a]?{...c,locale:a}:c}default:return c}};const Ne=({children:c,localeNames:s,messages:a})=>{const[{locale:l},g]=(0,t.useReducer)(mt,ot,()=>Pt(s));(0,t.useEffect)(()=>{window.localStorage.setItem(ze,l),document.documentElement.setAttribute("lang",l)},[l]);const A=j=>{g({type:"CHANGE_LOCALE",locale:j})},S=Le()(a[l],a.en);return t.createElement(G.Z,{locale:l,defaultLocale:"en",messages:S,textComponent:"span"},t.createElement(We,{changeLocale:A,localeNames:s},c))};Ne.propTypes={children:o().element.isRequired,localeNames:o().objectOf(o().string).isRequired,messages:o().object.isRequired};var Me=Ne,xe=(c,s)=>{const a=Object.entries(s),l=a.findIndex(([A])=>A===c);return a.slice(0,l).every(([,A])=>Object.values(A).every(Boolean))},Yt=(c,s)=>{const a=c.split("."),l=a[1],g=Object.entries(s[a[0]]),A=g.findIndex(([j])=>j===l);return g.slice(0,A).every(([,j])=>j)};const Gt={currentStep:null,guidedTourState:{contentTypeBuilder:{create:!1,success:!1},contentManager:{create:!1,success:!1},apiTokens:{create:!1,success:!1}},isGuidedTourVisible:!1,isSkipped:!0};var Qt=(c=Gt,s)=>(0,me.ZP)(c,a=>{switch(s.type){case"SET_CURRENT_STEP":{a.currentStep=s.step;break}case"SET_STEP_STATE":{const[l,g]=s.currentStep.split(".");a.guidedTourState[l][g]=s.value;break}case"SET_SKIPPED":{a.isSkipped=s.value;break}case"SET_GUIDED_TOUR_VISIBILITY":{a.isGuidedTourVisible=s.value;break}default:return a}}),Jt=c=>{const s={...c},a=X.get(st),l=X.get(Fe),g=X.get(nt);if(a&&a.forEach(A=>{const[S,j]=A.split(".");Ce()(s,["guidedTourState",S,j],!0)}),l){const[A,S]=l.split(".");Ce()(s,["guidedTourState",A,S],!0),X.addCompletedStep(l),X.addCurrentStep(null)}return g!==null&&Ce()(s,"isSkipped",g),s};const Ft=({children:c})=>{const[{currentStep:s,guidedTourState:a,isGuidedTourVisible:l,isSkipped:g},A]=(0,t.useReducer)(Qt,Gt,Jt),S=K=>{if(K!==null){const ue=ke()(a,K),he=Yt(K,a);if(ue||g||!he)return null}return X.addCurrentStep(K),A({type:"SET_CURRENT_STEP",step:K})},j=K=>{A({type:"SET_GUIDED_TOUR_VISIBILITY",value:K})},W=(K,ue)=>{X.addCompletedStep(K),A({type:"SET_STEP_STATE",currentStep:K,value:ue})},q=K=>{const ue=a[K];if(ue){const he=xe(K,a),de=Object.keys(ue)[0],ye=ue[de];if(he&&!s&&!ye)return S(`${K}.${de}`)}return null},le=K=>{X.setSkipped(K),A({type:"SET_SKIPPED",value:K})};return t.createElement(h.Zc,{guidedTourState:a,currentStep:s,setCurrentStep:S,setGuidedTourVisibility:j,setSkipped:le,setStepState:W,startSection:q,isGuidedTourVisible:l,isSkipped:g},c)};Ft.propTypes={children:o().element.isRequired};var Xt=Ft;const bt="STRAPI_THEME",_t=()=>{const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",s=localStorage.getItem(bt);return s||localStorage.setItem(bt,c),s||c},Ht=({children:c,themes:s})=>{const[a,l]=(0,t.useState)(_t()),g=(0,t.useCallback)(S=>{l(S),localStorage.setItem(bt,S)},[l]),A=(0,t.useMemo)(()=>({currentTheme:a,onChangeTheme:g,themes:s}),[a,g,s]);return t.createElement(d.Rj.Provider,{value:A},c)};Ht.propTypes={children:o().node.isRequired,themes:o().shape({light:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,dark:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,custom:o().object}).isRequired};var qt=Ht,es=e(86861),ts=dt.vJ`
|
|
14
|
-
body {
|
|
15
|
-
background: ${({theme:c})=>c.colors.neutral100};
|
|
16
|
-
}
|
|
17
|
-
`;const zt=({children:c})=>{const{currentTheme:s,themes:a}=(0,Dt.M1)();return t.createElement(es.f,{theme:a[s]||a.light},c,t.createElement(ts,null))};zt.propTypes={children:o().element.isRequired};var ss=zt;const ns=new Et.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),$t=({authLogo:c,children:s,components:a,customFields:l,fields:g,getAdminInjectedComponents:A,getPlugin:S,localeNames:j,menu:W,menuLogo:q,messages:le,plugins:K,runHookParallel:ue,runHookSeries:he,runHookWaterfall:de,settings:ye,showReleaseNotification:Ee,showTutorials:we,store:Se,themes:gt})=>t.createElement(qt,{themes:gt},t.createElement(ss,null,t.createElement(Et.QueryClientProvider,{client:ns},t.createElement(p.zt,{store:Se},t.createElement(d.ux.Provider,{value:{getAdminInjectedComponents:A}},t.createElement(V,{authLogo:c,menuLogo:q,showReleaseNotification:Ee,showTutorials:we},t.createElement(h._Y,{getPlugin:S,menu:W,plugins:K,runHookParallel:ue,runHookWaterfall:de,runHookSeries:he,settings:ye},t.createElement(h.rt,{components:a,fields:g},t.createElement(h.MG,{customFields:l},t.createElement(Me,{messages:le,localeNames:j},t.createElement(h.m$,null,t.createElement(h.w7,null,t.createElement(Xt,null,t.createElement(h.N$,null,s))))))))))))));$t.propTypes={authLogo:o().oneOfType([o().string,o().any]).isRequired,children:o().element.isRequired,components:o().object.isRequired,customFields:o().object.isRequired,fields:o().object.isRequired,getAdminInjectedComponents:o().func.isRequired,getPlugin:o().func.isRequired,localeNames:o().objectOf(o().string).isRequired,menu:o().arrayOf(o().shape({to:o().string.isRequired,icon:o().func.isRequired,intlLabel:o().shape({id:o().string.isRequired,defaultMessage:o().string.isRequired}).isRequired,permissions:o().array,Component:o().func})).isRequired,menuLogo:o().oneOfType([o().string,o().any]).isRequired,messages:o().object.isRequired,plugins:o().object.isRequired,runHookParallel:o().func.isRequired,runHookWaterfall:o().func.isRequired,runHookSeries:o().func.isRequired,settings:o().object.isRequired,showReleaseNotification:o().bool.isRequired,showTutorials:o().bool.isRequired,store:o().object.isRequired,themes:o().shape({light:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,dark:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,custom:o().object}).isRequired};var as=$t,os={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"},Tt=e(46339),is={admin:{tutorials:{links:[]}},contentManager:{editView:{informations:[],"right-links":[]},listView:{actions:[],deleteModalAdditionalInfos:[]}}},rs="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 ls{constructor({adminConfig:s,appPlugins:a,library:l,middlewares:g,reducers:A}){this.customConfigurations=s.config,this.customBootstrapConfiguration=s.bootstrap,this.configurations={authLogo:Ot,head:{favicon:rs},locales:["en"],menuLogo:Ot,notifications:{releases:!0},themes:{light:n.W,dark:E.$},translations:{},tutorials:!0},this.appPlugins=a||{},this.library=l,this.middlewares=g,this.plugins={},this.reducers=A,this.translations={},this.hooksDict={},this.admin={injectionZones:is},this.customFields=se.rh,this.menu=[],this.settings={global:{id:"global",intlLabel:{id:"Settings.global",defaultMessage:"Global Settings"},links:[]}}}addComponents=s=>{Array.isArray(s)?s.map(a=>this.library.components.add(a)):this.library.components.add(s)};addCorePluginMenuLink=s=>{const a=JSON.stringify(s);f()(s.to,`link.to should be defined for ${a}`),f()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),f()(["/plugins/content-type-builder","/plugins/upload"].includes(s.to),"This method is not available for your plugin"),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${a}`),this.menu.push(s)};addFields=s=>{Array.isArray(s)?s.map(a=>this.library.fields.add(a)):this.library.fields.add(s)};addMenuLink=s=>{const a=JSON.stringify(s);f()(s.to,`link.to should be defined for ${a}`),f()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${a}`),f()(s.Component&&typeof s.Component=="function","link.Component should be a valid React Component"),f()(s.icon&&typeof s.icon=="function","link.Icon should be a valid React Component"),this.menu.push(s)};addMiddlewares=s=>{s.forEach(a=>{this.middlewares.add(a)})};addReducers=s=>{Object.keys(s).forEach(a=>{this.reducers.add(a,s[a])})};addSettingsLink=(s,a)=>{f()(this.settings[s],"The section does not exist");const l=JSON.stringify(a);f()(a.id,`link.id should be defined for ${l}`),f()(a.intlLabel?.id&&a.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${l}`),f()(a.to,`link.to should be defined for ${l}`),f()(a.Component&&typeof a.Component=="function","link.Component should be a valid React Component"),this.settings[s].links.push(a)};addSettingsLinks=(s,a)=>{f()(this.settings[s],"The section does not exist"),f()(Array.isArray(a),"TypeError expected links to be an array"),a.forEach(l=>{this.addSettingsLink(s,l)})};async bootstrap(){Object.keys(this.appPlugins).forEach(s=>{const a=this.appPlugins[s].bootstrap;a&&a({addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}),I()(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(Tt.No),this.createHook(Tt.LK),this.createHook(Tt.dV),this.createHook(Tt.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,a=this.customConfigurations.theme.light;!s&&!a&&(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."),u()(this.configurations.themes.light,this.customConfigurations.theme)),a&&u()(this.configurations.themes.light,a),s&&u()(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]=y()};createSettingSection=(s,a)=>{f()(s.id,"section.id should be defined"),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,"section.intlLabel should be defined"),f()(Array.isArray(a),"TypeError expected links to be an array"),f()(this.settings[s.id]===void 0,"A similar section already exists"),this.settings[s.id]={...s,links:[]},a.forEach(l=>{this.addSettingsLink(s.id,l)})};createStore=()=>te(this.middlewares.middlewares,this.reducers.reducers);getAdminInjectedComponents=(s,a,l)=>{try{return this.admin.injectionZones[s][a][l]||[]}catch(g){return console.error("Cannot get injected component",g),g}};getPlugin=s=>this.plugins[s];async initialize(){Object.keys(this.appPlugins).forEach(s=>{this.appPlugins[s].register(this)})}injectContentManagerComponent=(s,a,l)=>{f()(this.admin.injectionZones.contentManager[s]?.[a],`The ${s} ${a} zone is not defined in the content manager`),f()(l,"A Component must be provided"),this.admin.injectionZones.contentManager[s][a].push(l)};injectAdminComponent=(s,a,l)=>{f()(this.admin.injectionZones.admin[s]?.[a],`The ${s} ${a} zone is not defined in the admin`),f()(l,"A Component must be provided"),this.admin.injectionZones.admin[s][a].push(l)};async loadAdminTrads(){const s=this.configurations.locales.map(g=>e(48224)(`./${g}.json`).then(({default:A})=>({data:A,locale:g})).catch(()=>({data:null,locale:g})));return(await Promise.all(s)).reduce((g,A)=>(A.data&&(g[A.locale]=A.data),g),{})}async loadTrads(){const s=await this.loadAdminTrads(),a=Object.keys(this.appPlugins).map(S=>{const j=this.appPlugins[S].registerTrads;return j?j({locales:this.configurations.locales}):null}).filter(S=>S),g=(await Promise.all(a)).reduce((S,j)=>{const W=j.reduce((q,le)=>(q[le.locale]=le.data,q),{});return Object.keys(W).forEach(q=>{S[q]={...S[q],...W[q]}}),S},{}),A=this.configurations.locales.reduce((S,j)=>(S[j]={...s[j],...g[j]||{},...this.customConfigurations?.translations?.[j]},S),{});return this.configurations.translations=A,Promise.resolve()}registerHook=(s,a)=>{f()(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(a)};registerPlugin=s=>{const a=(0,se.Sy)(s);this.plugins[a.pluginId]=a};runHookSeries=(s,a=!1)=>a?this.hooksDict[s].runSeriesAsync():this.hooksDict[s].runSeries();runHookWaterfall=(s,a,l=!1,g)=>l?this.hooksDict[s].runWaterfallAsync(a,g):this.hooksDict[s].runWaterfall(a,g);runHookParallel=s=>this.hooksDict[s].runParallel();render(){const s=this.createStore(),a=T()(os,this.configurations.locales||[]),{components:{components:l},fields:{fields:g}}=this.library;return t.createElement(as,{authLogo:this.configurations.authLogo,components:l,fields:g,customFields:this.customFields,localeNames:a,getAdminInjectedComponents:this.getAdminInjectedComponents,getPlugin:this.getPlugin,messages:this.configurations.translations,menu:this.menu,menuLogo:this.configurations.menuLogo,plugins:this.plugins,runHookParallel:this.runHookParallel,runHookWaterfall:(A,S,j=!1)=>this.runHookWaterfall(A,S,j,s),runHookSeries:this.runHookSeries,themes:this.configurations.themes,settings:this.settings,showTutorials:this.configurations.tutorials,showReleaseNotification:this.configurations.notifications.releases,store:s},t.createElement(t.Fragment,null,t.createElement(L.q,{link:[{rel:"icon",type:"image/png",href:this.configurations.head.favicon}],htmlAttributes:{lang:localStorage.getItem(ze)||"en"}}),t.createElement(i.VK,{basename:v.Z},t.createElement(It,{store:s}))))}}var us=({adminConfig:c={},appPlugins:s,library:a,middlewares:l,reducers:g})=>new ls({adminConfig:c,appPlugins:s,library:a,middlewares:l,reducers:g})},5985:function(D,m,e){"use strict";var t=e(32735);const i=(0,t.createContext)();m.Z=i},20139:function(D,m,e){"use strict";var t=e(32735),i=e(5985);const n=()=>{const{changeLocale:E,localeNames:C,messages:u}=(0,t.useContext)(i.Z);return{changeLocale:E,localeNames:C,messages:u}};m.Z=n},10190:function(D,m,e){"use strict";var t=e(32735),i=e(8471),n=e(32308);const E=i.ZP.img`
|
|
18
|
-
height: ${72/16}rem;
|
|
19
|
-
`,C=()=>{const{logos:{auth:u}}=(0,n.um)();return t.createElement(E,{src:u?.custom??u.default,"aria-hidden":!0,alt:""})};m.Z=C},66694:function(D,m,e){"use strict";e.d(m,{ux:function(){return n},_5:function(){return C},$l:function(){return P},Rj:function(){return R}});var t=e(32735),n=(0,t.createContext)({}),C=(0,t.createContext)({}),P=(0,t.createContext)({}),R=(0,t.createContext)({})},78246:function(D,m){"use strict";const e="/admin/".replace(window.location.origin,"");m.Z=e},46339:function(D,m,e){"use strict";e.d(m,{Eo:function(){return n},LK:function(){return i},No:function(){return t},dV:function(){return E}});const t="Admin/CM/pages/ListView/inject-column-in-table",i="Admin/CM/pages/App/mutate-collection-types-links",n="Admin/CM/pages/EditView/mutate-edit-view-layout",E="Admin/CM/pages/App/mutate-single-types-links"},32308:function(D,m,e){"use strict";e.d(m,{um:function(){return E},U_:function(){return f},Dq:function(){return k},H9:function(){return Ve},$_:function(){return Bt},rW:function(){return Et},bF:function(){return Ae},G4:function(){return Zt},Te:function(){return Pe},M1:function(){return It}});var t=e(32735),i=e(66694),E=()=>(0,t.useContext)(i._5),C=e(70166),u=e(24989),P=e(97889);const T={data:{},error:null,isLoading:!0};var I=(p,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"GET_DATA":{r.isLoading=!0,r.data={},r.error=null;break}case"GET_DATA_SUCCEEDED":{r.data=d.data,r.isLoading=!1,r.error=null;break}case"GET_DATA_ERROR":{r.isLoading=!1,r.error=d.error;break}default:return r}}),f=p=>{const[{data:d,error:r,isLoading:w},x]=(0,t.useReducer)(I,T),{get:B}=(0,u.kY)();return(0,t.useEffect)(()=>{(async()=>{try{x({type:"GET_DATA"});const{data:{data:G}}=await B("/admin/permissions",{params:{role:p}});x({type:"GET_DATA_SUCCEEDED",data:G})}catch{}})()},[p,B]),{data:d,error:r,isLoading:w}};const L={role:{},permissions:{},isLoading:!0};var b=(p,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"GET_DATA_SUCCEEDED":{r.role=d.role,r.permissions=d.permissions,r.isLoading=!1;break}case"GET_DATA_ERROR":{r.isLoading=!1;break}case"ON_SUBMIT_SUCCEEDED":{r.role.name=d.name,r.role.description=d.description;break}default:return r}}),k=p=>{const d=(0,u.lm)(),[r,w]=(0,t.useReducer)(b,L),{get:x}=(0,u.kY)();(0,t.useEffect)(()=>{p?(async G=>{try{const[{data:{data:ae}},{data:{data:Le}}]=await Promise.all([`roles/${G}`,`roles/${G}/permissions`].map(J=>x(`/admin/${J}`)));w({type:"GET_DATA_SUCCEEDED",role:ae,permissions:Le})}catch(ae){console.error(ae),w({type:"GET_DATA_ERROR"}),d({type:"warning",message:{id:"notification.error"}})}})(p):w({type:"GET_DATA_SUCCEEDED",role:{},permissions:[]})},[x,p,d]);const B=(0,t.useCallback)(V=>{w({type:"ON_SUBMIT_SUCCEEDED",...V})},[]);return{...r,onSubmitSucceeded:B}},U=(p,d)=>d.map(({permissions:r})=>(0,u.qX)(p,r)),se=async(p,d)=>{const r=U(p,d),w=await Promise.all(r);return d.filter((B,V)=>w[V])},M=e(99381),h=e.n(M),z=async(p,d,r)=>{const w=U(p,d),x=await Promise.all(w),B=d.filter((ae,Le)=>x[Le]),V=B.findIndex(ae=>ae.to==="/settings");if(V===-1)return[];const G=h()(B);return G[V].notificationsCount=r?1:0,G},oe=e(2287),o=e(36919),Re=e(45112),$=e(83983);const pe={generalSectionLinks:[{icon:oe.Z,intlLabel:{id:"global.plugins",defaultMessage:"Plugins"},to:"/list-plugins",permissions:$.Z.marketplace.main},{icon:o.Z,intlLabel:{id:"global.marketplace",defaultMessage:"Marketplace"},to:"/marketplace",permissions:$.Z.marketplace.main},{icon:Re.Z,intlLabel:{id:"global.settings",defaultMessage:"Settings"},to:"/settings",permissions:[],notificationsCount:0}],pluginsSectionLinks:[],isLoading:!0};var Ge=(p=pe,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"SET_SECTION_LINKS":{const{authorizedGeneralSectionLinks:w,authorizedPluginSectionLinks:x}=d.data;r.generalSectionLinks=w,r.pluginsSectionLinks=x;break}case"UNSET_IS_LOADING":{r.isLoading=!1;break}default:return r}}),Ve=()=>{const[p,d]=(0,t.useReducer)(Ge,pe),{allPermissions:r}=(0,u.vn)(),{shouldUpdateStrapi:w}=(0,u.L7)(),{menu:x}=(0,u.j1)(),B=(0,t.useRef)(p.generalSectionLinks),V=(0,t.useRef)(w),G=async(Le=r)=>{const be=await se(Le,x),We=await z(Le,B.current,V.current);d({type:"SET_SECTION_LINKS",data:{authorizedGeneralSectionLinks:We,authorizedPluginSectionLinks:be}}),d({type:"UNSET_IS_LOADING"})},ae=(0,t.useRef)(G);return(0,t.useEffect)(()=>{ae.current(r)},[r,d]),p},et=e(33795),ke=e.n(et),Ye=(p,d)=>({...p,isLoading:d});const Fe={roles:[],isLoading:!0};var nt=(p,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"GET_DATA":{r.isLoading=!0,r.roles=[];break}case"GET_DATA_SUCCEEDED":{r.roles=d.data,r.isLoading=!1;break}case"GET_DATA_ERROR":{r.isLoading=!1;break}default:return r}}),Ae=(p=!0)=>{const d=(0,u.lm)(),[{roles:r,isLoading:w},x]=(0,t.useReducer)(nt,Fe,()=>Ye(Fe,p));(0,t.useEffect)(()=>{p&&B()},[p]);const B=(0,t.useCallback)(async()=>{const V=(0,u.tg)();try{x({type:"GET_DATA"});const{data:{data:G}}=await V.get("/admin/roles");x({type:"GET_DATA_SUCCEEDED",data:G})}catch(G){const ae=ke()(G,["response","payload","message"],"An error occured");x({type:"GET_DATA_ERROR"}),ae!=="Forbidden"&&d({type:"warning",message:ae})}},[d]);return{roles:r,isLoading:w,getData:B}},ne=e(3040),X=e.n(ne);const fe={menu:[],isLoading:!0};var ie=(p,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"CHECK_PERMISSIONS_SUCCEEDED":{d.data.forEach(w=>{w.hasPermission&&X()(r,["menu",...w.path.split("."),"isDisplayed"],w.hasPermission)}),r.menu.forEach((w,x)=>{r.menu[x].links=w.links.filter(B=>B.isDisplayed===!0)}),r.isLoading=!1;break}default:return r}}),Ue=e(9086),me=e.n(Ue),je=e(98978),Ce=e.n(je),ut=p=>Ce()(p,d=>d.id),Je=p=>p.map(d=>{const r=d.links.map(w=>({...w,isDisplayed:!1}));return{...d,links:r}}),F=[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},to:"/settings/roles",id:"roles",isDisplayed:!1,permissions:$.Z.settings.roles.main},{intlLabel:{id:"global.users"},to:"/settings/users?pageSize=10&page=1&sort=firstname",id:"users",isDisplayed:!1,permissions:$.Z.settings.users.main}],ct=[...(()=>window&&window.strapi&&window.strapi.isEE?e(66334).Z:e(47950).Z)(),...F],Ze=[{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:$.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:$.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:$.Z.settings["transfer-tokens"].main}];const Xe=(()=>window&&window.strapi&&window.strapi.isEE?e(11545).Z:e(73086).Z)();var re=[...Ze,...Xe],_=(p,{settings:d,shouldUpdateStrapi:r})=>{const w=d.global.links,x=ut([...w,...re]).map(G=>({...G,hasNotification:G.id==="000-application-infos"&&r})),B=Object.values(me()(d,"global")),V=[{...d.global,links:x},{id:"permissions",intlLabel:{id:"Settings.permissions",defaultMessage:"Administration Panel"},links:ct},...B];return{...p,menu:Je(V)}},Pe=(p=!1)=>{const{allPermissions:d}=(0,u.vn)(),{shouldUpdateStrapi:r}=(0,u.L7)(),{settings:w}=(0,u.j1)(),[{isLoading:x,menu:B},V]=(0,t.useReducer)(ie,fe,()=>_(fe,{settings:w,shouldUpdateStrapi:r}));return(0,t.useEffect)(()=>{p||(async()=>{const ae=async(We,at)=>({hasPermission:await(0,u.qX)(d,We),path:at}),J=(We=>We.reduce((at,ze,vt)=>{const Pt=ot=>ot.map((Kt,mt)=>ae(ot[mt].permissions,`${vt}.links.${mt}`));return[...at,...Pt(ze.links)]},[]))(B),be=await Promise.all(J);V({type:"CHECK_PERMISSIONS_SUCCEEDED",data:be})})()},[d,p]),{isLoading:x,menu:B}},ht=e(8997),Rt=e(88423),_e=e.n(Rt),At=e(56236),Ct=e.n(At);const Lt={fieldsToPick:[],formErrors:{},initialData:{},isLoading:!0,modifiedData:{},showHeaderButtonLoader:!1,showHeaderLoader:!0},Mt=(p,d)=>(0,P.ZP)(p,r=>{switch(d.type){case"GET_DATA_SUCCEEDED":{r.isLoading=!1,r.showHeaderLoader=!1,r.initialData=_e()(d.data,p.fieldsToPick),r.modifiedData=_e()(d.data,p.fieldsToPick);break}case"ON_CANCEL":{r.modifiedData=p.initialData,r.formErrors={};break}case"ON_CHANGE":{d.inputType==="password"&&!d.value?Ct()(r.modifiedData,d.keys.split(".")):d.keys.includes("username")&&!d.value?X()(r.modifiedData,d.keys.split("."),null):X()(r.modifiedData,d.keys.split("."),d.value);break}case"ON_SUBMIT":{r.showHeaderButtonLoader=!0;break}case"ON_SUBMIT_SUCCEEDED":{r.initialData=_e()(d.data,p.fieldsToPick),r.modifiedData=_e()(d.data,p.fieldsToPick),r.showHeaderButtonLoader=!1;break}case"SET_ERRORS":{r.formErrors=d.errors,r.showHeaderButtonLoader=!1;break}default:return r}});var Ut=(p,d)=>({...p,fieldsToPick:d}),Zt=(p,d,r,w)=>{const[{formErrors:x,initialData:B,isLoading:V,modifiedData:G,showHeaderButtonLoader:ae,showHeaderLoader:Le},J]=(0,t.useReducer)(Mt,Lt,()=>Ut(Lt,w)),be=(0,u.lm)(),{lockApp:We,unlockApp:at}=(0,u.o1)(),{get:ze,put:vt}=(0,u.kY)();return(0,t.useEffect)(()=>{p&&(async()=>{try{const{data:{data:Me}}=await ze(p);J({type:"GET_DATA_SUCCEEDED",data:Me,fieldsToPick:w})}catch(Me){console.error(Me.response),be({type:"warning",message:{id:"notification.error"}})}})()},[p]),[{formErrors:x,initialData:B,isLoading:V,modifiedData:G,showHeaderButtonLoader:ae,showHeaderLoader:Le},J,{handleCancel:()=>{J({type:"ON_CANCEL"})},handleChange:({target:{name:Ne,value:Me,type:Ke}})=>{J({type:"ON_CHANGE",inputType:Ke,keys:Ne,value:Me})},handleSubmit:async Ne=>{Ne.preventDefault();const Me=await(0,ht.R6)(G,d);if(J({type:"SET_ERRORS",errors:Me||{}}),!Me)try{We(),J({type:"ON_SUBMIT"});const Ke=me()(G,["confirmPassword","registrationToken"]);Ke.roles&&(Ke.roles=Ke.roles.map(yt=>yt.id));const{data:{data:xe}}=await vt(p,Ke);r(xe),J({type:"ON_SUBMIT_SUCCEEDED",data:xe}),be({type:"success",message:{id:"notification.success.saved"}})}catch(Ke){const xe=Ke?.response?.payload??{data:{}};xe?.data&&typeof xe.data=="string"?be({type:"warning",message:xe.data}):be({type:"warning",message:xe.message});const yt=(0,ht.Iz)(xe);J({type:"SET_ERRORS",errors:yt})}finally{at()}},setField:(Ne,Me)=>{J({type:"ON_CHANGE",keys:Ne,value:Me})}}]},Bt=()=>(0,t.useContext)(i.$l);const St=!JSON.parse(localStorage.getItem("STRAPI_UPDATE_NOTIF")),Dt=()=>{const{latestStrapiReleaseTag:p,shouldUpdateStrapi:d}=useAppInfo(),r=useNotification();return useEffect(()=>{d&&St&&r({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,r]),null};var Wt=null,It=()=>(0,t.useContext)(i.Rj),Et=(p,d,r,w)=>{const[x,B]=(0,t.useState)(!1),V=(0,u.lm)(),{post:G}=(0,u.kY)(),{formatAPIError:ae}=(0,u.So)();return{regenerateData:async()=>{try{const{data:{data:{accessKey:J}}}=await G(`${p}${d}/regenerate`);B(!1),r(J)}catch(J){B(!1),w?w(J):V({type:"warning",message:ae(J)})}},isLoadingConfirmation:x}}},70166:function(D,m,e){"use strict";e.d(m,{G:function(){return n}});var t=e(24989),i=e(20108);function n(){const{get:E}=(0,t.kY)(),{formatAPIError:C}=(0,t.So)(),u=(0,t.lm)(),P=(0,i.useQueries)(["components","content-types"].map(L=>({queryKey:["content-manager",L],async queryFn(){const{data:{data:v}}=await E(`/content-manager/${L}`);return v},onError(v){u({type:"warning",message:C(v)})}}))),[T,R]=P,I=T.isLoading||R.isLoading,O=(R?.data??[]).filter(L=>L.kind==="collectionType"&&L.isDisplayed),f=(R?.data??[]).filter(L=>L.kind!=="collectionType"&&L.isDisplayed);return{isLoading:I,components:T?.data??[],collectionTypes:O,singleTypes:f}}},47950:function(D,m){"use strict";m.Z=[]},73086:function(D,m){"use strict";m.Z=[]},954:function(D,m,e){"use strict";e.d(m,{sg:function(){return L},bU:function(){return v},ZP:function(){return y}});var t=e(32735),i=e(8471),n=e(60216),E=e.n(n),C=e(72850),u=e(87933),P=e(67879),T=e(34853),R=e(20139),O=()=>{const{changeLocale:k,localeNames:Z}=(0,R.Z)(),{locale:U}=(0,P.Z)();return t.createElement(T.O,{label:Z[U]},Object.keys(Z).map(te=>t.createElement(T.s,{onClick:()=>k(te),key:te},Z[te])))};const f=(0,i.ZP)(C.x)`
|
|
20
|
-
margin: 0 auto;
|
|
21
|
-
width: 552px;
|
|
22
|
-
`,L=(0,i.ZP)(u.k)`
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
`,v=({children:k})=>t.createElement(f,{shadow:"tableShadow",hasRadius:!0,paddingTop:9,paddingBottom:9,paddingLeft:10,paddingRight:10,background:"neutral0",justifyContent:"center"},k);v.propTypes={children:E().node.isRequired};const b=({children:k})=>t.createElement("div",null,t.createElement(u.k,{as:"header",justifyContent:"flex-end"},t.createElement(C.x,{paddingTop:6,paddingRight:8},t.createElement(O,null))),t.createElement(C.x,{paddingTop:2,paddingBottom:11},k));b.propTypes={children:E().node.isRequired};var y=b},56761:function(D,m){"use strict";const e=[];m.Z=e},72218:function(D,m,e){"use strict";var t=e(8471),i=e(63642);const n=(0,t.ZP)(i.E)`
|
|
25
|
-
svg {
|
|
26
|
-
height: 1rem;
|
|
27
|
-
width: 1rem;
|
|
28
|
-
path {
|
|
29
|
-
fill: ${({theme:E})=>E.colors.neutral600};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;m.Z=n},1115:function(D,m,e){"use strict";var t=e(32735),i=e(24989),n=e(54894),E=e(60492),C=e(10369),u=e(27649),P=e(72850),T=e(49372),R=e(87933),I=e(8284),O=e(41415),f=e(60216),L=e.n(f),v=e(67879),b=e(8471),y=e(92802),k=e(954),Z=e(10190),U=e(72218);const te=(0,b.ZP)(C.o)`
|
|
33
|
-
::-ms-reveal {
|
|
34
|
-
display: none;
|
|
35
|
-
}
|
|
36
|
-
`,se=({onSubmit:M,schema:h,children:Q})=>{const[z,oe]=(0,t.useState)(!1),{formatMessage:o}=(0,v.Z)();return t.createElement(u.o,null,t.createElement(k.bU,null,t.createElement(y.J9,{enableReinitialize:!0,initialValues:{email:"",password:"",rememberMe:!1},onSubmit:M,validationSchema:h,validateOnChange:!1},({values:Re,errors:$,handleChange:pe})=>t.createElement(i.l0,{noValidate:!0},t.createElement(k.sg,null,t.createElement(Z.Z,null),t.createElement(P.x,{paddingTop:6,paddingBottom:1},t.createElement(T.Z,{variant:"alpha",as:"h1"},o({id:"Auth.form.welcome.title",defaultMessage:"Welcome!"}))),t.createElement(P.x,{paddingBottom:7},t.createElement(T.Z,{variant:"epsilon",textColor:"neutral600"},o({id:"Auth.form.welcome.subtitle",defaultMessage:"Log in to your Strapi account"}))),$.errorMessage&&t.createElement(T.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},$.errorMessage)),t.createElement(R.k,{direction:"column",alignItems:"stretch",gap:6},t.createElement(C.o,{error:$.email?o({id:$.email,defaultMessage:"This value is required."}):"",value:Re.email,onChange:pe,label:o({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:o({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),t.createElement(te,{error:$.password?o({id:$.password,defaultMessage:"This value is required."}):"",onChange:pe,value:Re.password,label:o({id:"global.password",defaultMessage:"Password"}),name:"password",type:z?"text":"password",endAction:t.createElement(U.Z,{onClick:Ie=>{Ie.stopPropagation(),oe(Ge=>!Ge)},label:o(z?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},z?t.createElement(n.Z,null):t.createElement(E.Z,null)),required:!0}),t.createElement(I.X,{onValueChange:Ie=>{pe({target:{value:Ie,name:"rememberMe"}})},value:Re.rememberMe,"aria-label":"rememberMe",name:"rememberMe"},o({id:"Auth.form.rememberMe.label",defaultMessage:"Remember me"})),t.createElement(O.z,{fullWidth:!0,type:"submit"},o({id:"Auth.form.button.login",defaultMessage:"Login"}))))),Q),t.createElement(R.k,{justifyContent:"center"},t.createElement(P.x,{paddingTop:4},t.createElement(i.rU,{to:"/auth/forgot-password"},o({id:"Auth.link.forgot-password",defaultMessage:"Forgot your password?"})))))};se.defaultProps={children:null,onSubmit(){}},se.propTypes={children:L().node,onSubmit:L().func,schema:L().shape({type:L().string.isRequired}).isRequired},m.Z=se},5365:function(D,m,e){"use strict";var t=e(32735),i=e(60216),n=e.n(i),E=e(1115),C=e(954);const u=P=>t.createElement(C.ZP,null,t.createElement(E.Z,{...P}));u.defaultProps={onSubmit:P=>P.preventDefault()},u.propTypes={onSubmit:n().func},m.Z=u},53951:function(D,m,e){"use strict";e.r(m);var t=e(32735),i=e(24989),n=e(27649),E=e(82055),C=e(17e3),u=e(9695),P=e(8482),T=e(25386),R=e(67879);const I=()=>{const{formatMessage:O}=(0,R.Z)();return(0,i.go)(),t.createElement(n.o,{labelledBy:"title"},t.createElement(E.T,{id:"title",title:O({id:"content-manager.pageNotFound",defaultMessage:"Page not found"})}),t.createElement(C.D,null,t.createElement(u.x,{action:t.createElement(i.Qj,{variant:"secondary",endIcon:t.createElement(P.Z,null),to:"/"},O({id:"app.components.NotFoundPage.back",defaultMessage:"Back to homepage"})),content:O({id:"app.page.not.found",defaultMessage:"Oops! We can't seem to find the page you're looging for..."}),hasRadius:!0,icon:t.createElement(T.Z,{width:"10rem"}),shadow:"tableShadow"})))};m.default=I},26123:function(D,m){"use strict";m.Z={}},41832:function(D,m){"use strict";const e=({data:t})=>{try{return Object.keys(t).reduce((i,n)=>{const E=t[n][0];return i[n]={id:E,defaultMessage:E},i},{})}catch{return{}}};m.Z=e},8997:function(D,m,e){"use strict";e.d(m,{R6:function(){return n},ot:function(){return I},Iz:function(){return O.Z},Pp:function(){return U},IF:function(){return Z},Qy:function(){return se},WW:function(){return L}});var t=e(24989),n=async(M,h)=>{let Q=null;try{await h.validate(M,{abortEarly:!1})}catch(z){Q=(0,t.CJ)(z)}return Q},E=e(32735),C=e(60216),u=e.n(C),P=e(53038);const T=({loadComponent:M})=>{const[h,Q]=(0,E.useState)(null);return(0,E.useEffect)(()=>{(async()=>{try{const oe=await M();Q(()=>oe.default)}catch(oe){console.log(oe)}})()},[M]),h?E.createElement(h,null):E.createElement(t.dO,null)},R=(M,h,Q)=>E.createElement(P.AW,{render:()=>E.createElement(T,{loadComponent:M}),key:h,path:h,exact:Q||!1});T.propTypes={loadComponent:u().func.isRequired};var I=R,O=e(41832),L=M=>M.filter((h,Q,z)=>z.findIndex(oe=>oe.key===h.key)===Q),v=e(98978);const b=M=>sortBy(M,h=>h.name);var y=null,Z=M=>`/admin/${M}`,U=(M,h="")=>[M,h].filter(Q=>Q).join(" ");const te={bufferToHex(M){return[...new Uint8Array(M)].map(h=>h.toString(16).padStart(2,"0")).join("")},async digestMessage(M){const h=new TextEncoder().encode(M),Q=await crypto.subtle.digest("SHA-256",h);return this.bufferToHex(Q)}};async function se(M){if(!M)return null;try{return await te.digestMessage(M.email)}catch{return null}}},58414:function(D,m,e){"use strict";e.d(m,{pl:function(){return R},q5:function(){return O.Z}});var t=e(32735),i=e(24989),n=e(8997),E=e(97889);const C={data:[],isLoading:!0};var P=(f,L)=>(0,E.ZP)(f,v=>{switch(L.type){case"GET_DATA_SUCCEEDED":{v.data=L.data,v.isLoading=!1;break}case"GET_DATA_ERROR":{v.isLoading=!1;break}default:return v}}),R=({ssoEnabled:f})=>{const[L,v]=(0,t.useReducer)(P,C),b=(0,i.lm)(),{get:y}=(0,i.kY)();return(0,t.useEffect)(()=>{(async()=>{try{if(!f){v({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:Z}=await y((0,n.IF)("providers"));v({type:"GET_DATA_SUCCEEDED",data:Z})}catch(Z){console.error(Z),v({type:"GET_DATA_ERROR"}),b({type:"warning",message:{id:"notification.error"}})}})()},[y,f,b]),L},I=e(21306),O=e(2690)},21306:function(D,m,e){"use strict";var t=e(32735),i=e(67879),n=e(53038),E=e(24989),C=e(36866),u=e.n(C),P=e(2690);const T="strapi-notification-seat-limit",R="https://cloud.strapi.io/profile/billing",I="https://strapi.io/billing/request-seats",O=()=>{const{formatMessage:f}=(0,i.Z)();let{license:L}=(0,P.Z)();const v=(0,E.lm)(),{pathname:b}=(0,n.TH)();(0,t.useEffect)(()=>{if(!L?.data)return;const{enforcementUserCount:y,permittedSeats:k,licenseLimitStatus:Z,isHostedOnStrapiCloud:U}=L?.data??{},te=!u()(k)&&!window.sessionStorage.getItem(`${T}-${b}`)&&(Z==="AT_LIMIT"||Z==="OVER_LIMIT");let se;Z==="OVER_LIMIT"?se="warning":Z==="AT_LIMIT"&&(se="softWarning"),te&&v({type:se,message:f({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:Z}),title:f({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:Z,enforcementUserCount:y,permittedSeats:k}),link:{url:U?R:I,label:f({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${T}-${b}`,!0)}})},[v,L.data,b,f])};m.Z=O},2690:function(D,m,e){"use strict";var t=e(24989),i=e(20108),n=e(83983);const E=()=>{const C=(0,t.ss)(n.Z.settings.users),{isLoading:u,allowedActions:{canRead:P,canCreate:T,canUpdate:R,canDelete:I}}=C,O=P&&T&&R&&I,{get:f}=(0,t.kY)(),L=async()=>{const{data:{data:b}}=await f("/admin/license-limit-information");return b};return{license:(0,i.useQuery)(["ee","license-limit-info"],L,{enabled:!u&&O})}};m.Z=E},66334:function(D,m,e){"use strict";var t=e(83983);const i=[];window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS)&&i.push({intlLabel:{id:"global.auditLogs",defaultMessage:"Audit Logs"},to:"/settings/audit-logs?pageSize=50&page=1&sort=date:DESC",id:"auditLogs",isDisplayed:!1,permissions:t.Z.settings.auditLogs.main});const n=i;m.Z=n},11545:function(D,m,e){"use strict";var t=e(83983);const i=[];window.strapi.features.isEnabled(window.strapi.features.SSO)&&i.push({intlLabel:{id:"Settings.sso.title",defaultMessage:"Single Sign-On"},to:"/settings/single-sign-on",id:"sso",isDisplayed:!1,permissions:t.Z.settings.sso.main}),window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)&&i.push({intlLabel:{id:"Settings.review-workflows.page.title",defaultMessage:"Review Workflows"},to:"/settings/review-workflows",id:"review-workflows",isDisplayed:!1,permissions:t.Z.settings["review-workflows"].main}),m.Z=i},68944:function(D,m,e){"use strict";e.d(m,{Z:function(){return O}});var t=e(32735),i=e(53038),n=e(67879),E=e(49189),C=e.n(E),u=e(24989),P=e(8997),R=()=>{const{params:{authResponse:f}}=(0,i.$B)("/auth/login/:authResponse"),{formatMessage:L}=(0,n.Z)(),{push:v}=(0,i.k6)(),b=(0,t.useRef)(L);let y=(0,t.useCallback)(()=>{v(`/auth/oops?info=${encodeURIComponent(b.current({id:"Auth.form.button.login.providers.error",defaultMessage:"We cannot connect you through the selected provider."}))}`)},[v]);const{get:k}=(0,u.kY)(),Z=(0,t.useCallback)(async()=>{try{const U=C().get("jwtToken");if(u.I8.clearAppStorage(),U){u.I8.setToken(U,!0);const te=(0,P.IF)("users/me"),{data:{data:se}}=await k(te);u.I8.setUserInfo(se,!0),C().remove("jwtToken"),v("/auth/login")}}catch{y()}},[k,v,y]);return(0,t.useEffect)(()=>{f==="error"&&y(),f==="success"&&Z()},[f,Z,y]),t.createElement(u.dO,null)},O=[{Component:()=>({default:R}),to:"/auth/login/:authResponse",exact:!0}]},98768:function(D,m,e){"use strict";var t=e(32735),i=e(60216),n=e.n(i),E=e(8471),C=e(9026),u=e(72850),P=e(87933),T=e(49372),R=e(67879),I=e(1115),O=e(58414),f=e(954),L=e(33205);const v=(0,E.ZP)(C.i)`
|
|
37
|
-
flex: 1;
|
|
38
|
-
`,b=y=>{const k=window.strapi.features.isEnabled(window.strapi.features.SSO),{isLoading:Z,data:U}=(0,O.pl)({ssoEnabled:k}),{formatMessage:te}=(0,R.Z)();return!k||!Z&&U.length===0?t.createElement(f.ZP,null,t.createElement(I.Z,{...y})):t.createElement(f.ZP,null,t.createElement(I.Z,{...y},t.createElement(u.x,{paddingTop:7},t.createElement(P.k,{direction:"column",alignItems:"stretch",gap:7},t.createElement(P.k,null,t.createElement(v,null),t.createElement(u.x,{paddingLeft:3,paddingRight:3},t.createElement(T.Z,{variant:"sigma",textColor:"neutral600"},te({id:"Auth.login.sso.divider"}))),t.createElement(v,null)),t.createElement(L.Z,{providers:U,displayAllProviders:!1})))))};b.defaultProps={onSubmit:y=>y.preventDefault(),requestError:null},b.propTypes={formErrors:n().object.isRequired,modifiedData:n().object.isRequired,onChange:n().func.isRequired,onSubmit:n().func,requestError:n().object},m.Z=b},33205:function(D,m,e){"use strict";var t=e(32735),i=e(60216),n=e.n(i),E=e(87933),C=e(63919),u=e(49372),P=e(15335),T=e(5803),R=e(8471),I=e(67879),O=e(14911);const f=R.ZP.a`
|
|
39
|
-
width: ${136/16}rem;
|
|
40
|
-
display: flex;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
align-items: center;
|
|
43
|
-
height: ${48/16}rem;
|
|
44
|
-
border: 1px solid ${({theme:y})=>y.colors.neutral150};
|
|
45
|
-
border-radius: ${({theme:y})=>y.borderRadius};
|
|
46
|
-
text-decoration: inherit;
|
|
47
|
-
&:link {
|
|
48
|
-
text-decoration: none;
|
|
49
|
-
}
|
|
50
|
-
color: ${({theme:y})=>y.colors.neutral600};
|
|
51
|
-
`,L=(0,R.ZP)(E.k)`
|
|
52
|
-
& a:not(:first-child):not(:last-child) {
|
|
53
|
-
margin: 0 ${({theme:y})=>y.spaces[2]};
|
|
54
|
-
}
|
|
55
|
-
& a:first-child {
|
|
56
|
-
margin-right: ${({theme:y})=>y.spaces[2]};
|
|
57
|
-
}
|
|
58
|
-
& a:last-child {
|
|
59
|
-
margin-left: ${({theme:y})=>y.spaces[2]};
|
|
60
|
-
}
|
|
61
|
-
`,v=({provider:y})=>t.createElement(C.u,{label:y.displayName},t.createElement(f,{href:`${window.strapi.backendURL}/admin/connect/${y.uid}`},y.icon?t.createElement("img",{src:y.icon,"aria-hidden":!0,alt:"",height:"32px"}):t.createElement(u.Z,null,y.displayName)));v.propTypes={provider:n().shape({icon:n().string,displayName:n().string.isRequired,uid:n().string.isRequired}).isRequired};const b=({providers:y,displayAllProviders:k})=>{const{formatMessage:Z}=(0,I.Z)();return k?t.createElement(P.r,{gap:4},y.map(U=>t.createElement(T.P,{key:U.uid,col:4},t.createElement(v,{provider:U})))):y.length>2&&!k?t.createElement(P.r,{gap:4},y.slice(0,2).map(U=>t.createElement(T.P,{key:U.uid,col:4},t.createElement(v,{provider:U}))),t.createElement(T.P,{col:4},t.createElement(C.u,{label:Z({id:"global.see-more"})},t.createElement(f,{as:O.rU,to:"/auth/providers"},t.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):t.createElement(L,{justifyContent:"center"},y.map(U=>t.createElement(v,{key:U.uid,provider:U})))};b.defaultProps={displayAllProviders:!0},b.propTypes={providers:n().arrayOf(n().object).isRequired,displayAllProviders:n().bool},m.Z=b},7277:function(D,m,e){"use strict";e.d(m,{Z:function(){return M}});var t=e(32735),i=e(53038),n=e(8471),E=e(24989),C=e(9026),u=e(27649),P=e(72850),T=e(49372),R=e(87933),I=e(23866),O=e(41415),f=e(67879),L=e(58414),v=e(954),b=e(33205),y=e(10190);const k=(0,n.ZP)(C.i)`
|
|
62
|
-
flex: 1;
|
|
63
|
-
`;var U=()=>{const h=window.strapi.features.isEnabled(window.strapi.features.SSO),{push:Q}=(0,i.k6)(),{formatMessage:z}=(0,f.Z)(),{isLoading:oe,data:o}=(0,L.pl)({ssoEnabled:h}),Re=()=>{Q("/auth/login")};return!h||!oe&&o.length===0?t.createElement(i.l_,{to:"/auth/login"}):t.createElement(v.ZP,null,t.createElement(u.o,null,t.createElement(v.bU,null,t.createElement(v.sg,null,t.createElement(y.Z,null),t.createElement(P.x,{paddingTop:6,paddingBottom:1},t.createElement(T.Z,{as:"h1",variant:"alpha"},z({id:"Auth.form.welcome.title"}))),t.createElement(P.x,{paddingBottom:7},t.createElement(T.Z,{variant:"epsilon",textColor:"neutral600"},z({id:"Auth.login.sso.subtitle"})))),t.createElement(R.k,{direction:"column",alignItems:"stretch",gap:7},oe?t.createElement(R.k,{justifyContent:"center"},t.createElement(I.a,null,z({id:"Auth.login.sso.loading"}))):t.createElement(b.Z,{providers:o}),t.createElement(R.k,null,t.createElement(k,null),t.createElement(P.x,{paddingLeft:3,paddingRight:3},t.createElement(T.Z,{variant:"sigma",textColor:"neutral600"},z({id:"or"}))),t.createElement(k,null)),t.createElement(O.z,{fullWidth:!0,size:"L",onClick:Re},z({id:"Auth.form.button.login.strapi"})))),t.createElement(R.k,{justifyContent:"center"},t.createElement(P.x,{paddingTop:4},t.createElement(E.rU,{to:"/auth/forgot-password"},t.createElement(T.Z,{variant:"pi"},z({id:"Auth.link.forgot-password"})))))))},te=e(78834),M={...te.Z,providers:{Component:U,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}},99568:function(D,m){"use strict";const e={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}]}}};m.Z=e},48224:function(D,m,e){var t={"./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 i(n){if(!e.o(t,n))return Promise.resolve().then(function(){var u=new Error("Cannot find module '"+n+"'");throw u.code="MODULE_NOT_FOUND",u});var E=t[n],C=E[0];return e.e(E[1]).then(function(){return e.t(C,19)})}i.keys=function(){return Object.keys(t)},i.id=48224,D.exports=i},47750:function(D,m,e){"use strict";D.exports=e.p+"70674f63fc3904c20de0.svg"}}]);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3455],{67249:function(N,M,t){t.r(M),t.d(M,{default:function(){return me}});var e=t(32735),n=t(24989),f=t(83983),x=t(47765),O=t(68625),W=t(4038),j=t(19406),B=t(27649),U=t(82055),g=t(41415),S=t(99223),F=t(17e3),Q=t(56755),z=t(73269),X=t(33827),k=t(94547),v=t(19786),P=t(49372),G=t(3685),J=t(35658),Y=t(33795),w=t.n(Y),I=t(67879),q=t(53038),_=t(32308),ee=()=>"todo empty role",te=t(60216),L=t.n(te),ne=t(87933),le=t(72850),se=t(50563);const K=({id:a,name:o,description:l,usersCount:E,icons:r,rowIndex:u,canUpdate:h})=>{const{formatMessage:C}=(0,I.Z)(),[,i]=r,R=C({id:"Roles.RoleRow.user-count",defaultMessage:"{number, plural, =0 {# user} one {# user} other {# users}}"},{number:E});return e.createElement(k.Tr,{"aria-rowindex":u,key:a,...h?(0,n.X7)({fn:i.onClick}):{}},e.createElement(v.Td,{maxWidth:(0,n.Q1)(130)},e.createElement(P.Z,{ellipsis:!0,textColor:"neutral800"},o)),e.createElement(v.Td,{maxWidth:(0,n.Q1)(250)},e.createElement(P.Z,{ellipsis:!0,textColor:"neutral800"},l)),e.createElement(v.Td,null,e.createElement(P.Z,{textColor:"neutral800"},R)),e.createElement(v.Td,null,e.createElement(ne.k,{justifyContent:"flex-end",...n.UW},r.map((d,D)=>d?e.createElement(le.x,{key:d.label,paddingLeft:D===0?0:1},e.createElement(se.h,{onClick:d.onClick,label:d.label,noBorder:!0,icon:d.icon})):null))))};K.propTypes={id:L().number.isRequired,name:L().string.isRequired,description:L().string.isRequired,usersCount:L().number.isRequired,icons:L().array.isRequired,rowIndex:L().number.isRequired,canUpdate:L().bool},K.defaultProps={canUpdate:!1};var ae=K,oe=t(97889);const re={roleToDelete:null,showModalConfirmButtonLoading:!1,shouldRefetchData:!1};var ie=(a,o)=>(0,oe.ZP)(a,l=>{switch(o.type){case"ON_REMOVE_ROLES":{l.showModalConfirmButtonLoading=!0;break}case"ON_REMOVE_ROLES_SUCCEEDED":{l.shouldRefetchData=!0,l.roleToDelete=null;break}case"RESET_DATA_TO_DELETE":{l.shouldRefetchData=!1,l.roleToDelete=null,l.showModalConfirmButtonLoading=!1;break}case"SET_ROLE_TO_DELETE":{l.roleToDelete=o.id;break}default:return l}});const de=()=>{(0,n.go)();const{locale:a}=(0,I.Z)(),{isLoading:o,allowedActions:{canCreate:l,canDelete:E,canRead:r,canUpdate:u}}=(0,n.ss)(f.Z.settings.roles),{getData:h,roles:C,isLoading:i}=(0,_.bF)(!1),[{query:R}]=(0,n.Kx)(),d=R?._q||"",{includes:D}=(0,n.L0)(a,{sensitivity:"base"}),T=(0,n.Xe)(a,{sensitivity:"base"}),A=(C||[]).filter(p=>D(p.name,d)||D(p.description,d)).sort((p,y)=>T.compare(p.name,y.name)||T.compare(p.description,y.description));return(0,e.useEffect)(()=>{!o&&r&&h()},[o,r,h]),{isLoadingForPermissions:o,canCreate:l,canDelete:E,canRead:r,canUpdate:u,isLoading:i,getData:h,sortedRoles:A,roles:C}},ce=({getData:a,canCreate:o,canDelete:l,canUpdate:E})=>{const{formatMessage:r}=(0,I.Z)(),u=(0,n.lm)(),[h,C]=(0,e.useState)(!1),{push:i}=(0,q.k6)(),[{selectedRoles:R,showModalConfirmButtonLoading:d,roleToDelete:D},T]=(0,e.useReducer)(ie,re),{post:A}=(0,n.tg)(),p=async()=>{try{T({type:"ON_REMOVE_ROLES"}),await A("/admin/roles/batch-delete",{ids:[D]}),await a(),T({type:"RESET_DATA_TO_DELETE"})}catch(s){const c=w()(s,["response","payload","data","ids"],null);if(c&&Array.isArray(c)){const Ee=c.join(`
|
|
2
|
-
`);u({type:"warning",message:Ee})}else u({type:"warning",message:{id:"notification.error"}})}m()},y=(0,e.useCallback)(s=>{i(`/settings/roles/duplicate/${s}`)},[i]),$=()=>i("/settings/roles/new"),Z=(0,e.useCallback)(s=>{T({type:"SET_ROLE_TO_DELETE",id:s}),m()},[]),m=()=>C(s=>!s),b=(0,e.useCallback)(s=>{i(`/settings/roles/${s}`)},[i]),V=(0,e.useCallback)((s,c)=>{s.preventDefault(),s.stopPropagation(),c.usersCount?u({type:"info",message:{id:"Roles.ListPage.notification.delete-not-allowed"}}):Z(c.id)},[u,Z]),H=(0,e.useCallback)((s,c)=>{s.preventDefault(),s.stopPropagation(),y(c.id)},[y]),ge=(0,e.useCallback)(s=>[...o?[{onClick:c=>H(c,s),label:r({id:"app.utils.duplicate",defaultMessage:"Duplicate"}),icon:e.createElement(x.Z,null)}]:[],...E?[{onClick:()=>b(s.id),label:r({id:"app.utils.edit",defaultMessage:"Edit"}),icon:e.createElement(O.Z,null)}]:[],...l?[{onClick:c=>V(c,s),label:r({id:"global.delete",defaultMessage:"Delete"}),icon:e.createElement(W.Z,null)}]:[]],[r,V,H,b,o,E,l]);return{handleNewRoleClick:$,getIcons:ge,selectedRoles:R,isWarningDeleteAllOpened:h,showModalConfirmButtonLoading:d,handleToggleModal:m,handleDeleteData:p}};var ue=()=>{const{formatMessage:a}=(0,I.Z)(),{isLoadingForPermissions:o,canCreate:l,canRead:E,canDelete:r,canUpdate:u,isLoading:h,getData:C,sortedRoles:i}=de(),{handleNewRoleClick:R,getIcons:d,isWarningDeleteAllOpened:D,showModalConfirmButtonLoading:T,handleToggleModal:A,handleDeleteData:p}=ce({getData:C,canCreate:l,canDelete:r,canUpdate:u}),y=i.length+1,$=6;if(o)return e.createElement(B.o,null,e.createElement(n.dO,null));const Z=a({id:"global.roles",defaultMessage:"roles"});return e.createElement(B.o,null,e.createElement(n.SL,{name:"Roles"}),e.createElement(U.T,{primaryAction:l?e.createElement(g.z,{onClick:R,startIcon:e.createElement(j.Z,null),size:"S"},a({id:"Settings.roles.list.button.add",defaultMessage:"Add new role"})):null,title:Z,subtitle:a({id:"Settings.roles.list.description",defaultMessage:"List of roles"}),as:"h2"}),E&&e.createElement(S.Z,{startActions:e.createElement(n.m,{label:a({id:"app.component.search.label",defaultMessage:"Search for {target}"},{target:Z})})}),E&&e.createElement(F.D,null,e.createElement(Q.i,{colCount:$,rowCount:y,footer:l?e.createElement(z.c,{onClick:R,icon:e.createElement(j.Z,null)},a({id:"Settings.roles.list.button.add",defaultMessage:"Add new role"})):null},e.createElement(X.h,null,e.createElement(k.Tr,{"aria-rowindex":1},e.createElement(v.Th,null,e.createElement(P.Z,{variant:"sigma",textColor:"neutral600"},a({id:"global.name",defaultMessage:"Name"}))),e.createElement(v.Th,null,e.createElement(P.Z,{variant:"sigma",textColor:"neutral600"},a({id:"global.description",defaultMessage:"Description"}))),e.createElement(v.Th,null,e.createElement(P.Z,{variant:"sigma",textColor:"neutral600"},a({id:"global.users",defaultMessage:"Users"}))),e.createElement(v.Th,null,e.createElement(G.T,null,a({id:"global.actions",defaultMessage:"Actions"}))))),e.createElement(J.p,null,i?.map((m,b)=>e.createElement(ae,{key:m.id,id:m.id,name:m.name,description:m.description,usersCount:m.usersCount,icons:d(m),rowIndex:b+2,canUpdate:u})))),!y&&!h&&e.createElement(ee,null)),e.createElement(n.QH,{isOpen:D,onConfirm:p,isConfirmButtonLoading:T,onToggleDialog:A}))},me=()=>e.createElement(n.O4,{permissions:f.Z.settings.roles.main},e.createElement(ue,null))},99223:function(N,M,t){t.d(M,{Z:function(){return f}});var e=t(74512),n=t(87933);const f=({startActions:x,endActions:O})=>!x&&!O?null:(0,e.jsxs)(n.k,{justifyContent:"space-between",alignItems:"flex-start",paddingBottom:4,paddingLeft:10,paddingRight:10,children:[(0,e.jsx)(n.k,{gap:2,wrap:"wrap",children:x}),(0,e.jsx)(n.k,{gap:2,shrink:0,wrap:"wrap",children:O})]})},73269:function(N,M,t){t.d(M,{c:function(){return U}});var e=t(74512),n=t(8471),f=t(72850),x=t(9026),O=t(87933),W=t(49372);const j=(0,n.ZP)(f.x)`
|
|
3
|
-
height: ${24/16}rem;
|
|
4
|
-
width: ${24/16}rem;
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
|
|
10
|
-
svg {
|
|
11
|
-
height: ${10/16}rem;
|
|
12
|
-
width: ${10/16}rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
svg path {
|
|
16
|
-
fill: ${({theme:g})=>g.colors.primary600};
|
|
17
|
-
}
|
|
18
|
-
`,B=(0,n.ZP)(f.x)`
|
|
19
|
-
border-radius: 0 0 ${({theme:g})=>g.borderRadius} ${({theme:g})=>g.borderRadius};
|
|
20
|
-
display: block;
|
|
21
|
-
width: 100%;
|
|
22
|
-
border: none;
|
|
23
|
-
`,U=({children:g,icon:S,...F})=>(0,e.jsxs)("div",{children:[(0,e.jsx)(x.i,{}),(0,e.jsx)(B,{as:"button",background:"primary100",padding:5,...F,children:(0,e.jsxs)(O.k,{children:[(0,e.jsx)(j,{"aria-hidden":!0,background:"primary200",children:S}),(0,e.jsx)(f.x,{paddingLeft:3,children:(0,e.jsx)(W.Z,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:g})})]})})]})}}]);
|