1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2448],{296(e,t,i){i.d(t,{A:()=>_});var a=i(73620),s=(i(96540),i(63710));i(44913);const n={column:"HWaKeOTknoox27vG9bI1",form_group:"x9dNRXkDo8ybSeDIXGmX",fieldset:"_S0xP4TNxaM_O4_V8SS5",flex_row:"qrNT4GqT3yB31x2jTr7V",flex_1:"rg60GDLHqyFwvht9p_93",field_70:"NQXiUqrAHOnTb6iPxzqO",field_30:"WCoEYpV6bJKvHUul2ttR",checkbox_grid:"NmdWN5GUfC1cL4_H4Lhw",feature_toggle_note:"aTFUUM_tjRE0E0mQKRwJ",half:"mvc9h31_PSsogSw2L4co",third:"VDMc3k3ymZ608mEGzWA9",twothirds:"EGGQs43Z3b4PIRjfJPF1",instructions:"ZUHm8HvdhgB2ZCcC0bDA",price:"Ujp4HAJTJWZM2jMak4TJ",currency:"Li_FqCFuT0_4apvQ9NMd",button_clear:"I8UyzB8ZP4EvSdPJvqe7",button_clear_big:"yZGtvR7qPxTsbRVXMSdR",error:"chwNYx7L1r9V5nvFaZ7I",actions:"VgkzZuqdPnSNiz9iL0ip",submit_button:"OYeANEjnooKZwVXInbNg",modal_submit_button:"LGT3Xf_8d3vaE9cqzZra",loading_overlay:"Dikbv3WvAAg2M7N8rc1G",loader:"lrWrnuZxq16VE8FGLW_g",image:"toOdiSTe6VMZOC_KpOm_",icons:"BTGojXaV4OcI4DW091Xm",camera:"_GCe3Fb0FOgd1bI8sSlN",ban:"Fv2Shw_2lawytsX7Bn6t"};var l=i(28097),o=i(67210),r=i(55023),d=i(44399),c=i(29921),h=i(79167),m=i(51930),p=i(75897),u=(0,a.A)(m.A,{}),v=(0,a.A)(r.A,{name:"title",disabled:!0}),g=(0,a.A)(m.A,{}),A=(0,a.A)(m.A,{});class f extends l.A{deleteMediaLibrary(){this.props.handleDelete(this.state.instance),this.setState({show_delete_modal:!1})}openDeleteModal(){this.setState({show_delete_modal:!0})}closeDeleteModal(){this.setState({show_delete_modal:!1})}render(){const{instance:e,errors:t,is_saving:i,saved:s,show_delete_modal:l}=this.state,{t:m}=this.props;let f,_;if(t&&t.errors&&(f=t.errors.map((e,t)=>(0,a.A)("p",{className:n.error},t,e))),void 0!==e.external_id&&e.external_id){const s=void 0!==e.thumbnail?e.thumbnail:e.file;_=(0,a.A)("div",{className:n.form_group},void 0,f,(0,a.A)("div",{className:n.column},void 0,(0,a.A)("fieldset",{},void 0,(0,a.A)("legend",{},void 0,m("Image")),(0,a.A)("div",{className:n.image},void 0,e.file?(0,a.A)("img",{src:s,alt:void 0!==e.thumbnail?e.thumbnail:""}):(0,a.A)("div",{className:n.icons},void 0,(0,a.A)("i",{className:"fa fa-ban "+n.ban}),(0,a.A)("i",{className:"fa fa-camera "+n.camera}))))),(0,a.A)("div",{className:n.column},void 0,(0,a.A)("div",{className:n.form_group},void 0,(0,a.A)("fieldset",{},void 0,(0,a.A)("legend",{},void 0,m("Name")),(0,a.A)(o.A,{values:e,error:t,handleChange:this.handleChange.bind(this),handleSubmit:this.handleSubmit.bind(this)},void 0,v))),(0,a.A)("div",{className:n.form_group},void 0,(0,a.A)("fieldset",{},void 0,(0,a.A)("legend",{},void 0,m("Actions")),(0,a.A)(o.A,{values:e,error:t,handleChange:this.handleChange.bind(this),handleSubmit:this.handleSubmit.bind(this)},void 0,i?g:(0,a.A)(c.A,{type:"button",theme:"danger_submit",onClick:this.openDeleteModal.bind(this)},void 0,m("Delete")))))),(0,a.A)(h.default,{show_modal:l,handleClose:this.closeDeleteModal.bind(this),title:m("Delete Media File"),subtitle:m("Are you sure you want to delete this file")},void 0,(0,a.A)("div",{className:n.modal_container},void 0,i?A:(0,a.A)(c.A,{theme:"danger_submit",type:"button",onClick:this.deleteMediaLibrary.bind(this)},void 0,m("Delete")))))}else _=(0,a.A)("fieldset",{className:n.form_group},void 0,f,(0,a.A)(o.A,{values:e,error:t,handleChange:this.handleChange.bind(this),handleSubmit:this.handleSubmit.bind(this)},void 0,(0,a.A)(r.A,{name:"title",placeholder:m("Image name or description")}),(0,a.A)(d.A,{name:"file",placeholder:m("Click here or drop files to select"),maxHeight:p.No,maxWidth:p.No}),i?u:(0,a.A)(c.A,{type:"submit",theme:"submit"},void 0,m("Save"))));return _}}const _=(0,s.CI)("app")(f)},53028(e,t,i){i.d(t,{Zp:()=>K,ok:()=>Z,O$:()=>H,PE:()=>j,Me:()=>W,c_:()=>z,Mn:()=>O,Ay:()=>B});var a=i(73620),s=i(96540),n=i(5556),l=i.n(n),o=i(54625),r=i(92439);const d="HkjK5dj4vz1PBzsKnVJf",c="IU7E1DByhSK60BhtJG5J",h="IYWyiZIFM4hLJWD2MsfD",m="TgCQUNCx84_NeSfmSspO",p="ZIp4xM9Bc1RMSQ5UaMdw",u="Ed1hvVew_iviVHdXuwEs",v="qqpDnaFub8YZyVNuZA7w",g="Kk23yL7K9jwVCKQL2b97",A="kaGXLOKNLBt7V1HXfgM5",f="wTx3KxwbF50XzNctLlW0",_="SS35HXA5TW2O_vR3h7mX",b="xcwugPZ23Zh2PhqC4YhU",y="jJOnr_7MhWbmJoBXIC_A",N="SQs9S7GTyaMMkWHJ5MlQ",C="ysEb3q4KDiU0XbK6Sprj",S="dlMgZUFzu3Z4afY23PXK",w="a49CzZDe4mYCQADqxbcM",x="drwjpen4sj369tizaAao",F="jpVLA_4Jx2kSJaqRbJjw",I="Yc_B0XG0TG3jRLaGnbLS",T="_QHR2gu9w3PNHYLOM9Vz",D="v4z1T8Z4XvMkWDfal3Xb",L="UQdHgq_rTj9_GvZcUKEk",k="Dauzb2QMUCs4HNyxCiyL",P="N60hO05Iy3U5V4bGzOZR",E="WnhBBgXlK3Y4KEWocgCJ",M="H6RXLZWvDDykECgNKCGA";class R extends s.Component{constructor(e){super(e);let t=!0;"undefined"==typeof document||"ontouchstart"in document.documentElement||(t=!1),this.is_touch=t}mapStatusToClass(e){if(void 0===e)return"";const[t,i,a,s,n]=r.y;if(e==t)return A+" "+f;if(e==i)return A+" "+_;if(e==a)return A+" "+b;if(e==s)return A+" "+y;if(e==n)return A+" "+N;throw"Error: Invalid Status Provided"}render(){const{title:e,caption:t,description:i,actions:s,className:n,style:l,small:r,status:A,noBorders:f}=this.props,{t:_}=this.props,b=s.map((e,t)=>{if("string"==typeof e.handleClick){const i=(0,a.A)("i",{className:e.icon_class},void 0,e.name&&(0,a.A)("span",{},void 0,e.name));return e.external_link?(0,a.A)("a",{href:e.handleClick,target:"_blank",rel:"noopener"}
1,t,i):e.link_blank?(0,a.A)("a",{href:e.handleClick,target:"_blank",rel:"opener"},t,i):(0,a.A)(o.N_,{to:e.handleClick},t,i)}return"function"==typeof e.handleClick?(0,a.A)("i",{className:e.icon_class,onClick:e.handleClick},t,e.name&&(0,a.A)("span",{},void 0,e.name)):(0,a.A)("i",{className:e.icon_class},t,e.name&&(0,a.A)("span",{},void 0,e.name))});let y=d;r&&(y+=" "+c),f&&(y+=" "+m);const N=u+" "+(this.is_touch?"":v);return(0,a.A)("div",{className:void 0!==n?y+" "+n:y,style:l},void 0,(0,a.A)("div",{className:h},void 0,(0,a.A)("div",{className:p},void 0,t&&(0,a.A)("h3",{className:C},void 0,t),(0,a.A)("h2",{className:g},void 0,void 0!==A&&(0,a.A)("span",{className:this.mapStatusToClass(A)}),e),i&&(0,a.A)("p",{className:S},void 0,i)),(0,a.A)("div",{className:N},void 0,b)),this.props.children)}}R.defaultProps={actions:[],small:!1,noBorders:!1},R.propTypes={title:l().node,caption:l().node,description:l().node,actions:l().arrayOf(l().shape({icon_class:l().string.isRequired,name:l().string,handleClick:l().oneOfType([l().string,l().func]),link_blank:l().bool,external_link:l().bool})),className:l().string,style:l().object,small:l().bool,noBorders:l().bool,status:l().oneOf(r.y)};const B=R,j=e=>(0,a.A)("div",{className:w},void 0,e.children),W=e=>{let t=x;return e.reverse&&(t+=" "+F),(0,a.A)("div",{className:t},void 0,e.children)},z=e=>(0,a.A)("div",{className:T},void 0,e.children),O=e=>(0,a.A)("div",{className:L},void 0,e.children),Z=e=>(0,a.A)("div",{className:I}
1,void 0,e.children),H=e=>(0,a.A)("div",{className:D},void 0,e.children),K=e=>{let t=k;return e.gray&&(t+=" "+P),e.noBorders&&(t+=" "+m),e.noPadding&&(t+=" "+M),e.overflowInitial&&(t+=" "+E),e.className&&(t+=" "+e.className),(0,a.A)("div",{className:t},void 0,e.children)}},44399(e,t,i){i.d(t,{A:()=>_});var a=i(73620),s=(i(96540),i(5556)),n=i.n(s),l=i(63710);const o="HCxltHtdGP1PgBwVqYLe",r="U5glQICD24LJYAov5Acs",d="B8brJkPoym0h2fVRxlHa",c="SidGM7SPiFDdq65_X_rZ",h="gVtfeB1ztteWnKbUcNXM",m="mM7zd8mz6hTZ_5rWlGdJ",p="PGemlHipAbFN4h6cXaY3",u="HkocWRDFTLWC6jQGAdFx",v="KEU5IzAPETrKAGSdiFRw";var g=i(39859),A=(0,a.A)("i",{className:"fa fa-plus"});class f extends g.A{constructor(e,t){super(e,t),this.state={},this.processFiles.bind(this)}preventDefault(e){e.preventDefault()}callChange(e){const{files:t}=e.target;this.processFiles(t)}handleDrop(e){e.preventDefault();const{files:t}=e.dataTransfer;this.processFiles(t),this.setState({is_dragging:!1})}handleDragEnter(e){this.setState({is_dragging:!0}),e.preventDefault()}handleDragLeave(e){this.setState({is_dragging:!1}),e.preventDefault()}processFiles(e){const{multiple:t}=this.props,{t:i}=this.props,a=e?e.length:0;if(this.setState({processingError:void 0}),a>0){if(!t&&1!==a)return this.setState({processingError:i("Select only one file.")}),void this.clearField();this.asyncResizeImage(e)}}clearField(){const{values:e,handleChange:t}=this.context,{name:i}=this.props;t({...e,[i]:null,[i+"__title"]:""},i)}async asyncResizeImage(e){const t=e.length;let i=[],a=new DataTransfer,s=!1;for(let n=0;n<t;n++){const t=e[n];if(i.push(t.name),!this.validFileType(t)){s=!0;break}{const e=await this.resizeImage(t);a.items.add(e)}}if(!s){const e=i.join(", ");this.resizeHandleChange(a.files,e)}}resizeImage(e){const{maxHeight:t,maxWidth:i}=this.props,{t:a}=this.props;return this.setState({processingStatus:a("Processing image...")}),new Promise(a=>{let s=new FileReader;s.onload=function(s){const n=document.createElement("img");n.onload=function(s){const l=document.createElement("canvas"),o=l.getContext("2d");let r=n.width,d=n.height;r>d?r>i&&(d*=i/r,r=i):d>t&&(r*=t/d,d=t),l.width=r,l.height=d,o.drawImage(n,0,0,r,d);const c=l.toDataURL(e.type);fetch(c).then(e=>e.blob()).then(t=>{const i=new File([t],e.name,t);a(i)})},n.src=s.target.result},s.readAsDataURL(e)})}resizeHandleChange(e,t){const{name:i}=this.props,{values:a,handleChange:s}=this.context;s({...a,[i]:e,[i+"__title"]:t},i),this.setState({processingStatus:void 0})}validFileType(e){const{multiple:t}=this.props,{t:i}=this.props;if("image"!==e.type.split("/")[0]){let e;return e=i(t?"At least one of the selected files is not an image":"The selected file is not an image"),this.setState({processingError:e}),this.clearField(),!1}return!0}render(){const{t:e,name:t,label:i,className:s,multiple:n,disabled:l,placeholder:g}=this.props,{processingError:f,is_dragging:_,processingStatus:b}=this.state,{values:y,errors:N}=this.context,C=y&&y[t+"__title"]||"",S=N?N[t]:void 0;let w=r+" "+(""!==C?"":d);return(S||f)&&(w+=" "+c),_&&(w+=" "+u),(0,a.A)("label",{className:o+" "+(s||""),onDrop:this.handleDrop.bind(this),onDragOver:this.preventDefault,onDragEnter:this.handleDragEnter.bind(this),onDragLeave:this.handleDragLeave.bind(this)},void 0,(0,a.A)("span",{},void 0,i),(0,a.A)("div",{className:w},void 0,(0,a.A)("span",{className:h},void 0,""!==C?C.replace(/C:\\fakepath\\/i,""):g||e("Select")),(0,a.A)("div",{className:m},void 0,A)),(0,a.A)("input",{type:"file",onChange:this.callChange.bind(this),name:t,multiple:n,disabled:l,accept:"image/*"}),!!S&&(0,a.A)("span",{className:p},void 0,S),!!f&&(0,a.A)("span",{className:p},void 0,f),!!b&&(0,a.A)("span",{className:v},void 0,b))}}f.defaultProps={multiple:!1},f.propTypes={...g.A.propTypes,multiple:n().bool,maxHeight:n().number.isRequired,maxWidth:n().number.isRequired};const _=(0,l.CI)()(f)},62711(e,t,i){i.d(t,{A:()=>N});var a=i(73620),s=(i(96540),i(5556)),n=i.n(s),l=i(63710);const o="nEWFskw74nqjQ8BfS9vQ",r="klvDDdKEw_O493X7c7fA",d="oqFUj0ijKPZsJjZjva5G",c="QCVX1QuEv120tsxVWb11",h="ddlj5qfhWYuo1D4Soq4O",m="sYfZIp98u2ZMMtZ92i4T",p="pGFXPte2fYsUbmm_hevr",u="W6VsZeumMNmOtYY0RD9B",v="K7uZ4KFTifZ2eMQCiPKr",g="CxBlgJ6pESvzskXFVPve",A="e35lgfXOmgx9lsnC7X0N";var f=i(51930),_=i(39859),b=(0,a.A)("i",{className:"fa fa-plus"});class y extends _.A{constructor(e){super(e),this.lazyImage,this.imagePath,this.state={image_loaded:!1}}getImagePath(e){const{name:t}=this.props;if(void 0!==e[t]&&""!==e[t])return void 0!==e[t].file?e[t].file:e[t]}componentDidMount(){this.lazyImage=new Image,this.imagePath=this.getImagePath(this.context.values),this.lazyImage.onload=()=>{this.setState({image_loaded:!0})},this.lazyImage.src=this.imagePath}componentDidUpdate(e,t){const i=this.getImagePath(this.context.values);this.imagePath!==i&&(this.lazyImage.src=i,this.imagePath=i,this.setState({image_loaded:!1}))}render(){const{name:e,label:t,disabled:i,className:s,onClear:n}=this.props,{values:l,errors:_}=this.context,{image_loaded:y}=this.state,{t:N}=this.props;let C,S=N("No File"),w=void 0!==s?o+" "+s:o;void 0!==l[e]&&null!==l[e]&&""!==l[e]&&(void 0!==l[e].file?(C=l[e].file,S=C.split("/").pop()):(C=l[e],S=C.split("/").pop()));const x=!!C,F=_?_[e]:void 0,I=y?(0,a.A)("img",{src:this.lazyImage.src,alt:N("Media Library Image")},"loaded_image"):(0,a.A)("div",{className:d},void 0,(0,a.A)(f.A,{className:c})),T=C?I:(0,a.A)("div",{className:d},void 0,(0,a.A)("i",{className:"fa fa-ban "+m}),(0,a.A)("i",{className:"fa fa-camera "+h}));let D;return x?n&&(D=(0,a.A)("i",{className:`fa fa-times ${A}`,onClick:n})):D=b,(0,a.A)("div",{className:w},void 0,t,(0,a.A)("div",{className:r},void 0,T),(0,a.A)("label",{className:p,onClick:this.props.onClick},void 0,(0,a.A)("span",{className:u},void 0,S),(0,a.A)("div",{className:g},void 0,D),F?(0,a.A)("span",{className:v},void 0,F):""))}}y.propTypes={..._.A.propTypes,onClick:n().func.isRequired,onClear:n().func};const N=(0,l.CI)("app")(y)},20864(e,t,i){i.r(t),i.d(t,{componentWithoutTranslation:()=>v,default:()=>g});var a=i(73620),s=i(64467),n=(i(96540),i(63710)),l=i(97530),o=i(18463),r=i(11359),d=i(10233),c=i(296),h=i(75897),m=(0,a.A)("br",{}),p=(0,a.A)("br",{});class u extends l.A{constructor(...e){super(...e),(0,s.A)(this,"apiEndpoint","alfred/media-library/"),(0,s.A)(this,"successRoute","alfred:media_library_list"),(0,s.A)(this,"updateListActionType",o.je),(0,s.A)(this,"cleanSave",r.J4)}
1getMediaType(){if(this.props.mediaType)return this.props.mediaType;const e=this.props.match?.params;return e?.media_type?e?.media_type:h.gg}updateListActionType(){return this.getMediaType()==h.nA?o.ld:o.je}getInitialInstance(){const e={};return this.getMediaType()==h.nA?e.media_type=h.nA:e.media_type=h.gg,e}render(){const{instance:e,errors:t}=this.state,{t:i}=this.props;let s;return s=this.getMediaType()==h.nA?"Favicon":i("Image"),(0,a.A)(d.A,{title:i("Add {{s}} to Media Library",{s}),small:!0},void 0,(0,a.A)(c.A,{handleSubmit:this.save,instance:e,saveState:this.state.saveRequest?.state,errors:t}),m,p)}}const v=u,g=(0,n.CI)("app")(u)},11359(e,t,i){i.d(t,{J4:()=>u,MN:()=>r,Pj:()=>h,UY:()=>g,Yg:()=>p,f1:()=>d,rP:()=>v,t6:()=>c,uJ:()=>A,wb:()=>m});var a=i(74875),s=i(73521),n=i(70395),l=i(43505),o=i(18463);function r(e){return{template:{...e}.template_id}}const d=(0,n.B)([o.S,o.GR,o.L6],"alfred/page/");function c(e){return{...e,data:(0,l.LJ)(e.data)}}function h(e){const t={...e};return void 0!==t.in_navigation&&t.in_navigation.length>0&&(t.pages=t.in_navigation.map((e,t)=>({external_id:e.external_id,order_in_menu:t})),delete t.in_navigation),t}const m=(0,n.B)([o.VL,o.JA,o.uI],"alfred/media-library/"),p=(0,n.B)([o.$s,o.Rm,o.mC],"alfred/media-library/");function u(e){const t={...e};let i=new FormData;for(let e in t)if(t.hasOwnProperty(e)){let a=t[e];if(null==a&&(a=""),"file"==e){if(a.constructor===FileList){const t=a.length;for(let s=0;s<t;s++)i.append(e,a.item(s))}}else"object"==typeof a&&(a=JSON.stringify(a)),i.append(e,a)}return i}function v(e){let t="POST",i=!1;return e||(t="DELETE",i=!0),{isDiscard:i,[a.oE]:{endpoint:"alfred/actions/",method:t,types:[o.Y7,o.Im,o.lv],success_notification:s.KL}}}function g(e){const t={...e};void 0!==t.media_library_logo&&(t.media_library_logo=t.media_library_logo.external_id),void 0!==t.media_library_favicon&&(t.media_library_favicon=t.media_library_favicon.external_id);let i=[];if(t.banners&&t.banners.length>0)for(let e in t.banners){let a={...t.banners[e]};a.media_library=a.media_library.external_id,void 0!==a.url_title&&delete a.url_title,i.push(a)}return t.banners=i,delete t.a_record,delete t.website_cluster,delete t.certificate,delete t.payment_features_supported,delete t.payment_features_available,t}const A=(0,n.B)([o.r8,o.Ze,o.Km],"alfred/custom-form/")},75897(e,t,i){i.d(t,{No:()=>o,Qo:()=>c,SF:()=>d,eR:()=>h,gg:()=>n,nA:()=>l,rG:()=>r});var a=i(73620),s=(i(96540),i(63710));const n=1,l=4,o=2e3,r=1,d=2,c=5;function h(){const{t:e}=(0,s.Bd)("app");return[{id:1,name:e("Text Field")},{id:2,name:e("Large Text Field")},{id:3,name:e("Email Field")}].map((e,t)=>(0,a.A)("option",{value:e.id},e.id,e.name))}},58915(e,t,i){i.d(t,{V:()=>$,A:()=>Q});var a=i(58168),s=i(73620),n=i(96540),l=i(40961),o=i(5556),r=i.n(o),d=i(63710),c=i(82960),h=i(69733),m=i(76808);const p="S2e5rHHXhn0p18B5l7KN",u="HfAjBRHRJmd_nH14PtIf",v="QczjbNJeUz1S39OOYXhv",g="wiSmEJwkyegwPhZtaLAo",A="CTWEDlzlH7TPuukvOjup",f="n_QvzbFwG3BN4jN0x3RE",_="_RegPo7vNybRguRB0Wn5",b="EASwaggHPo74xc1r8NAy",y="_d5CyRWwpg9h6dNaoBug",N="Q0rsOIlWYW6elSWUjg2N",C="CY_SSenwCOKPu1hUvRFy",S="wGrfjkXeK49yqxWD45jz",w="Dxb4IeBBCc7tBBChgSBv";var x=i(51930),F=i(84759),I=i(29921),T=(0,s.A)("i",{className:"fa fa-times"});class D extends m.A{UNSAFE_componentWillReceiveProps(e){super.UNSAFE_componentWillReceiveProps(e);const{is_fetching:t}=this.props;t&&e.fetched&&this.setState({showCreateForm:!1})}handleCreateInstanceClose(e){e?this.props.handleClose(e):this.props.handleClose(),this.resetModal()}showCreateForm(){this.setState(e=>({showCreateForm:!e.showCreateForm}))}getCreateItemForm(){throw"Implement getCreateItemForm in child class"}getItemsList(){throw"Implement getItemsList in child class"}getFormTitle(){throw"Implement getFormTitle in child class"}render(){const{show_modal:e,title:t}=this.props,{showCreateForm:i}=this.state,{t:a}=this.props,o=e?u:"";let r;return r=i?this.getCreateItemForm():this.getItemsList(),l.createPortal((0,s.A)("div",{className:p+" "+o},void 0,(0,s.A)("div",{className:g,onClick:this.handleClose.bind(this)}),(0,s.A)("div",{className:v},void 0,(0,s.A)("div",{className:_,onClick:this.handleClose.bind(this)},void 0,T),(0,s.A)("h3",{className:A},void 0,t),(0,s.A)("div",{className:f},void 0,n.createElement("input",{type:"text",placeholder:a("app::Search"),onChange:this.handleSearchChange.bind(this),value:this.state.query,ref:this.setInputRef.bind(this)})),(0,s.A)("div",{className:b},void 0,(0,s.A)("h4",{className:y},void 0,this.getFormTitle())),(0,s.A)("div",{className:i?C:""},void 0,r),i?(0,s.A)("div",{className:S},void 0,(0,s.A)(I.A,{theme:"white",onClick:()=>this.showCreateForm()},void 0,(0,s.A)("i",{className:"fa fa-arrow-circle-o-left "+N}),a("app::Back to List"))):(0,s.A)("div",{className:S},void 0,(0,s.A)(I.A,{theme:"white",onClick:this.handleClose.bind(this)},void 0,a("app::Cancel")),(0,s.A)(F.A,{onClick:this.showCreateForm.bind(this)},void 0,(0,s.A)("i",{className:"fa fa-plus "+w}),a("app::Add New")),(0,s.A)(I.A,{onClick:this.handleSubmit.bind(this)},void 0,a("app::Select"))))),this.el)}}D.defaultProps={...D.defaultProps};const L=D;var k=i(11359),P=i(64467),E=i(20864),M=i(296);
1class R extends E.componentWithoutTranslation{constructor(...e){super(...e),(0,P.A)(this,"successRoute",void 0),(0,P.A)(this,"componentDidSave",(e,t)=>{this.props.handleClose(e)})}render(){const{instance:e,errors:t}=this.state;return(0,s.A)(M.A,{handleSubmit:this.save,instance:e,saveState:this.state.saveRequest?.state,errors:t})}}const B=R,j="p3vcGrJ3LbwDezmjxsVw",W="BAjQ4RB4cOty9ynAJIOA",z="vtQcuwBQtEKo8PWAJAiZ",O="LgffUo8MgWyETlq3hdvY";var Z=i(97173),H=i(2598),K=i(67210),G=(0,s.A)(x.A,{});class X extends n.Component{render(){const{t:e,is_fetching:t,fetched:i,multiple:a,hide_pagination:n,pagination_available:l,list:o,instance:r}=this.props;let d;return void 0!==o&&o.length>0?(d=o.map((e,t)=>{if(void 0!==e){const i=void 0!==e.thumbnail?e.thumbnail:e.file;return(0,s.A)("label",{},e.id,(0,s.A)("li",{},void 0,a?(0,s.A)(Z.A,{name:"selected_items",value:t}):(0,s.A)(H.A,{name:"selected_items",value:t}),(0,s.A)("span",{className:O}),(0,s.A)("div",{className:z,style:{backgroundImage:`url(${i})`}})))}}),!n&&l&&!t&&i&&d.push((0,s.A)("li",{className:W},-2,(0,s.A)(F.A,{type:"button",theme:"primary_full",onClick:this.props.loadMoreResults.bind(this)},void 0,e("More Results"))))):t&&(d=(0,s.A)("li",{className:W},void 0,G)),(0,s.A)(K.A,{values:r,handleChange:this.props.handleChange.bind(this),handleSubmit:this.props.handleSubmit.bind(this)},void 0,(0,s.A)("ul",{className:j},void 0,d))}}X.propTypes={fetched:r().bool,handleChange:r().func,handleSubmit:r().func,loadMoreResults:r().func,instance:r().object};const J=(0,d.CI)("app")(X);var U=i(75897);class V extends L{getCreateItemForm(){const{mediaType:e}=this.props;return(0,s.A)(B,{handleClose:this.handleCreateInstanceClose.bind(this),mediaType:e})}getItemsList(){const{is_fetching:e,fetched:t,multiple:i,hide_pagination:s,pagination_available:l}=this.props,{list:o}=this.state;return n.createElement(J,(0,a.A)({},this.props,{instance:this.state,is_fetching:e,handleChange:this.handleChange.bind(this),handleSubmit:this.handleSubmit.bind(this),loadMoreResults:this.loadMoreResults.bind(this)}))}getFormTitle(){const{mediaType:e}=this.props,{showCreateForm:t}=this.state,{t:i}=this.props;if(t){let t;return e===U.gg?t=i("Image"):e===U.nA&&(t="Favicon"),i("Upload {{m}}",{m:t})}return i("Media Library")}}V.defaultProps={...L.defaultProps,mediaType:U.gg},V.propTypes={...L.propTypes,mediaType:r().number};const q=(e,t)=>{const i={...e},{external_id:a}=i;return{id:a,title:void 0!==i.title&&i.title?i.title:i.file.split("/").pop(),external_id:a,file:i.file,thumbnail:i.thumbnail}},Y=(0,d.CI)("app")(V),Q=(0,h.Ng)((0,m.t)("alfred","media_library",q),e=>(0,c.zH)({fetchList:k.wb},e))(Y),$=(0,h.Ng)((0,m.t)("alfred","media_library_favicon",q),e=>(0,c.zH)({fetchList:k.Yg},e))(Y)},62193(e,t,i){i.d(t,{L9:()=>r,Wd:()=>c,er:()=>d,et:()=>s,iq:()=>a,ir:()=>l,jt:()=>o,lu:()=>h,oA:()=>n});const a=1,s=2,n=1,l=2,o=1,r=2,d=3,c=[o,r,d],h=8},74653(e,t,i){i.d(t,{AK:()=>N,Az:()=>n,EB:()=>w,FV:()=>u,G3:()=>y,II:()=>r,Lr:()=>s,Og:()=>b,PV:()=>A,TM:()=>x,Tc:()=>_,V5:()=>d,Xi:()=>v,YK:()=>g,cE:()=>l,cd:()=>h,eo:()=>f,g0:()=>p,kA:()=>m,kl:()=>C,mZ:()=>c,qd:()=>a,rm:()=>S,sw:()=>F,y1:()=>o});const a="h1",s="h2",n="h3",l="p",o="a",r="btn",d="img",c="form",h="eVid",m="bc",p="col",u="slide",v="align",g="col-1",A="col-2",f="col-3",_="col-4",b="banner",y={[g]:1,[A]:2,[f]:3,[_]:4,[b]:1},N=[g,A,f,_,b],C=[a,s,n,l],S=[o,r],w=[...N,p,u],x="y",F=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/},43505(e,t,i){i.d(t,{FV:()=>o,LJ:()=>n,PO:()=>l,QF:()=>r});var a=i(74653);const s=e=>{if(void 0!==e.text)return e;let t={...e};return e.type===a.g0&&e.gallery&&void 0!==e.img&&delete t.img,"object"==typeof e.img&&(t.img=e.img.external_id),"object"==typeof e.cForm&&(t.cForm=e.cForm.external_id),t.children=e.children.map(e=>s(e)),t},n=e=>e.map(e=>s(e)),l=e=>({external_id:e.external_id,file:e.file,thumbnail:e.thumbnail}),o=()=>({type:a.YK,children:[{type:a.g0,children:[r()]}]}),r=e=>({type:e?a.V5:a.cE,children:[{text:""}]})}}]);
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.