PageSourceSearch

https://client.cdn77.com/_next/static/chunks/1279-5750667e4401bd9a.js

js cdn77.com collected 2026-10-02 02:33:57 UTC 8,960 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var s=arguments[a];if(null!=s)for(var t in s)s.hasOwnProperty(t)&&(e[t]=s[t])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:cdn77-js-app":!0});var a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d0b4e117-b27d-4749-91ec-4b69197b7009",e._sentryDebugIdIdentifier="sentry-dbid-d0b4e117-b27d-4749-91ec-4b69197b7009")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1279],{5290:e=>{e.exports={separator:"AddAwsOriginForm_separator__tCHnV","app-light":"AddAwsOriginForm_app-light__PWC2Q","app-dark":"AddAwsOriginForm_app-dark__TPSLI"}},8226:(e,a,s)=>{"use strict";s.d(a,{I:()=>c,S:()=>l});var t=s(46499),n=s(37876),i=s(1693),r=s(56535);s(14232);var l=Array(20).fill("•").join(""),c=function(e){var a=e.name,s=e.placeholder,c=e.validate,o=(0,t._)((0,r.Mt)(a),3),d=(o[0],o[1].initialValue),u=o[2].setValue,_=d===l;return(0,n.jsx)(i.Z,{name:a,placeholder:s,validate:c,onBlur:function(e){_&&""===e.target.value&&u(l)},onFocus:function(e){_&&e.target.value===l&&u("")}})}},21279:(e,a,s)=>{"use strict";s.d(a,{o:()=>_});var t=s(52411),n=s(16690),i=s(37876),r=s(73649),l=s(40490),c=s(20441);s(14232);var o=s(89848),d=s(28845),u=s(26618),_=function(e){var a=e.header,s=e.isOpen,_=e.closeModal,h=e.initialValues,p=e.primaryOriginId,m=e.submitButtonText,f=void 0===m?"Add S3 Storage":m,g=e.onSuccess;return(0,i.jsx)(r.a,{closeModal:_,isOpen:s,width:640,children:(0,i.jsx)(d.J,{initialValues:h,primaryOriginId:p,onSuccess:function(e){_(),(0,o.oR)((0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:e.label})," has been created."]}),{type:"success"}),g(e)},children:function(e){var s=e.values,r=e.submitButtonProps;return(0,i.jsxs)(l.k,{buttons:(0,i.jsx)(c.P,{button:(0,n._)((0,t._)({},r),{color:"primary",text:s.id?"Save changes":f})}),title:a?void 0:s.id?"Edit S3 Storage":"Add new S3 Storage",children:[a,(0,i.jsx)(u.a,{})]})}})})}},26618:(e,a,s)=>{"use strict";s.d(a,{a:()=>j});var t=s(52411),n=s(16690),i=s(60176),r=s(37876),l=s(414),c=s(13236),o=s(68116),d=s(1693),u=s(82255),_=s(34906),h=s.n(_),p=s(56535),m=s(14232),f=s(35654),g=s(60337),w=s(51207),b=s(64451),y=s(41402),v=s(5290),x=s.n(v),k=h().bind(x()),j=function(){var e=(0,l.w)(),a=(0,b.Bp)().origins,s=(0,p.j7)(),_=s.values,h=s.setValues,v=s.initialValues,x=m.useMemo(function(){var e,s;return(0,i._)(null!=(e=null==a?void 0:a.aws)?e:[]).concat((0,i._)(null!=(s=null==a?void 0:a.url)?s:[])).map(function(e){return e.label})},[a]);return(0,r.jsxs)(r.Fragment,{children:[_.cdns.length>1&&(0,r.jsx)(g.f,{labels:_.cdns.map(function(e){return e.label})}),(0,r.jsxs)(c.m,{className:"mb-32",maxWidth:300,children:[(0,r.jsx)(o.J,{htmlFor:"label",tooltip:"The label is for you to identify your S3 Storage quickly. You can name it anything you want.",children:"Label"}),(0,r.jsx)(d.Z,{name:"label",validate:function(e){var a;return null!=(a=(0,y.gx)(e,"Enter an S3 Storage label"))?a:e!==v.label&&(0,y.Ke)(e,x)}})]}),(0,r.jsxs)(c.m,{className:"mb-32",maxWidth:580,children:[(0,r.jsx)(o.J,{htmlFor:"note",tooltip:"The note is useful for storing additional unstructured information about origin. As an example, you can leave a note for your team members or pin important information regarding the setup here.",optional:!0,children:"Note"}),(0,r.jsx)(u.h,{name:"note",placeholder:"Your notes...",rows:2})]}),(0,r.jsx)(c.m,{className:"mb-32",maxWidth:580,children:(0,r.jsx)(w.S,{domainValidationMessage:"S3 Storage URL must be valid domain name or IP address.",label:"S3 Storage URL",protocolInputName:"scheme",urlInputName:"host",onChange:function(e){var a=e.port,s=e.url,i=e.protocol;h((0,n._)((0,t._)({},_),{host:a?"".concat(s,":").concat(a):s,scheme:null!=i?i:_.scheme}))}})}),(0,r.jsx)("hr",{className:k("separator","app-".concat(e))}),(0,r.jsx)(f.M,{})]})}},28845:(e,a,s)=>{"use strict";s.d(a,{J:()=>h});var t=s(52411),n=s(16690),i=s(68946),r=s(60176),l=s(37876);s(14232);var c=s(8226),o=s(50091),d=s(94682),u=s(76386),_=s(84362),h=function(e){var a=e.initialValues,s=void 0===a?{id:"",with_credentials:!1,aws_access_key_id:"",aws_access_key_secret:"",aws_region:"",label:"",note:"",scheme:"http",host:"",cdns:[]}:a,h=e.primaryOriginId,p=e.onSuccess,m=e.children,f=(0,u.s)(_.p8.clap.origin),g=(0,u.s)(_.p8.clap.originFallbacks(null!=h?h:"","s3"));return(0,l.jsx)(d._,{proxy:!0,endpointUrl:s.id?_.p8.clap.editAwsOrigin(s.id):_.p8.clap.awsOrigin,getValues:function(e){var a=(0,o.o)(e.host),s=a.host,t=a.baseDir;return{id:e.id||"",host:s,base_dir:t||null,scheme:e.scheme,label:e.label,note:e.note||null,aws_access_key_id:e.with_credentials?e.aws_access_key_id:null,aws_access_key_secret:e.with_credentials?e.aws_access_key_secret===c.S?void 0:e.aws_access_key_secret:null,aws_region:e.with_credentials?e.aws_region:null,fallback_configuration:h?{primary_origin_id:h}:void 0}},initialValues:s,method:s.id?"PATCH":"POST",showSuccessMessage:!1,onSuccess:function(e,a){if(a)if(s.id){a.aws_access_key_secret;var l,c=(0,i._)(a,["aws_access_key_secret"]),o=(0,n._)((0,t._)({},c),{note:null!=(l=null==a?void 0:a.note)?l:void 0,base_dir:void 0,type:"aws"});h&&h!==s.id?(f.update(function(e){return e.map(function(e){var a;return h===e.id&&"aws"===e.type?(0,n._)((0,t._)({},e),{fallback_origins:null==(a=e.fallback_origins)?void 0:a.map(function(e){var a=e.id,t=e.label;return a===s.id?{id:o.id,label:o.label}:{id:a,label:t}})}):e})}),g.update(function(e){return e.map(function(e){return s.id===e.id?o:e})})):f.update(function(e){return e.map(function(e){return s.id===e.id?o:e})}),p&&p(o)}else{if(!e)return;h&&h!==s.id?(f.update(function(a){return a.map(function(a){var s;return h===a.id&&e&&"aws"===a.type?(0,n._)((0,t._)({},a),{fallback_origins:(0,r._)(null!=(s=a.fallback_origins)?s:[]).concat([{id:e.id,label:e.label}])}):a})}),g.update(function(a){return(0,r._)(a).concat([e])})):f.update(function(a){return(0,r._)(a).concat([e])}),p&&p(e)}},children:m})}},35654:(e,a,s)=>{"use strict";s.d(a,{M:()=>b,v:()=>w});var t=s(52411),n=s(16690),i=s(46499),r=s(37876),l=s(76315),c=s(3452),o=s(58894),d=s(6203),u=s(13236),_=s(68116),h=s(1693),p=s(56535),m=s(14232),f=s(8226),g=s(41402),w=function(e){return Object.entries(e).filter(function(e){return["aws_access_key_id","aws_region"].includes((0,i._)(e,1)[0])}).some(function(e){var a=(0,i._)(e,2),s=(a[0],a[1]);return void 0!==s&&""!==s})},b=function(){var e=(0,p.j7)(),a=e.values,s=e.initialValues,i=e.touched,w=e.validateForm,b=e.setValues,y=e.setTouched;m.useEffect(function(){w()},[a.with_credentials]);var v=function(){b((0,n._)((0,t._)({},a),{aws_access_key_id:s.aws_access_key_id,aws_access_key_secret:s.aws_access_key_secret,aws_region:s.aws_region})),y((0,n._)((0,t._)({},i),{aws_access_key_id:!1,aws_access_key_secret:!1,aws_region:!1}))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)(l.f,{gap:{x:"md",y:"none"},horizontalAlign:"between",verticalAlign:"center",children:[(0,r.jsx)(c.f,{xs:"auto",children:(0,r.jsx)(o.E,{display:"block",tag:"h3",weight:"bold",children:"AWS credentials"})}),(0,r.jsx)(c.f,{xs:"auto",children:(0,r.jsx)(d.d,{checked:a.with_credentials,name:"editMode",size:"md",onChange:function(){a.with_credentials&&v(),b((0,n._)((0,t._)({},a),{with_credentials:!a.with_credentials}))}})})]})}),(0,r.jsx)(o.E,{className:a.with_credentials?"mb-32":void 0,color:{light:"grey-700",dark:"grey-400"},maxWidth:780,size:15,tag:"p",children:"To access a protected file from an S3 bucket, you need authorized credentials. Without them, AWS will deny access. For publicly shared files, AWS credentials are not necessary."}),a.with_credentials&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.m,{className:"mb-32",maxWidth:580,children:[(0,r.jsx)(_.J,{htmlFor:"aws_access_key_id",tooltip:"Specifies an AWS access key associated with an IAM user or role.",children:"AWS access key ID"}),(0,r.jsx)(h.Z,{name:"aws_access_key_id",placeholder:"AKIAIOSFODNN7EXAMPLE",validate:a.with_credentials?function(e){return(0,g.gx)(e,"Required")}:void 0})]}),(0,r.jsxs)(u.m,{className:"mb-32",maxWidth:580,children:[(0,r.jsx)(_.J,{htmlFor:"aws_access_key_secret",tooltip:'Specifies the secret key associated with the access key. This is essentially the "password" for the access key.',children:"AWS secret access key"}),(0,r.jsx)(f.I,{name:"aws_access_key_secret",placeholder:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",validate:a.with_credentials?function(e){return(0,g.gx)(e,"Required")}:void 0})]}),(0,r.jsxs)(u.m,{maxWidth:200,children:[(0,r.jsx)(_.J,{htmlFor:"aws_region",children:"AWS default region"}),(0,r.jsx)(h.Z,{name:"aws_region",placeholder:"us-east-1",validate:a.with_credentials?function(e){return(0,g.gx)(e,"Required")}:void 0})]})]})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.