From 0136c32d782012fde2125017348a2c013e13d454 Mon Sep 17 00:00:00 2001 From: Denis Kulichkin Date: Wed, 11 Dec 2024 17:56:12 +0700 Subject: [PATCH] Remove Admin.set_object_field_value (#8231) --- assets/js/admin.js | 30 ------------------------------ src/Resources/public/app.js | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/assets/js/admin.js b/assets/js/admin.js index 82f50fba47..96df3ef514 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -21,7 +21,6 @@ const Admin = { shared_setup(subject) { Admin.read_config(); Admin.log('[core|shared_setup] Register services on', subject); - Admin.set_object_field_value(subject); Admin.add_filters(subject); Admin.setup_select2(subject); Admin.setup_icheck(subject); @@ -366,35 +365,6 @@ const Admin = { updateCounter(); }, - /** - * Change object field value - * @param subject - */ - set_object_field_value(subject) { - Admin.log('[core|set_object_field_value] set value field on', subject); - - this.log(jQuery('a.sonata-ba-edit-inline', subject)); - jQuery('a.sonata-ba-edit-inline', subject).on('click', (event) => { - Admin.stopEvent(event); - const element = jQuery(event.target); - jQuery.ajax({ - url: element.attr('href'), - type: 'POST', - success: (response) => { - const elm = element.parent(); - elm.children().remove(); - // fix issue with html comment ... - elm.html(jQuery(response.replace(//g, '')).html()); - elm.effect('highlight', { color: '#57A957' }, 2000); - Admin.set_object_field_value(elm); - }, - error: () => { - element.parent().effect('highlight', { color: '#C43C35' }, 2000); - }, - }); - }); - }, - setup_collection_counter(subject) { Admin.log('[core|setup_collection_counter] setup collection counter', subject); diff --git a/src/Resources/public/app.js b/src/Resources/public/app.js index 0a5e5fa7e6..cb2b47992c 100644 --- a/src/Resources/public/app.js +++ b/src/Resources/public/app.js @@ -1 +1 @@ -!function(){var e={163:function(t){function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=function(){return[]},e.resolve=e,e.id=163,t.exports=e},3752:function(t,e,i){var n=i(9755);if(void 0===n)throw new Error("AdminLTE requires jQuery");!function(t){"use strict";function e(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlayTemplate),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'
',onLoadStart:function(){},onLoadDone:function(t){return t}};function s(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(o,a))}if("string"==typeof r){if(void 0===r[s])throw new Error("No method named "+s);r[s]()}}))}e.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.element).find(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},e.prototype._setUpListeners=function(){t(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},e.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},e.prototype._removeOverlay=function(){t(this.$overlay).remove()};var o=t.fn.boxRefresh;t.fn.boxRefresh=s,t.fn.boxRefresh.Constructor=e,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=o,this},t(window).on("load",(function(){t('[data-widget="box-refresh"]').each((function(){s.call(t(this))}))}))}(n),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},s=".box-header",o=".box-body",r=".box-footer",a=".box-tools",l="collapsed-box";function c(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(o,a))}if("string"==typeof s){if(void 0===r[s])throw new Error("No method named "+s);r[s]()}}))}e.prototype.toggle=function(){t(this.element).is(".collapsed-box")?this.expand():this.collapse()},e.prototype.expand=function(){var e=t.Event("expanded.boxwidget"),i=t.Event("expanding.boxwidget"),n=this.options.collapseIcon,c=this.options.expandIcon;t(this.element).removeClass(l),t(this.element).children(s+", "+o+", "+r).children(a).find("."+c).removeClass(c).addClass(n),t(this.element).children(o+", "+r).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.collapse=function(){var e=t.Event("collapsed.boxwidget"),i=t.Event("collapsing.boxwidget"),n=this.options.collapseIcon,c=this.options.expandIcon;t(this.element).children(s+", "+o+", "+r).children(a).find("."+n).removeClass(n).addClass(c),t(this.element).children(o+", "+r).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(l),t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.remove=function(){var e=t.Event("removed.boxwidget"),i=t.Event("removing.boxwidget");t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this)).trigger(i)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,(function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1})),t(this.element).on("click",this.options.removeTrigger,(function(i){return i&&i.preventDefault(),e.remove(t(this)),!1}))};var h=t.fn.boxWidget;t.fn.boxWidget=c,t.fn.boxWidget.Constructor=e,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=h,this},t(window).on("load",(function(){t(".box").each((function(){c.call(t(this))}))}))}(n),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()}var i="lte.controlsidebar",n={controlsidebarSlide:!0},s=".control-sidebar",o='[data-toggle="control-sidebar"]',r=".control-sidebar-open",a="control-sidebar-open",l="control-sidebar-hold-transition";function c(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(o,a))}"string"==typeof s&&r.toggle()}))}e.prototype.init=function(){t(this.element).is(o)||t(this).on("click",this.toggle),this.fix(),t(window).resize(function(){this.fix()}.bind(this))},e.prototype.toggle=function(e){e&&e.preventDefault(),this.fix(),t(s).is(r)||t("body").is(r)?this.collapse():this.expand()},e.prototype.expand=function(){t(s).show(),this.options.controlsidebarSlide?t(s).addClass(a):t("body").addClass(l).addClass(a).delay(50).queue((function(){t("body").removeClass(l),t(this).dequeue()})),t(this.element).trigger(t.Event("expanded.controlsidebar"))},e.prototype.collapse=function(){this.options.controlsidebarSlide?t(s).removeClass(a):t("body").addClass(l).removeClass(a).delay(50).queue((function(){t("body").removeClass(l),t(this).dequeue()})),t(s).fadeOut(),t(this.element).trigger(t.Event("collapsed.controlsidebar"))},e.prototype.fix=function(){t("body").is(".layout-boxed")&&this._fixForBoxed(t(".control-sidebar-bg"))},e.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(".wrapper").height()})};var h=t.fn.controlSidebar;t.fn.controlSidebar=c,t.fn.controlSidebar.Constructor=e,t.fn.controlSidebar.noConflict=function(){return t.fn.controlSidebar=h,this},t(document).on("click",o,(function(e){e&&e.preventDefault(),c.call(t(this),"toggle")}))}(n),function(t){"use strict";function e(t){this.element=t}var i="lte.directchat";function n(n){return this.each((function(){var s=t(this),o=s.data(i);o||s.data(i,o=new e(s)),"string"==typeof n&&o.toggle(s)}))}e.prototype.toggle=function(t){t.parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")};var s=t.fn.directChat;t.fn.directChat=n,t.fn.directChat.Constructor=e,t.fn.directChat.noConflict=function(){return t.fn.directChat=s,this},t(document).on("click",'[data-widget="chat-pane-toggle"]',(function(e){e&&e.preventDefault(),n.call(t(this),"toggle")}))}(n),function(t){"use strict";function e(t){this.options=t,this.init()}var i="lte.pushmenu",n={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},s='[data-toggle="push-menu"]',o=".sidebar-mini",r="sidebar-collapse",a="sidebar-open",l="sidebar-expanded-on-hover",c="expanded.pushMenu",h="collapsed.pushMenu";function u(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(a))}"toggle"===s&&r.toggle()}))}e.prototype.init=function(){(this.options.expandOnHover||t("body").is(o+".fixed"))&&(this.expandOnHover(),t("body").addClass("sidebar-mini-expand-feature")),t(".content-wrapper").click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(a)&&this.close()}.bind(this)),t(".sidebar-form .form-control").click((function(t){t.stopPropagation()}))},e.prototype.toggle=function(){var e=t(window).width(),i=!t("body").hasClass(r);e<=this.options.collapseScreenSize&&(i=t("body").hasClass(a)),i?this.close():this.open()},e.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(r).trigger(t.Event(c)):t("body").addClass(a).trigger(t.Event(c))},e.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(r).trigger(t.Event(h)):t("body").removeClass(a+" "+r).trigger(t.Event(h))},e.prototype.expandOnHover=function(){t(".main-sidebar").hover(function(){t("body").is(o+".sidebar-collapse")&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(".sidebar-expanded-on-hover")&&this.collapse()}.bind(this))},e.prototype.expand=function(){setTimeout((function(){t("body").removeClass(r).addClass(l)}),this.options.expandTransitionDelay)},e.prototype.collapse=function(){setTimeout((function(){t("body").removeClass(l).addClass(r)}),this.options.expandTransitionDelay)};var d=t.fn.pushMenu;t.fn.pushMenu=u,t.fn.pushMenu.Constructor=e,t.fn.pushMenu.noConflict=function(){return t.fn.pushMenu=d,this},t(document).on("click",s,(function(e){e.preventDefault(),u.call(t(this),"toggle")})),t(window).on("load",(function(){u.call(t(s))}))}(n),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var i="lte.todolist",n={onCheck:function(t){return t},onUnCheck:function(t){return t}},s={data:'[data-widget="todo-list"]'};function o(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(o,a))}if("string"==typeof r){if(void 0===r[s])throw new Error("No method named "+s);r[s]()}}))}e.prototype.toggle=function(t){t.parents(s.li).first().toggleClass("done"),t.prop("checked")?this.check(t):this.unCheck(t)},e.prototype.check=function(t){this.options.onCheck.call(t)},e.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("change ifChanged","input:checkbox",(function(){e.toggle(t(this))}))};var r=t.fn.todoList;t.fn.todoList=o,t.fn.todoList.Constructor=e,t.fn.todoList.noConflict=function(){return t.fn.todoList=r,this},t(window).on("load",(function(){t(s.data).each((function(){o.call(t(this))}))}))}(n),function(t){"use strict";function e(e,i){this.element=e,this.options=i,t(this.element).addClass(l),t(s+r,this.element).addClass(a),this._setUpListeners()}var i="lte.tree",n={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},s=".treeview",o=".treeview-menu",r=".active",a="menu-open",l="tree";function c(s){return this.each((function(){var o=t(this);if(!o.data(i)){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,new e(o,r))}}))}e.prototype.toggle=function(t,e){var i=t.next(o),n=t.parent(),r=n.hasClass(a);n.is(s)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),r?this.collapse(i,n):this.expand(i,n))},e.prototype.expand=function(e,i){var n=t.Event("expanded.tree");if(this.options.accordion){var s=i.siblings(".menu-open, .active"),r=s.children(o);this.collapse(r,s)}i.addClass(a),e.stop().slideDown(this.options.animationSpeed,function(){t(this.element).trigger(n),i.height("auto")}.bind(this))},e.prototype.collapse=function(e,i){var n=t.Event("collapsed.tree");i.removeClass(a),e.stop().slideUp(this.options.animationSpeed,function(){t(this.element).trigger(n),i.find(s).removeClass(a).find(o).hide()}.bind(this))},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.trigger,(function(i){e.toggle(t(this),i)}))};var h=t.fn.tree;t.fn.tree=c,t.fn.tree.Constructor=e,t.fn.tree.noConflict=function(){return t.fn.tree=h,this},t(window).on("load",(function(){t('[data-widget="tree"]').each((function(){c.call(t(this))}))}))}(n),function(t){"use strict";function e(t){this.options=t,this.bindedResize=!1,this.activate()}var i="lte.layout",n={slimscroll:!0,resetHeight:!0},s=".wrapper",o=".content-wrapper",r=".main-header",a=".sidebar",l=".sidebar-menu",c="fixed";function h(s){return this.each((function(){var o=t(this),r=o.data(i);if(!r){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,r=new e(a))}if("string"==typeof s){if(void 0===r[s])throw new Error("No method named "+s);r[s]()}}))}e.prototype.activate=function(){this.fix(),this.fixSidebar(),t("body").removeClass("hold-transition"),this.options.resetHeight&&t("body, html, "+s).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(".main-header .logo, "+a).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(l).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(l).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},e.prototype.fix=function(){t(".layout-boxed > "+s).css("overflow","hidden");var e=t(".main-footer").outerHeight()||0,i=t(r).outerHeight()||0,n=i+e,l=t(window).height(),h=t(a).outerHeight()||0;if(t("body").hasClass(c))t(o).css("min-height",l-e);else{var u;u=h+i<=l?(t(o).css("min-height",l-n),l-n):(t(o).css("min-height",h),h);var d=t(".control-sidebar");void 0!==d&&d.height()>u&&t(o).css("min-height",d.height())}},e.prototype.fixSidebar=function(){t("body").hasClass(c)?this.options.slimscroll&&void 0!==t.fn.slimScroll&&0===t(".main-sidebar").find("slimScrollDiv").length&&t(a).slimScroll({height:t(window).height()-t(r).height()+"px"}):void 0!==t.fn.slimScroll&&t(a).slimScroll({destroy:!0}).height("auto")};var u=t.fn.layout;t.fn.layout=h,t.fn.layout.Constuctor=e,t.fn.layout.noConflict=function(){return t.fn.layout=u,this},t(window).on("load",(function(){h.call(t("body"))}))}(n)},4040:function(t,e,i){var n=i(9755);const s={collectionCounters:[],config:null,translations:null,shared_setup(t){s.read_config(),s.log("[core|shared_setup] Register services on",t),s.set_object_field_value(t),s.add_filters(t),s.setup_select2(t),s.setup_icheck(t),s.setup_checkbox_range_selection(t),s.setup_xeditable(t),s.setup_form_tabs_for_errors(t),s.setup_inline_form_errors(t),s.setup_tree_view(t),s.setup_collection_counter(t),s.setup_sticky_elements(t),s.setup_readmore_elements(t),s.setup_form_submit(t)},read_config(){const t=n("[data-sonata-admin]").data("sonata-admin");this.config=t.config,this.translations=t.translations},get_config(t){return null==this.config&&this.read_config(),this.config[t]},get_translations(t){return null==this.translations&&this.read_config(),this.translations[t]},setup_list_modal(t){s.log("[core|setup_list_modal] configure modal on",t),n("div.modal-dialog",t).css({width:"90%",height:"85%",padding:0}),n("div.modal-content",t).css({"border-radius":"0",height:"100%",padding:0}),n(".modal-body",t).css({width:"auto",height:"90%",padding:15,overflow:"auto"}),n(t).trigger("sonata-admin-setup-list-modal")},setup_select2(t){s.get_config("USE_SELECT2")&&(s.log("[core|setup_select2] configure Select2 on",t),n('select:not([data-sonata-select2="false"])',t).each(((t,e)=>{const i=n(e);let o=!1;const r=i.data("popover");let a=null,l=10,c=!1;i.removeClass("form-control"),i.find('option[value=""]').length||i.attr("data-placeholder")&&i.attr("data-placeholder").length||"true"===i.attr("data-sonata-select2-allow-clear")?o=!0:"false"===i.attr("data-sonata-select2-allow-clear")&&(o=!1),"true"===i.attr("data-sonata-select2-allow-tags")&&(c=!0),i.attr("data-sonata-select2-maximumSelectionLength")&&(a=i.attr("data-sonata-select2-maximumSelectionLength")),i.attr("data-sonata-select2-minimumResultsForSearch")&&(l=i.attr("data-sonata-select2-minimumResultsForSearch")),i.select2({width:()=>s.get_select2_width(i),theme:"bootstrap",dropdownAutoWidth:!0,minimumResultsForSearch:l,placeholder:o?" ":"",allowClear:o,maximumSelectionLength:a,tags:c}),void 0!==r&&i.select2("container").popover(r.options)})))},setup_icheck(t){if(s.get_config("USE_ICHECK")){s.log("[core|setup_icheck] configure iCheck on",t);const e=n('input[type="checkbox"]:not(label.btn > input, [data-sonata-icheck="false"]), input[type="radio"]:not(label.btn > input, [data-sonata-icheck="false"])',t);e.iCheck({checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue"}),t===window.document&&setTimeout((()=>{e.iCheck("update")}),0)}},setup_checkbox_range_selection(t){let e;s.log("[core|setup_checkbox_range_selection] configure checkbox range selection on",t);const i=s.get_config("USE_ICHECK");n('tbody input[type="checkbox"], tbody .iCheck-helper',t).on("click",(s=>{let o;if(o=i?n(s.target).prev('input[type="checkbox"]'):n(s.target),o.length){const r=o.closest("tr").index();if(s.shiftKey&&e>=0){const s=n(`tbody input[type="checkbox"]:nth(${r})`,t).prop("checked");n('tbody input[type="checkbox"]',t).each(((t,o)=>{if(t>e&&tr&&t',container:"body",placement:"auto",success(t){const e=n(t);s.setup_xeditable(e),n(this).closest("td").replaceWith(e)},error:t=>"application/json"===t.getResponseHeader("Content-Type")?JSON.parse(t.responseText):t.responseText})},log(){if(!s.get_config("DEBUG"))return;for(var t=arguments.length,e=new Array(t),i=0;i{if(t.preventDefault(),t.stopPropagation(),"false"===n(t.target).attr("sonata-filter"))return;s.log("[core|add_filters] handle filter container: ",n(t.target).attr("filter-container"));const i=n(`#${n(t.currentTarget).attr("filter-container")}`);0===n('div[sonata-filter="true"]:visible',i).length&&n(i).slideDown();const o=n(t.currentTarget).attr("filter-target"),r=n(`div[id="${o}"]`,i),a=n("i",`.sonata-toggle-filter[filter-target="${o}"]`);n(r).is(":visible")?(a.filter(":not(.fa-minus-circle)").removeClass("fa-check-square").addClass("fa-square"),r.hide()):(a.filter(":not(.fa-minus-circle)").removeClass("fa-square").addClass("fa-check-square"),r.show()),n('div[sonata-filter="true"]:visible',i).length>0?n(i).slideDown():n(i).slideUp(),e()})),n(".sonata-filter-form",t).on("submit",(t=>{const e=n(t.target);if(e.find('[sonata-filter="true"]:hidden :input').val(""),!t.target.dataset.defaultValues)return;const i=s.convert_query_string_to_object(n.param({filter:JSON.parse(t.target.dataset.defaultValues)}));e.find("[name*=filter]").each(((t,s)=>{const o=s.multiple?[]:"",r=i[s.name]||o,a=n(s).val()||o;if(JSON.stringify(r)===JSON.stringify(a))s.removeAttribute("name");else if(s.multiple&&"[]"===JSON.stringify(a)){const t=s.name.substring(0,s.name.length-2);e.append(``),s.removeAttribute("name")}})),0===e.find("[name*=filter]").length&&e.append('')})),0===n(".advanced-filter :input:visible",t).filter((function(){return n(this).val()})).length&&n(".advanced-filter").hide(),n('[data-toggle="advanced-filter"]',t).on("click",(()=>{n(".advanced-filter").toggle()})),e()},set_object_field_value(t){s.log("[core|set_object_field_value] set value field on",t),this.log(n("a.sonata-ba-edit-inline",t)),n("a.sonata-ba-edit-inline",t).on("click",(t=>{s.stopEvent(t);const e=n(t.target);n.ajax({url:e.attr("href"),type:"POST",success:t=>{const i=e.parent();i.children().remove(),i.html(n(t.replace(//g,"")).html()),i.effect("highlight",{color:"#57A957"},2e3),s.set_object_field_value(i)},error:()=>{e.parent().effect("highlight",{color:"#C43C35"},2e3)}})}))},setup_collection_counter(t){s.log("[core|setup_collection_counter] setup collection counter",t);const e=/_([0-9]+)[^0-9]*$/;n(t).find("[data-prototype]").each(((t,i)=>{const o=n(i);let r=-1;o.children().each(((t,i)=>{const s=e.exec(n('[id^="sonata-ba-field-container"]',i).attr("id"));s&&s[1]&&s[1]>r&&(r=parseInt(s[1],10))})),s.collectionCounters[o.attr("id")]=r}))},setup_collection_buttons(t){n(t).on("click",".sonata-collection-add",(t=>{s.stopEvent(t);const e=n(t.target).closest("[data-prototype]");s.collectionCounters[e.attr("id")]+=1;const i=s.collectionCounters[e.attr("id")];let o=e.attr("data-prototype");const r=e.attr("data-prototype-name")||"__name__",a=new RegExp(`${e.attr("id")}_${r}`,"g");o=o.replace(a,`${e.attr("id")}_${i}`);const l=e.attr("id").split("_"),c=new RegExp(`${l[l.length-1]}\\]\\[${r}`,"g");o=o.replace(c,`${l[l.length-1]}][${i}`),n(o).insertBefore(n(t.target).parent()).trigger("sonata-admin-append-form-element"),n(t.target).trigger("sonata-collection-item-added")})),n(t).on("click",".sonata-collection-delete",(t=>{s.stopEvent(t),n(t.target).trigger("sonata-collection-item-deleted"),n(t.target).closest(".sonata-collection-row").remove(),n(document).trigger("sonata-collection-item-deleted-successful")}))},setup_per_page_switcher(t){s.log("[core|setup_per_page_switcher] setup page switcher",t),n("select.per-page").on("change",(t=>{n("input[type=submit]").hide(),window.top.location.href=t.target.options[t.target.selectedIndex].value}))},setup_form_tabs_for_errors(t){s.log("[core|setup_form_tabs_for_errors] setup form tab's errors",t),n("form",t).each(((t,e)=>{s.show_form_first_tab_with_errors(n(e),".sonata-ba-field-error")})),n(t).on("click",'form [type="submit"]',(t=>{s.show_form_first_tab_with_errors(n(t.target).closest("form"),":invalid")})).on("keypress",'form [type="text"]',(t=>{13===t.which&&s.show_form_first_tab_with_errors(n(t.target),":invalid")}))},show_form_first_tab_with_errors(t,e){s.log("[core|show_form_first_tab_with_errors] show first tab with errors",t);let i;t.find(".nav-tabs a").each(((t,s)=>{const o=n(s).attr("href"),r=n(s),a=r.find(".has-errors");n(o).find(e).length>0?(i||(r.tab("show"),i=r),a.removeClass("hide")):a.addClass("hide")}))},setup_inline_form_errors(t){s.log("[core|setup_inline_form_errors] show first tab with errors",t);const e='.sonata-ba-field-inline-table [id$="_delete"][type="checkbox"]';n(e,t).each(((t,e)=>{s.switch_inline_form_errors(n(e))})),n(t).on("change",e,(t=>{s.switch_inline_form_errors(n(t.target))}))},switch_inline_form_errors(t){s.log("[core|switch_inline_form_errors] switch_inline_form_errors",t);const e=t.closest(".sonata-ba-field-inline-table"),i=e.find(".sonata-ba-field-error-messages");t.is(":checked")?(e.find("[required]").removeAttr("required").attr("data-required","required"),i.hide()):(e.find("[data-required]").attr("required","required"),i.show())},setup_tree_view(t){s.log("[core|setup_tree_view] setup tree view",t),n("ul.js-treeview",t).treeView()},get_select2_width(t){const e=/width:(auto|(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc)))/i;let i=t.attr("style");if(void 0!==i){const t=i.split(";");for(let i=0,n=t.length;i=1)return n[1]}}return i=t.css("width"),i.indexOf("%")>0?i:"100%"},setup_sortable_select2(t,e,i){const o=[],r=[],a=[],l=t.val()?t.val().split(","):[];for(let t=0;ts.get_select2_width(t),dropdownAutoWidth:!0,data:[...r,...a],multiple:!0,...i};t.select2(c);const h=t.data("select2").$container.find("ul.select2-selection__rendered");h.sortable({containment:"parent",items:"> li[data-select2-id]",update:()=>{const e=h.children("li[data-select2-id]").toArray().map((t=>o[t.title]));t.val(e.join())}}),t.parents("form:first").submit((()=>{let e=t.val().trim();if(""!==e){let i=t.attr("name");e=e.split(","),i=i.substring(0,i.length-1);for(let s=0;s").attr("type","hidden").attr("name","".concat(i+s,"]")).val(e[s]).appendTo(t.parents("form:first"))}t.remove()}))},setup_sticky_elements(t){if(s.get_config("USE_STICKYFORMS")){s.log("[core|setup_sticky_elements] setup sticky elements on",t);const e=n(t).find(".navbar-static-top"),i=n(t).find(".content-wrapper"),o=n(i).find("nav.navbar"),r=n(i).find(".sonata-ba-form-actions");o.length&&new window.Waypoint.Sticky({element:o[0],offset:()=>(s.refreshNavbarStuckClass(e),n(e).outerHeight()),handler:t=>{"up"===t?n(o).width("auto"):n(o).width(n(i).outerWidth()),s.refreshNavbarStuckClass(e)}}),r.length&&new window.Waypoint({element:i[0],offset:"bottom-in-view",handler:t=>{n(".sonata-ba-form form > .row").outerHeight()+n(r).outerHeight()-2{t.length&&Math.round(n(window).scrollTop()+n(window).height())>=n(document).height()&&n(t).removeClass("stuck"),e.length&&0===n(window).scrollTop()&&n(e).removeClass("stuck")}),250)),n("body").on("expanded.pushMenu collapsed.pushMenu",(()=>{setTimeout((()=>{s.handleResize(t,e,i)}),350)})),n(window).on("resize",s.debounce((()=>{s.handleResize(t,e,i)}),250))},handleResize(t,e,i){e.length&&n(e).hasClass("stuck")&&n(e).width(n(i).outerWidth()),t.length&&n(t).hasClass("stuck")&&n(t).width(n(i).outerWidth())},refreshNavbarStuckClass(t){const e=t.outerHeight();let i=document.getElementById("navbar-stuck");null===i&&(i=document.createElement("style"),i.id="navbar-stuck",i.type="text/css",i.dataset.lastOffset=e,i.innerHTML=`body.fixed .content-header .navbar.stuck { top: ${e}px; }`,document.head.appendChild(i)),i.dataset.lastOffset!==e&&(i.dataset.lastOffset=e,i.innerHTML=`body.fixed .content-header .navbar.stuck { top: ${e}px; }`)},debounce(t,e,i){let n;return function(){for(var s=arguments.length,o=new Array(s),r=0;r{n=null,i||t.apply(a,o)}),e),l&&t.apply(a,o)}},setup_readmore_elements(t){s.log("[core|setup_readmore_elements] setup readmore elements on",t),n(t).find(".sonata-readmore").each(((t,e)=>{const i=n(e);i.readmore({collapsedHeight:parseInt(i.data("readmore-height"),10),moreLink:`${i.data("readmore-more")}`,lessLink:`${i.data("readmore-less")}`})}))},handle_top_navbar_height(){n("body.fixed .content-wrapper").css("padding-top",n(".navbar-static-top").outerHeight())},setup_form_submit(t){s.log("[core|setup_form_submit] setup form submit on",t),n(t).find("form").on("submit",(t=>{const e=n(t.target);setTimeout((()=>{e.find("button").prop("disabled",!0)}),1);const i=e.find(".nav-tabs li.active .changer-tab");i.length>0&&e.find('input[name="_tab"]').val(i.attr("aria-controls"))}))},convert_query_string_to_object(t){return t.split("&").reduce(((t,e)=>{const i=decodeURIComponent(e.split("=")[0]),n=e.split("=")[1];return i.endsWith("[]")?(Object.prototype.hasOwnProperty.call(t,i)||(t[i]=[]),t[i].push(n)):t[i]=n,t}),{})},setup_view_tabs_changer(){n(".changer-tab").on("click",(t=>{const e=n(t.target).attr("aria-controls"),i=window.location.search.substring(1),s=decodeURIComponent(i).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"');let o="{}";s.length&&(o=`{"${s}"}`);const r=JSON.parse(o);r._tab=e;const a=`${window.location.origin+window.location.pathname}?${n.param(r,!0)}`;window.history.pushState({path:a},"",a)}))}};window.Admin=s,n((()=>{s.handle_top_navbar_height(),n("html").removeClass("no-js"),s.setup_per_page_switcher(document),s.setup_collection_buttons(document),s.setup_view_tabs_changer(),s.shared_setup(document)})),n(window).on("resize",(()=>{s.handle_top_navbar_height()})),n(document).on("sonata-admin-append-form-element",(t=>{s.setup_select2(t.target),s.setup_icheck(t.target),s.setup_collection_counter(t.target)})),n(window).on("load",(()=>{s.get_config("CONFIRM_EXIT")&&n(".sonata-ba-form form").each(((t,e)=>{n(e).confirmExit()}))}))},2056:function(t,e,i){var n=i(9755);const s={remove_iCheck_in_flashmessage(){n(".read-more-state").iCheck("destroy")},addFlashmessageListener(){document.querySelectorAll(".read-more-state").forEach((t=>{t.addEventListener("change",(e=>{const i=document.querySelector(`label[for="${t.id}"]`),n=i.querySelector(".more"),s=i.querySelector(".less");e.target.checked?(n.classList.add("hide"),s.classList.remove("hide")):(n.classList.remove("hide"),s.classList.add("hide"))}))}))}};n((()=>{s.remove_iCheck_in_flashmessage(),s.addFlashmessageListener()}))},243:function(t,e,i){var n=i(9755);n.fn.confirmExit=function(){return n(this).attr("data-original",n(this).serialize()),n(this).on("submit",(function(){n(this).removeAttr("data-original")})),n(this)},n(window).on("beforeunload",(t=>{const e=t||window.event,i=window.Admin.get_translations("CONFIRM_EXIT");let s=!1;if(n("form[data-original]").each(((t,e)=>{n(e).attr("data-original")!==n(e).serialize()&&(s=!0)})),s)return e&&(e.returnValue=i),i}))},9543:function(t,e,i){var n=i(9755);n((()=>{n(".sidebar-toggle").on("click",(()=>{document.cookie.includes("sonata_sidebar_hide=1")?document.cookie="sonata_sidebar_hide=0;path=/":document.cookie="sonata_sidebar_hide=1;path=/"}))}))},2916:function(t,e,i){var n=i(9755);const s="treeView",o={togglersAttribute:"[data-treeview-toggler]",toggledState:"is-toggled",activeState:"is-active",defaultToggled:"[data-treeview-toggled]",instanceAttribute:"data-treeview-instance"};function r(t,e){this.element=t,this.options=n.extend({},o,e),this.defaults=o,this.name=s,this.init()}r.prototype={init(){this.setElements(),this.setEvents(),this.setAttributes(),this.showActiveElement(),this.showToggledElements()},setElements(){this.$element=n(this.element),this.$togglers=this.$element.find(this.options.togglersAttribute),this.$defaultToggled=this.$element.find(this.options.defaultToggled)},setAttributes(){this.$element.attr(this.options.instanceAttribute,!0)},setEvents(){this.$togglers.on("click",this.toggle.bind(this))},toggle(t){const e=n(t.currentTarget).parent();e.toggleClass(this.options.toggledState),e.next("ul").slideToggle()},showActiveElement(){const t=`[${this.options.instanceAttribute}] ul, [${this.options.instanceAttribute}]`,e=this.$element.find(`.${this.options.activeState}`).parents(t);e.show(),e.prev().addClass(this.options.toggledState)},showToggledElements(){this.$defaultToggled.addClass(this.options.toggledState),this.$defaultToggled.next("ul").show()}},n.fn[s]=function(t){return this.each((function(){n.data(this,`plugin_${s}`)||n.data(this,`plugin_${s}`,new r(this,t))}))}},7915:function(t,e,i){i(8294),i(1309),i(3929),i(4050),i(63),i(9737),i(8852),i(6278),i(6927),i(3497),i(7814),i(5377)},5377:function(t,e,i){!function(t){"use strict";var e=function(i,n){this.options=t.extend({},e.DEFAULTS,n);var s=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=s.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(i),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(i){return this.each((function(){var n=t(this),s=n.data("bs.affix"),o="object"==typeof i&&i;s||n.data("bs.affix",s=new e(this,o)),"string"==typeof i&&s[i]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,i,n){var s=this.$target.scrollTop(),o=this.$element.offset(),r=this.$target.height();if(null!=i&&"top"==this.affixed)return s=t-n&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var i=this.$element.height(),n=this.options.offset,s=n.top,o=n.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=s=n),"function"==typeof s&&(s=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var a=this.getState(r,i,s,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-i-o})}};var n=t.fn.affix;t.fn.affix=i,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),n=e.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),i.call(e,n)}))}))}(i(9755))},1309:function(t,e,i){!function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){var n=t(this),s=n.attr("data-target");s||(s=(s=n.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,"")),s="#"===s?[]:s;var o=t(document).find(s);function r(){o.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),o.length||(o=n.closest(".alert")),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",r).emulateTransitionEnd(i.TRANSITION_DURATION):r())};var n=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var n=t(this),s=n.data("bs.alert");s||n.data("bs.alert",s=new i(this)),"string"==typeof e&&s[e].call(n)}))},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(i(9755))},3929:function(t,e,i){!function(t){"use strict";var e=function(i,n){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,n),this.isLoading=!1};function i(i){return this.each((function(){var n=t(this),s=n.data("bs.button"),o="object"==typeof i&&i;s||n.data("bs.button",s=new e(this,o)),"toggle"==i?s.toggle():i&&s.setState(i)}))}e.VERSION="3.4.1",e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",n=this.$element,s=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[s]()),setTimeout(t.proxy((function(){n[s](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))}),this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=i,t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(e){var n=t(e.target).closest(".btn");i.call(n,"toggle"),t(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(i(9755))},4050:function(t,e,i){!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};function i(i){return this.each((function(){var n=t(this),s=n.data("bs.carousel"),o=t.extend({},e.DEFAULTS,n.data(),"object"==typeof i&&i),r="string"==typeof i?i:o.slide;s||n.data("bs.carousel",s=new e(this,o)),"number"==typeof i?s.to(i):r?s[r]():o.interval&&s.pause().cycle()}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=600,e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},e.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},e.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},e.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},e.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(n)},e.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(i,n){var s=this.$element.find(".item.active"),o=n||this.getItemForDirection(i,s),r=this.interval,a="next"==i?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],h=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(o)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(i),"object"==typeof o&&o.length&&o[0].offsetWidth,s.addClass(a),o.addClass(a),s.one("bsTransitionEnd",(function(){o.removeClass([i,a].join(" ")).addClass("active"),s.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(e.TRANSITION_DURATION)):(s.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),r&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=i,t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var s=function(e){var n=t(this),s=n.attr("href");s&&(s=s.replace(/.*(?=#[^\s]+$)/,""));var o=n.attr("data-target")||s,r=t(document).find(o);if(r.hasClass("carousel")){var a=t.extend({},r.data(),n.data()),l=n.attr("data-slide-to");l&&(a.interval=!1),i.call(r,a),l&&r.data("bs.carousel").to(l),e.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",s).on("click.bs.carousel.data-api","[data-slide-to]",s),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(i(9755))},63:function(t,e,i){!function(t){"use strict";var e=function(i,n){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function i(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(n)}function n(i){return this.each((function(){var n=t(this),s=n.data("bs.collapse"),o=t.extend({},e.DEFAULTS,n.data(),"object"==typeof i&&i);!s&&o.toggle&&/show|hide/.test(i)&&(o.toggle=!1),s||n.data("bs.collapse",s=new e(this,o)),"string"==typeof i&&s[i]()}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=350,e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i,s=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(s&&s.length&&(i=s.data("bs.collapse"))&&i.transitioning)){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){s&&s.length&&(n.call(s,"hide"),i||s.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[r](this.$element[0][l])}}}},e.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var s=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return s.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(e.TRANSITION_DURATION)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},e.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(e,n){var s=t(n);this.addAriaAndCollapsedClass(i(s),s)}),this)).end()},e.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var s=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=s,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){var s=t(this);s.attr("data-target")||e.preventDefault();var o=i(s),r=o.data("bs.collapse")?"toggle":s.data();n.call(o,r)}))}(i(9755))},9737:function(t,e,i){!function(t){"use strict";var e='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};function n(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==i?t(document).find(i):null;return n&&n.length?n:e.parent()}function s(i){i&&3===i.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),s=n(e),o={relatedTarget:this};s.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(s[0],i.target)||(s.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(e.attr("aria-expanded","false"),s.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}i.VERSION="3.4.1",i.prototype.toggle=function(e){var i=t(this);if(!i.is(".disabled, :disabled")){var o=n(i),r=o.hasClass("open");if(s(),!r){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",s);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var s=t(this);if(i.preventDefault(),i.stopPropagation(),!s.is(".disabled, :disabled")){var o=n(s),r=o.hasClass("open");if(!r&&27!=i.which||r&&27==i.which)return 27==i.which&&o.find(e).trigger("focus"),s.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(i.target);38==i.which&&l>0&&l--,40==i.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth

'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var n=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===n&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=function(i){return this.each((function(){var n=t(this),s=n.data("bs.popover"),o="object"==typeof i&&i;!s&&/destroy|hide/.test(i)||(s||n.data("bs.popover",s=new e(this,o)),"string"==typeof i&&s[i]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(i(9755))},3497:function(t,e,i){!function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(i).is(document.body)?t(window):t(i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each((function(){var n=t(this),s=n.data("bs.scrollspy"),o="object"==typeof i&&i;s||n.data("bs.scrollspy",s=new e(this,o)),"string"==typeof i&&s[i]()}))}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),s=e.data("target")||e.attr("href"),o=/^#./.test(s)&&t(s);return o&&o.length&&o.is(":visible")&&[[o[i]().top+n,s]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),s=this.offsets,o=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return r!=(t=o[o.length-1])&&this.activate(t);if(r&&e=s[t]&&(void 0===s[t+1]||e .active"),r=s&&t.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade"),i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),s&&s()}o.length&&r?o.one("bsTransitionEnd",a).emulateTransitionEnd(e.TRANSITION_DURATION):a(),o.removeClass("in")};var n=t.fn.tab;t.fn.tab=i,t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var s=function(e){e.preventDefault(),i.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',s).on("click.bs.tab.data-api",'[data-toggle="pill"]',s)}(i(9755))},6278:function(t,e,i){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],i=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function r(e,n){var r=e.nodeName.toLowerCase();if(-1!==t.inArray(r,n))return-1===t.inArray(r,i)||Boolean(e.nodeValue.match(s)||e.nodeValue.match(o));for(var a=t(n).filter((function(t,e){return e instanceof RegExp})),l=0,c=a.length;l
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:n},l.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var s=this.options.trigger.split(" "),o=s.length;o--;){var r=s[o];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},l.prototype.getDefaults=function(){return l.DEFAULTS},l.prototype.getOptions=function(i){var n=this.$element.data();for(var s in n)n.hasOwnProperty(s)&&-1!==t.inArray(s,e)&&delete n[s];return(i=t.extend({},this.getDefaults(),n,i)).delay&&"number"==typeof i.delay&&(i.delay={show:i.delay,hide:i.delay}),i.sanitize&&(i.template=a(i.template,i.whiteList,i.sanitizeFn)),i},l.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,(function(t,n){i[t]!=n&&(e[t]=n)})),e},l.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState)i.hoverState="in";else{if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)}},l.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},l.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)}},l.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,s=this.tip(),o=this.getUID(this.type);this.setContent(),s.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,c=a.test(r);c&&(r=r.replace(a,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(t(document).find(this.options.container)):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),u=s[0].offsetWidth,d=s[0].offsetHeight;if(c){var p=r,f=this.getPosition(this.$viewport);r="bottom"==r&&h.bottom+d>f.bottom?"top":"top"==r&&h.top-df.width?"left":"left"==r&&h.left-ur.top+r.height&&(s.top=r.top+r.height-l)}else{var c=e.left-o,h=e.left+o+i;cr.right&&(s.left=r.left+r.width-h)}return s},l.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},l.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},l.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},l.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},l.prototype.enable=function(){this.enabled=!0},l.prototype.disable=function(){this.enabled=!1},l.prototype.toggleEnabled=function(){this.enabled=!this.enabled},l.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},l.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},l.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var c=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var i=t(this),n=i.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||i.data("bs.tooltip",n=new l(this,s)),"string"==typeof e&&n[e]())}))},t.fn.tooltip.Constructor=l,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=c,this}}(i(9755))},8294:function(t,e,i){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||t(n).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(i(9755))},9741:function(t,e,i){var n,s;!function(o,r){"use strict";void 0===(s="function"==typeof(n=r)?n.call(e,i,e,t):n)||(t.exports=s)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i