File manager - Edit - /home/jardides/www/Jardi-design/media/system/js/fields/joomla-media-select-es5.min.js
Back
!function(){"use strict";function e(){e=function(){return t};var t={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),l=new J(i||[]);return r(a,"_invoke",{value:L(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h={};function p(){}function f(){}function m(){}var v={};c(v,a,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(_([])));y&&y!==n&&i.call(y,a)&&(v=y);var b=m.prototype=p.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(r,o,a,l){var s=d(e[r],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;r(this,"_invoke",{value:function(e,i){function r(){return new t((function(t,r){n(e,i,t,r)}))}return o=o?o.then(r,r):r()}})}function L(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return A()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var l=w(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var s=d(e,t,n);if("normal"===s.type){if(i=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i="completed",n.method="throw",n.arg=s.arg)}}}function w(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=d(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function J(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:A}}function A(){return{value:void 0,done:!0}}return f.prototype=m,r(b,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:f,configurable:!0}),f.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},x(k.prototype),c(k.prototype,l,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var a=new k(u(e,n,i,r),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},t.values=_,J.prototype={constructor:J,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(F),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),F(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;F(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function t(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function n(e){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=e.apply(n,i);function l(e){t(a,r,o,l,s,"next",e)}function s(e){t(a,r,o,l,s,"throw",e)}l(void 0)}))}}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?o:String(o)),i)}var r,o}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function a(e,t,n){return a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&o(r,n.prototype),r},a.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,r(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,e)},l(e)}if(!Joomla)throw new Error("Joomla API is not properly initiated");Joomla.selectedMediaFile={};var s=Joomla.getOptions("media-picker",{});if(!Object.keys(s).length)throw new Error("No supported extensions provided");document.addEventListener("onMediaFileSelected",function(){var t=n(e().mark((function t(n){var i,r,o,a,l,c,u,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Joomla.selectedMediaFile=n.detail,i=Joomla.Modal.getCurrent(),r=i.querySelector(".modal-body")){e.next=5;break}return e.abrupt("return");case 5:if((o=r.querySelector("joomla-field-mediamore"))&&o.parentNode.removeChild(o),!r.closest("joomla-field-media")){e.next=9;break}return e.abrupt("return");case 9:a=s.images,l=s.audios,c=s.videos,u=s.documents,Joomla.selectedMediaFile.path&&(a.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="images":l.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="audios":c.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="videos":u.includes(Joomla.selectedMediaFile.extension.toLowerCase())&&(d="documents"),d&&r.insertAdjacentHTML("afterbegin",'<joomla-field-mediamore\n parent-id="'+i.id+'"\n type="'+d+'"\n summary-label="'+Joomla.Text._("JFIELD_MEDIA_SUMMARY_LABEL")+'"\n lazy-label="'+Joomla.Text._("JFIELD_MEDIA_LAZY_LABEL")+'"\n alt-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_LABEL")+'"\n alt-check-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_CHECK_LABEL")+'"\n alt-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_CHECK_DESC_LABEL")+'"\n classes-label="'+Joomla.Text._("JFIELD_MEDIA_CLASS_LABEL")+'"\n figure-classes-label="'+Joomla.Text._("JFIELD_MEDIA_FIGURE_CLASS_LABEL")+'"\n figure-caption-label="'+Joomla.Text._("JFIELD_MEDIA_FIGURE_CAPTION_LABEL")+'"\n embed-check-label="'+Joomla.Text._("JFIELD_MEDIA_EMBED_CHECK_LABEL")+'"\n embed-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_EMBED_CHECK_DESC_LABEL")+'"\n download-check-label="'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_CHECK_LABEL")+'"\n download-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_CHECK_DESC_LABEL")+'"\n title-label="'+Joomla.Text._("JFIELD_MEDIA_TITLE_LABEL")+'"\n width-label="'+Joomla.Text._("JFIELD_MEDIA_WIDTH_LABEL")+'"\n height-label="'+Joomla.Text._("JFIELD_MEDIA_HEIGHT_LABEL")+'"\n></joomla-field-mediamore>\n'));case 11:case"end":return e.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());var c=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},u=function(e){return new Promise((function(t,n){var i=new Image;i.src=e,i.onload=function(){Joomla.selectedMediaFile.width=i.width,Joomla.selectedMediaFile.height=i.height,t(!0)},i.onerror=function(){n(!1)}}))},d=function(){var t=n(e().mark((function t(n,i,r){var o,a,l,s,d,h,p,f,m,v,g,y;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.url?(o=Joomla.getOptions("system.paths"),a=o.rootFull,(l=n.url.split(a)).length>1?(Joomla.selectedMediaFile.url=l[1],n.thumb_path?Joomla.selectedMediaFile.thumb=n.thumb_path:Joomla.selectedMediaFile.thumb=!1):n.thumb_path&&(Joomla.selectedMediaFile.url=n.url,Joomla.selectedMediaFile.thumb=n.thumb_path)):Joomla.selectedMediaFile.url=!1,!Joomla.selectedMediaFile.url){e.next=47;break}if(d="",h="",p="",f="",m="",v="",g="",c(i)){e.next=35;break}if(y=r.closest(".modal-content"),!(s=y.querySelector("joomla-field-mediamore"))){e.next=30;break}if("true"===s.getAttribute("alt-check")&&(p=' alt=""'),h=s.getAttribute("alt-value")?' alt="'+s.getAttribute("alt-value")+'"':p,f=s.getAttribute("img-classes")?' class="'+s.getAttribute("img-classes")+'"':"",m=s.getAttribute("fig-classes")?' class="image '+s.getAttribute("fig-classes")+'"':' class="image"',v=s.getAttribute("fig-caption")?""+s.getAttribute("fig-caption"):"","true"!==s.getAttribute("is-lazy")){e.next=30;break}if(d=' loading="lazy" width="'+Joomla.selectedMediaFile.width+'" height="'+Joomla.selectedMediaFile.height+'"',0!==Joomla.selectedMediaFile.width&&0!==Joomla.selectedMediaFile.height){e.next=30;break}return e.prev=21,e.next=24,u(Joomla.selectedMediaFile.url);case 24:d=' loading="lazy" width="'+Joomla.selectedMediaFile.width+'" height="'+Joomla.selectedMediaFile.height+'"',e.next=30;break;case 27:e.prev=27,e.t0=e.catch(21),d="";case 30:g=v?"<figure"+m+'><img src="'+Joomla.selectedMediaFile.url+'"'+f+d+h+' data-path="'+Joomla.selectedMediaFile.path+'"/><figcaption>'+v+"</figcaption></figure>":'<img src="'+Joomla.selectedMediaFile.url+'"'+f+d+h+' data-path="'+Joomla.selectedMediaFile.path+'"/>',s&&s.parentNode.removeChild(s),Joomla.editors.instances[i].replaceSelection(g),e.next=47;break;case 35:if(0!==Joomla.selectedMediaFile.width&&0!==Joomla.selectedMediaFile.height){e.next=45;break}return e.prev=36,e.next=39,u(Joomla.selectedMediaFile.url);case 39:e.next=45;break;case 41:e.prev=41,e.t1=e.catch(36),Joomla.selectedMediaFile.height=0,Joomla.selectedMediaFile.width=0;case 45:r.markValid(),r.setValue(Joomla.selectedMediaFile.url+"#joomlaImage://"+n.path.replace(":","")+"?width="+Joomla.selectedMediaFile.width+"&height="+Joomla.selectedMediaFile.height);case 47:case"end":return e.stop()}}),t,null,[[21,27],[36,41]])})));return function(e,n,i){return t.apply(this,arguments)}}(),h=function(e,t,n,i){if(e.url){var r=Joomla.getOptions("system.paths").rootFull,o=e.url.split(r);o.length>1?Joomla.selectedMediaFile.url=o[1]:Joomla.selectedMediaFile.url=e.url}else Joomla.selectedMediaFile.url=!1;var a;if(Joomla.selectedMediaFile.url)if(c(t))n.markValid(),n.givenType=i,n.setValue(Joomla.selectedMediaFile.url);else{var l;if(a=n.closest(".modal-content").querySelector("joomla-field-mediamore")){var s=a.getAttribute("embed-it");if(s&&"true"===s){if("audios"===i&&(l='<audio controls src="'+Joomla.selectedMediaFile.url+'"></audio>'),"documents"===i){var u=a.getAttribute("title");l='<object type="application/'+Joomla.selectedMediaFile.extension+'" data="'+Joomla.selectedMediaFile.url+'" '+(u?'title="'+u+'"':"")+' width="'+a.getAttribute("width")+'" height="'+a.getAttribute("height")+'">\n '+Joomla.Text._("JFIELD_MEDIA_UNSUPPORTED").replace("{tag}",'<a download href="'+Joomla.selectedMediaFile.url+'">').replace(/{extension}/g,Joomla.selectedMediaFile.extension)+"\n</object>"}"videos"===i&&(l='<video controls width="'+a.getAttribute("width")+'" height="'+a.getAttribute("height")+'">\n <source src="'+Joomla.selectedMediaFile.url+'" type="'+Joomla.selectedMediaFile.fileType+'">\n</video>')}else if(""!==Joomla.editors.instances[t].getSelection())l='<a download href="'+Joomla.selectedMediaFile.url+'">'+Joomla.editors.instances[t].getSelection()+"</a>";else{var d=/([\w-]+)\./.exec(Joomla.selectedMediaFile.url);l='<a download href="'+Joomla.selectedMediaFile.url+'">'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_FILE").replace("{file}",d[1])+"</a>"}}a&&a.parentNode.removeChild(a),Joomla.editors.instances[t].replaceSelection(l)}},p=function(){var t=n(e().mark((function t(n,i,r){var o,a,l,c,u;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==n.success){e.next=12;break}if(o=n.data[0],a=s.images,l=s.audios,c=s.videos,u=s.documents,!Joomla.selectedMediaFile.extension||!a.includes(o.extension.toLowerCase())){e.next=5;break}return e.abrupt("return",d(o,i,r));case 5:if(!Joomla.selectedMediaFile.extension||!l.includes(o.extension.toLowerCase())){e.next=7;break}return e.abrupt("return",h(o,i,r,"audios"));case 7:if(!Joomla.selectedMediaFile.extension||!u.includes(o.extension.toLowerCase())){e.next=9;break}return e.abrupt("return",h(o,i,r,"documents"));case 9:if(!Joomla.selectedMediaFile.extension||!c.includes(o.extension.toLowerCase())){e.next=11;break}return e.abrupt("return",h(o,i,r,"videos"));case 11:case 12:return e.abrupt("return","");case 13:case"end":return e.stop()}}),t)})));return function(e,n,i){return t.apply(this,arguments)}}();Joomla.getMedia=function(t,i,r){return new Promise((function(o,a){if(!t||"object"==typeof t&&(!t.path||""===t.path))return Joomla.selectedMediaFile={},void o({resp:{success:!1}});var l=new URL(Joomla.getOptions("media-picker-api").apiBaseUrl?Joomla.getOptions("media-picker-api").apiBaseUrl:Joomla.getOptions("system.paths").baseFull+"index.php?option=com_media&format=json");l.searchParams.append("task","api.files"),l.searchParams.append("url",!0),l.searchParams.append("path",t.path),l.searchParams.append("mediatypes","0,1,2,3"),l.searchParams.append(Joomla.getOptions("csrf.token"),1),fetch(l,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then(function(){var t=n(e().mark((function t(n){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=o,e.next=3,p(n,i,r);case 3:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 5:case"end":return e.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){return a(e)}))}))},Joomla.getImage=Joomla.getMedia;var f=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n);var a,l,s,c=r.prototype;return c.connectedCallback=function(){var e=this;"images"===this.type?(this.innerHTML="<details open>\n<summary>"+this.summarytext+'</summary>\n<div class="">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-alt">'+this.alttext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-alt" data-is="alt-value" />\n </div>\n </div>\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input" type="checkbox" id="'+this.parentId+'-alt-check">\n <label class="form-check-label" for="'+this.parentId+'-alt-check">'+this.altchecktext+'</label>\n <div><small class="form-text">'+this.altcheckdesctext+'</small></div>\n </div>\n </div>\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input" type="checkbox" id="'+this.parentId+'-lazy" checked>\n <label class="form-check-label" for="'+this.parentId+'-lazy">'+this.lazytext+'</label>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-classes">'+this.classestext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-classes" data-is="img-classes"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-figclasses">'+this.figclassestext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-figclasses" data-is="fig-classes"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-figcaption">'+this.figcaptiontext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-figcaption" data-is="fig-caption"/>\n </div>\n </div>\n</div>\n</details>',this.lazyInputFn=this.lazyInputFn.bind(this),this.altCheckFn=this.altCheckFn.bind(this),this.inputFn=this.inputFn.bind(this),this.lazyInput=this.querySelector("#"+this.parentId+"-lazy"),this.lazyInput.addEventListener("change",this.lazyInputFn),this.altCheck=this.querySelector("#"+this.parentId+"-alt-check"),this.altCheck.addEventListener("input",this.altCheckFn),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){t.addEventListener("input",e.inputFn);var n=t.dataset.is;return n&&e.setAttribute(n,t.value.replace(/"/g,""")),t})),this.setAttribute("is-lazy",!!this.lazyInput.checked),this.setAttribute("alt-check",!1)):["audios","videos","documents"].includes(this.type)&&(this.innerHTML="<details open>\n<summary>"+this.summarytext+'</summary>\n<div class="">\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input radio" type="radio" name="flexRadioDefault" id="'+this.parentId+'-embed-check-2" value="0" checked>\n <label class="form-check-label" for="'+this.parentId+'-embed-check-2">\n '+this.downloadchecktext+'\n <div><small class="form-text">'+this.downloadcheckdesctext+'</small></div>\n </label>\n </div>\n <div class="form-check">\n <input class="form-check-input radio" type="radio" name="flexRadioDefault" id="'+this.parentId+'-embed-check-1" value="1">\n <label class="form-check-label" for="'+this.parentId+'-embed-check-1">\n '+this.embedchecktext+'\n <div><small class="form-text">'+this.embedcheckdesctext+'</small></div>\n </label>\n </div>\n </div>\n <div class="toggable-parts" style="display: none">\n <div style="display: '+("audios"===this.type?"none":"block")+'">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-width">'+this.widthtext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-width" value="800" data-is="width"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-height">'+this.heighttext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-height" value="600" data-is="height"/>\n </div>\n </div>\n <div style="display: '+("document"===this.type?"block":"none")+'">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-title">'+this.titletext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-title" value="" data-is="title"/>\n </div>\n </div>\n </div>\n </div>\n</div>\n</details>',this.embedInputFn=this.embedInputFn.bind(this),this.inputFn=this.inputFn.bind(this),[].slice.call(this.querySelectorAll(".form-check-input.radio")).map((function(t){return t.addEventListener("input",e.embedInputFn)})),this.setAttribute("embed-it",!1),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){t.addEventListener("input",e.inputFn);var n=t.dataset.is;return n&&e.setAttribute(n,t.value.replace(/"/g,""")),t})))},c.disconnectedCallback=function(){var e=this;"image"===this.type&&(this.lazyInput.removeEventListener("input",this.lazyInputFn),this.altInput.removeEventListener("input",this.inputFn),this.altCheck.removeEventListener("input",this.altCheckFn)),["audio","video","document"].includes(this.type)&&([].slice.call(this.querySelectorAll(".form-check-input.radio")).map((function(t){return t.removeEventListener("input",e.embedInputFn)})),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){return t.removeEventListener("input",e.embedInputFn)}))),this.innerHTML=""},c.lazyInputFn=function(e){this.setAttribute("is-lazy",!!e.target.checked)},c.altCheckFn=function(e){this.setAttribute("alt-check",!!e.target.checked)},c.inputFn=function(e){var t=e.target.dataset.is;t&&this.setAttribute(t,e.target.value.replace(/"/g,"""))},c.embedInputFn=function(e){var t=e.target.value;this.setAttribute("embed-it","0"!==t);var n=this.querySelector(".toggable-parts");n&&("block"!==n.style.display?n.style.display="block":n.style.display="none")},a=r,(l=[{key:"type",get:function(){return this.getAttribute("type")}},{key:"parentId",get:function(){return this.getAttribute("parent-id")}},{key:"lazytext",get:function(){return this.getAttribute("lazy-label")}},{key:"alttext",get:function(){return this.getAttribute("alt-label")}},{key:"altchecktext",get:function(){return this.getAttribute("alt-check-label")}},{key:"altcheckdesctext",get:function(){return this.getAttribute("alt-check-desc-label")}},{key:"embedchecktext",get:function(){return this.getAttribute("embed-check-label")}},{key:"embedcheckdesctext",get:function(){return this.getAttribute("embed-check-desc-label")}},{key:"downloadchecktext",get:function(){return this.getAttribute("download-check-label")}},{key:"downloadcheckdesctext",get:function(){return this.getAttribute("download-check-desc-label")}},{key:"classestext",get:function(){return this.getAttribute("classes-label")}},{key:"figclassestext",get:function(){return this.getAttribute("figure-classes-label")}},{key:"figcaptiontext",get:function(){return this.getAttribute("figure-caption-label")}},{key:"summarytext",get:function(){return this.getAttribute("summary-label")}},{key:"widthtext",get:function(){return this.getAttribute("width-label")}},{key:"heighttext",get:function(){return this.getAttribute("height-label")}},{key:"titletext",get:function(){return this.getAttribute("title-label")}}])&&i(a.prototype,l),s&&i(a,s),Object.defineProperty(a,"prototype",{writable:!1}),r}(l(HTMLElement));customElements.define("joomla-field-mediamore",f)}();
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings