/*! This file is auto-generated */
window.makeSlugeditClickable=window.editPermalink=function(){},window.wp=window.wp||{},function(n){var t=!1,a=wp.i18n.__;window.commentsBox={st:0,get:function(t,e){var i=this.st;return this.st+=e=e||20,this.total=t,n("#commentsdiv .spinner").addClass("is-active"),e={action:"get-comments",mode:"single",_ajax_nonce:n("#add_comment_nonce").val(),p:n("#post_ID").val(),start:i,number:e},n.post(ajaxurl,e,function(t){return t=wpAjax.parseAjaxResponse(t),n("#commentsdiv .widefat").show(),n("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof t&&t.responses[0]?(n("#the-comment-list").append(t.responses[0].data),theList=theExtraList=null,n("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?n("#show-comments").hide():n("#show-comments").show().children("a").text(a("Show more comments")))):void(1!=t?n("#the-comment-list").append('
'+wpAjax.broken+" |
"):n("#show-comments").text(a("No more comments found.")))}),!1},load:function(t){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(t)}},window.WPSetThumbnailHTML=function(t){n(".inside","#postimagediv").html(t)},window.WPSetThumbnailID=function(t){var e=n('input[value="_thumbnail_id"]',"#list-table");0",{class:"avatar avatar-64 photo",width:64,height:64,alt:"",src:i.lock_error.avatar_src,srcset:i.lock_error.avatar_src_2x?i.lock_error.avatar_src_2x+" 2x":void 0}),a.find("div.post-locked-avatar").empty().append(e)),a.show().find(".currently-editing").text(i.lock_error.text),a.find(".wp-tab-first").focus()):i.new_lock&&n("#active_post_lock").val(i.new_lock))}).on("before-autosave.update-post-slug",function(){t=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){n("#edit-slug-box > *").length||t||n.post(ajaxurl,{action:"sample-permalink",post_id:n("#post_ID").val(),new_title:n("#title").val(),samplepermalinknonce:n("#samplepermalinknonce").val()},function(t){"-1"!=t&&n("#edit-slug-box").html(t)})})}(jQuery),function(s){var n,t;function i(){n=!1,window.clearTimeout(t),t=window.setTimeout(function(){n=!0},3e5)}s(document).on("heartbeat-send.wp-refresh-nonces",function(t,e){var i,a=s("#wp-auth-check-wrap");(n||a.length&&!a.hasClass("hidden"))&&(i=s("#post_ID").val())&&s("#_wpnonce").val()&&(e["wp-refresh-post-nonces"]={post_id:i})}).on("heartbeat-tick.wp-refresh-nonces",function(t,e){e=e["wp-refresh-post-nonces"];e&&(i(),e.replace&&s.each(e.replace,function(t,e){s("#"+t).val(e)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){i()})}(jQuery),jQuery(document).ready(function(u){var p,e,i,a,s,n,o,l,c,t,r,d,h=u("#content"),f=u(document),v=u("#post_ID").val()||0,m=u("#submitpost"),w=!0,b=u("#post-visibility-select"),g=u("#timestampdiv"),k=u("#post-status-select"),_=!!window.navigator.platform&&-1!==window.navigator.platform.indexOf("Mac"),y=new ClipboardJS(".copy-attachment-url.edit-media"),x=wp.i18n.__,C=wp.i18n._x;function D(t){r.hasClass("wp-editor-expand")||(c?o.theme.resizeTo(null,l+t.pageY):h.height(Math.max(50,l+t.pageY)),t.preventDefault())}function j(){var t;r.hasClass("wp-editor-expand")||(t=c?(o.focus(),((t=parseInt(u("#wp-content-editor-container .mce-toolbar-grp").height(),10))<10||200 *").length&&(u("form#post").one("submit",function(){t=!0}),window.setTimeout(function(){!t&&wp.autosave&&wp.autosave.server.triggerSave()},200))}),f.on("autosave-disable-buttons.edit-post",function(){i.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||i.removeClass("disabled")}).on("before-autosave.edit-post",function(){u(".autosave-message").text(x("Saving Draft\u2026"))}).on("after-autosave.edit-post",function(t,e){u(".autosave-message").text(e.message),u(document.body).hasClass("post-new-php")&&u(".submitbox .submitdelete").show()}),u(window).on("beforeunload.edit-post",function(){var t="undefined"!=typeof tinymce&&tinymce.get("content");if(t&&!t.isHidden()&&t.isDirty()||wp.autosave&&wp.autosave.server.postChanged())return x("The changes you made will be lost if you navigate away from this page.")}).on("unload.edit-post",function(t){if(w&&(!t.target||"#document"==t.target.nodeName)){var e=u("#post_ID").val(),t=u("#active_post_lock").val();if(e&&t){t={action:"wp-remove-post-lock",_wpnonce:u("#_wpnonce").val(),post_ID:e,active_post_lock:t};if(window.FormData&&window.navigator.sendBeacon){var i=new window.FormData;if(u.each(t,function(t,e){i.append(t,e)}),window.navigator.sendBeacon(ajaxurl,i))return}u.post({async:!1,data:t,url:ajaxurl})}}}),u("#tagsdiv-post_tag").length?window.tagBox&&window.tagBox.init():u(".meta-box-sortables").children("div.postbox").each(function(){if(0===this.id.indexOf("tagsdiv-"))return window.tagBox&&window.tagBox.init(),!1}),u(".categorydiv").each(function(){var t,s,e,i=u(this).attr("id").split("-");i.shift(),s=i.join("-"),e="category"==s?"cats":s+"_tab",u("a","#"+s+"-tabs").click(function(t){t.preventDefault();t=u(this).attr("href");u(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),u("#"+s+"-tabs").siblings(".tabs-panel").hide(),u(t).show(),"#"+s+"-all"==t?deleteUserSetting(e):setUserSetting(e,"pop")}),getUserSetting(e)&&u('a[href="#'+s+'-pop"]',"#"+s+"-tabs").click(),u("#new"+s).one("focus",function(){u(this).val("").removeClass("form-input-tip")}),u("#new"+s).keypress(function(t){13===t.keyCode&&(t.preventDefault(),u("#"+s+"-add-submit").click())}),u("#"+s+"-add-submit").click(function(){u("#new"+s).focus()}),t=function(t){return!!u("#new"+s).val()&&(t.data+="&"+u(":checked","#"+s+"checklist").serialize(),u("#"+s+"-add-submit").prop("disabled",!0),t)},i=function(t,e){var i,a=u("#new"+s+"_parent");u("#"+s+"-add-submit").prop("disabled",!1),"undefined"!=e.parsed.responses[0]&&(i=e.parsed.responses[0].supplemental.newcat_parent)&&(a.before(i),a.remove())},u("#"+s+"checklist").wpList({alt:"",response:s+"-ajax-response",addBefore:t,addAfter:i}),u("#"+s+"-add-toggle").click(function(t){t.preventDefault(),u("#"+s+"-adder").toggleClass("wp-hidden-children"),u('a[href="#'+s+'-all"]',"#"+s+"-tabs").click(),u("#new"+s).focus()}),u("#"+s+"checklist, #"+s+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var t=u(this),e=t.is(":checked"),i=t.val();i&&t.parents("#taxonomy-"+s).length&&u("#in-"+s+"-"+i+", #in-popular-"+s+"-"+i).prop("checked",e)})}),u("#postcustom").length&&u("#the-list").wpList({addBefore:function(t){return t.data+="&post_id="+u("#post_ID").val(),t},addAfter:function(){u("table#list-table").show()}}),u("#submitdiv").length&&(p=u("#timestamp").html(),e=u("#post-visibility-display").html(),a=function(){"public"!=b.find("input:radio:checked").val()?(u("#sticky").prop("checked",!1),u("#sticky-span").hide()):u("#sticky-span").show(),"password"!=b.find("input:radio:checked").val()?u("#password-span").hide():u("#password-span").show()},s=function(){if(!g.length)return!0;var t,e=u("#post_status"),i=u('option[value="publish"]',e),a=u("#aa").val(),s=u("#mm").val(),n=u("#jj").val(),o=u("#hh").val(),l=u("#mn").val(),c=new Date(a,s-1,n,o,l),r=new Date(u("#hidden_aa").val(),u("#hidden_mm").val()-1,u("#hidden_jj").val(),u("#hidden_hh").val(),u("#hidden_mn").val()),d=new Date(u("#cur_aa").val(),u("#cur_mm").val()-1,u("#cur_jj").val(),u("#cur_hh").val(),u("#cur_mn").val());return c.getFullYear()!=a||1+c.getMonth()!=s||c.getDate()!=n||c.getMinutes()!=l?(g.find(".timestamp-wrap").addClass("form-invalid"),!1):(g.find(".timestamp-wrap").removeClass("form-invalid"),d"+x("%1$s %2$s, %3$s at %4$s:%5$s").replace("%1$s",u('option[value="'+s+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(n,10)).replace("%3$s",a).replace("%4$s",("00"+o).slice(-2)).replace("%5$s",("00"+l).slice(-2))+" "),"private"==b.find("input:radio:checked").val()?(u("#publish").val(x("Update")),0===i.length?e.append('"):i.html(x("Privately Published")),u('option[value="publish"]',e).prop("selected",!0),u("#misc-publishing-actions .edit-post-status").hide()):("future"==u("#original_post_status").val()||"draft"==u("#original_post_status").val()?i.length&&(i.remove(),e.val(u("#hidden_post_status").val())):i.html(x("Published")),e.is(":hidden")&&u("#misc-publishing-actions .edit-post-status").show()),u("#post-status-display").text(wp.sanitize.stripTagsAndEncodeText(u("option:selected",e).text())),"private"==u("option:selected",e).val()||"publish"==u("option:selected",e).val()?u("#save-post").hide():(u("#save-post").show(),"pending"==u("option:selected",e).val()?u("#save-post").show().val(x("Save as Pending")):u("#save-post").show().val(x("Save Draft"))),!0)},u("#visibility .edit-visibility").click(function(t){t.preventDefault(),b.is(":hidden")&&(a(),b.slideDown("fast",function(){b.find('input[type="radio"]').first().focus()}),u(this).hide())}),b.find(".cancel-post-visibility").click(function(t){b.slideUp("fast"),u("#visibility-radio-"+u("#hidden-post-visibility").val()).prop("checked",!0),u("#post_password").val(u("#hidden-post-password").val()),u("#sticky").prop("checked",u("#hidden-post-sticky").prop("checked")),u("#post-visibility-display").html(e),u("#visibility .edit-visibility").show().focus(),s(),t.preventDefault()}),b.find(".save-post-visibility").click(function(t){var e="",i=b.find("input:radio:checked").val();switch(b.slideUp("fast"),u("#visibility .edit-visibility").show().focus(),s(),"public"!==i&&u("#sticky").prop("checked",!1),i){case"public":e=u("#sticky").prop("checked")?x("Public, Sticky"):x("Public");break;case"private":e=x("Private");break;case"password":e=x("Password Protected")}u("#post-visibility-display").text(e),t.preventDefault()}),b.find("input:radio").change(function(){a()}),g.siblings("a.edit-timestamp").click(function(t){g.is(":hidden")&&(g.slideDown("fast",function(){u("input, select",g.find(".timestamp-wrap")).first().focus()}),u(this).hide()),t.preventDefault()}),g.find(".cancel-timestamp").click(function(t){g.slideUp("fast").siblings("a.edit-timestamp").show().focus(),u("#mm").val(u("#hidden_mm").val()),u("#jj").val(u("#hidden_jj").val()),u("#aa").val(u("#hidden_aa").val()),u("#hh").val(u("#hidden_hh").val()),u("#mn").val(u("#hidden_mn").val()),s(),t.preventDefault()}),g.find(".save-timestamp").click(function(t){s()&&(g.slideUp("fast"),g.siblings("a.edit-timestamp").show().focus()),t.preventDefault()}),u("#post").on("submit",function(t){s()||(t.preventDefault(),g.show(),wp.autosave&&wp.autosave.enableButtons(),u("#publishing-action .spinner").removeClass("is-active"))}),k.siblings("a.edit-post-status").click(function(t){k.is(":hidden")&&(k.slideDown("fast",function(){k.find("select").focus()}),u(this).hide()),t.preventDefault()}),k.find(".save-post-status").click(function(t){k.slideUp("fast").siblings("a.edit-post-status").show().focus(),s(),t.preventDefault()}),k.find(".cancel-post-status").click(function(t){k.slideUp("fast").siblings("a.edit-post-status").show().focus(),u("#post_status").val(u("#hidden_post_status").val()),s(),t.preventDefault()})),u("#titlediv").on("click",".edit-slug",function(){!function(){var t,e,i,a=0,s=u("#post_name"),n=s.val(),o=u("#sample-permalink"),l=o.html(),c=u("#sample-permalink a").html(),r=u("#edit-slug-buttons"),d=r.html(),p=u("#editable-post-name-full");for(p.find("img").replaceWith(function(){return this.alt}),p=p.html(),o.html(c),e=u("#editable-post-name"),i=e.html(),r.html(' "),r.children(".save").click(function(){var i=e.children("input").val();i!=u("#editable-post-name-full").text()?u.post(ajaxurl,{action:"sample-permalink",post_id:v,new_slug:i,new_title:u("#title").val(),samplepermalinknonce:u("#samplepermalinknonce").val()},function(t){var e=u("#edit-slug-box");e.html(t),e.hasClass("hidden")&&e.fadeIn("fast",function(){e.removeClass("hidden")}),r.html(d),o.html(l),s.val(i),u(".edit-slug").focus(),wp.a11y.speak(x("Permalink saved"))}):r.children(".cancel").click()}),r.children(".cancel").click(function(){u("#view-post-btn").show(),e.html(i),r.html(d),o.html(l),s.val(n),u(".edit-slug").focus()}),t=0;tp.length/4?"":p,e.html('').children("input").keydown(function(t){var e=t.which;13===e&&(t.preventDefault(),r.children(".save").click()),27===e&&r.children(".cancel").click()}).keyup(function(){s.val(this.value)}).focus()}()}),window.wptitlehint=function(t){var e=u("#"+(t=t||"title")),i=u("#"+t+"-prompt-text");""===e.val()&&i.removeClass("screen-reader-text"),e.on("input",function(){""!==this.value?i.addClass("screen-reader-text"):i.removeClass("screen-reader-text")})},wptitlehint(),t=u("#post-status-info"),r=u("#postdivrich"),!h.length||"ontouchstart"in window?u("#content-resize-handle").hide():t.on("mousedown.wp-editor-resize",function(t){(o="undefined"!=typeof tinymce?tinymce.get("content"):o)&&!o.isHidden()?(c=!0,l=u("#content_ifr").height()-t.pageY):(c=!1,l=h.height()-t.pageY,h.blur()),f.on("mousemove.wp-editor-resize",D).on("mouseup.wp-editor-resize mouseleave.wp-editor-resize",j),t.preventDefault()}).on("mouseup.wp-editor-resize",j),"undefined"!=typeof tinymce&&(u("#post-formats-select input.post-format").on("change.set-editor-class",function(){var t,e,i=this.id;i&&u(this).prop("checked")&&(t=tinymce.get("content"))&&((e=t.getBody()).className=e.className.replace(/\bpost-format-[^ ]+/,""),t.dom.addClass(e,"post-format-0"==i?"post-format-standard":i),u(document).trigger("editor-classchange"))}),u("#page_template").on("change.set-editor-class",function(){var t,e,i=u(this).val()||"";(i=i.substr(i.lastIndexOf("/")+1,i.length).replace(/\.php$/,"").replace(/\./g,"-"))&&(t=tinymce.get("content"))&&((e=t.getBody()).className=e.className.replace(/\bpage-template-[^ ]+/,""),t.dom.addClass(e,"page-template-"+i),u(document).trigger("editor-classchange"))})),h.on("keydown.wp-autosave",function(t){83===t.which&&(t.shiftKey||t.altKey||_&&(!t.metaKey||t.ctrlKey)||!_&&!t.ctrlKey||(wp.autosave&&wp.autosave.server.triggerSave(),t.preventDefault()))}),"auto-draft"===u("#original_post_status").val()&&window.history.replaceState&&u("#publish").on("click",function(){d=window.location.href,d+=-1!==d.indexOf("?")?"&":"?",d+="wp-post-new-reload=true",window.history.replaceState(null,null,d)}),y.on("success",function(t){var e=u(t.trigger),i=u(".success",e.closest(".copy-to-clipboard-container"));t.clearSelection(),e.focus(),clearTimeout(n),i.removeClass("hidden"),n=setTimeout(function(){i.addClass("hidden")},3e3),wp.a11y.speak(x("The file URL has been copied to your clipboard"))})}),function(t,o){t(function(){var i,e=t("#content"),a=t("#wp-word-count").find(".word-count"),s=0;function n(){var t=!i||i.isHidden()?e.val():i.getContent({format:"raw"}),t=o.count(t);t!==s&&a.text(t),s=t}t(document).on("tinymce-editor-init",function(t,e){"content"===e.id&&(i=e).on("nodechange keyup",_.debounce(n,1e3))}),e.on("input keyup",_.debounce(n,1e3)),n()})}(jQuery,new wp.utils.WordCounter);