1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2926],{3493:e=>{e.exports={b1gswgd3:"b1gswgd3","information-box":"information-box","address-details":"address-details","vat-details":"vat-details"}},4589:(e,t,n)=>{"use strict";n.d(t,{OU:()=>d,WQ:()=>c,ai:()=>u,gk:()=>a,hB:()=>h,mu:()=>o,yo:()=>l});var i=n(29935),s=n(82643),r=n(77248);function a(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/cdn/sites",void 0,!0)]})})()}function o(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.Jt)("/cdn/sites/".concat(e),void 0,!0)]})})()}function c(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.bE)("/cdn/sites",{origin_url:e})]})})()}function l(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.F6)("/cdn/sites/".concat(e),t)]})})()}function d(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.bE)("/cdn/sites/".concat(e,"/purge"),{})]})})()}function u(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.bE)("/cdn/sites/".concat(e,"/purgePaths"),t)]})})()}function h(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.bE)("/cdn/sites/".concat(e,"/parse-certificate"),t)]})})()}},4975:e=>{e.exports={pje7e67:"pje7e67",selectable:"selectable",selected:"selected",iban:"iban",card:"card"}},6531:e=>{e.exports={w1p2rqqk:"w1p2rqqk"}},6806:e=>{e.exports={i12peusf:"i12peusf",d1byzllr:"d1byzllr"}},9736:e=>{e.exports={e1ffsaz9:"e1ffsaz9"}},11218:e=>{e.exports={saq5y34:"saq5y34","path-chooser":"path-chooser"}},12092:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(12694),s=n(14343);function r(){var e=(0,s.useRef)(null),t=function(){if(e.current)return{width:e.current.offsetWidth,height:e.current.offsetHeight}},n=(0,i._)((0,s.useState)(t),2),r=n[0],a=n[1],o=function(){return a(t())};return(0,s.useEffect)(function(){return window.addEventListener("resize",o),function(){return window.removeEventListener("resize",o)}},[]),(0,s.useLayoutEffect)(o,[]),[e,r]}},14050:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/joomla.b3663def.svg",height:79,width:381,blurWidth:0,blurHeight:0}},19004:e=>{e.exports={p1dsjcrm:"p1dsjcrm",e1jvmtpm:"e1jvmtpm",a1ccr4rn:"a1ccr4rn",a18zdc3o:"a18zdc3o",i10oaygn:"i10oaygn"}},20119:e=>{e.exports={tnluiv1:"tnluiv1"}},20702:(e,t,n)=>{"use strict";n.d(t,{P:()=>Y});var i=n(15383),s=n(14343),r=n(13872),a=n.n(r),o=n(14155),c=n.n(o),l=n(29935),d=n(12694),u=n(82643),h=n(2447),p=n.n(h),m=n(67750),f=n.n(m),g=n(69399),x=n(86449),v=n(51689),j=n(66163),y=n(76009),b=n(73154),_=n(97252),w=n(62759),C=n(11550),N=n(85781);let A={src:"/_next/static/media/web_pro_crown_grey.b127a1f2.svg"},k={src:"/_next/static/media/web_ultra_crown_grey.7fa80a24.svg"};var S=n(98835),E=n(92379),I=n.n(E);let D=function(){var e,t,n=(0,d._)((0,s.useState)(!1),2),r=n[0],a=n[1],o=(0,d._)((0,s.useState)([]),2),h=o[0],m=o[1],E=(0,d._)((0,s.useState)(!1),2),D=E[0],T=E[1],P=(0,b.md)(w.SH),F=(0,b.md)(_.e),Y=(0,d._)((0,s.useState)(""),2),O=Y[0],R=Y[1];(0,s.useEffect)(function(){T(!0),R(c().route)},[]),(0,s.useEffect)(function(){(0,l._)(function(){var e,t,n;return(0,u.YH)(this,function(i){switch(i.label){case 0:return[4,(0,j.UK)()];case 1:return e=i.sent(),t=[],n=new Date,e.forEach(function(i){i.state=z(i,n),"visible"==i.state&&y.notificationBanners[e[0].type]&&"alert"==y.notificationBanners[e[0].type].style&&!t.includes(String(i.location))&&t.push(String(i.location))}),R(c().route),m(t),[2]}})})()},[]);var H=function(){a(!r)},q=function(e){return e.includes(O)?I().active:""};return(0,i.jsxs)("aside",{className:"".concat(I()["side-bar-styles"]," ").concat(r?I().active:""),children:[(0,i.jsxs)("header",{children:[(0,i.jsx)("div",{className:I()["mobile-menu"],onClick:function(){return H()},children:(0,i.jsx)(g.g,{icon:x.ckx})}),(0,i.jsx)(f(),{href:"/",children:(0,i.jsx)("img",{src:S.A.src})})]}),(0,i.jsxs)("nav",{children:[(0,i.jsxs)("section",{className:I().user,children:[(0,i.jsx)("figure",{className:I().avatar,children:D&&(0,i.jsx)(p(),{email:F.mail,default:"mm"})}),(0,i.jsxs)("p",{children:[(0,i.jsx)("span",{className:I().name,children:null==F?void 0:F.fullName}),(0,i.jsx)("a",{href:"/logout?logoutOtherDomain=true",children:"Log out"})]})]}),(0,i.jsxs)("section",{className:I().menu,children:[(0,i.jsx)("h3",{children:"Account"}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/account-details",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/account-details"])),children:[(0,i.jsx)(g.g,{icon:x.X46})," Account details"," ",h.includes("account-details")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]}),(null==(e=F.products)?void 0:e.includes("cdn"))&&(0,i.jsxs)(f(),{href:{pathname:"/dashboard/payment-methods",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/payment-methods"])),children:[(0,i.jsx)(g.g,{icon:x.$O8})," Payment methods",h.includes("payment-methods")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/invoices",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/invoices"])),children:[(0,i.jsx)(g.g,{icon:x.h8M}
1)," Invoices"," ",h.includes("invoices")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]})]}),(0,i.jsxs)("section",{className:I().menu,children:[(0,i.jsx)("h3",{children:"Products"}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/overview",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/overview"])),children:[(0,i.jsx)(g.g,{icon:x.k1j})," Overview"," "]}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/web",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/web"])," ").concat(I().web),children:["ultra"===P?(0,i.jsxs)("span",{className:I().img,children:[q(["/dashboard/web"])?(0,i.jsx)("img",{src:N.A.src}):(0,i.jsx)("img",{src:k.src}),(0,i.jsx)("span",{children:" Web Ultra"})]}):"pro"===P?(0,i.jsxs)("span",{className:I().img,children:[q(["/dashboard/web"])?(0,i.jsx)("img",{src:C.A.src}):(0,i.jsx)("img",{src:A.src}),(0,i.jsx)("span",{children:"Web Pro"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.g,{icon:x.uaX})," Web Free"]})," ",h.includes("web")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/api",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/api"])," ").concat(I().api),children:[(0,i.jsx)(g.g,{icon:x.rLL})," API"," ",h.includes("api")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]}),(0,i.jsxs)(f(),{href:{pathname:"/dashboard/cdn",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/cdn","/dashboard/cdn-checkout"])," ").concat(I().cdn),children:[(0,i.jsx)(g.g,{icon:x.Qux})," CDN"," ",h.includes("cdn")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]}),(null==(t=F.products)?void 0:t.includes("ps"))&&(0,i.jsxs)(f(),{href:{pathname:"/dashboard/photoshop",query:""},className:"".concat(I()["menu-item"]," ").concat(q(["/dashboard/photoshop"])," ").concat(I().photoshop),children:[(0,i.jsx)("span",{className:I()["photoshop-item"]})," Photoshop plugin"," ",h.includes("photoshop")&&(0,i.jsx)(g.g,{icon:v.zpE,style:{color:"#DE5856"}})]})]}),(0,i.jsx)("a",{href:"/logout?logoutOtherDomain=true",className:I()["mobile-logout"],children:"Log out"}),(0,i.jsx)("div",{className:I()["back-to-website"],children:(0,i.jsxs)(f(),{href:"/",children:[(0,i.jsx)(g.g,{icon:x.CeG})," to tinify.com"]})})]})]})};var z=function(e,t){try{if((new Date(e.start_on)>t||e.end_on&&new Date(e.end_on)<t)&&"visible"==e.state)return(0,j.cQ)({id:e.id,state:"hidden"}),"hidden";if(new Date(e.start_on)<=t&&new Date(e.end_on)>=t&&"hidden"==e.state)return(0,j.cQ)({id:e.id,state:"visible"}),"visible"}catch(e){console.log("Error :",e)}return e.state},T=n(91187),P=n(97197),F=n.n(P),Y=function(e){var t=(0,b.md)(_.e),n=(0,T.E)();return(0,s.useEffect)(function(){t.mail||n||c().push("".concat(window.location.origin,"/not-logged-in"))},[n]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:[e.title," - Dashboard"]}),(0,i.jsx)("meta",{charSet:"utf-8"}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,i.jsx)("link",{rel:"shortcut icon",href:"https://tinypng.com/images/favicon.ico"}),(0,i.jsx)("link",{rel:"apple-touch-icon",href:"https://tinypng.com/images/apple-touch-icon.png"})]}),(0,i.jsxs)("main",{className:F()["main-styles"],children:[(0,i.jsx)(D,{}),(0,i.jsx)("section",{className:F()["section-styles"],children:(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:e.children})})})]})]})}},21854:e=>{e.exports={a17tli2f:"a17tli2f","input-wrapper":"input-wrapper",error:"error",icon:"icon"}},22090:e=>{e.exports={tckrlkm:"tckrlkm",metadata:"metadata",title:"title",value:"value","show-mediumdown":"show-mediumdown","badge-wrap":"badge-wrap",badge:"badge",icon:"icon",invalid:"invalid",valid:"valid"}},24680:(e,t,n)=>{"use strict";n.d(t,{z:()=>u});var i=n(12694),s=n(15383),r=n(53764),a=n(89267),o=n(93101),c=n(51689),l=n(70010);n(29521);var d=function(e,t){var n=(0,i._)((0,o.Xq)(e,t).split(/\s+/),2),r=n[0],a=n[1];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:r})," ",a]})},u=function(e){var t=e.credits?e.credits:0,n=function(e){return 0===e?"0%":(100*Math.min(Math.max(e,.045),1)).toString()+"%"},i=e.maximum?n(e.progress/e.maximum):"100%",r=e.projection&&e.maximum?n(e.projection/e.maximum):void 0;return(0,s.jsxs)(h,{progress:i,projection:r,progressColor:e.dashboardPage?a.A.colors.progressbarcolors[e.dashboardPage]:"#f48616",projectionColor:e.dashboardPage?a.A.colors.progressbarcolors[e.dashboardPage+"Secondary"]:"#fce0c4",children:[!e.hideLabels&&(0,s.jsxs)("div",{className:"labels",children:[(0,s.jsx)("div",{children:(0,s.jsx)("span",{children:e.progress>0&&e.formatAsSize?d(e.progress,{unit:e.unit}):(0,o.ZV)(e.progress)})}),e.maximum&&!e.hideMaximum&&(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"maximum",children:e.maximum>0&&e.formatAsSize?d(e.maximum,{unit:e.unit,precision:0}):(0,o.ZV)(e.maximum)})})]}),(0,s.jsxs)("div",{className:"bar",children:[void 0!=e.projection&&(0,s.jsx)("span",{className:"projection"}),(0,s.jsx)("span",{className:"progress"})]}),e.showLegend&&(0,s.jsxs)("div",{className:"legend",children:[(0,s.jsxs)("div",{className:"progress",children:["Current ",e.type]}),(0,s.jsx)("div",{children:e.progress>0&&e.formatAsSize?(0,o.Xq)(e.progress,{unit:e.unit}):(0,o.ZV)(e.progress)}),void 0!=e.projection&&e.maximum&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"projected",children:["Projected ",e.type,e.projectionTooltip&&(0,s.jsx)(l.m,{message:e.projectionTooltip,icon:c.wRm})]}),(0,s.jsx)("div",{children:e.projection>0&&e.formatAsSize?(0,o.Xq)(e.projection,{unit:e.unit}):(0,o.ZV)(e.projection)})]}),e.maximum&&!e.hideIncluded&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"traffic",children:"Included in plan"}),(0,s.jsx)("div",{children:e.formatAsSize?(0,o.Xq)(e.maximum-t,{unit:e.unit,precision:0}):(0,o.ZV)(e.maximum-t)})]})]})]})},h=(0,r.I)("div")({name:"ProgressBarStyles",class:"p14z22y3",propsAsIs:!1,vars:{"p14z22y3-0":[function(e){return e.progress}],"p14z22y3-1":[function(e){return e.progressColor}],"p14z22y3-2":[function(e){return String(e.projection)}],"p14z22y3-3":[function(e){return e.projectionColor}]}})}
1,25028:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(15383),s=n(53764);n(33510);let r=function(e){var t=e.onChange,n=e.checked,s=e.color,r=e.disabled,o=e.size;return(0,i.jsx)(a,{color:s,children:(0,i.jsxs)("label",{htmlFor:"toggle",className:o,children:[(0,i.jsx)("input",{id:"toggle",type:"checkbox",onChange:function(e){return t(e.target.checked)},checked:n,disabled:r}),(0,i.jsx)("span",{className:"slider round"})]})})};var a=(0,s.I)("span")({name:"ToggleStyles",class:"t1va79uz",propsAsIs:!1,vars:{"t1va79uz-0":[function(e){return e.color?e.color:"#006ec7"}]}})},25472:e=>{e.exports={iz9yw37:"iz9yw37","input-group":"input-group",submit:"submit","field-container":"field-container",summary:"summary",icon:"icon","fading-circle":"fading-circle","checkbox-wrapper":"checkbox-wrapper",checkbox:"checkbox",description:"description","summary-success":"summary-success","successful-color":"successful-color","error-color":"error-color","input-summary":"input-summary","retry-button":"retry-button"}},27758:e=>{e.exports={p132gmq0:"p132gmq0",actions:"actions","summary-error":"summary-error"}},29516:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var i=n(78024),s=n(37743),r=n(1833),a=n(15383),o=n(53764),c=n(14343),l=n(85616),d=n(89267);n(6806);var u={small:d.A.layouts.paddings.submit,normal:d.A.layouts.paddings.normalButton,large:d.A.layouts.paddings.largeButton},h=function(e){function t(){return(0,s._)(this,t),(0,i._)(this,t,arguments)}return(0,r._)(t,e),t.prototype.render=function(){return(0,a.jsx)("div",{className:"submit",hidden:!!this.props.hidden&&this.props.hidden,children:(0,a.jsxs)("div",{className:m,children:[(0,a.jsx)(p,{customSize:this.props.customSize,color:this.props.color,className:this.props.className?this.props.className:"",type:"submit",onClick:this.props.form.submit,value:this.props.value,disabled:this.props.disabled}),this.props.loading&&(0,a.jsx)(l.A,{})]})})},t}(c.Component),p=(0,o.I)("input")({name:"InputStyles",class:"i12peusf",propsAsIs:!1,vars:{"i12peusf-0":[function(e){return u[e.customSize||"normal"]}],"i12peusf-1":[function(e){var t=e.color;return d.A.colors.buttoncolors[void 0===t?"mint":t]}],"i12peusf-2":[function(e){var t=e.color;return t?"".concat(d.A.colors.buttoncolors.darken[t]):""}]}}),m="d1byzllr"},29521:e=>{e.exports={p14z22y3:"p14z22y3",labels:"labels",maximum:"maximum",bar:"bar",progress:"progress",projection:"projection",legend:"legend",credits:"credits",projected:"projected",traffic:"traffic"}},29783:e=>{e.exports={s1si9q4a:"s1si9q4a",sehjr8m:"sehjr8m",table:"table",tr:"tr",thead:"thead",origin:"origin",settings:"settings",endpoint:"endpoint",aliases:"aliases",value:"value",traffic:"traffic",status:"status"}},32488:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var i=n(78024),s=n(37743),r=n(1833),a=n(15383),o=n(14343),c=n(53764),l=n(69399),d=n(23401),u=n(45369);n(4975);var h={card:u.A.src,iban:"/_next/static/media/iban.0c1e2b06.svg",visa:"/_next/static/media/visa.36db84e6.svg",mastercard:"/_next/static/media/mastercard.e95eaa61.svg",americanexpress:"/_next/static/media/americanexpress.1ffb0c5b.svg",discover:"/_next/static/media/discover.a7c78576.svg",new:"/_next/static/media/new.fd4a585b.svg"},p=function(e){function t(){return(0,s._)(this,t),(0,i._)(this,t,arguments)}return(0,r._)(t,e),t.prototype.render=function(){var e=this;return(0,a.jsxs)(m,{className:"".concat(this.props.type," ").concat(this.props.select),onClick:function(){e.props.onClick&&e.props.onClick()},children:[(0,a.jsx)("figure",{children:"paypal"===this.props.type?(0,a.jsx)(l.g,{icon:d.Btl,size:"5x"}):(0,a.jsx)("img",{src:h[this.props.type]})}),(0,a.jsx)("p",{children:this.props.number})]})},t}(o.Component),m=(0,c.I)("div")({name:"PaymentCardStyles",class:"pje7e67",propsAsIs:!1})},33510:e=>{e.exports={t1va79uz:"t1va79uz",xl:"xl",slider:"slider"}},34120:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/express.730bbff2.svg",height:31,width:106,blurWidth:0,blurHeight:0}},34727:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/rails.84813ad0.svg",height:155,width:411,blurWidth:0,blurHeight:0}},35197:e=>{e.exports={s9pd5ol:"s9pd5ol"}},36100:e=>{e.exports={cmy6ryf:"cmy6ryf","input-group":"input-group"}},36468:e=>{e.exports={s17jfsjr:"s17jfsjr"}},37886:e=>{e.exports={cz0es63:"cz0es63",container:"container",row:"row",th:"th",error:"error",ok:"ok",state:"state"}},38326:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(78024),s=n(37743),r=n(83846),a=n(1833),o=n(15383),c=function(e){function t(e){(0,s._)(this,t),(n=(0,i._)(this,t,[e])).update=function(e,t){var i=Object.assign(n.state.values,(0,r._)({},e,t));n.setState({values:i})},n.validate=function(){var e=n.props.fields,t=n.state.values,i=[];return(Object.keys(e).forEach(function(n){var s=e[n],r=t[n]||"";s.required&&r.length<1&&i.push({path:n,error:"required_field"}),"email"==s.type&&r.length>1&&!r.match(/[\w._%+-]+@[\w0-9.-]+\.[\w]+/)&&i.push({path:n,error:"invalid_format",expected:"email"})}),i.length>0)?(n.props.onError({error:"invalid_request",details:i}
1),!1):(n.props.onError(void 0),!0)},n.submit=function(e){e.preventDefault(),n.validate()&&n.props.onSubmit(n.state.values)};var n,a={};return e.values&&(a=e.values),n.state={values:a},n}return(0,a._)(t,e),t.prototype.render=function(){return(0,o.jsx)("form",{onSubmit:this.submit,onChange:this.props.onChange,noValidate:!0,children:this.props.children(this)})},t}(n(14343).Component)},41273:e=>{e.exports={s2uzlhr:"s2uzlhr"}},41955:e=>{e.exports={p6hp87o:"p6hp87o","payment-method":"payment-method",expanded:"expanded","payment-method-details":"payment-method-details",card:"card","payment-method-options":"payment-method-options"}},42073:e=>{e.exports={if6ugxd:"if6ugxd","field-container":"field-container"}},45437:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/prestashop.c761fda4.svg",height:323,width:2160,blurWidth:0,blurHeight:0}},47179:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/symfony.18d12270.svg",height:57,width:226,blurWidth:0,blurHeight:0}},47369:e=>{e.exports={a2i62i3:"a2i62i3",c1re3o7j:"c1re3o7j",thead:"thead",collapsed:"collapsed",origin:"origin",settings:"settings",aliases:"aliases",value:"value","arrow-1":"arrow-1","arrow-2":"arrow-2","border-right":"border-right","colord-important":"colord-important","color-neutral":"color-neutral",darker:"darker","color-warning":"color-warning",endpoint:"endpoint",traffic:"traffic",status:"status",action:"action",edit:"edit"}},50523:e=>{e.exports={s19yzwfu:"s19yzwfu",savings:"savings",content:"content",jpg:"jpg",png:"png",avif:"avif",webp:"webp",other:"other",renditions:"renditions"}},51924:e=>{e.exports={c1tg4hg2:"c1tg4hg2","credit-card-details":"credit-card-details","credit-card-input":"credit-card-input","input-group":"input-group"}},52961:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/jekyll.ba065b6f.svg",height:1019,width:2496,blurWidth:0,blurHeight:0}},58136:e=>{e.exports={a3xmcyg:"a3xmcyg","gravatar-link":"gravatar-link",tooltip:"tooltip","submit-container":"submit-container","summary-success":"summary-success","check-email":"check-email",blurb:"blurb","email-actions":"email-actions",disabled:"disabled"}},58216:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,J:()=>o});var i=n(29935),s=n(82643),r=n(77248);function a(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/account-invoicing-details",void 0,!0)]})})()}function o(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.F6)("/account-invoicing-details",e)]})})()}},60273:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/magento2.3ac8a362.svg",height:916,width:3316,blurWidth:0,blurHeight:0}},61030:e=>{e.exports={s1fj6y2d:"s1fj6y2d",step:"step",name:"name",icon:"icon","draw-line":"draw-line"}},61305:(e,t,n)=>{"use strict";n.d(t,{w0:()=>tL,Z7:()=>f,m8:()=>w,KK:()=>e9,TX:()=>ts,aT:()=>t_,su:()=>tl,p:()=>tA,Q8:()=>tj,Ew:()=>tT,BD:()=>tJ,wk:()=>tQ});var i=n(29935),s=n(78024),r=n(37743),a=n(1833),o=n(82643),c=n(15383),l=n(14343),d=n(69074),u=n(13008),h=n(38326),p=n(29516),m=n(4589);n(36468);var f=function(e){function t(e){var n;return(0,r._)(this,t),(n=(0,s._)(this,t,[e])).addSite=function(e){return(0,i._)(function(){var t;return(0,o.YH)(this,function(i){switch(i.label){case 0:"http://"!==(t=e.url).substring(0,7)&&"https://"!=t.substring(0,8)&&(t="https://"+t),n.setState({error:void 0}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,m.WQ)(t)];case 2:return i.sent(),n.props.fetchCdnDetails(),n.props.hideAddCdn(),[3,4];case 3:return i.sent(),n.setState({error:{error:"invalid_request",details:[{path:"url",error:"invalid_format",expected:"This URL does not seem valid."}]}}),[3,4];case 4:return[2]}})})()},n.state={error:void 0},n}return(0,a._)(t,e),t.prototype.render=function(){var e=this;return(0,c.jsx)("div",{hidden:!this.props.visible,children:(0,c.jsx)(h.A,{onSubmit:this.addSite,onError:function(t){e.setState({error:t})},fields:{url:{required:!0}},onChange:function(){return e.setState({error:void 0})},children:function(t){return(0,c.jsxs)("div",{className:g,children:[(0,c.jsx)(u.Ay,{form:t,name:"url",type:"url",placeholder:"Website domain",default:"",error:e.state.error}),(0,c.jsx)(p.A,{form:t,value:"Add",customSize:"small",color:"green"}),(0,c.jsx)(d.A,{color:"neutral",size:"small",onClick:function(){return e.props.hideAddCdn()},children:"Cancel"})]})}})})},t}
1(l.Component),g="s17jfsjr",x=n(53764),v=n(67750),j=n.n(v),y=n(69399),b=n(86449),_=n(31757);n(3493);var w=function(e){function t(e){var n;return(0,r._)(this,t),(n=(0,s._)(this,t,[e])).state={loading:!1},n}return(0,a._)(t,e),t.prototype.render=function(){return(0,c.jsxs)(C,{children:[(0,c.jsxs)(_.A,{className:"information-box",children:[(0,c.jsx)("h3",{children:"Billing address"}),this.props.invoicingDetails.client||this.props.invoicingDetails.vatNumber?(0,c.jsx)("p",{children:"The following information is currently registered for your invoices. If needed you can modify the invoice details on your latest invoice within 30 days of the invoice creation date. To do so click on Edit your invoice details to modify your address."}):(0,c.jsx)("p",{children:"You can modify the invoice details on your latest invoice within 30 days of the invoice creation date. To do so click on Edit your invoice details to modify your billing address."})]}),(0,c.jsxs)("div",{className:"address-details",children:[this.props.invoicingDetails.client||this.props.invoicingDetails.vatNumber?(0,c.jsxs)("div",{children:[(0,c.jsx)("h4",{children:this.props.invoicingDetails.client}),(0,c.jsx)("p",{children:this.props.invoicingDetails.address&&this.props.invoicingDetails.address.replace(/,/g,"\n")}),this.props.invoicingDetails.vatNumber&&(0,c.jsxs)("div",{className:"vat-details",children:[(0,c.jsx)("strong",{children:"VAT number"}),(0,c.jsx)("span",{children:this.props.invoicingDetails.vatNumber})]})]}):(0,c.jsx)("p",{children:"No invoice details available yet."}),(0,c.jsx)("hr",{}),(0,c.jsxs)(j(),{href:"/dashboard/account-details",children:["Edit your invoice details",(0,c.jsx)(y.g,{icon:b.dmS})]})]})]})},t}(l.Component),C=(0,x.I)("div")({name:"BillingAddressStyles",class:"b1gswgd3",propsAsIs:!1}),N=n(83846),A=n(12694),k=n(11945),S=n(89267),E=n(17844),I=n(93629),D=n(80288);function z(e){var t=e.show,n=e.children;return t?(0,c.jsx)(D.A,{isOpen:!0,style:{overlay:{backgroundColor:"rgba(161, 183, 191, 0.85)"},content:{padding:"3rem"}},children:(0,c.jsx)(T,{children:n})}):null}n(98812);var T=(0,x.I)("div")({name:"PromptModalStyles",class:"p1jpfa4i",propsAsIs:!1});function P(e){var t=e.action,n=e.onConfirm,i=e.onCancel;return(0,c.jsxs)(F,{children:[(0,c.jsxs)("h3",{children:["Are you sure you want to ",t," this endpoint?"]}),"enable"==t&&(0,c.jsxs)("p",{children:["Enabling this endpoint will ",(0,c.jsx)("strong",{children:"resume traffic"})," to the endpoint."]}),"disable"==t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("p",{children:["Disabling this endpoint will ",(0,c.jsx)("strong",{children:"stop traffic"})," to the endpoint and ",(0,c.jsx)("strong",{children:"flushes"})," your compressed media library. This can take ",(0,c.jsx)("strong",{children:"a few hours"})," to propagate through the network."]}),(0,c.jsx)("p",{children:"Make sure to disable Tinify CDN on your website before disabling."})]}),"remove"==t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("p",{children:["Removing this endpoint will ",(0,c.jsx)("strong",{children:"stop traffic"})," to the endpoint and ",(0,c.jsx)("strong",{children:"flushes"})," your compressed media library. This can take ",(0,c.jsx)("strong",{children:"a few hours"})," to propagate through the network."]}),(0,c.jsxs)("p",{children:["Make sure to disable Tinify CDN on your website. Removing the endpoint is ",(0,c.jsx)("strong",{children:"irreversible"}),"."]})]}),(0,c.jsxs)("div",{className:"actions",children:[(0,c.jsx)(d.A,{size:"small",color:"neutral",onClick:function(){return i()},children:"Cancel"}),(0,c.jsx)(d.A,{size:"small",color:"mint",onClick:function(){return n()},children:t})]})]})}n(9736);var F=(0,x.I)("div")({name:"EnableDisableStyles",class:"e1ffsaz9",propsAsIs:!1});function Y(e){var t=(0,A._)((0,l.useState)(""),2),n=t[0],i=t[1],s=(0,A._)((0,l.useState)("all"),2),r=s[0],a=s[1],o=(0,A._)((0,l.useState)("purge"),2),h=o[0],p=o[1],f=(0,A._)((0,l.useState)(),2),g=f[0],x=f[1],v=function(){(0,m.OU)(e.site.id).then(function(){p("done")}).catch(function(e){console.log(e),x(e.message)})},j=function(){var t=n.replace(/ /g,"").replace(/\n/g,",").split(",").filter(function(e){return e});(0,m.ai)(e.site.id,{paths:t}).then(function(){p("done")}
1).catch(function(e){switch(e.error){case"invalid_request":x("Invalid request, please enter correct path(s).");break;case"internal_error":x("Internal error, please try again later.");break;default:x(e.message)}console.log(e)})},_=function(){if("done"==h)return void e.setConfirm(void 0);"custom"==r?j():"confirm"==h?v():p("confirm")},w=function(){x("")},C=function(){x(""),p("purge"),a("all")};return(0,c.jsxs)(O,{children:["purge"==h&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Purge cache"}),(0,c.jsxs)("p",{children:["You are about to purge the cache of the following endpoint:",(0,c.jsx)("br",{}),e.site.origin_url]}),(0,c.jsx)("br",{}),(0,c.jsxs)("form",{children:[(0,c.jsx)("input",{id:"radioAll",type:"radio",name:"purgeSelect",value:"endpoint",onChange:function(){a("all"),w()},checked:"all"==r}),(0,c.jsx)("label",{htmlFor:"radioAll",children:"Everything"}),(0,c.jsx)("p",{children:"Clear all cached files and serve the latest versions."}),(0,c.jsx)("input",{id:"radioCustom",type:"radio",name:"purgeSelect",value:"paths",onChange:function(){return a("custom")}}),(0,c.jsx)("label",{htmlFor:"radioCustom",children:"Custom"}),(0,c.jsxs)("p",{children:["Purge certain assets, for instructions please visit the"," ",(0,c.jsx)("a",{href:"/cdn/documentation/purge-cache",children:"CDN documentation page"}),"."]}),"custom"==r&&(0,c.jsx)(u.Ay,{type:"textarea",name:"paths",placeholder:"Enter file path(s) here separated by comma (,) or a new lineâ¦",onChange:function(e){i(e.target.value),w()}})]})]}),"confirm"==h&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Are you sure you want to purge everything?"}),(0,c.jsxs)("p",{children:["Are you sure you want to purge everything? This action will remove"," ",(0,c.jsx)("strong",{children:"all"})," your cached files from Tinify CDN. The CDN(s) will pull the files from your site and you may see an increase in traffic to your endpoint"]}),(0,c.jsx)("p",{children:"Note: In case you only need to remove a couple of files, it is recommended to select the âcustom purgeâ option."})]}),"done"==h&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Your purge request is confirmed"}),(0,c.jsxs)("p",{children:["With purging your cache you remove cached content from the CDN network and start serving the latest version of your content. Depending on the size of the request, this can take a",(0,c.jsx)("strong",{children:" few hours"})," to propagate through the network."]}),(0,c.jsx)("a",{onClick:function(){return C()},children:"Create new request"})]}),(0,c.jsxs)("div",{className:"actions",children:[g&&(0,c.jsxs)("div",{className:"summary-error",children:[(0,c.jsx)(y.g,{icon:b.tUE}),g]}),"done"!=h&&(0,c.jsx)(d.A,{size:"small",color:"neutral",onClick:function(){return e.setConfirm(void 0)},children:"Cancel"}),(0,c.jsxs)(d.A,{size:"small",color:"mint",onClick:function(){w(),_()},children:["confirm"==h&&"Confirm","purge"==h&&"Purge","done"==h&&"Close"]})]})]})}n(27758);var O=(0,x.I)("section")({name:"PurgePathsStyles",class:"p132gmq0",propsAsIs:!1}),R=n(57459);n(61030);var H={done:(0,c.jsx)(y.g,{icon:k.QRE,size:"lg",className:"icon"}),current:(0,c.jsx)(y.g,{icon:R.GEE,size:"lg",className:"icon",mask:k.GEE,transform:"shrink-3"}),todo:(0,c.jsx)(y.g,{icon:R.GEE,size:"lg",className:"icon"})};function q(e){var t=e.steps,n=e.currentStep;return(0,c.jsx)(B,{children:t.map(function(e,i){var s;return(0,c.jsxs)("div",{className:i===t.length-1?"step":"step draw-line",children:[(s=t.length,s===n?H.done:i>n?H.todo:i<n?H.done:i===n?H.current:null),(0,c.jsx)("span",{className:"name",children:e})]},"".concat(e,"-").concat(i))})})}var B=(0,x.I)("div")({name:"StepsStyle",class:"s1fj6y2d",propsAsIs:!1});function M(e){var t=e.buttons,n=e.site;return(0,c.jsxs)(L,{children:[(0,c.jsx)("h3",{children:"Adding an alias"}),(0,c.jsx)("p",{children:"A CDN alias refers to a personalized and unique web address that you can associate with your website or online presence. It helps establish a professional image and creates a consistent and cohesive online identity. A custom alias also allows you to have greater control over your websiteâs URL structure and improves search engine optimization (SEO) by providing a clear and focused alias for search engines to index."}),(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Important:"})," Tinify CDN only supports a single certificate to be installed on your CDN site. This means that when you configure your own alias, your CDN site can only be used with your aliases and any usage of ",(0,c.jsx)("strong",{children:n.endpoint})," will yield a 'this connection is insecure' error."]}),t]})}n(11218);var L=(0,x.I)("div")({name:"StartStyle",class:"saq5y34",propsAsIs:!1}),W=n(24526);n(42073);let V=function(e){var t=e.label,n=e.className,i=e.children;return(0,c.jsxs)(U,{className:"input-group "+(void 0===n?"":n),children:[(0,c.jsx)("div",{children:(0,c.jsx)("label",{children:t})}),(0,c.jsx)("div",{className:"field-container",children:i})]})};var U=(0,x.I)("div")({name:"InputGroupContainer",class:"if6ugxd",propsAsIs:!1});function G(e){var t=e.markCompleted,n=e.site,s=e.certificate,r=e.setTlsConfig,a=e.buttons,d=(0,A._)((0,l.useState)(void 0),2),p=d[0],f=d[1],g=(0,A._)((0,l.useState)(!1),2),x=g[0],v=g[1],j=function(){var e;return void 0!==p&&(null==(e=p.details)?void 0:e.filter(function(e){return 0>["bundle","private_key"].indexOf(e.path||"")}).length)>0?(0,c.jsx)(W.g,{message:p.details[0].message||"Unknown error"}):null};return(0,c.jsxs)(J,{children:[(0,c.jsx)("h3",{children:"Import your certificate"}),(0,c.jsxs)("p",{children:["You will need to provide us with a valid PEM encoded X.509 certificate and a matching private key (RSA or EDCSA). The certificate must be trusted, and not expired."," "]}),(0,c.jsx)(h.A,{onSubmit:function(e){return(0,i._)(function(){var i;return(0,o.YH)(this,function(a){switch(a.label){case 0:v(!0),a.label=1;case 1:if(a.trys.push([1,4,,5]),(null==s?void 0:s.bundle)===e.bundle&&(null==s?void 0:s.private_key)===e.private_key)return[3,3];return[4,(0,m.hB)(n.id,e)];case 2:r({certificate:i=a.sent(),source:{bundle:e.bundle,private_key:e.private_key},wildcard:i.alternative_names[0].startsWith("*")}),a.label=3;case 3:return v(!1),t(),[3,5];case 4:return f(a.sent()),v(!1),[3,5];case 5:return[2]}})})()},onError:function(e){return f(e)},fields:{bundle:{required:!0},private_key:{required:!0}},values:{bundle:null==s?void 0:s.bundle,private_key:null==s?void 0:s.private_key},children:function(e){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(V,{label:"Certificate",children:(0,c.jsx)(u.Ay,{form:e,showErrorMessageFromAPI:!0,type:"textarea",
1name:"bundle",default:null==s?void 0:s.bundle,onChange:function(){return f(void 0)},error:p,placeholder:"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"})}),(0,c.jsx)(V,{label:"Private key",children:(0,c.jsx)(u.Ay,{form:e,showErrorMessageFromAPI:!0,type:"textarea",name:"private_key",default:null==s?void 0:s.private_key,onChange:function(){return f(void 0)},error:p,placeholder:"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"})}),j(),l.cloneElement(a,{onContinueClick:function(){return null},continueButtonLoading:x,docsLink:{pageId:"use-your-own-domain-name",anchor:"import-your-certificate"}})]})}})]})}n(36100);var J=(0,x.I)("div")({name:"CertificateStyle",class:"cmy6ryf",propsAsIs:!1}),X=n(68541);function Z(e){return(0,c.jsxs)(Q,{children:[(0,c.jsxs)("div",{className:"left",children:[!e.hideCancelProcess&&(0,c.jsx)("a",{onClick:function(t){return e.onCancel()},children:"Cancel process"}),(0,c.jsx)(X.A,(0,I._)((0,E._)({},e.docsLink||{pageId:"use-your-own-domain-name"}),{children:"documentation"}))]}),(0,c.jsxs)("div",{className:"right",children:[!e.hidePreviousButton&&(0,c.jsx)(d.A,{size:"small",color:"neutral",disabled:e.previousButtonDisabled,type:"button",onClick:function(t){t.preventDefault(),e.onPreviousClick(t)},children:"Back"}),(0,c.jsx)(d.A,{type:"submit",loading:e.continueButtonLoading,size:"small",color:e.continueButtonColor,disabled:e.continueButtonLoading||e.continueButtonDisabled,onClick:function(t){e.onContinueClick()},children:e.continueButtonValue})]})]})}n(93278);var Q=(0,x.I)("div")({name:"ButtonStyles",class:"bpv1igk",propsAsIs:!1}),K=n(86105),$=n(70010);n(19004);var ee=(0,x.I)("div")({name:"PillStyle",class:"p1dsjcrm",propsAsIs:!1,vars:{"p1dsjcrm-0":[function(e){return e.backgroundColor}]}});function et(e){var t=e.backgroundColor,n=e.children;return(0,c.jsx)(ee,{backgroundColor:void 0===t?"none":t,children:n})}function en(e){var t=e.availableAliases,n=e.aliasErrors,i=e.setAliases,s=e.loading,r=e.site,a=e.buttons,o=(0,l.useMemo)(function(){var e,n;return e=function(e){var t=e.split(".").reverse(),n=t.splice(1,1)[0];return t.unshift(n),t},n=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),t.sort(function(t,i){return n.compare(e(t).join("."),e(i).join("."))})},[t]),d=(0,A._)((0,l.useState)([]),2),u=d[0],h=d[1],p=(0,A._)((0,l.useState)([]),2),m=p[0],f=p[1];return(0,l.useEffect)(function(){var e=r.aliases.map(function(e){return e.name}),n=t.filter(function(t){return e.includes(t)});n.length>0?h((0,K._)(n)):0===u.length&&h(t.slice(0,3));var i=e.filter(function(e){return!t.includes(e)});f((0,K._)(i))},[r.aliases,t]),(0,l.useEffect)(function(){var e=Object.keys(n);h(function(t){var n=t.filter(function(t){return -1===e.indexOf(t)});return i(n),n})},[n]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{children:"Select the aliases that you want to use on your CDN site. You can only choose aliases that are secured by your provided certificate."}),m.length>0&&(0,c.jsx)("p",{className:ei,children:"Note: You have aliases configured on this site, that will not be secured with the newly provided certificate. These aliases will be automatically removed once you save."}),(0,c.jsxs)("ul",{className:es,children:[m.map(function(e){return(0,c.jsx)("li",{className:er,children:(0,c.jsxs)(et,{backgroundColor:S.A.colors.backgroundcolors.lightorange,children:[(0,c.jsx)("span",{className:ea,children:(0,c.jsx)($.m,{message:"The new certificate does not secure this alias",icon:k.JAe})}),e]})},e)}),o.map(function(e){var t=-1!==u.indexOf(e);return(0,c.jsx)("li",{className:er,onClick:function(){return s||e in n?null:h(function(t){var n=t.indexOf(e);if(-1!==n)return t.splice(n,1),i((0,K._)(t)),(0,K._)(t);var s=(0,K._)(t).concat([e]);return i(s),s})},children:(0,c.jsxs)(et,{backgroundColor:n[e]?S.A.colors.backgroundcolors.lightorange:t?S.A.colors.backgroundcolors.success:"#FFF",children:[(0,c.jsx)("span",{className:ea,children:n[e]?(0,c.jsx)($.m,{message:n[e],icon:k.JAe}):(0,c.jsx)(y.g,{icon:t?R.Dnq:R.Nfw})}),e]})},e)})]}),a]})}var ei="e1jvmtpm",es="a1ccr4rn",er="a18zdc3o",ea="i10oaygn";n(21854);var eo=["images","cdn","assets","media","files","resources","content"];function ec(e){var t=e.wildcardAlias,n=e.setAliases,i=e.aliases,s=e.serverErrors,r=e.handleSubmit,a=e.buttons,o=(0,A._)((0,l.useState)(void 0),2),d=o[0],h=o[1];(0,l.useEffect)(function(){h(s)},[s]);var p=function(e,n){var i=new RegExp("^[^.]+\\.".concat(t.substring(2),"$"));return""===n?{path:e,error:"required_field"}:i.test(n)?null:{message:"This alias is not secured by the certificate for ".concat(t,"."),path:e,error:"invalid_value"}},m=function(e){var t=[],n=!0,i=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(n=(r=a.next()).done);
1n=!0){var o=(0,A._)(r.value,2),c=o[0],l=o[1],d=p(c,l);d&&t.push(d)}}catch(e){i=!0,s=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw s}}return!t.length||(h({error:"invalid_request",details:t}),!1)};return(0,l.useEffect)(function(){i.length>0?m(i.map(function(e,t){return["aliases/"+t,e]})):0===i.length&&n([""])},[]),(0,c.jsx)(el,{children:(0,c.jsxs)("form",{onSubmit:function(e){e.preventDefault();var t=new FormData(e.currentTarget);m((0,K._)(t.entries()))&&(n((0,K._)(new Set(t.values()))),h(void 0),r())},children:[(0,c.jsx)("ul",{children:i.map(function(e,s){return(0,c.jsxs)("li",{children:[(0,c.jsx)("div",{className:"input-wrapper",children:(0,c.jsx)(u.Ay,{error:d,errorLocation:"bottom",placeholder:eo[s]+t.slice(1),default:e,type:"text",onBlur:function(e){var t=p("aliases/".concat(s),e.target.value);t?h(function(e){return e?(e.details.push(t),(0,E._)({},e)):{error:"invalid_request",details:[t]}}):h(function(e){return e?(0,I._)((0,E._)({},e),{details:e.details.filter(function(e){return e.path!=="aliases/".concat(s)})}):e})},name:"aliases/".concat(s)})}),(0,c.jsx)("span",{className:"icon",children:i.length>1&&(0,c.jsx)(y.g,{size:"lg",icon:k.yLS,onClick:function(){h(function(e){return e?(0,I._)((0,E._)({},e),{details:e.details.filter(function(e){return e.path!=="aliases/".concat(s)})}):e}),n(function(e){return e.filter(function(e,t){return s!==t})})}})})]},"".concat(e,"-").concat(s))})}),i.length<5&&(0,c.jsx)("a",{onClick:function(){return n(function(e){var t=(0,K._)(e);return t.push(""),t})},children:"Add another alias"}),a]})})}var el=(0,x.I)("div")({name:"AliasAddStyles",class:"a17tli2f",propsAsIs:!1});function ed(e){var t=e.buttons,n=e.markCompleted,s=e.tlsConfig,r=e.aliases,a=e.site,d=e.setAliases,u=(0,A._)((0,l.useState)(void 0),2),h=u[0],p=u[1],f=(0,A._)((0,l.useState)(void 0),2),g=f[0],x=f[1],v=(0,A._)((0,l.useState)({}),2),j=v[0],y=v[1],b=(0,A._)((0,l.useState)(!1),2),_=b[0],w=b[1],C=(0,A._)((0,l.useState)(0),2),N=C[0],k=C[1];(0,l.useEffect)(function(){0!==N&&(0,i._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:w(!0),p(void 0),t.label=1;case 1:if(t.trys.push([1,4,,5]),r.sort().join("")===a.aliases.map(function(e){return e.name}).sort().join(""))return[3,3];return[4,(0,m.yo)(a.id,{aliases:r,certificate:s.source})];case 2:t.sent(),t.label=3;case 3:return n(),[3,5];case 4:return(e=t.sent()).error&&("invalid_request"===e.error?(x(e),y(Object.fromEntries(e.details.filter(function(e){return!!e.path&&"duplicate_value"===e.error&&e.path.startsWith("aliases/")}).map(function(e){var t;return[(null==(t=e.path)?void 0:t.split("/")[1])?r[Number(e.path.split("/")[1])]:void 0,"This alias is already in use on a different site"]})))):p(e.message)),w(!1),[3,5];case 5:return[2]}})})()},[N]),(0,l.useEffect)(function(){r.length>5?p("Too many aliases selected. You can only select 5 alias names!"):0==r.length?p("No aliases selected! You will need to select at least one alias to continue."):p(void 0)},[r]);var S=(0,l.useMemo)(function(){return h?h:h?-1!==h.indexOf("has a value that is already in use.")?"Some aliases cannot be used, because they are already in use on another site":h:null},[h]);return(0,c.jsxs)(eu,{children:[(0,c.jsx)("h3",{children:"Adding aliases"}),(0,c.jsx)("div",{className:"error",children:S&&(0,c.jsx)(W.g,{message:S})||null}),s.wildcard&&(0,c.jsx)(ec,{wildcardAlias:s.certificate.alternative_names[0],loading:_,serverErrors:g,aliases:r,setAliases:d,handleSubmit:function(){return Promise.resolve(k(function(e){return e+1}))},buttons:l.cloneElement(t,{onContinueClick:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){return[2,null]})})()},continueButtonValue:"Save",continueButtonLoading:_,continueButtonDisabled:void 0!==h,docsLink:{pageId:"use-your-own-domain-name",anchor:"setup-your-cdn-aliases"}})})||(0,c.jsx)(en,{availableAliases:s.certificate.alternative_names,site:a,aliasErrors:j,loading:_,setAliases:d,buttons:l.cloneElement(t,{onContinueClick:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){return[2,k(function(e){return e+1})]})})()},continueButtonValue:"Save",continueButtonLoading:_,continueButtonDisabled:void 0!==h,docsLink:{pageId:"use-your-own-domain-name",anchor:"setup-your-cdn-aliases"}})})]})}n(65114);var eu=(0,x.I)("div")({name:"AddCustomAliasesStyles",class:"a173yihj",propsAsIs:!1}),eh=n(47949);n(37886);var ep=function(e){return e[e.Success=0]="Success",e[e.Failed=1]="Failed",e}(ep||{}),em=["active","error"];function ef(e){var t=(0,l.useRef)(void 0),n=(0,A._)((0,l.useState)(null),2),s=n[0],r=n[1],a=(0,A._)((0,l.useState)(!1),2),d=a[0],u=a[1];return(0,l.useEffect)(function(){return t.current=setTimeout(function(){return(0,i._)(function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:return[4,e.refetchSingleSite(e.site.id)];case 1:return[2,t.sent()]}})})()},2e3),function(){return clearTimeout(t.current)}}),(0,l.useEffect)(function(){e.site.aliases.every(function(e){return -1!==em.indexOf(e.state)})&&(void 0!==e.site.aliases.find(function(e){return"error"==e.state})?r(1):r(0))},[e.site.aliases]),(0,l.useEffect)(function(){null!==s&&clearTimeout(t.current)},[s]),(0,c.jsxs)(eg,{children:[1===s&&(0,c.jsx)(W.g,{message:"Something went wrong while deploying your config. Your configuration will be reverted to previous settings. Contact [email protected] for assistance."}),(0,c.jsx)("h3",{children:"Configure your DNS"}),(0,c.jsx)("p",{children:"Configure your DNS provider to use your CDN alias with Tinify CDN. You can use the CNAME target that will be shown in the VALUE row after the changes have been confirmed to be valid and propogating to the network."}),(0,c.jsxs)("p",{children:["We have compiled step by step instructions on configuring your DNS on the"," ",(0,c.jsx)(X.A,{pageId:"use-your-own-domain-name",anchor:"configure-your-dns",children:"documentation page."})]}),(0,c.jsxs)("div",{className:"container",children:[(0,c.jsxs)("div",{className:"th",children:[(0,c.jsx)("div",{children:(0,c.jsx)("strong",{children:"Alias"})}),(0,c.jsx)("div",{children:(0,c.jsx)("strong",{children:"Value"})})]}),(0,c.jsx)("div",{className:"tr",children:e.site.aliases.map(function(t){return(0,c.jsxs)("div",{className:"row "+("error"===t.state?"error ":" ok"),
1children:[(0,c.jsx)("div",{children:t.name}),(0,c.jsx)("div",{children:"active"===t.state?"".concat(e.site.endpoint.split("https://")[1],"."):"error"!==t.state?(0,c.jsx)(eh.A,{}):(0,c.jsx)(c.Fragment,{children:"Deployment error"})}),(0,c.jsx)("div",{className:"state",children:{pending_deployment:(0,c.jsx)(c.Fragment,{}),pending_certificate:(0,c.jsx)(c.Fragment,{}),active:(0,c.jsx)(y.g,{icon:k.SGM}),error:(0,c.jsx)(y.g,{icon:k.bnw})}[t.state]})]},t.name)})})]}),l.cloneElement(e.buttons,{onContinueClick:function(){return(0,i._)(function(){var t;return(0,o.YH)(this,function(n){switch(n.label){case 0:if(0===s)return[2,e.onContinueClick()];return u(!0),t=e.site.aliases.filter(function(e){return"error"!==e.state}).map(function(e){return e.name}),[4,(0,m.yo)(e.site.id,{aliases:t})];case 1:return n.sent(),[4,e.refetchSingleSite(e.site.id)];case 2:return n.sent(),e.onCancel(),[2]}})})()},previousButtonDisabled:!0,continueButtonLoading:d,continueButtonValue:1===s?"Revert configuration":"Next",continueButtonColor:0===s?"green":"red",hidePreviousButton:!0,hideCancelProcess:!0,continueButtonDisabled:null===s,docsLink:{pageId:"use-your-own-domain-name",anchor:"configure-your-dns"}})]})}var eg=(0,x.I)("div")({name:"ConfigureDNSStyles",class:"cz0es63",propsAsIs:!1});n(6531);var ex=["start","certificate","configure alias","configure dns","ready"];function ev(e){var t=e.onCancel,n=e.site,s=e.startStep,r=e.refetchSingleSite,a=(0,A._)((0,l.useState)(0),2),d=a[0],u=a[1],h=(0,l.useMemo)(function(){if(!s)return ex;var e=ex.indexOf(s);return ex.slice(e)},[s]),p=(0,A._)((0,l.useState)(n.certificate&&{certificate:n.certificate,wildcard:n.certificate.alternative_names[0].startsWith("*.")}||void 0),2),m=p[0],f=p[1],g=(0,A._)((0,l.useState)(n.aliases.map(function(e){return e.name})),2),x=g[0],v=g[1],j=(0,c.jsx)(Z,{onCancel:function(){return t()},onPreviousClick:function(){d>0&&u(d-1),0===d&&t()},continueButtonColor:"green",continueButtonValue:d!==ex.length?"Continue":"Finish",onContinueClick:function(){return u(d+1)},previousButtonDisabled:!1});return(0,c.jsxs)(l.Fragment,{children:[(0,c.jsx)(q,{steps:h,currentStep:d}),(0,c.jsx)(ej,{children:{start:(0,c.jsx)(M,{buttons:j,site:n}),certificate:(0,c.jsx)(G,{markCompleted:function(){u(function(e){return e+1})},site:n,certificate:null==m?void 0:m.source,setTlsConfig:f,buttons:j}),"configure alias":void 0!==m&&(0,c.jsx)(ed,{markCompleted:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return[4,r(n.id)];case 1:return e.sent(),u(function(e){return e+1}),[2]}})})()},tlsConfig:m,aliases:x,setAliases:v,buttons:j,site:n}),"configure dns":(0,c.jsx)(ef,{buttons:j,refetchSingleSite:r,site:n,onCancel:t,onContinueClick:function(){return u(d+1)}}),ready:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Your CDN aliases are set up"}),(0,c.jsxs)("p",{children:["Please be aware that your site is not accessible anymore via"," ",n.endpoint," and should only be accessed through the aliases."]}),(0,c.jsxs)("p",{children:["You can review your set-up in the installation instructions for your site, or"," ",(0,c.jsx)(X.A,{pageId:"use-your-own-domain-name",anchor:"verify-the-setup",children:"read the documentation."})]}),l.cloneElement(j,{onContinueClick:t,continueButtonValue:"Close",hideCancelProcess:!0,docsLink:{pageId:"use-your-own-domain-name",anchor:"verify-the-setup"}}
1)]})}[h[d]]})]})}var ej=(0,x.I)("div")({name:"WizardStyles",class:"w1p2rqqk",propsAsIs:!1}),ey=n(67659),eb=n.n(ey);let e_=function(e){var t=(0,A._)((0,l.useState)(!0),2),n=t[0],i=t[1],s=(0,A._)((0,l.useState)(e?eb()(e.validity_end):null),2),r=s[0],a=s[1];return(0,l.useEffect)(function(){if(e){var t=eb()(e.validity_end);a(t),i(eb()()<t)}},[e]),{isValidCertificate:n,expirationDate:r}};function ew(e){var t=e_(e.certificate),n=t.isValidCertificate,i=t.expirationDate;return(0,c.jsxs)(_.A,{padding:"none",className:eC,children:[(0,c.jsxs)("div",{className:"metadata",children:[(0,c.jsxs)("span",{className:"title",children:[(0,c.jsx)("span",{className:"show-mediumdown",children:"Certificate\xa0"}),"Expiration date"]}),(0,c.jsx)("span",{className:"value",children:i&&i.format("Do MMM YYYY")})]}),(0,c.jsx)("div",{className:"badge-wrap",children:n?(0,c.jsx)("span",{className:"badge valid",children:"Valid"}):(0,c.jsx)("span",{className:"badge invalid",children:"Expired"})})]})}n(75374);var eC="c1c4is5b";function eN(e){var t=e.onCancel,n=e.site,s=e.refetchSingleSite,r=(0,A._)((0,l.useState)(!1),2),a=r[0],u=r[1];return(0,c.jsxs)(l.Fragment,{children:[(0,c.jsx)("h3",{children:"Are you sure you want to remove the certificate"}),(0,c.jsxs)("p",{children:["Removing the certificate will also ",(0,c.jsx)("strong",{children:"remove the aliases"})," ",'on this CDN endpoint. After removal, only "',n.endpoint,'" can be used for accessing content on the CDN.']}),(0,c.jsxs)("p",{children:["Make sure you are ",(0,c.jsx)("strong",{children:"not using"})," any of the following aliases on your website before removing the certificate."]}),(0,c.jsx)("p",{children:(0,c.jsx)("ul",{children:n.aliases.map(function(e){return(0,c.jsx)("li",{children:e.name},e.name)})})}),(0,c.jsxs)("p",{children:['Removing the certificate and reverting to the default "',n.endpoint,'" can take up to 20 minutes.']}),(0,c.jsxs)("div",{className:"actions",children:[(0,c.jsx)(d.A,{size:"small",color:"neutral",onClick:function(){return t()},children:"Cancel"}),(0,c.jsx)(d.A,{size:"small",color:"mint",disabled:a,onClick:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:u(!0),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,(0,m.yo)(n.id,{certificate:null,aliases:[]})];case 2:return e.sent(),[4,s(n.id)];case 3:return e.sent(),u(!1),t(),[3,5];case 4:return e.sent(),u(!1),[3,5];case 5:return[2]}})})()},children:"Remove certificate"})]})]})}function eA(e){var t=e.aliases;return(0,c.jsx)(ek,{children:t.map(function(e){return(0,c.jsxs)("li",{children:[function(e){switch(e){case"active":return(0,c.jsx)(y.g,{icon:k.GEE,className:"icon",color:S.A.colors.interaction.success});case"pending_deployment":return(0,c.jsx)(y.g,{icon:k.z1G,className:"icon",spin:!0});case"pending_certificate":return(0,c.jsx)(y.g,{icon:k.GEE,className:"icon",color:S.A.colors.interaction.warning});default:return(0,c.jsx)(y.g,{icon:k.wRm,color:S.A.colors.interaction.warning,className:"icon"})}}(e.state),e.name]},e.name)})})}n(63814);var ek=(0,x.I)("ul")({name:"AliassesStyles",class:"a11t1kr",propsAsIs:!1}),eS=n(36318),eE=n(94937),eI=n(97597),eD=n(60273),ez=n(45437),eT=n(80396),eP=n(14050),eF=n(34727),eY=n(47179),eO=n(89307),eR=n(52961),eH=n(34120),eq={wordpress:"WordPress",magento2:"Magento",prestashop:"PrestaShop",drupal:"Drupal",joomla:"Joomla",rails:"Rails",symfony:"Symfony",laravel:"Laravel",jekyll:"Jekyll",express:"Express",custom:"Other"},eB={wordpress:eI.A.src,magento2:eD.A.src,prestashop:ez.A.src,drupal:eT.A.src,joomla:eP.A.src,rails:eF.A.src,symfony:eY.A.src,laravel:eO.A.src,jekyll:eR.A.src,express:eH.A.src},eM=Object.entries(eq).map(function(e){var t=(0,A._)(e,2);return{value:t[0],label:t[1]}}),eL=function(e){var t;return{content:"''",display:"block",height:"2.2rem",width:"2.2rem",marginRight:"1rem",background:"url(".concat(null!=(t=eB[e.value])?t:"",") 50% / 20px no-repeat transparent")}},eW=function(e){var t=eq[e];return t?{value:e,label:t}:void 0},eV={display:"none"},eU=function(e){var t=e.innerProps;return(0,c.jsx)("span",(0,E._)({style:eV},t))};function eG(e){var t=eS.c.DropdownIndicator;return(0,c.jsx)(t,(0,I._)((0,E._)({},e),{children:(0,c.jsxs)("div",{className:"drop-down",style:{display:"grid",color:"#40444F"},children:[(0,c.jsx)(y.g,{className:"icon",icon:b.GF6,style:{height:"1.2rem",marginBottom:"-4.7px"}}),(0,c.jsx)(y.g,{className:"icon",icon:b.tdl,style:{height:"1.2rem"}})]})}))}
1var eJ=function(e){var t=e.value,n=e.onChange;return(0,c.jsx)(eE.Ay,{options:eM,value:eW(t),onChange:function(e){return e&&n(e.value)},components:{DropdownIndicator:eG,IndicatorSeparator:eU},styles:{container:function(e){return(0,I._)((0,E._)({},e),{borderRadius:"1rem",border:"1px solid #E2E5E8",padding:"0.4rem 0.6rem",width:"100%",height:"4.5rem",outline:"none",color:"".concat(S.A.colors.fontcolors.body),fontSize:"1.5rem",lineHeight:"2.2rem",background:"#FFF","&:before":{color:"".concat(S.A.colors.fontcolors.placeholder)}})},control:function(e){return(0,I._)((0,E._)({},e),{backgroundColor:"none",border:"0",boxShadow:"none","&:focus":{outline:"none"},"&:active":{outline:"none"}})},menu:function(e){return(0,I._)((0,E._)({},e),{left:"0rem",overflow:"hidden"})},option:function(e,t){var n=t.data,i=t.isSelected,s=t.isFocused;return(0,I._)((0,E._)({},e),{display:"flex",alignItems:"center",fontWeight:"normal",padding:"0.8rem 1.6rem",backgroundColor:i?S.A.colors.buttoncolors.blue:s?S.A.colors.backgroundcolors.lightblue:"white","&:before":eL(n)})},singleValue:function(e,t){var n=t.data;return(0,I._)((0,E._)({},e),{display:"flex",alignItems:"center",fontWeight:"normal","&:before":eL(n)})}}})},eX=n(25028);function eZ(e){var t=e.checked,n=e.onChange,i=e.created_at;return(0,c.jsxs)(_.A,{padding:"none",className:eQ,children:[(0,c.jsxs)("div",{className:"metadata",children:[(0,c.jsxs)("span",{className:"title",children:[(0,c.jsx)("span",{className:"show-mediumdown"}),"Image transcoding"]}),(0,c.jsxs)("span",{className:"value",children:["images will be automatically converted to WebP",i>new Date("2025-03-17T13:00:00Z")?" or AVIF":""," for supported devices"]})]}),(0,c.jsx)("div",{className:"badge-wrap",children:(0,c.jsx)(eX.A,{checked:t,onChange:n,color:S.A.colors.buttoncolors.green,size:"xl"})})]})}n(22090);var eQ="tckrlkm";n(65585);var eK=function(e){return e[e.NONE=0]="NONE",e[e.PURGE_CACHE=1]="PURGE_CACHE",e[e.TOGGLE_ENDPOINT_STATUS=2]="TOGGLE_ENDPOINT_STATUS",e[e.REMOVE_ENDPOINT=3]="REMOVE_ENDPOINT",e[e.CONFIGURE_CUSTOM_DOMAIN_TLS_WIZARD=4]="CONFIGURE_CUSTOM_DOMAIN_TLS_WIZARD",e[e.UPDATE_CERTIFICATE=5]="UPDATE_CERTIFICATE",e[e.UPDATE_ALIASES=6]="UPDATE_ALIASES",e[e.REMOVE_CERTIFICATE=7]="REMOVE_CERTIFICATE",e}(eK||{});function e$(e){var t,n=e.site,s=e.refetchSingleSite,r=e.fetchCdnDetails,a=e.plan,d=(0,A._)((0,l.useState)({origin_url:n.origin_url}),2),p=d[0],f=d[1],g=(0,A._)((0,l.useState)({edge_transcoding:!1}),2),x=g[0],v=g[1],j=(0,A._)((0,l.useState)({}),2),b=j[0],_=j[1],w=(0,A._)((0,l.useState)(0),2),C=w[0],S=w[1],D=function(e){return(0,i._)(function(){var t,i,a,c;return(0,o.YH)(this,function(o){switch(o.label){case 0:return o.trys.push([0,7,,8]),[4,(0,m.yo)(n.id,e)];case 1:if(!("error"in(t=o.sent())))return[3,2];return console.error(t),[3,6];case 2:if("removed"!==e.state)return[3,4];return[4,r()];case 3:return o.sent(),[3,6];case 4:return[4,s(n.id)];case 5:o.sent(),o.label=6;case 6:return[3,8];case 7:return"error"in(i=o.sent())&&void 0!==(c=null==(a=i.details)?void 0:a.map(function(e){return[e.path,i]}))&&_(function(e){return(0,E._)({},e,Object.fromEntries(c))}),[3,8];case 8:return[2]}})})()},T=(n.aliases.length>0||n.certificate)&&a;return(0,c.jsxs)(e1,{children:[(0,c.jsx)(z,{show:0!==C,children:(t={},(0,N._)(t,1,(0,c.jsx)(Y,{setConfirm:function(){S(0)},site:n},n.id)),(0,N._)(t,3,(0,c.jsx)(P,{action:"remove",onConfirm:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return[4,D({state:"removed"})];case 1:return e.sent(),S(0),[2]}})})()},onCancel:function(){return S(0)}},n.id)),(0,N._)(t,2,(0,c.jsx)(P,{action:"active"===n.state?"disable":"enable",onConfirm:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return[4,D({state:"active"===n.state?"disabled":"active"})];case 1:return e.sent(),S(0),[2]}})})()},onCancel:function(){return S(0)}},n.id)),(0,N._)(t,4,(0,c.jsx)(ev,{site:n,onCancel:function(){return S(0)},refetchSingleSite:s},n.id)),(0,N._)(t,6,(0,c.jsx)(ev,{site:n,startStep:"configure alias",onCancel:function(){return S(0)},refetchSingleSite:s},n.id)),(0,N._)(t,5,(0,c.jsx)(ev,{site:n,startStep:"certificate",onCancel:function(){return S(0)},refetchSingleSite:s},n.id)),(0,N._)(t,7,(0,c.jsx)(eN,{site:n,refetchSingleSite:s,onCancel:function(){return S(0)}},n.id)),(0,N._)(t,0,null),t)[C]}),(0,c.jsxs)(e2,{children:[(0,c.jsxs)("div",{style:{paddingTop:"0.75rem"},children:[(0,c.jsx)(h.A,{onSubmit:function(e){e.origin_url!==n.origin_url&&D({origin_url:e.origin_url,state:"active"})},onChange:function(){return _(function(e){return(0,I._)((0,E._)({},e),{origin_url:void 0})})},onError:function(e){return _(function(t){return(0,I._)((0,E._)({},t),{origin_url:e})})},fields:{origin_url:{required:!0}},values:{origin_url:p.origin_url},children:function(e){return(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"align-input",children:"Origin URL"}),(0,c.jsx)(u.Ay,{form:e,name:"origin_url",type:"url",disabled:!a,default:p.origin_url,editable:!0,onChange:function(e){return f(function(t){return(0,I._)((0,E._)({},t),{origin_url:e.target.value})})},error:b.origin_url,errorLocation:"bottom",style:"jasper"}),(0,c.jsx)("div",{hidden:p.origin_url==n.origin_url,children:(0,c.jsx)("button",{style:{position:"absolute",right:"3rem",top:"0.85rem",padding:"0.5rem 1rem",border:"none",background:"#40444f",borderRadius:"0.3rem",color:"white",cursor:"pointer"},children:"Update"})})]})}}),(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"align-input",children:"Platform"}),(0,c.jsx)("div",{className:"small",children:(0,c.jsx)(eJ,{value:n.selected_technology||n.detected_technology||"custom",onChange:function(e){return D({selected_technology:e})}})})]}),0===n.aliases.length&&(null==a?void 0:a.details.third_party_certificate)===!0&&(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"align-input",children:"Aliases"}),(0,c.jsx)("div",{children:(0,c.jsx)("button",{onClick:function(){return S(4)},className:"btn neutral",children:"Configure your aliases"})})]}),T&&(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"align-input",children:"Aliases"}),(0,c.jsx)("div",{children:(0,c.jsx)(eA,{aliases:n.aliases})})]}),(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"hide-mediumdown align-input-shadowbox",children:"Certificate"}),(0,c.jsx)("div",{children:n.certificate&&(0,c.jsx)(ew,{certificate:n.certificate})})]})]}),(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)("label",{className:"hide-mediumdown align-input-shadowbox",children:"Auto convert"}),(0,c.jsx)("div",{children:(0,c.jsx)(eZ,{created_at:new Date(n.created_at),checked:!!(x.edge_transcoding?p.edge_transcoding:n.edge_transcoding),onChange:function(e){return(0,i._)(function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:if(f(function(t){return(0,I._)((0,E._)({},t),{edge_transcoding:e})}),x.edge_transcoding)return[3,5];v(function(e){return(0,I._)((0,E._)({},e),{edge_transcoding:!0})}),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,D({edge_transcoding:e})];case 2:return t.sent(),[3,4];case 3:return t.sent(),f(function(e){return(0,I._)((0,E._)({},e),{edge_transcoding:n.edge_transcoding})}),[3,4];case 4:v(function(e){return(0,I._)((0,E._)({},e),{edge_transcoding:!1})}),t.label=5;case 5:return[2]}})})()}})})]})]}),(0,c.jsx)(e0,{children:(0,c.jsxs)("ul",{className:"fa-ul",children:[a&&(0,c.jsxs)(l.Fragment,{children:[(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.LBj,listItem:!0}),(0,c.jsx)("a",{onClick:function(){D({instructions_visible:!0}),window.scrollTo(0,0)},children:"Installation instructions"})]}),(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.pyI,listItem:!0}),(0,c.jsx)("a",{onClick:function(){return S(1)},children:"Purge cache"})]}),(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.Jyw,listItem:!0}),(0,c.jsxs)("a",{onClick:function(){return S(2)},children:["active"==n.state?"Disable":"Enable"," endpoint"]})]})]}),(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.yLS,listItem:!0}),(0,c.jsx)("a",{onClick:function(){return S(3)},children:"Remove endpoint"})]}),T&&(0,c.jsxs)(c.Fragment,{children:[(null==a?void 0:a.details.third_party_certificate)===!0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.zLW,listItem:!0}),(0,c.jsx)("a",{onClick:function(){return S(6)},children:"Edit aliases"})]}),(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.Vpu,listItem:!0}),(0,c.jsx)("a",{onClick:function(){return S(5)},children:"Update SSL certificate"})]})]}),(0,c.jsxs)("li",{children:[(0,c.jsx)(y.g,{icon:k.mGv,listItem:!0}),(0,c.jsx)("a",{onClick:function(){return S(7)},children:"Remove SSL certificate"})]})]})]})})]})]})}var e0=(0,x.I)("div")({name:"Actions",class:"a1bgn41",propsAsIs:!1}),e1=(0,x.I)("div")({name:"SettingsStyle",class:"s3hrpgj",propsAsIs:!1}),e2=(0,x.I)("div")({name:"TwoColumns",class:"tocarcx",propsAsIs:!1});function e3(e){var t=e.site,n=e.warning,i="color-"+(n?"warning":"neutral");return(0,c.jsx)(c.Fragment,{children:t.aliases.length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"endpoint",children:[(0,c.jsx)("span",{className:"thead",children:"endpoint"}),(0,c.jsx)("span",{className:"arrow-1 "+i,children:(0,c.jsx)(y.g,{icon:"arrow-right"})}),(0,c.jsx)("span",{className:"value "+i,children:t.endpoint})]}),(0,c.jsxs)("div",{className:"aliases",children:[(0,c.jsx)("span",{className:"thead",children:"aliases"}),(0,c.jsx)("span",{className:"arrow-2 darker "+i,children:(0,c.jsx)(y.g,{icon:"arrow-right"})}),(0,c.jsxs)("span",{className:"value border-right "+i,children:[(0,c.jsx)("span",{className:i+" darker",style:{float:"left"},children:t.aliases.length}),(0,c.jsx)("span",{className:i+" darker border-right",style:{float:"right",paddingRight:"0.6rem"},children:(0,c.jsx)($.m,{message:n?"There is a problem with delivery on this site. The certificate is expired.":"This site can only serve traffic over one of the configured alias domains.",icon:k.wRm})})]})]})]})||(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"endpoint",children:[(0,c.jsx)("span",{className:"thead",children:"endpoint"}),(0,c.jsx)("span",{className:"arrow-1",children:(0,c.jsx)(y.g,{icon:"arrow-right"})}),(0,c.jsx)("span",{className:"value",children:t.endpoint})]}),(0,c.jsx)("div",{className:"aliases",children:t.aliases.length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"thead",children:"aliases"}),(0,c.jsx)("span",{className:"",children:"site.aliases.length"})]})})]})})}function e4(e){var t=(0,A._)((0,l.useState)(e.settingsExpanded),2),n=t[0],i=t[1],s=e_(e.site.certificate).isValidCertificate;return(0,l.useEffect)(function(){i(e.settingsExpanded)},[e.settingsExpanded]),(0,c.jsxs)(l.Fragment,{children:[(0,c.jsxs)(e7,{className:n?"collapsed "+e.className:e.className,children:[(0,c.jsxs)("div",{className:"origin",children:[(0,c.jsx)("span",{className:"thead",children:"origins"}),(0,c.jsx)("span",{children:e.site.origin_url})]}),(0,c.jsx)(e3,{site:e.site,warning:!s}),(0,c.jsx)("div",{className:"traffic",children:(0,c.jsxs)("div",{className:"data",children:[(e.bandwidth/1e3).toFixed(2)," GB"]})}),(0,c.jsx)("div",{className:"status",children:(0,c.jsx)(e6,{className:"action",state:e.site.state,children:e.site.state})}),(0,c.jsx)("div",{className:"settings",children:(0,c.jsx)(y.g,{icon:k.BH7,className:"icon",onClick:function(){e.expandSettingsClicked?e.expandSettingsClicked():i(!n)}})})]}),n&&(0,c.jsx)(e5,{children:(0,c.jsx)(e$,{site:e.site,plan:e.plan,refetchSingleSite:e.refetchSingleSite,fetchCdnDetail
1s:e.fetchCdnDetails})})]})}n(47369);var e5=(0,x.I)("div")({name:"CollapsableAnimation",class:"c112jr6y",propsAsIs:!1}),e6=(0,x.I)("span")({name:"ActionStyles",class:"a2i62i3",propsAsIs:!1,vars:{"a2i62i3-0":[function(e){return"active"==e.state?S.A.colors.productcolors.web:S.A.colors.fontcolors.placeholder}]}}),e7=(0,x.I)("div")({name:"CDNSitesRowStyles",class:"c1re3o7j",propsAsIs:!1});n(29783);var e9=function(e){function t(e){var n;return(0,r._)(this,t),(n=(0,s._)(this,t,[e])).hideAddCdn=function(){n.setState({addSiteVisible:!1})},n.bandwidthUsage=function(e){if(!n.props.statistics)return 0;var t=new Date().getMonth(),i=0;return Object.entries(n.props.statistics.traffic.usage[e]).forEach(function(e){var n=(0,A._)(e,2),s=n[0],r=n[1];new Date(s).getMonth()==t&&(i+=r)}),i},n.state={addSiteVisible:!1,siteSettingsExpanded:{}},n}return(0,a._)(t,e),t.prototype.render=function(){var e=this,t=this.props.sites.length,n=this.props.account.paying_state,i=this.props.account,s=this.props.account.plan&&!this.props.account.plan.details.sites_excess&&this.props.account.plan.details.sites_included;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(_.A,{children:(0,c.jsxs)(te,{children:[(0,c.jsx)("h3",{children:"CDN endpoints"}),(0,c.jsxs)("div",{className:"table",children:[(0,c.jsxs)("div",{className:"thead tr",children:[(0,c.jsxs)("div",{children:["Origins (",t,s&&"/".concat(s),")"]}),(0,c.jsx)("div",{children:"Endpoint"}),(0,c.jsx)("div",{children:this.props.sites&&this.props.sites.find(function(e){return e.aliases.length>0})&&(0,c.jsx)(c.Fragment,{children:"Aliases"})}),(0,c.jsx)("div",{children:"Traffic"}),(0,c.jsx)("div",{children:"Status"})]}),this.props.sites.map(function(t,n){return(0,c.jsx)(e4,{index:n,site:t,bandwidth:e.bandwidthUsage(t.id),refetchSingleSite:e.props.refetchSingleSite,fetchCdnDetails:e.props.fetchCdnDetails,plan:e.props.account.plan,className:"tr",settingsExpanded:e.state.siteSettingsExpanded[t.id]||!1,expandSettingsClicked:function(){return e.setState({siteSettingsExpanded:(0,N._)({},t.id,!e.state.siteSettingsExpanded[t.id])})}},n)})]}),(0,c.jsx)("div",{className:e8,children:i&&"delinquent"!=n&&s&&s<=t?(0,c.jsxs)("p",{children:["In need of more endpoints?"," ",(0,c.jsx)("a",{href:"/dashboard/cdn-checkout",children:"Upgrade your account!"})]}):this.props.account.plan&&(0,c.jsx)(d.A,{size:"small",color:"orange",icon:"arrow-right",iconPosition:"left",onClick:function(){return e.setState({addSiteVisible:!0})},children:"Add new endpoint"})})]})}),(0,c.jsx)(f,{enabled:!s||t<s,visible:this.state.addSiteVisible,hideAddCdn:this.hideAddCdn,fetchCdnDetails:this.props.fetchCdnDetails})]})},t}(l.Component),e8="s1si9q4a",te=(0,x.I)("div")({name:"SitesTableStyle",class:"sehjr8m",propsAsIs:!1}),tt=n(32488);n(51924);var tn=function(e){function t(){return(0,r._)(this,t),(0,s._)(this,t,arguments)}(0,a._)(t,e);var n=t.prototype;return n.updateName=function(e){if(e){var t=e.target.name,n=e.target.value,i=(0,E._)({},this.props).newCardPaymentOption;Object.assign(i,(0,N._)({},t,n)),this.props.updatePaymentDetails(i)}},n.updateCard=function(e){if(e){var t=e.target.name,n=e.target.value,i=this.props.newCardPaymentOption?this.props.newCardPaymentOption:{paymentType:"card",type:"card",fullName:"",card:{number:"",exp_month:"",exp_year:"",cvc:""}};Object.assign(i.card,(0,N._)({},t,n)),this.props.updatePaymentDetails(i)}},n.render=function(){var e=this;return(0,c.jsx)(ti,{children:(0,c.jsx)("form",{children:(0,c.jsxs)("div",{className:"credit-card-details",children:[(0,c.jsxs)("div",{className:"credit-card-input",children:[(0,c.jsx)(u.Ay,{error:this.props.validationErrors,errorLocation:"right",onChange:function(t){return e.updateCard(t)},type:"number",name:"number",id:"cardnumber",placeholder:"0000 0000 0000 0000",autocomplete:"cc-number"}),(0,c.jsxs)("div",{className:"input-group",children:[(0,c.jsx)(u.Ay,{error:this.props.validationErrors,onChange:function(t){return e.updateCard(t)},type:"number",name:"exp_month",placeholder:"MM",id:"expiration_date_month",autocomplete:"cc-exp-month"}),(0,c.jsx)(u.Ay,{error:this.props.validationErrors,onChange:function(t){return e.updateCard(t)},type:"number",name:"exp_year",placeholder:"YYYY",id:"expiration_date_year",autocomplete:"cc-exp-year"}),(0,c.jsx)(u.Ay,{error:this.props.validationErrors,errorLocation:"right",onCh
1ange:function(t){return e.updateCard(t)},type:"number",name:"cvc",id:"cvc",placeholder:"CVC",autocomplete:"cc-csc"})]})]}),(0,c.jsx)("section",{children:(0,c.jsx)(tt.A,{type:"card",number:"â¢â¢â¢â¢ â¢â¢â¢â¢ â¢â¢â¢â¢ â¢â¢â¢â¢"})})]})})})},t}(l.Component),ti=(0,x.I)("div")({name:"CreditCardPaymentStyles",class:"c1tg4hg2",propsAsIs:!1});n(41955);var ts=function(e){function t(){return(0,r._)(this,t),(0,s._)(this,t,arguments)}(0,a._)(t,e);var n=t.prototype;return n.UpdatePaymentMethod=function(e){this.props.loading||(this.setState({paymentType:e}),this.props.updatePaymentMethod(e))},n.updatePaymentDetails=function(e){this.props.loading||this.props.updatePaymentDetails(e)},n.render=function(){var e=this;return(0,c.jsxs)(tr,{children:[this.props.paymentDetails&&this.props.paymentDetails.existing&&(0,c.jsxs)("div",{className:"payment-method ".concat("existing"==this.props.paymentMethod?"expanded":""),onClick:function(){return e.UpdatePaymentMethod("existing")},children:[(0,c.jsx)("input",{onChange:function(){return e.UpdatePaymentMethod("existing")},type:"radio",checked:"existing"==this.props.paymentMethod,name:"payment-method",id:"existing-method",value:"existing-method"}),(0,c.jsx)("label",{htmlFor:"existing-method",children:"Existing payment method"}),(0,c.jsxs)("div",{className:"payment-method-details",children:[(0,c.jsx)("p",{children:"Youâve previously purchased a product or subscription from us. Select one of the existing payment methods or create a new one."}),(0,c.jsx)("div",{className:"payment-method-options",children:(0,c.jsx)(tt.A,{type:"card",number:this.props.paymentDetails.existing.number})})]})]}),(0,c.jsxs)("div",{className:"payment-method ".concat("card"==this.props.paymentMethod?"expanded":""),onClick:function(){return e.UpdatePaymentMethod("card")},children:[(0,c.jsx)("input",{onChange:function(){return e.UpdatePaymentMethod("card")},type:"radio",checked:"card"==this.props.paymentMethod,name:"payment-method",id:"card",value:"card"}),(0,c.jsx)("label",{htmlFor:"card",children:"Credit card"}),(0,c.jsxs)("div",{className:"payment-method-details",children:[(0,c.jsx)("p",{children:"Please enter your credit card details below"}),(0,c.jsx)(tn,{newCardPaymentOption:this.props.paymentDetails.card,updatePaymentDetails:this.props.updatePaymentDetails,validationErrors:this.props.validationErrors})]})]})]})},t}(l.Component),tr=(0,x.I)("section")({name:"PaymentMethodStyles",class:"p6hp87o",propsAsIs:!1}),ta=n(58216),to=n(36345);n(25472);var tc=function(e){return e[e.Incomplete=0]="Incomplete",e[e.Validating=1]="Validating",e[e.Valid=2]="Valid",e[e.Invalid=3]="Invalid",e[e.Unchanged=4]="Unchanged",e}(tc||{});function tl(e){var t=e.invoicingDetails,n=(0,A._)((0,l.useState)(!1),2),s=n[0],r=n[1],a=(0,A._)((0,l.useState)(""),2),h=a[0],p=a[1],m=(0,A._)((0,l.useState)(""),2),f=m[0],g=m[1],x=(0,A._)((0,l.useState)(!1),2),v=x[0],j=x[1],w=(0,A._)((0,l.useState)(!!t.vatNumber),2),C=w[0],N=w[1],S=(0,A._)((0,l.useState)(4),2),E=S[0],I=S[1],D=(0,A._)((0,l.useState)(""),2),z=D[0],T=D[1],P=(0,A._)((0,l.useState)(t.vatNumber),2),F=P[0],Y=P[1],O=(0,A._)((0,l.useState)(t.client),2),R=O[0],H=O[1],q=(0,A._)((0,l.useState)(t.address),2),B=q[0],M=q[1],L=(0,A._)((0,l.useState)(t.email),2),W=L[0],U=L[1],G=(0,A._)((0,l.useState)(!0),2),J=G[0],X=G[1],Z=(0,A._)((0,l.useState)(!0),2),Q=Z[0],K=Z[1],$=function(e){return(0,i._)(function(){var t,n,i;return(0,o.YH)(this,function(s){switch(s.label){case 0:if(!e)return I(0),[2];Y(t=e.toLocaleUpperCase()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,(0,to.I)(t)];case 2:return n=s.sent(),I(2),H(n.company),en(n.company),M(n.address.join("\n")),[3,4];case 3:return i=s.sent(),I(3),T(i.message),[3,4];case 4:return[2]}})})()},ee=function(){return(0,i._)(function(){var e,t;return(0,o.YH)(this,function(n){switch(n.label){case 0:if(p(""),g(""),r(!0),!R)return K(!1),[2];if(!es())return g("One or more fields are invalid."),[2];Y(e=C?F:void 0),t={vatNumber:e,client:R,address:B,email:W},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,ta.J)(t)];case 2:return n.sent(),p("Invoice details updated!"),I(0),setTimeout(function(){p("")},3e3),[3,4];case 3:return g(n.sent().message),[3,4];case 4:return j(!1),r(!1),I(4),[2]}})})()},et=function(e){var t=e.target,n=t.name,i=t.value,s=""===i?void 0:i;switch(n){case"hasVAT":N(!C);break;case"vatNumber":I(0),Y(i);break;case"client":H(i),en(i);break;case"address":M(s);break;case"email":U(s),ei(s)}g(""),j(!0)},en=function(e){return""!==t.client||v?e&&""!==e.trim()?void K(!0):void K(!1):void K(!0)},ei=function(e){return e?e.match(/[\w._%+-]+@[\w0-9.-]+\.[\w]+/)?void X(!0):void X(!1):void X(!0)},es=function(){var e=!C||2===E||4===E;return v&&J&&Q&&e};return(0,c.jsx)(td,{children:(0,c.jsx)(_.A,{title:"Invoice details",children:(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"description",children:"If you wish to have the invoice receipt issued for your company, please fill out the form below. The billing address is the address that will appear on the invoice."}),(0,c.jsx)("div",{className:"checkbox-wrapper",children:(0,c.jsxs)("label",{children:[(0,c.jsx)("input",{className:"checkbox",name:"hasVAT",type:"checkbox",checked:C,onChange:et}),"I have a European VAT number"]})}
1),(0,c.jsxs)("form",{onSubmit:ee,children:[C&&(0,c.jsxs)(V,{label:"Vat Number",children:[(0,c.jsx)(u.Ay,{name:"vatNumber",type:"text",placeholder:"NL123456789B01",value:F,default:F,invalid:3===E,onChange:et,onFocus:function(){3===E&&I(0)},onBlur:function(e){var t=""===e.target.value?void 0:e.target.value;0===E&&(I(1),$(t))}}),function(){switch(E){case 0:break;case 1:return(0,c.jsxs)("div",{className:"input-summary successful-color",children:[(0,c.jsx)(eh.A,{}),(0,c.jsx)("p",{children:"Checking VAT number. Please wait."})]});case 2:return(0,c.jsxs)("div",{className:"input-summary successful-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:k.iW_}),(0,c.jsxs)("p",{children:["Based on this VAT number, we were able to fill out the address.",(0,c.jsx)("br",{}),"Please check if the address is correct."]})]});case 3:return(0,c.jsxs)("div",{className:"input-summary error-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:k.tUE}),(0,c.jsx)("p",{children:z}),(0,c.jsx)("button",{hidden:z.includes("Invalid"),type:"button",className:"retry-button",onClick:function(){I(1),$(F)},children:"Retry"})]})}return null}()]}),(0,c.jsxs)(V,{label:"Company",children:[(0,c.jsx)(u.Ay,{type:"text",name:"client",placeholder:"Company name",value:R,default:R,invalid:!Q,onChange:et}),!Q&&(0,c.jsxs)("div",{className:"input-summary error-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:k.tUE}),(0,c.jsx)("p",{children:"Please enter a company name."})]})]}),(0,c.jsx)(V,{label:"Address",children:(0,c.jsx)(u.Ay,{type:"textarea",name:"address",placeholder:"Address",value:B,default:B,onChange:et})}),(0,c.jsxs)(V,{label:"Billing Email",children:[(0,c.jsx)("div",{children:(0,c.jsx)("p",{className:"description",children:"Set up a custom address to receive invoice receipts and other billing-related communication. Your primary account email will continue to receive all emails."})}),(0,c.jsx)(u.Ay,{type:"email",name:"email",placeholder:"Billing email address",default:W,invalid:!J,onChange:et}),!J&&(0,c.jsxs)("div",{className:"input-summary error-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:k.tUE}),(0,c.jsx)("p",{children:"Please enter a valid email."})]})]}),(0,c.jsxs)(V,{className:"submit",children:[f&&(0,c.jsxs)("div",{className:"summary error-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:k.tUE}),(0,c.jsx)("p",{children:f})]}),h&&(0,c.jsxs)("div",{className:"summary successful-color",children:[(0,c.jsx)(y.g,{className:"icon",icon:b.SGM}),(0,c.jsx)("p",{children:h})]}),s&&(0,c.jsxs)("div",{className:"summary successful-color",children:[(0,c.jsx)(eh.A,{}),(0,c.jsx)("p",{children:"Updating"})]}),(0,c.jsx)(d.A,{color:"green",disabled:!es(),size:"small",className:"button",handleSubmit:ee,type:"submit",children:"Update"})]})]})]})})})}var td=(0,x.I)("div")({name:"InvoiceDetailsContainer",class:"iz9yw37",propsAsIs:!1}),tu=n(51689),th=n(93101),tp=n(64800),tm=n(24680),tf=n(45544),tg=n(87990),tx=n(55720);function tv(e,t){return e.reduce(function(e,n){return e+t(n)},0)}n(50523);var tj=function(e){var t=e.statistics,n=tv(t,function(e){return e.unoptimized_size}),i=tv(t,function(e){return e.optimized_size}),s=tv(t,function(e){return e.files_count}),r=tv(t,function(e){return e.transcoded_count}),a=tv(t,function(e){return e.transformed_count})+tv(t,function(e){return e.transcoded_count}),o=tv(t,function(e){return e.dimension_count}),d=(0,l.useMemo)(function(){var e={"image/jpeg":{start:0,end:0},"image/png":{start:0,end:0},"image/webp":{start:0,end:0},"image/avif":{start:0,end:0}},n=0;return Object.entries(e).forEach(function(e){var i=(0,A._)(e,2),r=i[0],a=i[1];if(s){var o,c=t.find(function(e){return e.media_type===r}),l=(null!=(o=null==c?void 0:c.files_count)?o:0)/s*360;a.start=n,a.end=l+n,n+=l}}),e},[s]);return(0,c.jsxs)("section",{className:ty,children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{children:"Media library"}),(0,c.jsxs)("div",{children:[(0,c.jsx)("figure",{children:(0,c.jsxs)(tg.t,{theme:tp.i,width:100,height:100,padding:0,defaultAxes:{dependent:(0,c.jsx)(c.Fragment,{}),independent:(0,c.jsx)(c.Fragment,{})},children:[(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],colorScale:[S.A.colors.chartcolors.cdnpielight],labels:[]}),(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],endAngle:(n-i)/n*360,cornerRadius:5,animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.cdnpiestrong],labels:[]}),(0,c.jsx)(tx.R,{text:"".concat(((n-i)/n*100).toFixed(0),"%"),x:52,y:50,textAnchor:"middle",style:{fontSize:20,fontFamily:S.A.fonts.heading,fontWeight:600}})]})}),(0,c.jsxs)("div",{className:"savings",children:[(0,c.jsxs)("h4",{children:["Total savings"," ",(0,c.jsx)($.m,{message:"The savings and original size for resized images is estimated using an AI model trained on historic data.",icon:tu.wRm})]}),(0,c.jsx)("table",{cellSpacing:0,children:(0,c.jsxs)("tbody",{children:[(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{children:"Original size"}),(0,c.jsx)("td",{children:(0,th.Xq)(n)})]}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{children:"Optimized size"}),(0,c.jsx)("td",{children:(0,th.Xq)(i)})]})]})})]})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("figure",{children:(0,c.jsxs)(tg.t,{theme:tp.i,width:100,height:100,padding:0,defaultAxes:{depen
1dent:(0,c.jsx)(c.Fragment,{}),independent:(0,c.jsx)(c.Fragment,{})},children:[(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.other],labels:[]}),d["image/webp"]&&(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],endAngle:d["image/webp"].end,startAngle:d["image/webp"].start,animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.webp],labels:[]}),d["image/avif"]&&(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],endAngle:d["image/avif"].end,startAngle:d["image/avif"].start,animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.avif],labels:[]}),d["image/jpeg"]&&(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],endAngle:d["image/jpeg"].end,startAngle:d["image/jpeg"].start,animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.jpg],labels:[]}),d["image/png"]&&(0,c.jsx)(tf.l,{innerRadius:41,data:[{y:1}],endAngle:d["image/png"].end,startAngle:d["image/png"].start,animate:{duration:0,onLoad:{duration:500}},colorScale:[S.A.colors.chartcolors.png],labels:[]}),(0,c.jsx)(tx.R,{text:"".concat((0,th.Xq)(s,{unit:"",spacing:"",precision:0})),x:50,y:50,textAnchor:"middle",style:{fontSize:20,fontFamily:S.A.fonts.heading,fontWeight:600}})]})}),(0,c.jsxs)("div",{className:"content",children:[(0,c.jsx)("h4",{children:"Optimized content"}),(0,c.jsx)("div",{className:"jpg",children:"JPG files"}),(0,c.jsx)("div",{className:"png",children:"PNG files"}),(0,c.jsx)("div",{className:"webp",children:"WebP files"}),(0,c.jsx)("div",{className:"avif",children:"AVIF files"}),(0,c.jsx)("div",{className:"other",children:"Other files"})]})]})]}),(0,c.jsxs)("aside",{children:[(0,c.jsx)("h4",{children:"Media library size"}),(0,c.jsx)(tm.z,{progress:i,unit:"B",formatAsSize:!0}),(0,c.jsxs)("div",{className:"renditions",children:[(0,c.jsxs)("h4",{children:["Renditions"," ",(0,c.jsx)($.m,{message:"Renditions are all distinct (resized and converted) versions of an original image.",icon:tu.wRm})]}),(0,c.jsx)("table",{cellSpacing:0,children:(0,c.jsxs)("tbody",{children:[(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{children:"Image renditions"}),(0,c.jsx)("td",{children:a})]}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{children:"Dimensions"}),(0,c.jsx)("td",{children:o})]}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{children:"Conversions"}),(0,c.jsx)("td",{children:r})]})]})})]})]})]})},ty="s19yzwfu",tb=n(98835);n(68951);var t_=function(e){function t(){return(0,r._)(this,t),(0,s._)(this,t,arguments)}return(0,a._)(t,e),t.prototype.render=function(){return(0,c.jsxs)(tw,{children:[(0,c.jsxs)("header",{children:[(0,c.jsx)("hgroup",{children:(0,c.jsx)("h1",{children:this.props.title})}),(0,c.jsx)(j(),{href:"/",children:(0,c.jsx)("img",{src:tb.A.src,alt:"Tinify logo"})})]}),(0,c.jsxs)("p",{children:["Thanks for being an awesome member. Drop us a line at"," ",(0,c.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"})," if you have any questions!"]})]})},t}(l.Component),tw=(0,x.I)("div")({name:"DashboardHeaderStyle",class:"d1pkxsb7",propsAsIs:!1}),tC=n(71545),tN=n(81261);n(98192);var tA=function(e){function t(e){var n;return(0,r._)(this,t),(n=(0,s._)(this,t,[e])).downloadInvoiceFromApiNext=function(e,t){return(0,i._)(function(){var n,i;return(0,o.YH)(this,function(s){switch(s.label){case 0:return[4,(0,tN.I)(e)];case 1:if(""==(n=s.sent()).url)return[2];return(i=document.createElement("a")).href=n.url,i.download="Tinify invoice ".concat(t,".pdf"),document.body.appendChild(i),i.click(),document.body.removeChild(i),[2]}})})()},n.downloadInvoiceFromSiteApi=function(e,t){return(0,i._)(function(){var n;return(0,o.YH)(this,function(i){return(n=document.createElement("a")).href="/web/invoices/".concat(e),n.download="Tinify invoice ".concat(t,".pdf"),document.body.appendChild(n),n.click(),document.body.removeChild(n),[2]})})()},n}return(0,a._)(t,e),t.prototype.render=function(){var e,t=this;return this.props.invoices&&(e=this.props.invoices.map(function(e,n){return(0,c.jsx)("div",{onClick:function(n){e.has_pdf&&t.downloadInvoiceFromSiteApi(e.id,e.number)},children:(0,c.jsxs)(_.A,{className:e.has_pdf?"invoice has-pdf":"invoice",padding:"small",children:[(0,c.jsxs)("div",{className:"name",children:[(0,c.jsx)("span",{className:"download",children:(0,c.jsx)(y.g,{icon:b.xCW})}),(0,c.jsx)("span",{className:"invoice-details",children:e.subject})]}),(0,c.jsx)("div",{className:"id",children:e.number}),(0,c.jsx)("div",{className:"date",children:new Date(e.created_at).toISOString().substr(0,10)}),(0,c.jsxs)("div",{className:"amount",children:["$",e.gross_amount]}),(0,c.jsx)("div",{className:"pay-invoice",children:"open"==e.state&&(0,c.jsxs)("a",{href:"/checkout/invoice#".concat(e.id),onClick:function(e){return e.stopPropagation()},children:[(0,c.jsx)("span",{children:"Pay now"}),(0,c.jsx)(y.g,{icon:b.dmS})]})}),(0,c.jsx)("div",{className:"status",children:(0,tC.A)(e.state)})]})},n)})),(0,c.jsxs)(tk,{children:[(0,c.jsx)("h3",{children:"Invoices"}),this.props.invoices.length>0?(0,c.jsxs)("div",{children:[(0,c.jsxs)("header",{children:[(0,c.jsx)("div",{children:"Description"}),(0,c.jsx)("div",{className:"id",children:"Invoice"}),(0,c.jsx)("div",{className:"date",children:"Date"}),(0,c.jsx)("div",{className:"amount",children:"Total"})]}),e]}):(0,c.jsx)("p",{children:"You donât have any invoices yet."})]})},t}(l.Component),tk=(0,x.I)("div")({name:"InvoiceListStyles",class:"i1sbzjy7",propsAsIs:!1}),tS=n(12092),tE=n(58067),tI=n(98923),tD=n(65463),tz=n(37632);n(35197);var tT=function(e){var t=e.statistics,n=e.plan,i=(0,A._)((0,tS.X)(),2),s=i[0],r=i[1],a=new Date().getMonth(),o=0,l={},d=!0,u=!1,h=void 0;try{for(var p,m,f=Object.entries(t.usage)[Symbol.iterator]();
1!(d=(m=f.next()).done);d=!0){var g=(0,A._)(m.value,2)[1],x=!0,v=!1,j=void 0;try{for(var y,b=Object.entries(g)[Symbol.iterator]();!(x=(y=b.next()).done);x=!0){var _=(0,A._)(y.value,2),w=_[0],C=_[1];l[w]=(l[w]||0)+1e6*C,new Date(w).getMonth()==a&&(o+=1e6*C)}}catch(e){v=!0,j=e}finally{try{x||null==b.return||b.return()}finally{if(v)throw j}}}}catch(e){u=!0,h=e}finally{try{d||null==f.return||f.return()}finally{if(u)throw h}}var N=(p=Math).max.apply(p,(0,K._)(Object.values(l))),k=Object.entries(l).map(function(e){var t=(0,A._)(e,2);return{date:t[0],traffic:t[1]}}),E=[-.015*N,1.05*N],I=(0,th.nT)(.9*N),D=I.steps,z=I.formatter,T=Object.entries(Object.values(t.usage)[0]).map(function(e){var t=(0,A._)(e,1)[0],n=[0,6].includes(new Date(t).getDay());return{date:t,y:n?.96*E[1]:null,y0:-(2.5*E[0])}});return 0==N?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{children:"Network traffic"}),(0,c.jsx)("p",{children:"No traffic has been recorded yet. Keep using Tinify CDN and the dashboard will be updated soon."})]}):(0,c.jsxs)("section",{className:tP,children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{children:"Network traffic"}),(0,c.jsx)("figure",{ref:s,children:r&&(0,c.jsxs)(tg.t,{theme:tp.i,width:r.width,height:r.height,padding:{left:55,bottom:25,right:25,top:10},domainPadding:{x:12,y:0},domain:{y:E},containerComponent:(0,c.jsx)(tz.E,{voronoiDimension:"x"}),children:[(0,c.jsx)(tI.k,{barRatio:0,data:T,alignment:"middle",x:"date",style:{data:{stroke:S.A.colors.chartcolors.weekend,strokeWidth:"2.2%"}}}),(0,c.jsx)(tE.O,{dependentAxis:!0,tickValues:D,tickFormat:z,style:{ticks:{strokeWidth:0}}}),(0,c.jsx)(tE.O,{offsetY:25,tickFormat:function(e){var t=new Date(e);return 1!=t.getDay()?"":t.toLocaleDateString("en",{month:"short",day:"numeric"})},style:{grid:{strokeWidth:0},ticks:{strokeWidth:function(e){return+!!e.text}}}}),(0,c.jsx)(tI.k,{cornerRadius:.5,animate:{duration:0,onLoad:{duration:500}},barRatio:.9,data:k,x:"date",y:"traffic",labels:function(e){var t=e.datum,n=t.date,i=t.traffic,s=new Date(n).toLocaleDateString("en",{month:"short",day:"numeric"});return"".concat(s,"\n").concat((0,th.Xq)(i,{unit:"B",zero:!0}))},labelComponent:(0,c.jsx)(tD.A,{theme:tp.i,labelComponent:(0,c.jsx)(tx.R,{lineHeight:1.2})}),style:{data:{fill:function(e){var t=e.datum;return S.A.colors.chartcolors[new Date(t.date).getMonth()==a?"cdncurrent":"cdnprevious"]}}}})]})})]}),(0,c.jsxs)("aside",{children:[(0,c.jsx)("h4",{children:"Traffic this month"}),(0,c.jsx)(tm.z,{progress:o,maximum:n&&1e6*n.details.traffic_included*1e3,projection:1e6*t.projection,unit:"B",showLegend:!0,formatAsSize:!0})]})]})},tP="s9pd5ol",tF=n(2447),tY=n.n(tF),tO=n(40141),tR=n(68408),tH=n(3171),tq=n(73154),tB=n(97252),tM=n(1578);n(58136);let tL=function(){var e,t,n,s,r,a,m=(0,A._)((0,tq.fp)(tB.e),2),f=m[0],g=m[1],x=(0,A._)((0,l.useState)(""),2),v=x[0],_=x[1],w=(0,A._)((0,l.useState)(""),2),C=w[0],N=w[1],k=(0,A._)((0,l.useState)(""),2),S=k[0],E=k[1],I=(0,A._)((0,l.useState)(""),2),D=I[0],z=I[1],T=(0,A._)((0,l.useState)(),2),P=T[0],F=T[1],Y=(0,A._)((0,l.useState)(!1),2),O=Y[0],R=Y[1],H=(0,A._)((0,l.useState)(!1),2),q=H[0],B=H[1],M=(0,A._)((0,l.useState)(),2),L=M[0],W=M[1],V=(0,A._)((0,l.useState)(!1),2),U=V[0],G=V[1],J=(0,tM.Vq)(),X=(t=(e=(0,A._)((0,l.useState)(0),2))[0],n=e[1],r=(s=(0,A._)((0,l.useState)(!0),2))[0],a=s[1],(0,l.useEffect)(function(){a(Date.now()>t);var e=setInterval(function(){return a(Date.now()>t)},1e3);return function(){return clearInterval(e)}},[t]),{reset:function(){return n(Date.now()+6e4)},isOver:r});(0,l.useEffect)(function(){G(!0),(0,i._)(function(){var e,t,n;return(0,o.YH)(this,function(i){switch(i.label){case 0:return[4,(0,tR.Dq)()];case 1:if(e=i.sent(),t=new URLSearchParams(window.location.search).get("confirm"),n=e.accountChange,!(t&&n))return[3,6];i.label=2;case 2:return i.trys.push([2,5,,6]),[4,(0,tR.$p)(n.id,t)];case 3:return i.sent(),[4,(0,tH.Ow)()];case 4:return g.apply(void 0,[i.sent()]),W(void 0),[3,6];case 5:return z(i.sent().message),[3,6];case 6:return W(n),_(f.fullName),N(f.mail),[2]}})})()},[]);var Z=function(e){z(""),F(void 0);var t=e.target;switch(t.name){case"name":_(t.value);break;case"email":N(t.value)}};return(0,c.jsxs)(tW,{children:[(0,c.jsx)("h3",{children:"Account information"}),(0,c.jsxs)("figure",{className:"avatar",children:[U&&(0,c.jsx)(tY(),{email:null==f?void 0:f.mail,default:"mm",size:125}),(0,c.jsxs)(j(),{href:"https://gravatar.com",className:"gravatar-link",target:"_blank",children:[(0,c.jsx)("div",{"data-tip":"We use your Gravatar as your account picture.<br />Click here to go to gravatar.com",children:(0,c.jsx)(y.g,{icon:tu.rwq})}),(0,c.jsx)(tO.A,{className:"tooltip",multiline:!0})]})]}),q?(0,c.jsx)(h.A,{onSubmit:function(){return(0,i._)(function(){var e,t,n;return(0,o.YH)(this,function(i){switch(i.label){case 0:R(!0),E(""),z(""),F(void 0),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,J.execute()];case 2:return e=i.sent(),[4,(0,tR.kI)({name:v,email:C,captcha_challenge:e})];case 3:return t=i.sent(),[4,(0,tH.Ow)()];case 4:return g.apply(void 0,[i.sent()]),t.accountChange?(B(!1),E("Check your inbox!"),W(t.accountChange)):(B(!1),E("Account information updated")),setTimeout(function(){E("")},3e3),[3,6];
1case 5:return z(["blocked_value.","invalid_format.","duplicate_value.","invalid_value."].includes((n=i.sent()).message)?function(e){switch(e){case"blocked_value":return"We canât deliver to this address.";case"invalid_format":return"Invalid format.";case"duplicate_value":return"This email address is already in use.";case"invalid_value":return"This does not seem to be valid.";default:return"This is an invalid email address."}}(n.message):n.message),[3,6];case 6:return R(!1),[2]}})})()},onChange:function(){return z("")},onError:function(e){F(e)},fields:{name:{required:!0},email:{required:!0,type:"email"}},values:{name:v,email:C},children:function(e){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.Ay,{form:e,type:"text",name:"name",icon:b.X46,default:v,error:P,onChange:Z}),(0,c.jsx)(u.Ay,{form:e,type:"email",name:"email",icon:b.y_8,default:C,error:P,onChange:Z,disabled:!!L}),D&&(0,c.jsx)("div",{className:"summary-error",children:D}),(0,c.jsxs)("div",{className:"submit-container",children:[(0,c.jsx)(d.A,{color:"neutral",size:"normal",hidden:!q,onClick:function(){B(!1),_(f.fullName),N(f.mail),z("")},children:"Cancel"}),(0,c.jsx)(p.A,{className:"update",form:e,value:"Update",customSize:"small",loading:O,disabled:O,color:"green"})]})]})}}):(0,c.jsxs)("div",{children:[(0,c.jsx)("h4",{children:null==f?void 0:f.fullName}),(0,c.jsx)("p",{children:null==f?void 0:f.mail}),!L&&(0,c.jsxs)("a",{onClick:function(){return B(!0)},children:["edit ",(0,c.jsx)(y.g,{icon:b.dB})]}),(0,c.jsxs)("div",{className:"summary-success",children:[S&&(0,c.jsx)("p",{className:"check-email",children:(0,c.jsxs)("strong",{children:[S," ",(0,c.jsx)(y.g,{icon:b.e68})]})}),L&&(0,c.jsxs)("div",{children:[(0,c.jsxs)("p",{className:"blurb",children:["A validation email has been sent to ",(0,c.jsx)("br",{}),(0,c.jsx)("strong",{children:"".concat(L.email)}),(0,c.jsx)("br",{}),"with a link to confirm your change."," "]}),(0,c.jsxs)("div",{className:"email-actions",children:[(0,c.jsxs)("a",{onClick:function(){return(0,i._)(function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,(0,tR.RW)(null==L?void 0:L.id)];case 1:return e.sent(),B(!1),W(void 0),N(f.mail),[3,3];case 2:return z(e.sent().message),[3,3];case 3:return[2]}})})()},children:[(0,c.jsx)(y.g,{icon:tu.Jgz,className:"icon"}),(0,c.jsx)("span",{children:"Cancel change"})]}),(0,c.jsxs)("a",{onClick:function(){return(0,i._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:if(!X.isOver)return[2];X.reset(),t.label=1;case 1:return t.trys.push([1,4,,5]),[4,J.execute()];case 2:return e=t.sent(),[4,(0,tR.ux)(null==L?void 0:L.id,e)];case 3:return t.sent(),E("Check your inbox!"),[3,5];case 4:return z(t.sent().message),[3,5];case 5:return setTimeout(function(){return E("")},3e3),[2]}})})()},className:X.isOver?"":"disabled",children:[(0,c.jsx)(y.g,{icon:tu.Yj9,className:"icon"}),(0,c.jsx)("span",{children:"Resend email"})]})]})]})]})]})]})};var tW=(0,x.I)("div")({name:"AccountInformationContainer",class:"a3xmcyg",propsAsIs:!1}),tV=n(44594),tU=n(87527),tG=n(51961);n(72196);var tJ=function(e){function t(e){var n;return(0,r._)(this,t),(n=(0,s._)(this,t,[e])).handleSubmit=function(){return(0,i._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:if(n.setState({loading:!0,error:void 0}),n.props.clearErrors(),!n.state.vatNumber)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,ta.J)({vatNumber:n.state.vatNumber})];case 2:return t.sent(),n.setState({loading:!1}),[3,4];case 3:return e=t.sent(),n.setState({error:e.message,loading:!1}),n.setState({loading:!1}),[2];case 4:return(0,tG.n)(n,n.props.paymentDetails),[2]}})})()},n.state={error:void 0,loading:!1,termsModalOpen:!1},n}(0,a._)(t,e);var n=t.prototype;return n.getCdnAccounts=function(){return(0,i._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:return[4,(0,tU.I)()];case 1:return[2,(e=t.sent())?e[0].id:void 0]}})})()},n.submitSuccess=function(){return(0,i._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:return[4,this.getCdnAccounts()];case 1:if(!(e=t.sent()))return[3,3];return[4,(0,tU.z)(e,{plan:this.props.selectedPlan.name})];case 2:t.sent(),t.label=3;case 3:return this.props.getOrderConfirmation(),[2]}})}).call(this)},n.openTermsModal=function(){this.setState({termsModalOpen:!0})},n.render=function(){var e=this;return(0,c.jsxs)(tX,{children:[(0,c.jsx)("h3",{children:"Summary"}),(0,c.jsxs)("div",{className:"details",children:[(0,c.jsxs)("h4",{children:["Tinify CDN ",this.props.selectedPlan.name," Plan"," ",(0,c.jsxs)("span",{children:["$",Math.round(this.props.selectedPlan.price)]})," "]}),(0,c.jsx)("p",{children:"Including sales taxes (if applicable)"}),(0,c.jsx)("hr",{}),(0,c.jsx)(tV.A,{isOpen:this.state.termsModalOpen,onClose:function(){return e.setState({termsModalOpen:!1})}}),(0,c.jsxs)("p",{children:["By submitting you agree to the"," ",(0,c.jsx)("a",{onClick:function(){return e.openTermsModal()},children:"terms of use"})]})]}),this.state.error&&(0,c.jsxs)("div",{className:"summary-error",children:[(0,c.jsx)(y.g,{icon:b.tUE})," ",this.state.error]}),(0,c.jsx)(d.A,{loading:this.state.loading,disabled:!this.props.paymentDetails,color:"green",size:"normal",onClick:function(){return e.handleSubmit()},children:"Complete order"})]})},t}(l.Component),tX=(0,x.I)("div")({name:"SummaryStyles",class:"s1gn2let",propsAsIs:!1}),tZ=n(85619),tQ=function(e){function t(){return(0,r._)(this,t),(0,s._)(this,t,arguments)}return(0,a._)(t,e),t.prototype.render=function(){var e=Math.ceil((new Date(this.props.tri
1alEndedOn).getTime()-new Date().getTime())/864e5);return e>0&&e<15?(0,c.jsx)(tZ.A,{color:"cdn",location:"cdn",title:e>9||this.props.statistics&&this.props.statistics.media_library.length>0?"You are currently on the CDN Trial plan (".concat(e," days left on trial)"):"It looks like you haven't configured Tinify CDN yet (".concat(e," days left on trial)"),body:e>9||this.props.statistics&&this.props.statistics.media_library.length>0?"Choose a CDN plan to ensure a worry-free and uninterrupted service.":"Looking to get Tinify CDN set up on your website? Weâre here to help. Once itâs up and running, your websiteâs files will be analyzed, optimized, and delivered via a super-fast global network of servers.",callToAction:e>9||this.props.statistics&&this.props.statistics.media_library.length>0?{link:"/dashboard/cdn-checkout",text:"Select Plan"}:{link:"mailto:[email protected]?subject=CDN setup assistance",text:"Contact Support"}},"RemainingDays"):e<=0?(0,c.jsx)(tZ.A,{color:"cdn",location:"cdn",title:"Your CDN account has expired.",body:"Choose a CDN plan to resume a worry-free and uninterrupted service.",callToAction:{link:"/dashboard/cdn-checkout",text:"Select Plan"}},"ExpiredAccount"):null},t}(l.Component)},63814:e=>{e.exports={a11t1kr:"a11t1kr",icon:"icon"}},64800:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var i=n(17844),s=n(93629),r=n(89267),a={fontFamily:r.A.fonts.body,fontSize:14,padding:3,fill:r.A.colors.fontcolors.tableheader},o={axis:{style:{grid:{strokeDasharray:"4 6",strokeWidth:.5,stroke:r.A.colors.border},axis:{strokeWidth:1,stroke:r.A.colors.lighten.border},ticks:{strokeWidth:1,stroke:r.A.colors.border,size:6},axisLabel:a,tickLabels:a}},bar:{style:{labels:(0,s._)((0,i._)({},a),{fontSize:13}),data:{fill:r.A.colors.productcolors.cdn,strokeWidth:0}}},tooltip:{style:{padding:7,pointerEvents:"none"},flyoutStyle:{fill:"white",strokeWidth:1,stroke:r.A.colors.border},cornerRadius:5,pointerLength:5}}},65114:e=>{e.exports={a173yihj:"a173yihj",error:"error"}},65585:e=>{e.exports={a1bgn41:"a1bgn41","fa-li":"fa-li","fa-ul":"fa-ul",s3hrpgj:"s3hrpgj","form-group":"form-group",small:"small","hide-mediumdown":"hide-mediumdown","align-input":"align-input","align-input-shadowbox":"align-input-shadowbox",btn:"btn",neutral:"neutral",tocarcx:"tocarcx"}},66163:(e,t,n)=>{"use strict";n.d(t,{UK:()=>o,cQ:()=>l,ug:()=>c});var i=n(29935),s=n(17844),r=n(82643),a=n(77248);function o(){return(0,i._)(function(){return(0,r.YH)(this,function(e){return[2,(0,a.Jt)("/notification",void 0,!0)]})})()}function c(e){return(0,i._)(function(){return(0,r.YH)(this,function(t){return[2,(0,a.Jt)("/notification/"+e,void 0,!0)]})})()}function l(e){return(0,i._)(function(){return(0,r.YH)(this,function(t){return[2,(0,a.F6)("/notification/",(0,s._)({},e))]})})()}},68408:(e,t,n)=>{"use strict";n.d(t,{$p:()=>u,Dq:()=>a,Qu:()=>o,RW:()=>l,kI:()=>c,ux:()=>d});var i=n(29935),s=n(82643),r=n(77248);function a(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/accounts",void 0,!0)]})})()}function o(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/account/products")]})})()}function c(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.F6)("/accounts",e)]})})()}function l(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.zr)("/account-changes/".concat(e))]})})()}function d(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.F6)("/account-changes/".concat(e),{captcha_challenge:t})]})})()}function u(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.F6)("/account-changes/".concat(e),{confirm:t})]})})()}},68541:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(15383),s=n(14343),r=[{id:"overview",category:"Overview",articles:[{id:"what-is-cdn",title:"What is CDN?",hidden:!1},{id:"what-is-tinify-cdn",title:"What is Tinify CDN?",hidden:!1,subitems:[{id:"how-does-tinify-cdn-work",title:"How does Tinify CDN work?"}]}]},{id:"configuration",category:"Configuration",articles:[{id:"configuration",title:"Setup guide for your platform",hidden:!1}]},{id:"features-of-tinify-CDN",category:"Features of Tinify CDN",articles:[{id:"single-and-multi-cdn",title:"Single-CDN and Multi-CDN",hidden:!1},{id:"caching",title:"Caching",hidden:!1,subitems:[{id:"cdn-caching",title:"CDN Caching"},{id:"content-stored-time",title:"How long is my content stored?"},{id:"managing-cache-times",title:"Managing cache times"},{id:"queryString-caching",title:"Query String Caching"},{id:"efficient-caching-strategies",title:"Efficient caching strategies"}]},{id:"cors",title:"CORS",hidden:!1,subitems:[{id:"example",title:"Example"},{id:"tinify-cdn-cors-rules",title:"TinifyCDN CORS rules"}]}
1,{id:"preflight-headers",title:"Preflight headers",hidden:!1},{id:"optimization",title:"Optimization",hidden:!1,subitems:[{id:"tinify-optimization",title:"How does it work"},{id:"file-format-detection",title:"File-format detection"},{id:"optimization",title:"Supported file formats"}]},{id:"resizing-images",title:"Resizing images",hidden:!1,subitems:[{id:"resize-example",title:"Example"},{id:"resizing-options",title:"Resizing options"}]},{id:"automatically-converting-images",title:"Auto convert images",hidden:!1,subitems:[{id:"heading",title:"Overview"},{id:"how-it-works",title:"How it works"}]}]},{id:"instructions",category:"Guides & instructions",articles:[{id:"check-tinify-cdn-setup",title:"Check your Tinify CDN setup",hidden:!1,subitems:[{id:"checkup-example",title:"Example"},{id:"checkup-website-intergration",title:"Checking the integration on your website"}]},{id:"select-plan",title:"Select best plan",hidden:!1,subitems:[{id:"cdn-usage",title:"CDN usage"}]},{id:"purge-cache",title:"Purge cache",hidden:!1,subitems:[{id:"purge-everything-instructions",title:"Purge everything"},{id:"purge-custom-instructions",title:"Custom purge"},{id:"best-practice",title:"Best practice: File name uniqueness"}]},{id:"use-your-own-domain-name",title:"Use your own domain name",hidden:!1,subitems:[{id:"prerequisites",title:"Prerequisites"},{id:"open-the-wizard",title:"Start the wizard"},{id:"import-your-certificate",title:"Import certificate and key"},{id:"setup-your-cdn-aliases",title:"Choose your aliases"},{id:"configure-your-dns",title:"Configure your DNS"},{id:"verify-the-setup",title:"Verify the setup"},{id:"frequently-asked-questions",title:"Frequently asked questions"},{id:"glossary",title:"Glossary"}]},{id:"website-speed",title:"Check website speed",hidden:!1,subitems:[{id:"tools-for-website-analyzing",title:"Tools for analyzing your website site"}]}]}],a=n(67750),o=n.n(a),c=Object.fromEntries(r.flatMap(function(e){return e.articles}).map(function(e){return[e.id,Array.isArray(e.subitems)?e.subitems.map(function(e){return e.id}):[]]}));function l(e){var t=e.pageId,n=e.anchor,r=e.target,a=e.className,l=e.children;return(0,s.useEffect)(function(){Object.hasOwnProperty.call(c,t)||console.error("Page ".concat(t.toString()," does not exist")),n&&-1===c[t].indexOf(n)&&console.error("Anchor ".concat(JSON.stringify(n)," does not exist for page ").concat(t))},[t,n]),(0,i.jsx)(o(),{href:"/cdn/documentation/".concat(t).concat(n?"#"+n:""),passHref:!0,title:"Visit the documentation",target:void 0===r?"_blank":r,className:void 0===a?"":a,children:l})}},68951:e=>{e.exports={d1pkxsb7:"d1pkxsb7"}},70010:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var i=n(15383),s=n(40141),r=n(69399),a=n(14343);n(20119);var o=function(e){var t=(0,a.useId)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{"data-tip":"react-tooltip","data-for":t,children:(0,i.jsx)(r.g,{icon:e.icon})}),(0,i.jsx)(s.A,{id:t,place:"top",type:"dark",effect:"solid",className:c,children:e.message})]})},c="tnluiv1"},71545:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(15383),s=n(69399),r=n(11945);function a(e){var t={icon:"open"==e?(0,i.jsx)(s.g,{className:"icon",icon:r.tUE,style:{height:"2rem"}}):(0,i.jsx)(s.g,{className:"icon",icon:r.e68,style:{height:"2rem"}}),text:e};return(0,i.jsx)("span",{className:o,children:(0,i.jsxs)("div",{className:t.text,children:[t.icon,(0,i.jsx)("p",{children:t.text})]})})}n(96527);var o="s1y0j6pj"},72196:e=>{e.exports={s1gn2let:"s1gn2let",details:"details","summary-error":"summary-error"}},73702:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(78024),s=n(37743),r=n(1833),a=n(17844),o=n(93629),c=n(15383),l=n(53764),d=n(14343),u=n(89267),h=n(42806),p=n(21015);n(41273);var m={small:u.A.layouts.paddings.smallButton,normal:u.A.layouts.paddings.normalButton,large:u.A.layouts.paddings.largeButton},f=function(e){function t(){var e;return(0,s._)(this,t),e=(0,i._)(this,t,arguments),e.boxShadow="inset 0 -0.2rem 0 ".concat(u.A.colors.buttoncolors.darken.disabled),e}return(0,r._)(t,e),t.prototype.render=function(){return(0,c.jsx)(g,{boxShadow:this.boxShadow,color:this.props.color,size:this.props.size,variant:this.props.variant,children:(0,c.jsx)(p.Ay,(0,o._)((0,a._)({style:{boxShadow:"inset 0 -0.2rem 0 ".concat(this.props.color?u.A.colors.buttoncolors.darken[this.props.color]:u.A.colors.buttoncolors.mint)},className:this.props.className,href:this.props.url,passHref:this.props.passHref,onClick:this.props.onClick},this.props.clickTracking?(0,h.DU)(this.props.clickTracking):{},this.props.openInNewTab?{target:"_blank",rel:"noopener noreferrer"}:{}),{children:this.props.text}))})},t}(d.Component),g=(0,l.I)("div")({name:"StyledWrapper",class:"s2uzlhr",propsAsIs:!1,vars:{"s2uzlhr-0":[function(e){return m[e.size||"normal"]}],"s2uzlhr-1":[function(e){var t=e.color;return"outline"===e.variant?"none":"0.1rem 0.1rem 0 ".concat(u.A.colors.buttoncolors.darken[void 0===t?"mint":t])}],"s2uzlhr-2":[function(e){var t=e.color;return"outline"===e.variant?"transparent":u.A.colors.buttoncolors[void 0===t?"mint":t]}],"s2uzlhr-3":[function(e){var t=e.color;return"outline"===e.variant?"2px solid ".concat(u.A.colors.buttoncolors[void 0===t?"mint":t]):"none"}],"s2uzlhr-4":[function(e){var t=e.color;return"outline"===e.variant?u.A.colors.buttoncolors[void 0===t?"mint":t]:"white"}],"s2uzlhr-5":[function(e){return"large"==e.size?"2.0rem":"1.5rem"}],"s2uzlhr-6":[function(e){return e.boxShadow}],"s2uzlhr-7":[function(e){var t=e.color;return"outline"===e.variant?u.A.colors.buttoncolors[void 0===t?"mint":t]:"rgba(255, 255, 255, 0.7)"}],"s2uzlhr-8":[function(e){return"outline"===e.variant?"translateY(0.1rem)":"none"}],"s2uzlhr-9":[function(e){var t=e.color,n=void 0===t?"mint":t;return"outline"===e.variant?u.A.colors.buttoncolors[n]:u.A.colors.buttoncolors.slightlyDarken[n]}]}})},75374:e=>{e.exports={c1c4is5b:"c1c4is5b",metadata:"metadata",title:"title",value:"value","show-mediumdown":"show-mediumdown","badge-wrap":"badge-wrap",badge:"badge",icon:"icon",invali
1d:"invalid",valid:"valid"}},76009:e=>{"use strict";e.exports=JSON.parse('{"notificationBanners":{"api_delinquent":{"title":"Your API account is limited to 500 compressions","text":"Your account is temporarily suspended because of unpaid invoices. Your API account has been downgraded to the free plan. Please add your payment details and pay the unpaid invoice(s) to restore your account.","button_text":"View your invoices","button_link":"/dashboard/invoices","style":"alert"},"cdn_delinquent":{"title":"Your CDN account is suspended","text":"Your CDN account is temporarily suspended because of unpaid invoices. Please add your payment details and pay the unpaid invoice(s) to reactivate your account.","button_text":"View your invoices","button_link":"/dashboard/invoices","style":"alert"},"account_suspension":{"title":"Your Tinify account is temporarily suspended","text":"We were unable to process payment due to card failure. Please add your payment details and pay your open invoice(s) to reactivate your account.","button_text":"Contact support","button_link":"mailto:[email protected]?subject=Account suspended","style":"alert"},"invalid_vat":{"title":"Your European VAT ID is no longer valid","text":"Please update your VAT ID so that we can issue future invoices with VAT exemption if applicable. If your VAT ID remains invalid during invoice creation, the VAT rate of your country will automatically be applied.","button_text":"Read more","button_link":"https://help.tinify.com/help/invalid-vat-id?version=latest","style":"alert"},"missing_payment":{"title":"Your account is missing payment details","text":"Your Web subscription is set to auto-renew but is missing payment details. Please add your credit card details to enjoy an uninterrupted experience.","style":"alert"},"photoshop_windows_update":{"title":"Photoshop 2023 update","text":"A new update is available for the Windows plugin. The plugin is now compatible with Photoshop 2023.","button_text":"Download plugin","button_link":"https://storage.googleapis.com/tinify/binaries/Win/TinyPNG-JPG-v2.5f.exe","style":"informative"},"photoshop_deprecation":{"title":"The Photoshop plugin will no longer receive updates or support","text":"Due to the ongoing challenges we have made the difficult decision to deprecate the plugin. While you can continue to use the plugin in its current state, please note that it\'s only compatible with Photoshop CC2023 (v24.6) or older.","button_text":"Learn more","button_link":"https://help.tinify.com/help/deprecation-of-the-photoshop-plugin","style":"informative"},"api_transcoding_feature":{"title":"New feature: Convert your images to other formats","text":"API users can now upload images and convert them to other formats, like PNG and JPEG as well as WebP, Google\'s image format built to make websites even faster.","button_text":"Read more","button_link":"https://tinypng.com/developers/reference#converting-images","style":"promotional"},"cdn_statistics_outage":{"title":"Sorry! Your CDN statistics might temporarily be delayed.","text":"Due to a recent upgrade, the CDN statistics on your account dashboard might be delayed. This is temporary and will be fixed before the next invoice creation. Thank you for your patience.","style":"informative"},"cdn_certificate_about_to_expire":{"title":"Your CDN certificate is set to expire","text":"To avoid any disruption, we strongly recommend that you take immediate action to renew your CDN certificate and please upload this as soon as possible. For assistance, please reach out to [email protected].","button_text":"Read more","button_link":"https://tinify.com/cdn/documentation/use-your-own-domain-name#import-your-certificate","style":"alert"},"cdn_certificate_expired":{"title":"Your CDN certificate expired","text":"To restore your websiteâs functionality, we strongly urge you to take immediate action and renew your CDN certificate. Please upload a new CDN certificate as soon as possible. For assistance, please reach out to [email protected].","button_text":"Read more","button_link":"https://tinify.com/cdn/documentation/use-your-own-domain-name#import-your-certificate","style":"alert"},"cdn_transcoding_feature":{"title":"New Feature: Effortless Image Conversion to Next-Gen Formats","text":"Experience the automatic conversion of JPEG and PNG images to WebP format, enhancing website performance and user engagement. This feature is automatically activated for new websites, while existing ones can easily enable it via the dashboard.","button_text":"Read more","button_link":"https://tinify.com/cdn/documentation/automatically-converting-images","style":"informative"}}
1,"upload_section":[{"label":"best results","value":"best","sublabel":"Based on smallest image size","badge":true},{"label":"all images","value":"all","sublabel":"Compressed and converted images"}],"optimizer_errors":{"input_missing":"The file you uploaded is empty.","decode_error":"The image could not be decoded.","unsupported_media_type":"This file type is not supported.","unsupported_operation":"This operation is not supported for this file.","unsupported_dimensions":"Image dimensions are too large.","input_too_large":"File size is too large.","decode_limit_exceeded":"File exceeds dimension limits.","flattening_required":"Image requires flattening to convert to \'image/jpeg\'; try including \\"transform\\": {\\"background\\": \\"black\\"}.","internal_error":"An internal error occurred.","gateway_timeout":"The request timed out.","animation_not_supported":"Animated PNGs cannot be converted."}}')},80396:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/drupal.7ec47350.svg",height:43,width:166,blurWidth:0,blurHeight:0}},81261:(e,t,n)=>{"use strict";n.d(t,{I:()=>o,N:()=>a});var i=n(29935),s=n(82643),r=n(77248);function a(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/invoices",void 0,!0)]})})()}function o(e){return(0,i._)(function(){return(0,s.YH)(this,function(t){return[2,(0,r.Jt)("/invoices/"+e,void 0,!0)]})})()}},85619:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(15383),s=n(53764),r=n(73702);function a(e){return(0,i.jsx)(c,{color:e.color,actionButton:null!=e.callToAction.text,children:(0,i.jsxs)("div",{className:"wrapper",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{children:e.title}),(0,i.jsx)("p",{children:e.body})]}),null!=e.callToAction.text&&(0,i.jsx)(r.A,{url:e.callToAction.link,text:e.callToAction.text,color:o.button[e.color],passHref:!0})]})})}n(99619);var o={background:{alert:"#FFEDEB",informative:"#CACACA",api:"#EBF9FB",web:"#F4FAEB",cdn:"#FEF3E8",photoshop:"#E9F5FC"},button:{alert:"red",informative:"dark",api:"mint",web:"green",cdn:"orange",photoshop:"blue"}},c=(0,s.I)("div")({name:"NotificationBannersStyles",class:"n1r0bf0h",propsAsIs:!1,vars:{"n1r0bf0h-0":[function(e){return o.background[e.color]}],"n1r0bf0h-1":[function(e){return e.actionButton?"max-width: 80%;":""}]}})},87527:(e,t,n)=>{"use strict";n.d(t,{I:()=>a,z:()=>o});var i=n(29935),s=n(82643),r=n(77248);function a(){return(0,i._)(function(){return(0,s.YH)(this,function(e){return[2,(0,r.Jt)("/cdn/accounts",void 0,!0)]})})()}function o(e,t){return(0,i._)(function(){return(0,s.YH)(this,function(n){return[2,(0,r.F6)("/cdn/accounts/".concat(e),t)]})})()}},89307:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/laravel.8473fe24.svg",height:150,width:600,blurWidth:0,blurHeight:0}},92379:e=>{e.exports={"side-bar-styles":"sidemenu_side-bar-styles__vAtY_",active:"sidemenu_active__1oRRN","mobile-menu":"sidemenu_mobile-menu__Mt2ts",user:"sidemenu_user__hqfD_",name:"sidemenu_name__QUP6Y",menu:"sidemenu_menu__zR08t",products:"sidemenu_products__B_r4o","menu-item":"sidemenu_menu-item__zme3_",cdn:"sidemenu_cdn___EjRo",api:"sidemenu_api__7nxxe",photoshop:"sidemenu_photoshop__G7ZSF",web:"sidemenu_web__YWyEp",selected:"sidemenu_selected__uE_3r","no-hover":"sidemenu_no-hover__InZzp","photoshop-item":"sidemenu_photoshop-item__ZGKH_",img:"sidemenu_img__YTR4m","mobile-logout":"sidemenu_mobile-logout__yBBto","back-to-website":"sidemenu_back-to-website__FhZ_z"}},93278:e=>{e.exports={bpv1igk:"bpv1igk",left:"left",right:"right"}},96527:e=>{e.exports={s1y0j6pj:"s1y0j6pj",icon:"icon",open:"open",paid:"paid",forgiven:"forgiven"}},97197:e=>{e.exports={"main-styles":"layout_main-styles__p2USE","section-styles":"layout_section-styles__IjgWx"}},97597:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/wordpress.91f4f935.svg",height:123,width:540,blurWidth:0,blurHeight:0}},98192:e=>{e.exports={i1sbzjy7:"i1sbzjy7",invoice:"invoice",date:"date",amount:"amount",status:"status","has-pdf":"has-pdf",name:"name",download:"download","invoice-details":"invoice-details",id:"id","pay-invoice":"pay-invoice"}},98812:e=>{e.exports={p1jpfa4i:"p1jpfa4i",actions:"actions"}},99619:e=>{e.exports={n1r0bf0h:"n1r0bf0h",wrapper:"wrapper"}}}]);
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.