%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/the-events-calendar/common/src/resources/js/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/the-events-calendar/common/src/resources/js/dropdowns.min.js

var tribe_dropdowns=window.tribe_dropdowns||{};!function(e,t,r){"use strict";t.selector={dropdown:".tribe-dropdown",created:".tribe-dropdown-created",searchField:".select2-search__field"},e.fn.tribe_dropdowns=function(){return t.dropdown(this,{}),this},t.freefrom_create_search_choice=function(e){if("string"!=typeof e.term)return null;var t=e.term.trim();if(""===t)return null;var a=this.options.options,o=a.$select;if(t.match(a.regexToken)&&(!o.is("[data-int]")||o.is("[data-int]")&&t.match(/\d+/))){var s={id:t,text:t,new:!0};return o.is("[data-create-choice-template]")&&(s.text=r.template(o.data("createChoiceTemplate"))({term:t})),s}return null},t.search_id=function(e){var t=void 0;return void 0!==e.id?t=e.id:void 0!==e.ID?t=e.ID:void 0!==e.value&&(t=e.value),void 0===e?void 0:t},t.matcher=function(a,o){if("string"!=typeof a.term||""===a.term.trim())return o;if(void 0===o.text)return null;var s=a.term.trim(),n=o.text,i=e(o.element).closest("select").data("dropdown"),d=-1!==n.toUpperCase().indexOf(s.toUpperCase());if(!d&&void 0!==i.tags){var c=r.where(i.tags,{text:n});if(i.tags.length>0&&r.isObject(c))d=-1!==t.search_id(c[0]).toUpperCase().indexOf(s.toUpperCase())}return d},t.init_selection=function(t,a){var o=t.is("[multiple]"),s=t.data("dropdown"),n=t.val().split(s.regexSplit),i=[];if(e(n).each(function(e,a){var o=function e(t,a){if(!r.isArray(a))return!1;for(var o in a){var s=a[o];if(s.hasOwnProperty("id")&&s.id==t.id)return s;if(s.hasOwnProperty("text")&&s.text==t.text)return s;if(s.hasOwnProperty("children")&&r.isArray(s.children)){var n=e(t,s.children);if(n)return n}}return!1}({id:this,text:this},s.ajax?t.data("options"):s.data);o&&o.selected&&i.push(o)}),i.length&&o)a(i);else{if(!i.length)return void a(!1);a(i[0])}},t.getSelectClasses=function(e){var t=e.attr("class").split(/\s+/);return r.difference(t,["select2-hidden-accessible","hide-before-select2-init"])},t.element=function(a,o){var s,n=e(a);o=e.extend({},o);if(n.addClass(t.selector.created.className()),o.$select=n,o.dropdownAutoWidth=!0,o.width="resolve",o.containerCss={},n.is(":visible")&&(o.containerCss.display="inline-block",o.containerCss.position="relative"),o.dropdownCss={},o.dropdownCss.width="auto",n.is("[data-dropdown-css-width]")&&(o.dropdownCss.width=n.data("dropdown-css-width"),o.dropdownCss.width&&"false"!==o.dropdownCss.width||(delete o.dropdownCss.width,delete o.containerCss)),o.allowClear=!0,n.is("[data-prevent-clear]")&&(o.allowClear=!1),n.is("[data-searching-placeholder]")&&(o.formatSearching=n.data("searching-placeholder")),!n.is("[data-placeholder]")&&n.is("[placeholder]")&&(o.placeholder=n.attr("placeholder")),n.is("[data-options]")&&(o.data=n.data("options")),o.minimumResultsForSearch=10,n.is("[data-hide-search]")&&(o.minimumResultsForSearch=1/0),n.is("[data-force-search]")&&delete o.minimumResultsForSearch,n.is("[data-freeform]")&&(o.createTag=t.freefrom_create_search_choice,o.tags=!0,n.data("tags",!0)),n.is("[multiple]")&&(o.multiple=!0,n.is("[data-maximum-selection-size]")&&(o.maximumSelectionSize=n.data("maximum-selection-size")),n.is("data-separator")||n.data("separator",","),r.isArray(n.data("separator"))?o.tokenSeparators=n.data("separator"):o.tokenSeparators=[n.data("separator")],o.separator=n.data("separator"),o.regexSeparatorElements=["^("],o.regexSplitElements=["(?:"],e.each(o.tokenSeparators,function(e,t){o.regexSeparatorElements.push("[^"+t+"]+"),o.regexSplitElements.push("["+t+"]")}),o.regexSeparatorElements.push(")$"),o.regexSplitElements.push(")"),o.regexSeparatorString=o.regexSeparatorElements.join(""),o.regexSplitString=o.regexSplitElements.join(""),o.regexToken=new RegExp(o.regexSeparatorString,"ig"),o.regexSplit=new RegExp(o.regexSplitString,"ig")),n.is("[data-tags]")&&(o.tags=n.data("tags"),o.createSearchChoice=function(e,t){if(e.match(o.regexToken))return{id:e,text:e}},0===o.tags.length&&(o.formatNoMatches=function(){return n.attr("placeholder")})),n.is("[data-source]")){var i=n.data("source");o.data={results:[]},o.formatResult=function(t,r,a){return void 0!==t.breadcrumbs?e.merge(t.breadcrumbs,[t.text]).join(" » "):t.text},o.ajax={dataType:"json",type:"POST",url:t.ajaxurl(),processResults:function(t,r,a){return e.isPlainObject(t)&&void 0!==t.success?e.isPlainObject(t.data)&&void 0!==t.data.results?t.success?t.data:("string"===e.type(t.data.message)?console.error(t.data.message):console.error("The Select2 search failed in some way... Verify the source."),{results:[]}):(console.error("We received a malformed results array, could not complete the Select2 Search."),{results:[]}):(console.error("We received a malformed Object, could not complete the Select2 Search."),{results:[]})}},o.ajax.data=function(e,t){return{action:"tribe_dropdown",source:i,search:e,page:t,args:n.data("source-args")}}}n.is("[data-attach-container]")&&(n.is("[multiple]")?(e.fn.select2.amd.define("AttachedDropdownAdapter",["select2/utils","select2/dropdown","select2/dropdown/attachContainer"],function(e,t,r){return e.Decorate(t,r)}),o.dropdownAdapter=e.fn.select2.amd.require("AttachedDropdownAdapter")):(e.fn.select2.amd.define("AttachedWithSearchDropdownAdapter",["select2/utils","select2/dropdown","select2/dropdown/search","select2/dropdown/minimumResultsForSearch","select2/dropdown/attachContainer"],function(e,t,r,a,o){var s=e.Decorate(t,o);return s=e.Decorate(s,r),s=e.Decorate(s,a)}),o.dropdownAdapter=e.fn.select2.amd.require("AttachedWithSearchDropdownAdapter"))),n.data("dropdown",o),s=n.select2TEC(o);var d=t.getSelectClasses(n).join(" ");s.data("select2").$container.addClass(d),s.data("select2").$container.removeClass("hide-before-select2-init"),s.on("select2:open",t.action_select2_open)},t.ajaxurl=function(){return void 0!==window.ajaxurl?window.ajaxurl:"undefined"!=typeof TEC&&void 0!==TEC.ajaxurl?TEC.ajaxurl:void console.error("Dropdowns framework cannot properly do an AJAX request without the WordPress `ajaxurl` variable setup.")},t.action_select2_open=function(r){var a=e(this),o=a.data("select2"),s=o.$dropdown.find(t.selector.searchField),n=t.getSelectClasses(o.$element).reduce(function(e,t,r,a){return"hide-if-js"===t?e:"tribe-dropdown-created"===t?e:e+" "+t});o.$dropdown.addClass(n),a.is("[data-search-placeholder]")&&s.attr("placeholder",a.data("searchPlaceholder"))},t.dropdown=function(e,r){var a=e.not(".select2-offscreen, .select2-container, "+t.selector.created.className());return 0===a.length?a:(r||(r={}),a.each(function(e,a){t.element(a,r)}),a)},e(function(){e(t.selector.dropdown).tribe_dropdowns()}),e(window).on("unload",function(){e(t.selector.dropdown).tribe_dropdowns()})}(jQuery,tribe_dropdowns,window.underscore||window._);

Zerion Mini Shell 1.0