!function(e){function t(t){for(var a,o,l=t[0],u=t[1],c=t[2],p=0,f=[];p<l.length;p++)o=l[p],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&f.push(r[o][0]),r[o]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);for(i&&i(t);f.length;)f.shift()();return s.push.apply(s,c||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,l=1;l<n.length;l++){var u=n[l];0!==r[u]&&(a=!1)}a&&(s.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},r={26:0},s=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var l=window.webpackWPML=window.webpackWPML||[],u=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var i=u;s.push([1285,0]),n()}({1285:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),s=n(38),o=n.n(s),l=n(3),u=n.n(l),c=n(7),i=n.n(c),p=n(9),f=n.n(p),m=n(1),d=function(){return r.a.createElement("img",{src:wpmlLanguageSettings.loaderImage,alt:"loading",width:"16",height:"16"})},g=function(){var e=Object(a.useState)(null),t=f()(e,2),n=t[0],r=t[1];return Object(a.useEffect)((function(){n&&setTimeout((function(){r(null)}),3e3)}),[n,r]),{confirmation:n,setSuccess:function(e){return r({message:e,type:"success"})},setError:function(e){return r({message:e,type:"error"})}}},v=n(17),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=Object(a.useState)(!1),n=f()(t,2),r=n[0],s=n[1];e||(e=wpmlLanguageSettings.endpoints.setFileType);var o=function(){var t=i()(u.a.mark((function t(n,a,r){var o,l;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s(!0),t.prev=1,t.next=4,Object(v.a)(e,{format:n});case 4:if(!(l=t.sent).success||null==l||null===(o=l.data)||void 0===o||!o.success){t.next=9;break}a(Object(m.a)("The new format has been saved.","sitepress")),t.next=10;break;case 9:throw new Error;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),r(Object(m.a)("Failed to save the new format","sitepress"));case 15:s(!1);case 16:case"end":return t.stop()}}),t,null,[[1,12]])})));return function(e,n,a){return t.apply(this,arguments)}}();return{isSaving:r,save:o}},y=function(e){var t=e.message,n=e.type,a=void 0===n?"success":n;return r.a.createElement("span",{className:"icl_ajx_response",style:{display:"inline",color:"error"===a?"red":"auto"}},t)},h=function(e){var t=e.initialFormat,n=e.allowedFormats,s=Object(a.useState)(t),o=f()(s,2),l=o[0],c=o[1],p=b(),v=p.isSaving,h=p.save,w=g(),O=w.confirmation,j=w.setSuccess,E=w.setError,S=function(){var e=i()(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h(l,j,E));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement("h4",null,Object(m.a)("Choose the image file type for flags","sitepress")),r.a.createElement("p",{className:"explanation-text"},Object(m.a)("This option affects only the built-in WPML flags, not the custom uploaded ones.","sitepress")),r.a.createElement("ul",{onChange:function(e){c(e.target.value)}},n.map((function(e){return r.a.createElement("li",{key:e},r.a.createElement("label",null,r.a.createElement("input",{className:"wpml-radio-native",type:"radio",name:"flags_format",value:e,defaultChecked:l===e}),sprintf(Object(m.a)("%s format","sitepress"),e.toUpperCase())))}))),r.a.createElement("p",{className:"buttons-wrap"},v&&r.a.createElement(y,{message:r.a.createElement(d,null)}),O&&r.a.createElement(y,{message:O.message,type:O.type}),r.a.createElement("input",{className:"button-primary wpml-button base-btn",name:"save",value:Object(m.a)("Save","sitepress"),type:"submit",onClick:S,disabled:v})))};document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("wpml-default-flag-format");e&&o.a.render(r.a.createElement(h,{initialFormat:wpmlLanguageSettings.flagsDefaultType.selectedFormat,allowedFormats:wpmlLanguageSettings.flagsDefaultType.allowedFormats}),e)}))}});