芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/the-events-calendar/src/resources/js/events-admin.min.js
/** * This JS file was auto-generated via Terser. * * Contributors should avoid editing this file, but instead edit the associated * non minified file file. For more information, check out our engineering docs * on how we handle JS minification in our engineering docs. * * @see: https://evnt.is/dev-docs-minification */ var tribeDateFormat=function(){var token=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,pad=function(val,len){for(val=String(val),len=len||2;val.length
99?Math.round(L/10):L),t:H<12?"a":"p",tt:H<12?"am":"pm",T:H<12?"A":"P",TT:H<12?"AM":"PM",Z:utc?"UTC":(String(date).match(timezone)||[""]).pop().replace(timezoneClip,""),o:(o>0?"-":"+")+pad(100*Math.floor(Math.abs(o)/60)+Math.abs(o)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10]};return mask.replace(token,(function($0){return $0 in flags?flags[$0]:$0.slice(1,$0.length-1)}))}}}();tribeDateFormat.masks={default:"ddd mmm dd yyyy HH:MM:ss",tribeQuery:"yyyy-mm-dd",tribeMonthQuery:"yyyy-mm",0:"yyyy-mm-dd",1:"m/d/yyyy",2:"mm/dd/yyyy",3:"d/m/yyyy",4:"dd/mm/yyyy",5:"m-d-yyyy",6:"mm-dd-yyyy",7:"d-m-yyyy",8:"dd-mm-yyyy",9:"yyyy.mm.dd",10:"mm.dd.yyyy",11:"dd.mm.yyyy",m0:"yyyy-mm",m1:"m/yyyy",m2:"mm/yyyy",m3:"m/yyyy",m4:"mm/yyyy",m5:"m-yyyy",m6:"mm-yyyy",m7:"m-yyyy",m8:"mm-yyyy"},tribeDateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(mask,utc){return tribeDateFormat(this,mask,utc)};var tribe_datepicker_opts={};jQuery((function($){$(".bumpdown-trigger").bumpdown();var $date_format=$("[data-datepicker_format]"),viewCalLinkHTML=($(".tribe-field-dropdown_select2 select"),$(document.getElementById("view-calendar-link-div")).html()),$event_pickers=($('select[name="tribeEventsTemplate"]'),$(document.getElementById("tribe-event-datepickers"))),is_community_edit=$("body").is(".tribe_community_edit"),datepicker_format=0;function get_datepicker_num_months(){var window_width=$(window).width();return window_width<800?1:window_width<=1100?2:3}$('[data-wp-lists="list:tribe_events_cat"]').each((function(){var $list=$(this),$first=$list.find(":checkbox:checked").first();if($first.length){var top_position=$list.find(":checkbox").position().top,checked_position=$first.position().top;$list.closest(".tabs-panel").scrollTop(checked_position-top_position+5)}})),$(viewCalLinkHTML).insertAfter(".edit-php.post-type-tribe_events #wpbody-content .wrap h2:eq(0) a");var setup_linked_post_fields=function(post_type){var saved_template=$(document.getElementById("tmpl-tribe-select-"+post_type)).length?wp.template("tribe-select-"+post_type):null,create_template=$(document.getElementById("tmpl-tribe-create-"+post_type)).length?wp.template("tribe-create-"+post_type):null,section=$(document.getElementById("event_"+post_type)),rows=section.find(".saved-linked-post");function add_sticky_linked_post_data(post_type,container,fields){if(void 0!==window["tribe_sticky_"+post_type+"_fields"]&&Array.isArray(window["tribe_sticky_"+post_type+"_fields"])){var $fields=$(fields),$rows=$fields.filter("tr.linked-post."+container);if(0!==$rows.length){var sticky_data=window["tribe_sticky_"+post_type+"_fields"].shift(),sticky_data_added=!1;if("object"==typeof sticky_data)for(var key in sticky_data){var $field=$fields.find('input[name="'+container+"["+key+'][]"]');$field.length&&!_.isEmpty(sticky_data[key])&&($field.val(sticky_data[key]),sticky_data_added=!0)}sticky_data_added&&$rows.show()}}}section.on("click",".tribe-add-post",(function(e){e.preventDefault();var dropdown=$({}),fields=$({});if(saved_template&&(dropdown=$(saved_template({}))),dropdown.find(".nosaved").length){var label=dropdown.find("label");label.text(label.data("l10n-create-"+post_type)),dropdown.find(".nosaved").remove()}create_template&&(fields=$(create_template({}))),section.find("tfoot").before(fields),fields.prepend(dropdown),section.find("tbody").length>1?section.find(".move-linked-post-group").show():section.find(".move-linked-post-group").hide(),fields.find(".tribe-dropdown").tribe_dropdowns()})),section.on("change",".linked-post-dropdown",toggle_linked_post_fields),rows.each((function(){var fields,row=$(this),group=row.closest("tbody");fields=create_template?$(create_template({})).find("tr"):group.find("tr").slice(2);var dropdown=row.find(".linked-post-dropdown");if(dropdown.length){var value=dropdown.val();0!==parseInt(value,10)&&fields.not(".remain-visible").hide()}else if(row.find(".nosaved").length){var label=row.find("label");label.text(label.data("l10n-create-"+post_type)),row.find(".nosaved").remove()}for(var post_type in tribe_events_linked_posts.post_types)tribe_events_linked_posts.post_types.hasOwnProperty(post_type)&&add_sticky_linked_post_data(post_type,tribe_events_linked_posts.post_types[post_type],fields);fields.find(".tribe-dropdown").tribe_dropdowns(),group.append(fields)})),section.on("click",".tribe-delete-this",(function(e){e.preventDefault();var $group=$(this).closest("tbody");$group.parents(".tribe-section").removeClass("tribe-is-creating-linked-post"),$group.fadeOut(500,(function(){$(this).remove()}))}));var sortable_items="> tbody";$("body").hasClass("wp-admin")||(sortable_items="table "+sortable_items),section.sortable({items:sortable_items,handle:".move-linked-post-group",containment:"parent",axis:"y",delay:100}),section.find("tbody").length>1?section.find(".move-linked-post-group").show():section.find(".move-linked-post-group").hide()},toggle_linked_post_fields=function(event){const $select=$(this),$group=$select.closest("tbody"),$edit=$group.find(".edit-linked-post-link a"),value=$select.val(),$selected=$select.find(":selected");let editLink="",existingPost=!1;$selected.val()===value&&(editLink=$selected.data("editLink"),existingPost=!!$selected.data("existingPost")),$edit.hide(),!existingPost&&"-1"!==value&&$selected.length?($group.find(".linked-post-name").val(value).parents(".linked-post").eq(0).attr("data-hidden",!0),$select.val("-1"),$group.find(".linked-post").not("[data-hidden]").show().find(".tribe-dropdown"),$group.parents(".tribe-section").addClass("tribe-is-creating-linked-post")):($group.find(".linked-post").hide().find("input, select").val(""),$group.parents(".tribe-section").removeClass("tribe-is-creating-linked-post"),_.isEmpty(editLink)||$edit.attr("href",editLink).show())};if($(".hide-if-js").hide(),void 0!==tribe_l10n_datatables.datepicker){var _MS_PER_DAY=864e5,date_format="yy-mm-dd";$date_format.length&&$date_format.attr("data-datepicker_format").length>=1&&(date_format=["yy-mm-dd","m/d/yy","mm/dd/yy","d/m/yy","dd/mm/yy","m-d-yy","mm-dd-yy","d-m-yy","dd-mm-yy","yy.mm.dd","mm.dd.yy","dd.mm.yy"][datepicker_format=$date_format.attr("data-datepicker_format")]);$event_pickers.length&&$event_pickers.data("startofweek");var $start_date=$(document.getElementById("EventStartDate")),$end_date=$(document.getElementById("EventEndDate")),$event_details=$(document.getElementById("tribe_events_event_details"));tribe_datepicker_opts={dateFormat:date_format,showAnim:"fadeIn",changeMonth:!0,changeYear:!0,numberOfMonths:get_datepicker_num_months(),showButtonPanel:!1,beforeShow:function(element,object){object.input.datepicker("option","numberOfMonths",get_datepicker_num_months()),object.input.data("prevDate",object.input.datepicker("getDate")),void 0!==object.input.data("datepicker-min-date")&&object.input.datepicker("option","minDate",object.input.data("datepicker-min-date")),void 0!==object.input.data("datepicker-max-date")&&object.input.datepicker("option","maxDate",object.input.data("datepicker-max-date")),$dpDiv=$(object.dpDiv),$dpDiv.addClass("tribe-ui-datepicker"),$event_details.trigger("tribe.ui-datepicker-div-beforeshow",[object]),$dpDiv.attrchange({trackValues:!0,callback:function(attr){"string"==typeof attr.newValue&&(attr.newValue.indexOf("display: none")>=0||attr.newValue.indexOf("display:none")>=0)&&($dpDiv.removeClass("tribe-ui-datepicker"),$event_details.trigger("tribe.ui-datepicker-div-closed",[object]))}})},onSelect:function(selected_date,object){var instance=$(this).data("datepicker"),date=$.datepicker.parseDate(instance.settings.dateFormat||$.datepicker._defaults.dateFormat,selected_date,instance.settings);if("EventStartDate"===this.id){var start_date=$(document.getElementById("EventStartDate")).data("prevDate"),date_diff=null==start_date?0:function date_diff_in_days(a,b){var utc1=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate()),utc2=Date.UTC(b.getFullYear(),b.getMonth(),b.getDate());return Math.floor((utc2-utc1)/_MS_PER_DAY)}(start_date,$end_date.datepicker("getDate")),end_date=new Date(date.setDate(date.getDate()+date_diff));$end_date.datepicker("option","minDate",$start_date.datepicker("getDate")).datepicker("setDate",end_date).datepicker_format}$(this).trigger("change"),$(this).trigger("blur")}},$.extend(tribe_datepicker_opts,tribe_l10n_datatables.datepicker);$(".tribe-datepicker").datepicker(tribe_datepicker_opts);var selectObject,$start_end_month=$('select[name="EventStartMonth"], select[name="EventEndMonth"]'),$start_month=$('select[name="EventStartMonth"]'),$end_month=$('select[name="EventEndMonth"]');if(is_community_edit){var $els={start:$event_pickers.find("#EventStartDate"),end:$event_pickers.next("tr").find("#EventEndDate")};$.each($els,(function(i,el){var $el=$(el);""!==$el.val()&&$el.val(tribeDateFormat($el.val(),datepicker_format))}))}var tribeDaysPerMonth=[29,31,28,31,30,31,30,31,31,30,31,30,31],tribeStartDays=[$(document.getElementById("28StartDays")),$(document.getElementById("29StartDays")),$(document.getElementById("30StartDays")),$(document.getElementById("31StartDays"))],tribeEndDays=[$(document.getElementById("28EndDays")),$(document.getElementById("29EndDays")),$(document.getElementById("30EndDays")),$(document.getElementById("31EndDays"))];for(var i in $start_end_month.on("change",(function(){var t=$(this),startEnd=t.attr("name");startEnd="EventStartMonth"==startEnd?"Start":"End";var chosenMonth=t.attr("value");"0"==chosenMonth.charAt(0)&&(chosenMonth=chosenMonth.replace("0",""));var remainder=$('select[name="Event'+startEnd+'Year"]').attr("value")%4;2==chosenMonth&&0==remainder&&(chosenMonth=0);var currentDateField=$('select[name="Event'+startEnd+'Day"]');$(".event"+startEnd+"DateField").remove(),"Start"==startEnd?((selectObject=tribeStartDays[tribeDaysPerMonth[chosenMonth]-28]).val(currentDateField.val()),$start_month.after(selectObject)):((selectObject=tribeEndDays[tribeDaysPerMonth[chosenMonth]-28]).val(currentDateField.val()),$end_month.after(selectObject))})),$start_end_month.trigger("change"),$('select[name="EventStartYear"]').on("change",(function(){$start_month.trigger("change")})),$('select[name="EventEndYear"]').on("change",(function(){$end_month.trigger("change")})),tribe_events_linked_posts.post_types)tribe_events_linked_posts.post_types.hasOwnProperty(i)&&setup_linked_post_fields(i)}$("body").on("change","#EventCountry",(function(){var $container=$(this).parents("div.eventForm").eq(0),$state_select=$container.find("#StateProvinceSelect"),$state_dropdown=$state_select.next(".select2-container"),$state_text=$container.find("#StateProvinceText"),country=$(this).val();"US"==country||"United States"==country?($state_text.hide(),$state_select.hide(),$state_dropdown.show()):($state_text.show(),$state_select.hide(),$state_dropdown.hide())})).find("#EventCountry").trigger("change");var overwriteCoordinates={$container:$(document.getElementById("overwrite_coordinates"))};overwriteCoordinates.$lat=overwriteCoordinates.$container.find("#VenueLatitude"),overwriteCoordinates.$lng=overwriteCoordinates.$container.find("#VenueLongitude"),overwriteCoordinates.$fields=$("").add(overwriteCoordinates.$lat).add(overwriteCoordinates.$lng),overwriteCoordinates.$toggle=overwriteCoordinates.$container.find("#VenueOverwriteCoords").on("change",(function(event){overwriteCoordinates.$toggle.is(":checked")?overwriteCoordinates.$fields.prop("disabled",!1).removeClass("hidden"):overwriteCoordinates.$fields.prop("disabled",!0).addClass("hidden")})),overwriteCoordinates.$toggle.trigger("change"),$("#EventInfo input, #EventInfo select").on("change",(function(){$(".rec-error").hide()})),$('.wp-admin.events-cal #post #publishing-action input[type="submit"]').on("click",(function(){$(this).data("clicked",!0)})),$("body").hasClass("post-type-tribe_venue")&&$("#menu-posts-tribe_events, #menu-posts-tribe_events a.wp-has-submenu").addClass("wp-menu-open wp-has-current-submenu wp-has-submenu").removeClass("wp-not-current-submenu").find("li a[href='edit.php?post_type=tribe_venue']").parent().addClass("current"),$("body").hasClass("post-type-tribe_organizer")&&$("#menu-posts-tribe_events, #menu-posts-tribe_events a.wp-has-submenu").addClass("wp-menu-open wp-has-current-submenu wp-has-submenu").removeClass("wp-not-current-submenu").find("li a[href='edit.php?post_type=tribe_organizer']").parent().addClass("current");var $tribe_views=$(document.getElementById("tribe-field-tribeEnableViews"));if($tribe_views.length){var $default_view_select=$('select[name="viewOption"]'),$default_mobile_view_select=$('select[name="mobile_default_view"]'),$view_inputs=$tribe_views.find("input:checkbox"),$view_desc=$("#tribe-field-tribeEnableViews .tribe-field-wrap p.description"),view_options={};!function create_view_array(){$default_view_select.find("option").each((function(){var $this=$(this);view_options[$this.attr("value")]=$this.text()})),$default_mobile_view_select.find("option").each((function(){var $this=$(this);view_options[$this.attr("value")]=$this.text()}))}(),$tribe_views.on("change","input:checkbox",(function(){var $this=$(this);$('[name="tribeEnableViews[]"]:checked').length<1?($this.attr("checked",!0),$view_desc.css("color","red")):$view_desc.removeAttr("style"),function set_selected_views($this){var prev_default_view=$default_view_select.find("option:selected").first().val(),prev_default_mobile_view=$default_mobile_view_select.find("option:selected").first().val();$default_view_select.find("option").remove(),$default_mobile_view_select.find("option").remove(),$view_inputs.each((function(){var $this=$(this);if($this.is(":checked")){var value=$this.val(),label=value.substr(0,1).toUpperCase()+value.substr(1);$default_view_select.append('
'+label+"
"),$default_mobile_view_select.append('
'+label+"
")}}));var $prev_default_option=$default_view_select.find("option[value='"+prev_default_view+"']"),$prev_default_mobile_option=$default_mobile_view_select.find("option[value='"+prev_default_mobile_view+"']");if($prev_default_option.val()==$this.val())$prev_default_option.attr("selected","selected");else{var $default_reset=$tribe_views.find("checkbox:checked").first().val();$default_view_select.find("option").find("option[value='"+$default_reset+"']").attr("selected","selected")}$prev_default_mobile_option.val()==$this.val()?$prev_default_mobile_option.attr("selected","selected"):($default_reset=$tribe_views.find("checkbox:checked").first().val(),$default_mobile_view_select.find("option").find("option[value='"+$default_reset+"']").attr("selected","selected"));$default_view_select.select2("destroy").select2({width:"auto"}),$default_mobile_view_select.select2("destroy").select2({width:"auto"})}($this)}))}$("#tribe-community-events.form form").on("submit",(function(){var $els={start:$event_pickers.find("#EventStartDate"),end:$event_pickers.next("tr").find("#EventEndDate")};$els.start.val(tribeDateFormat($els.start.datepicker("getDate"),"tribeQuery")),$els.end.val(tribeDateFormat($els.end.datepicker("getDate"),"tribeQuery")),$event_pickers.parent().find(".tribe-no-end-date-update").each((function(){$el=$(this),$el.is(":visible")&&$el.val(tribeDateFormat($el.datepicker("getDate"),"tribeQuery"))}))}))}));