!function(){var e={54:function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},o=0;o<t.length;o++){var a=t[o],i=a[0],s={id:e+":"+o,css:a[1],media:a[2],sourceMap:a[3]};n[i]?n[i].parts.push(s):r.push(n[i]={id:i,parts:[s]})}return r}r.d(t,{A:function(){return h}});var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},i=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,d=!1,l=function(){},f=null,c="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e,t,r,o){d=r,f=o||{};var i=n(e,t);return v(i),function(t){for(var r=[],o=0;o<i.length;o++){var s=i[o];(u=a[s.id]).refs--,r.push(u)}for(t?v(i=n(e,t)):i=[],o=0;o<r.length;o++){var u;if(0===(u=r[o]).refs){for(var d=0;d<u.parts.length;d++)u.parts[d]();delete a[u.id]}}}}function v(e){for(var t=0;t<e.length;t++){var r=e[t],n=a[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(g(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var i=[];for(o=0;o<r.parts.length;o++)i.push(g(r.parts[o]));a[r.id]={id:r.id,refs:1,parts:i}}}}function m(){var e=document.createElement("style");return e.type="text/css",i.appendChild(e),e}function g(e){var t,r,n=document.querySelector("style["+c+'~="'+e.id+'"]');if(n){if(d)return l;n.parentNode.removeChild(n)}if(p){var o=u++;n=s||(s=m()),t=C.bind(null,n,o,!1),r=C.bind(null,n,o,!0)}else n=m(),t=b.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var y,I=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function C(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=I(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function b(e,t){var r=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(c,t.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},379:function(){},974:function(e,t,r){var n=r(379);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,r(54).A)("5525806c",n,!0,{})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={id:n,exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e;r(974),e=jQuery,Craft.UserPhotoInput=Garnish.Base.extend({userId:null,imageUpload:null,init:function(t,r,n){var o=this;this.userId=t,this.setSettings(n,Craft.UserPhotoInput.defaults);var a={postParameters:{userId:this.userId},containerSelector:r,uploadAction:"users/upload-user-photo",deleteAction:"users/delete-user-photo",uploadButtonSelector:".btn.upload-photo",deleteButtonSelector:".btn.delete-photo",fileInputSelector:"input[type=file]",uploadParamName:"photo",onAfterRefreshImage:function(t){if(void 0!==t.html){if(Craft.refreshElementInstances(o.userId),t.headerPhotoHtml)for(var r=e(".header-photo"),n=0;n<r.length;n++){var a=e(t.headerPhotoHtml);r.eq(n).replaceWith(a),Craft.cp.elementThumbLoader.load(a)}o.initImageEditor()}}};this.imageUpload=new Craft.ImageUpload(a),this.initImageEditor()},initImageEditor:function(){var t=this;this.addListener(this.imageUpload.$container.find(".edit-photo"),"click",(function(r){new Craft.AssetImageEditor(e(r.currentTarget).data("photoid"),{allowSavingAsNew:!1,onSave:function(){Craft.sendActionRequest("POST","users/render-photo-input",{data:{userId:t.userId}}).then((function(e){var r=e.data;t.imageUpload.refreshImage(r)}))}})}))}},{defaults:{isCurrentUser:!1}})}()}();
//# sourceMappingURL=UserPhotoInput.js.map