CoreFiles by mySites.guru
core.es6.min.js1 lines, 11,231 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
fdb82ffdf8a07f6ead9f2bb8b28abfcc
sha1
1a774092e48c2947382f6c3004c4b41bba55cbc0
sha256
58816296b48250ffcfdcc80a19b03ecb7695fdd3fc4090645cfc03376390bdbb
(()=>{if("function"==typeof window.CustomEvent)return!1;const a=(a,b)=>{const c=document.createEvent("CustomEvent"),d=b||{bubbles:!1,cancelable:!1,detail:void 0};return c.initCustomEvent(a,d.bubbles,d.cancelable,d.detail),c};return a.prototype=window.Event.prototype,window.CustomEvent=a,!0})(),window.Joomla=window.Joomla||{},window.Joomla.editors=window.Joomla.editors||{},window.Joomla.editors.instances=window.Joomla.editors.instances||{},window.Joomla.Modal=window.Joomla.Modal||{current:"",setCurrent:a=>{window.Joomla.current=a},getCurrent:()=>window.Joomla.current},((a,b)=>{"use strict";a.submitform=(a,c,d)=>{let e=c;const f=a;e||(e=b.getElementById("adminForm")),f&&(e.task.value=f),e.noValidate=!d,d?e.hasAttribute("novalidate")&&e.removeAttribute("novalidate"):e.setAttribute("novalidate","");const g=b.createElement("input");g.style.display="none",g.type="submit",e.appendChild(g).click(),e.removeChild(g)},a.submitbutton=(c,d,e)=>{let f=b.querySelector(d||"form.form-validate"),g=e;if("string"==typeof d&&null===f&&(f=b.querySelector(`#${d}`)),f){if(void 0===g||null===g){const a=c.split(".");let b=f.getAttribute("data-cancel-task");b||(b=`${a[0]}.cancel`),g=c!==b}(!g||b.formvalidator.isValid(f))&&a.submitform(c,f)}else a.submitform(c)},a.Text={strings:{},_:(b,c)=>{let d=b,e=c;const f=a.getOptions("joomla.jtext");return f&&(a.Text.load(f),a.loadOptions({"joomla.jtext":null})),e=void 0===e?"":e,d=d.toUpperCase(),void 0===a.Text.strings[d]?e:a.Text.strings[d]},load:b=>([].slice.call(Object.keys(b)).forEach(c=>{a.Text.strings[c.toUpperCase()]=b[c]}),a.Text)},a.JText=a.Text,a.optionsStorage=a.optionsStorage||null,a.getOptions=(b,c)=>(a.optionsStorage||a.loadOptions(),void 0===a.optionsStorage[b]?c:a.optionsStorage[b]),a.loadOptions=c=>{if(!c){const c=[].slice.call(b.querySelectorAll(".joomla-script-options.new"));let d=0;if(c.forEach(b=>{const c=b.text||b.textContent,e=JSON.parse(c);e&&(a.loadOptions(e),d+=1),b.className=b.className.replace(" new"," loaded")}),d)return}a.optionsStorage?c&&[].slice.call(Object.keys(c)).forEach(b=>{a.optionsStorage[b]=null!==c[b]&&"object"==typeof a.optionsStorage[b]&&"object"==typeof c[b]?a.extend(a.optionsStorage[b],c[b]):c[b]}):a.optionsStorage=c||{}},a.replaceTokens=a=>{if(/^[0-9A-F]{32}$/i.test(a)){const c=[].slice.call(b.getElementsByTagName("input"));c.forEach(b=>{"hidden"===b.type&&"1"===b.value&&32===b.name.length&&(b.name=a)})}},a.checkAll=(b,c)=>{if(!b.form)return!1;const d=[].slice.call(b.form.elements);let e=0;return d.forEach(a=>{a.type===b.type&&0===a.id.indexOf(c||"cb")&&(a.checked=b.checked,e+=a.checked?1:0)}),b.form.boxchecked&&(b.form.boxchecked.value=e,a.Event.dispatch(b.form.boxchecked,"change")),!0},a.renderMessages=(c,d,e,f)=>{let g,h,i,j,k,l,m;g="undefined"==typeof d||d&&"#system-message-container"===d?b.getElementById("system-message-container"):b.querySelector(d),("undefined"==typeof e||e&&!1===e)&&a.removeMessages(g),[].slice.call(Object.keys(c)).forEach(d=>{if(h=c[d],"object"==typeof window.customElements&&"function"==typeof window.customElements.get("joomla-alert"))i=b.createElement("joomla-alert"),-1<["notice","message","error","warning"].indexOf(d)?(m="notice"===d?"info":d,m="message"===d?"success":m,m="error"===d?"danger":m,m="warning"===d?"warning":m):m="info",i.setAttribute("type",m),i.setAttribute("dismiss","true"),f&&0<parseInt(f,10)&&i.setAttribute("autodismiss",f);else{i=b.createElement("div"),-1<["notice","message","error","warning"].indexOf(d)?(m="notice"===d?"info":d,m="message"===d?"success":m,m="error"===d?"danger":m,m="warning"===d?"warning":m):m="info",i.className=`alert alert-${m}`;const a=b.createElement("button");a.setAttribute("type","button"),a.setAttribute("data-dismiss","alert"),a.className="close",a.innerHTML="\xD7",i.appendChild(a)}j=a.Text._(d),"undefined"!=typeof j&&(k=b.createElement("h4"),k.className="alert-heading",k.innerHTML=a.Text._(d)?a.Text._(d):d,i.appendChild(k)),h.forEach(a=>{l=b.createElement("div"),l.innerHTML=a,i.appendChild(l)}),g.appendChild(i),"object"!=typeof window.customElements&&"function"!=typeof window.customElements.get("joomla-alert")&&f&&0<parseInt(f,10)&&setTimeout(()=>{a.removeMessages(g)},f)})},a.removeMessages=a=>{let c;if(c=a?a:b.getElementById("system-message-container"),"object"==typeof window.customElements&&window.customElements.get("joomla-alert")){const a=[].slice.call(c.querySelectorAll("joomla-alert"));a.length&&a.forEach(a=>{a.close()})}else{for(;c.firstChild;)c.removeChild(c.firstChild);c.style.display="none",delete c.offsetHeight,c.style.display=""}},a.ajaxErrorsMessages=(b,c)=>{const d={};if("parsererror"===c){const c=[];let e=b.responseText.trim();for(let a=e.length-1;0<=a;a--)c.unshift(["&#",e[a].charCodeAt(),";"].join(""));e=c.join(""),d.error=[a.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",e)]}else d.error="nocontent"===c?[a.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:"timeout"===c?[a.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:"abort"===c?[a.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:b.responseJSON&&b.responseJSON.message?[`${a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)} <em>${b.responseJSON.message}</em>`]:b.statusText?[`${a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)} <em>${b.statusText}</em>`]:[a.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",b.status)];return d},a.isChecked=(d,f)=>{let g=f;if("undefined"==typeof g?g=b.getElementById("adminForm"):"string"==typeof f&&(g=b.getElementById(f)),g.boxchecked.value=d?parseInt(g.boxchecked.value,10)+1:parseInt(g.boxchecked.value,10)-1,a.Event.dispatch(g.boxchecked,"change"),!g.elements["checkall-toggle"])return;let h,j,k,l=!0;for(h=0,k=g.elements.length;h<k;h++)if(j=g.elements[h],"checkbox"===j.type&&"checkall-toggle"!==j.name&&!j.checked){l=!1;break}g.elements["checkall-toggle"].checked=l},a.tableOrdering=(c,d,e,f)=>{let g=f;"undefined"==typeof g?g=b.getElementById("adminForm"):"string"==typeof f&&(g=b.getElementById(f)),g.filter_order.value=c,g.filter_order_Dir.value=d,a.submitform(e,g)},a.listItemTask=(c,d,e=null)=>{let f=e;f=null===e?b.adminForm:b.getElementById(e);const g=f[c];let h,j=0;if(!g)return!1;for(;h=f[`cb${j}`],!!h;)h.checked=!1,j+=1;return g.checked=!0,f.boxchecked.value=1,a.submitform(d,f),!1},a.loadingLayer=(c,d)=>{const e=c||"show",f=d||b.body;if("load"===e){if(b.getElementById("loading-logo"))return!1;const c=a.getOptions("system.paths")||{},d=c.root||"",e=b.createElement("div");e.id="loading-logo",e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.opacity="0.8",e.style.filter="alpha(opacity=80)",e.style.overflow="hidden",e.style["z-index"]="10000",e.style.display="none",e.style["background-color"]="#fff",e.style["background-image"]=`url("${d}/media/system/images/ajax-loader.gif")`,e.style["background-position"]="center",e.style["background-repeat"]="no-repeat",e.style["background-attachment"]="fixed",f.appendChild(e)}else b.getElementById("loading-logo")||a.loadingLayer("load",f),b.getElementById("loading-logo").style.display="show"===e?"block":"none";return b.getElementById("loading-logo")},a.extend=(a,b)=>{let c=a;return null===a&&(c={}),[].slice.call(Object.keys(b)).forEach(a=>{c[a]=b[a]}),a},a.request=b=>{let c;const d=a.extend({url:"",method:"GET",data:null,perform:!0},b);try{if(c=new XMLHttpRequest,c.open(d.method,d.url,!0),c.setRequestHeader("X-Requested-With","XMLHttpRequest"),c.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==d.method){const b=a.getOptions("csrf.token","");b&&c.setRequestHeader("X-CSRF-Token",b),d.headers&&d.headers["Content-Type"]||c.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(d.headers&&[].slice.call(Object.keys(d.headers)).forEach(a=>{"Content-Type"===a&&"false"===d.headers["Content-Type"]||c.setRequestHeader(a,d.headers[a])}),c.onreadystatechange=()=>{4!==c.readyState||(200===c.status?d.onSuccess&&d.onSuccess.call(window,c.responseText,c):d.onError&&d.onError.call(window,c))},d.perform){if(d.onBefore&&!1===d.onBefore.call(window,c))return c;c.send(d.data)}}catch(a){return window.console?console.log(a):null,!1}return c},a.WebComponents=()=>{const c=a.getOptions("webcomponents");if(!c||!c.length)return;let d=!1;const e=[];let f,g=!1;const h=()=>{window.WebComponents.ready=!0,b.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0})),n()},i=()=>{window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback(a=>{f=a,g&&f()})},j=()=>{i(),k()},k=()=>{window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),d=!0,l().then(h)},l=()=>{g=!1;const a=()=>{g=!0,e.length=0,f&&f()};return Promise.all(e.map(a=>a instanceof Function?a():a)).then(()=>{a()}).catch(a=>{console.error(a)})};window.WebComponents=window.WebComponents||{ready:!1,_batchCustomElements:i,waitFor:a=>{a&&(e.push(a),d&&l())}};const m=()=>{try{return new Function("(a = 0) => a"),!0}catch(a){return!1}},n=()=>{c&&c.length&&c.forEach(a=>{let c;if(a.match(/\.js/g))if(c=b.createElement("script"),!m()){let b;a.match(/\.min\.js/g)?b=a.replace(/\.min\.js/g,"-es5.min.js"):a.match(/\.js/g)&&(b=a.replace(/\.js/g,"-es5.js")),c.src=b}else c.src=a;c&&b.head.appendChild(c)})};let o="core.min.js",p=b.querySelector(`script[src*="${o}"]`);if(p||(o="core.js",p=b.querySelector(`script[src*="${o}"]`)),!p)throw new Error("core(.min).js is not registered correctly!");let q=[];(!("attachShadow"in Element.prototype&&"getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&q.push("sd"),(!window.customElements||window.customElements.forcePolyfill)&&q.push("ce");const r=(()=>{const a=b.createElement("template");if(!("content"in a))return!0;if(!(a.content.cloneNode()instanceof DocumentFragment))return!0;const c=b.createElement("template");c.content.appendChild(b.createElement("div")),a.content.appendChild(c);const d=a.cloneNode(!0);return 0===d.content.childNodes.length||0===d.content.firstChild.content.childNodes.length})();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!r||(q=["sd-ce-pf"]),q.length){const c=b.createElement("script"),d=`media/vendor/webcomponentsjs/js/webcomponents-${q.join("-")}.min.js`,e=p.src.match(/\?.*/)[0],f=a.getOptions("system.paths");if(!f)throw new Error("core(.min).js is not registered correctly!");c.src=f.rootFull+d+(e||""),"loading"===b.readyState?(c.setAttribute("onload","window.WebComponents._batchCustomElements()"),b.write(c.outerHTML),b.addEventListener("DOMContentLoaded",k)):(c.addEventListener("load",j),c.addEventListener("error",()=>{throw new Error(`Could not load polyfill bundle${f.rootFull+d}`)}),b.head.appendChild(c))}else d=!0,"complete"===b.readyState?h():(window.addEventListener("load",k),window.addEventListener("DOMContentLoaded",()=>{window.removeEventListener("load",k),k()}))}})(Joomla,document),((a,b)=>{"use strict";b.Event||(b.Event={},b.Event.dispatch=(b,c,d)=>{let e=b,f=c,g=d;"string"==typeof b&&(g=c,f=b,e=a),g=g||{},e.dispatchEvent(new CustomEvent(f,{detail:g,bubbles:!0,cancelable:!0}))},b.Event.listenOnce=(a,b,c)=>{const d=e=>(a.removeEventListener(b,d),c.call(a,e));a.addEventListener(b,d)})})(window,Joomla),document.addEventListener("DOMContentLoaded",Joomla.WebComponents);

No other release has this exact content. See every version of this file.