AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/dansnotreville-fr/nice/media/plg_system_nrframework/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/dansnotreville-fr/nice/media/plg_system_nrframework/js//conditionbuilder.js
var TF_Condition_Builder=function(){function e(e){this.app_ajax_url="?option=com_ajax&format=raw&plugin=nrframework&task=ConditionBuilder",this.wrapper=e,this.isJ4=Joomla.Modal,this.root_url=this.wrapper.dataset.root,this.site_url=this.root_url.replace("/administrator",""),this.token=this.wrapper.dataset.token,this.init()}var t=e.prototype;return t.init=function(){this.initEvents(),this.initLoadConditions()},t.initEvents=function(){this.prepare(),document.addEventListener("click",function(e){this.addConditionEvent(e),this.deleteConditionEvent(e),this.deleteGroupConditionEvent(e)}.bind(this)),document.addEventListener("change",function(e){this.handleConditionSelector(e)}.bind(this)),jQuery(document).on("change",".condition_selector",function(e){this.handleConditionSelector(e)}.bind(this)),document.addEventListener("afterConditionSettings",function(e){this.loadConditionAssets(e.detail.condition_name,e.detail.element)}.bind(this))},t.prepare=function(){NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/toggle.css")},t.initLoadConditions=function(){var e=this.wrapper.previousElementSibling.value;if(e){var t={data:e,name:this.wrapper.previousElementSibling.getAttribute("name"),include_rules:this.wrapper.dataset.includeRules,exclude_rules:this.wrapper.dataset.excludeRules,exclude_rules_pro:this.wrapper.dataset.excludeRulesPro},o=this;this.call("init_load",t,function(e){var t=o.wrapper.querySelector(".tf-conditionbuilder-initial-message");t&&t.remove(),o.wrapper.querySelector(".cb-groups").innerHTML=e,o.beautifyProConditions(o.wrapper),o.getValidRules().forEach(function(e){o.loadConditionAssets(e.value,e.closest(".cb-item"))}),o.wrapper.classList.add("init-load-done")})}else this.wrapper.querySelector(".tf-cb-add-new-group").click()},t.loadConditionAssets=function(e,t){var o=this;switch(e){case"Joomla\\UserGroup":case"Joomla\\Menu":case"Component\\ContentCategory":case"Component\\K2Category":case"Component\\VirtueMartCategory":case"Component\\VirtueMartCategoryView":case"Component\\HikashopCategory":case"Component\\HikashopCategoryView":NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/treeselect.css"),NRHelper.loadScript(this.site_url+"/media/plg_system_nrframework/js/treeselect.js",function(){NRTreeselect.init(t)},!0);break;case"Date\\Date":case"Component\\HikashopLastPurchasedDate":case"Component\\VirtueMartLastPurchasedDate":NRHelper.loadStyleSheet(this.site_url+"/media/system/css/fields/calendar.css"),NRHelper.loadScript(this.site_url+"/media/system/js/fields/calendar-locales/en.js"),NRHelper.loadScript(this.site_url+"/media/system/js/fields/calendar-locales/date/gregorian/date-helper.min.js"),NRHelper.loadScript(this.site_url+"/media/system/js/fields/calendar.min.js",function(){t.querySelectorAll(".field-calendar").forEach(function(e){JoomlaCalendar.init(e)})},!0);break;case"Date\\Time":NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/vendor/jquery-clockpicker.min.css"),NRHelper.loadScript(this.site_url+"/media/plg_system_nrframework/js/vendor/jquery-clockpicker.min.js",function(){t.querySelectorAll(".clockpicker").forEach(function(e){jQuery(e).clockpicker()})},!0);break;case"URL":case"Joomla\\UserID":case"Geo\\City":case"Geo\\Region":case"Referrer":case"IP":case"Component\\VirtueMartCartContainsProducts":case"Component\\VirtueMartCurrentProductPrice":case"Component\\VirtueMartCurrentProductStock":case"Component\\HikashopCartContainsProducts":case"Component\\HikashopCurrentProductPrice":case"Component\\HikashopCurrentProductStock":this.isJ4?NRHelper.loadScript(this.site_url+"/media/system/js/fields/joomla-field-subform.js"):NRHelper.loadScript(this.site_url+"/media/jui/js/jquery.ui.core.min.js",function(){NRHelper.loadScript(o.site_url+"/media/jui/js/jquery.ui.sortable.min.js",function(){NRHelper.loadScript(o.site_url+"/media/system/js/subform-repeatable.js")})}),NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/tfinputrepeater.css"),NRHelper.loadScript(this.site_url+"/media/plg_system_nrframework/js/tfinputrepeater.js");case"Joomla\\UserID":this.isJ4?NRHelper.loadScript(this.site_url+"/media/system/js/fields/joomla-field-user.min.js"):NRHelper.loadScript(this.site_url+"/media/jui/js/fielduser.min.js");case"Component\\VirtueMartCartContainsProducts":case"Component\\VirtueMartCurrentProductPrice":case"Component\\VirtueMartCurrentProductStock":case"Component\\HikashopCartContainsProducts":case"Component\\HikashopCurrentProductPrice":case"Component\\HikashopCurrentProductStock":this.loadSelect2();break;case"Component\\K2Item":case"Component\\ContentArticle":case"Component\\VirtueMartSingle":case"Component\\HikashopSingle":case"Component\\HikashopPurchasedProduct":case"Component\\VirtueMartPurchasedProduct":this.loadSelect2()}switch(e){case"Component\\VirtueMartCartContainsProducts":case"Component\\VirtueMartCartContainsXProducts":case"Component\\VirtueMartLastPurchasedDate":case"Component\\VirtueMartCurrentProductPrice":case"Component\\VirtueMartCurrentProductStock":case"Component\\VirtueMartTotalSpend":case"Component\\VirtueMartCartValue":case"Component\\HikashopCartContainsProducts":case"Component\\HikashopCartContainsXProducts":case"Component\\HikashopLastPurchasedDate":case"Component\\HikashopCurrentProductPrice":case"Component\\HikashopCurrentProductStock":case"Component\\HikashopTotalSpend":case"Component\\HikashopCartValue":NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/tf-ecomm-range-field.css")}NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/toggle.css"),"Date"!=e&&jQuery(document).trigger("subform-row-add",[t]),this.isJ4&&this.fixShowOnElements(t)},t.loadSelect2=function(){var e=this;NRHelper.loadStyleSheet(this.site_url+"/media/plg_system_nrframework/css/select2.css"),NRHelper.loadScript(this.site_url+"/media/plg_system_nrframework/js/vendor/select2.min.js",function(){NRHelper.loadScript(e.site_url+"/media/plg_system_nrframework/js/ajaxify.js",function(){new TF_Ajaxify_Field},!0)},!0)},t.fixShowOnElements=function(t){t.querySelectorAll("[data-showon]").forEach(function(e){e.removeAttribute("data-showon-initialised"),Joomla.Showon.initialise(t)})},t.handleConditionSelector=function(e){var t=e.target.closest(".condition_selector");if(t&&t.value){e.preventDefault();var o=t.closest(".cb-item");o.classList.add("ajax-loading");this.loadConditionSettings(o,t.value,function(){o.classList.remove("ajax-loading"),o.querySelector(".cb-item-content").querySelectorAll("select.hasChosen").forEach(function(e){jQuery(e).chosen("destroy"),jQuery(e).chosen({disable_search_threshold:10,inherit_select_classes:!0})})})}},t.loadConditionSettings=function(o,r,n){var e=parseInt(o.closest(".cb-group").dataset.key),t=parseInt(o.closest(".cb-item").dataset.key),i={conditionItemGroup:this.wrapper.previousElementSibling.getAttribute("name")+"["+e+"][rules]["+t+"]",name:r,request_option:this.wrapper.dataset.option,request_layout:this.wrapper.dataset.layout};this.call("options",i,function(e){e=""!==e?e:'<div class="select-condition-message">'+Joomla.JText._("NR_CB_SELECT_CONDITION_GET_STARTED")+"</div>",o.querySelector(".cb-item-content").innerHTML=e;var t=new CustomEvent("afterConditionSettings",{detail:{element:o,condition_name:r}});document.dispatchEvent(t),n&&n()})},t.beautifyProConditions=function(e){var t=e.querySelectorAll(".condition_selector:not(.tf-cb-prepared)");if(0!==t.length){function o(e){var t=e.nextElementSibling.querySelectorAll("li.disabled-result.group-option");0!==t.length&&t.forEach(function(e){e.classList.add("is-pro"),e.querySelector(".locks")||(e.setAttribute("data-pro-only",e.innerHTML),e.innerHTML+='<div class="locks"><svg xmlns="http://www.w3.org/2000/svg" width="20" fill="currentColor" viewBox="0 96 960 960"><path d="M220 976q-24.75 0-42.375-17.625T160 916V482q0-24.75 17.625-42.375T220 422h70v-96q0-78.85 55.606-134.425Q401.212 136 480.106 136T614.5 191.575Q670 247.15 670 326v96h70q24.75 0 42.375 17.625T800 482v434q0 24.75-17.625 42.375T740 976H220Zm0-60h520V482H220v434Zm260.168-140Q512 776 534.5 753.969T557 701q0-30-22.668-54.5t-54.5-24.5Q448 622 425.5 646.5t-22.5 55q0 30.5 22.668 52.5t54.5 22ZM350 422h260v-96q0-54.167-37.882-92.083-37.883-37.917-92-37.917Q426 196 388 233.917 350 271.833 350 326v96ZM220 916V482v434Z"/></svg><svg xmlns="http://www.w3.org/2000/svg" width="20" fill="currentColor" viewBox="0 96 960 960"><path d="M220 422h390v-96q0-54.167-37.882-92.083-37.883-37.917-92-37.917Q426 196 388 233.917 350 271.833 350 326h-60q0-79 55.606-134.5t134.5-55.5Q559 136 614.5 191.575T670 326v96h70q24.75 0 42.375 17.625T800 482v434q0 24.75-17.625 42.375T740 976H220q-24.75 0-42.375-17.625T160 916V482q0-24.75 17.625-42.375T220 422Zm0 494h520V482H220v434Zm260.168-140Q512 776 534.5 753.969T557 701q0-30-22.668-54.5t-54.5-24.5Q448 622 425.5 646.5t-22.5 55q0 30.5 22.668 52.5t54.5 22ZM220 916V482v434Z"/></svg></div>')})}var r=new MutationObserver(function(e,t){var o=e,r=Array.isArray(o),n=0;for(o=r?o:o[Symbol.iterator]();;){var i;if(r){if(n>=o.length)break;i=o[n++]}else{if((n=o.next()).done)break;i=n.value}var s=i;(s.target.closest(".chosen-results")||s.target.closest(".chzn-results"))&&s.target.closest(".hasChosen")&&s.target.closest(".hasChosen").previousElementSibling&&(jQuery(s.target.closest(".hasChosen").previousElementSibling).trigger("chosen:showing_dropdown").trigger("chzn:showing_dropdown"),t.disconnect())}}),n={attributes:!0,childList:!0,characterData:!0,subtree:!0};t.forEach(function(t){t.classList.add("tf-cb-prepared"),jQuery(t).on("chosen:ready",function(e){t.nextElementSibling.querySelector(".chosen-search input").addEventListener("keydown",function(e){r.observe(t.nextElementSibling.querySelector(".chosen-results"),n)})}),jQuery(t).on("chosen:showing_dropdown",function(e){o(t)}),jQuery(t).on("liszt:ready",function(e){t.nextElementSibling.querySelector(".chzn-search input").addEventListener("keydown",function(e){r.observe(t.nextElementSibling.querySelector(".chzn-results"),n)})}),jQuery(t).on("liszt:showing_dropdown",function(e){o(t)})})}},t.deleteGroupConditionEvent=function(e){if(e.target.closest(".removeGroupCondition")){e.preventDefault();var t=e.target.closest(".cb-group");this.getValidRules(t).length&&!confirm(Joomla.JText._("NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM"))||(1==this.getTotalConditionGroups()?(t.querySelectorAll(".cb-item:not(:first-child)").forEach(function(e){e.remove()}),this.resetCondition(t.querySelector(".cb-item"))):t.remove())}},t.deleteConditionEvent=function(e){if(e.target.closest(".tf-cb-remove-condition")){e.preventDefault();var t=e.target.closest(".cb-item");0!==t.querySelector(".condition_selector").selectedIndex&&!confirm(Joomla.JText._("NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM"))||(1!=this.getTotalConditionItems()?this.deleteCondition(t):this.resetCondition(t))}},t.deleteCondition=function(e){var t=e.closest(".cb-group");e.remove(),0==t.querySelectorAll(".cb-item").length&&t.remove()},t.resetCondition=function(e){e.querySelector(".condition_selector").selectedIndex=0,jQuery(e.querySelector(".condition_selector")).chosen("destroy"),jQuery(e.querySelector(".condition_selector")).chosen({disable_search_threshold:10,inherit_select_classes:!0}),jQuery(e.querySelector(".condition_selector")).trigger("change")},t.getTotalConditionGroups=function(){return this.wrapper.querySelectorAll(".cb-group").length},t.getValidRules=function(e){void 0===e&&(e=this.wrapper);var t=e.querySelectorAll("select.condition_selector"),o=[];return t.forEach(function(e){0!==e.selectedIndex&&o.push(e)}),o},t.getTotalConditionItems=function(){return this.wrapper.querySelectorAll(".cb-item").length},t.addConditionEvent=function(e){var t=e.target.closest(".tf-cb-add-new-group");if(t){e.preventDefault();var o=t.closest(".cb-item")||t,r=o.closest(".cb-group"),n=groupKey=0;n=this.addingNewGroup(o)?(groupKey=this.findHighestGroupKey()+1,0):(groupKey=parseInt(r.dataset.key),this.findHighestGroupItemKey(r)+1),o.classList.add("ajax-loading");var i=this;this.addCondition(o,this.wrapper.previousElementSibling.getAttribute("name"),groupKey,n,function(e){o.classList.remove("ajax-loading"),i.wrapper.classList.add("init-load-done"),i.beautifyProConditions(e)})}},t.findHighestGroupKey=function(){return Math.max.apply(Math,Array.from(this.wrapper.querySelectorAll(".cb-group[data-key]")).map(function(e){return parseInt(e.dataset.key)}))},t.findHighestGroupItemKey=function(e){return Math.max.apply(Math,Array.from(e.querySelectorAll(".cb-item[data-key]")).map(function(e){return parseInt(e.dataset.key)}))},t.addCondition=function(n,e,t,o,i){var s=this.addingNewGroup(n),r={conditionItemGroup:e,groupKey:t,conditionKey:o,include_rules:this.wrapper.dataset.includeRules,exclude_rules:this.wrapper.dataset.excludeRules,exclude_rules_pro:this.wrapper.dataset.excludeRulesPro,addingNewGroup:s},a=this;this.call("add",r,function(e){var t=document.createElement("div");t.innerHTML=e;var o=a.wrapper.querySelector(".tf-conditionbuilder-initial-message");o&&o.remove();var r=null;r=s?(a.wrapper.querySelector(".cb-groups").insertAdjacentHTML("beforeend",t.innerHTML),a.wrapper.querySelector(".cb-group:last-of-type")):(n.closest(".item-group-footer")?n.closest(".cb-group").querySelector(".cb-items").insertAdjacentHTML("beforeend",t.innerHTML):n.insertAdjacentHTML("afterend",t.innerHTML),n.closest(".cb-group")),i&&i(r)})},t.addingNewGroup=function(e){return!!e&&!e.closest(".cb-group")},t.call=function(e,t,o){var r=this,n=this.root_url+this.app_ajax_url+"&"+this.token+"=1";t.subtask=e,fetch(n,{method:"post",body:JSON.stringify(t)}).then(function(e){return e.text()}).then(function(e){o(e),r.wrapper.querySelectorAll("select.hasChosen").forEach(function(e){jQuery(e).chosen("destroy"),jQuery(e).chosen({disable_search_threshold:10,inherit_select_classes:!0})}),r.wrapper.querySelectorAll(".hasPopover").forEach(function(e){jQuery(e).popover({html:!0,trigger:"hover focus",container:"body"})})}).catch(function(e){alert(e)})},e}(),TF_Condition_Builder_Loader=function(){function e(){this.init()}return e.prototype.init=function(){!function(){if(window.IntersectionObserver){var t=new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&(new TF_Condition_Builder(e.target),t.unobserve(e.target))})},{rootMargin:"0px 0px 0px 0px"});document.querySelectorAll("div.cb").forEach(function(e){t.observe(e)})}}()},e}();!function(){"use strict";document.addEventListener("DOMContentLoaded",function(){new TF_Condition_Builder_Loader})}(window);


Anon7 - 2022
AnonSec Team