DeveloperPlatformARAFAppIconModal.react",["fbt","ix","DeveloperPlatformARAFAppIconModalMutation.graphql","DeveloperPlatformARAFAppIconModal_app.graphql","GeoButton.react","GeoCancelButton.react","GeoDivider.react","GeoFileSelector.react","GeoFlexbox.react","GeoModalFooter.react","GeoModalHeader.react","GeoModal_DEPRECATED.react","GeoNotice.react","GeoText.react","IPB4BImage.react","RelayHooks","asyncToGeneratorRuntime","react","readFileAsDataURL"],(function(t,n,r,o,a,i,l,s,u){"use strict";var e,c,d,m=d||(d=o("react")),p=d.useState,_={card:{paddingTop:"xyamay9",paddingInlineEnd:"xv54qhq",paddingBottom:"x1l90r2v",paddingInlineStart:"xf7dkkf",$$css:!0}},f=e!==void 0?e:e=n("DeveloperPlatformARAFAppIconModal_app.graphql");function g(e){var t=e.app,a=e.isShown,i=e.onComplete,l=e.onHide,d=o("RelayHooks").useFragment(f,t),g=p(null),h=g[0],y=g[1],C=p(null),b=C[0],v=C[1],S=p(null),R=S[0],L=S[1],E=p(null),k=E[0],I=E[1],T=p(null),D=T[0],x=T[1],$=p(100),P=$[0],N=$[1],M=p(100),w=M[0],A=M[1],F=h==null&&R==null,O=p(null),B=O[0],W=O[1],q=function(t){if(t==null){I(null),x(null),N(100),A(100);return}var e=new Image;e.onload=function(){var t=e.naturalWidth,n=e.naturalHeight,r=t/n;I(t),x(n),r>1?(N(Math.min(t,512)),A("auto")):r<1?(N("auto"),A(Math.min(n,100))):(N(100),A(100)),t<512||t>1024||n<512||n>1024?v(s._(/*BTDS*/"The size of the image must be between 512 u00d7 512 and 1024 u00d7 1024 pixels.")):v(null)},e.src=t},U=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=e[0];if(t==null)y(null),L(t),q(t),v(null);else{var n=yield r("readFileAsDataURL")(t);n!=null&&(y(n),q(n),L(t))}W(null)});return function(n){return e.apply(this,arguments)}})(),V=o("RelayHooks").useMutation(c!==void 0?c:c=n("DeveloperPlatformARAFAppIconModalMutation.graphql")),H=V[0],G=V[1],z=function(){var e,t={},n=(e=R==null?void 0:R.name.replace(/[^a-zA-Z0-9]/gi,"_"))!=null?e:null;n!=null&&R!=null&&(t[n]=R,H({variables:{app_id:d.id,input:{logo:n}},uploadables:t,onCompleted:function(){i()},onError:function(t){W(t)}}))};return m.jsx(r("GeoModal_DEPRECATED.react"),{footer:m.jsx(r("GeoModalFooter.react"),{primaryButton:m.jsx(r("GeoButton.react"),{isDisabled:F||G||R==null||b!=null,isLoading:G,label:s._(/*BTDS*/"Save"),onClick:z,variant:"primary"}),secondaryButton:m.jsx(r("GeoCancelButton.react"),{isDisabled:G})}),header:m.jsx(r("GeoModalHeader.react"),{description:s._(/*BTDS*/"You can upload a JPG, GIF, or PNG file. The size of the image must be between 512 x 512 and 1024 x 1024 pixels. File size limit 5 MB."),heading:s._(/*BTDS*/"Upload app icon")}),isShown:a,onHide:l,children:m.jsxs(r("GeoFlexbox.react"),{direction:"column",gap:4,xstyle:_.card,children:[m.jsx(r("GeoFileSelector.react"),{allowMultiple:!1,errorMessage:b,fileTypes:["image/jpg","image/jpeg","image/png","image/gif"],image:h!=null?m.jsx(r("IPB4BImage.react"),{height:w,src:h,width:P}):m.jsx(r("IPB4BImage.react"),{src:u("399268")}),isLabelHidden:!0,label:s._(/*BTDS*/"App icon"),maxFileSize:5*1024,onChange:U,showSelectedFileNames:function(t){var e=t[0];return k!=null&&D!=null?e.name+" ("+k+" xD7 "+D+")":e.name},value:R!=null?[R]:[]}),m.jsx(r("GeoDivider.react"),{}),m.jsx(r("GeoText.react"),{children:s._(/*BTDS*/"By uploading this file, you certify that you have the right to distribute this image and that it is not pornographic.")}),B&&m.jsx(r("GeoNotice.react"),{status:"error",children:B.message})]})})}g.displayName=g.name+" [from "+i.id+"]",l.default=g}),226);
-----
DeveloperPlatformARAFAppIconModalMutation.graphql",["DeveloperPlatformARAFAppIconModalMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"app_id"},{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{kind:"Variable",name:"app_id",variableName:"app_id"},{kind:"Variable",name:"input",variableName:"input"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o=[{alias:null,args:null,kind:"ScalarField",name:"category",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"DeveloperPlatformARAFAppIconModalMutation",selections:[{alias:null,args:t,concreteType:"XFBSaveArafAppSettingsResponsePayload",kind:"LinkedField",name:"xfb_save_araf_app_settings",plural:!1,selections:[{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"app",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"DeveloperPlatformARAFAppSettingsPage_app"}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DeveloperPlatformARAFAppIconModalMutation",selections:[{alias:null,args:t,concreteType:"XFBSaveArafAppSettingsResponsePayload",kind:"LinkedField",name:"xfb_save_araf_app_settings",plural:!1,selections:[{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"app",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"privacy_url",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"application_category",storageKey:null},{alias:null,args:null,concreteType:"XFBApplicationAccessRequestAssessmentModule",kind:"LinkedField",name:"access_request_assessment_module",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"has_icon",storageKey:null},{alias:null,args:null,concreteType:"XFBAccessRequestAssessmentSubmission",kind:"LinkedField",name:"latest_submission",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"require_user_data_deletion",storageKey:null},{alias:null,args:null,concreteType:"XFBApplicationDataDeletionURLInfo",kind:"LinkedField",name:"data_deletion_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"url_type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null}],storageKey:null},r],storageKey:null},r,{alias:null,args:null,kind:"ScalarField",name:"in_scope_for_property_review",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"icon_url",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_viewer_admin",storageKey:null},{alias:null,args:null,concreteType:"XFBARAFAppCategory",kind:"LinkedField",name:"application_all_categories",plural:!0,selections:o,storageKey:null},{alias:null,args:null,concreteType:"XFBARAFAppSubCategory",kind:"LinkedField",name:"application_all_sub_categories",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"group",storageKey:null},{alias:null,args:null,concreteType:"XFBARAFAppCategory",kind:"LinkedField",name:"categories",plural:!0,selections:o,storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"application_submission_email",storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:n("DeveloperPlatformARAFAppIconModalMutation_facebookRelayOperation"),metadata:{},name:"DeveloperPlatformARAFAppIconModalMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null);
-----
DeveloperPlatformARAFAppIconModalMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24778283438479611"}),null);
-----