HEX
Server: Apache/2.4.38 (Debian)
System: Linux host457 5.14.0-4-amd64 #1 SMP Debian 5.14.16-1 (2021-11-03) x86_64
User: www-data (33)
PHP: 7.4.21
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/vhosts/harpoeditore.it/httpdocs/wp-content/plugins/copy-delete-posts/assets/js/cdp.min.js
function cdp_tooltips_update_content(){if(jQuery("select").cdpNiceSelect("update"),!(void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium)||!jQuery.cdp.isPremium()){jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),$prems=jQuery(".cdp-tooltip-premium");for(let t=0;t<$prems.length;t++){let e=$prems[t],i=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(i=parseInt(jQuery(e).attr("data-top"))),jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:i,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return cdpJS.strAreYouSure;console.log(cdpJS.strYouAreCrazy);let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"debug_function"}).done(t=>{console.log(t),console.log(cdpJS.strDebugOutputEnd)})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,i="default",c=null,o=null,d=null,p=null,n=null,s=null,a=null,l=!1;const r=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function u(e=null,i=!1){let c=this;"string"==typeof e&&(c=`.${e}`),0!=i&&(c=i),$parent=t(t(c).parents(".cdp-collapsible")[0]),$arrow=$parent.find(".cdp-arrow"),$body=$parent.find(".cdp-collapsible-content"),$title=$parent.find(".cdp-collapsible-title"),$titles=t(".cdp-collapsible-title"),group=$parent.attr("data-cdp-group"),height=$body.prop("scrollHeight"),$oArrows=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-arrow"),$oBodies=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-collapsible-content"),$body.hasClass("cdp-active")?($body.removeClass("cdp-active"),$titles.removeClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":""})):($titles.removeClass("cdp-active"),$body.addClass("cdp-active"),$title.addClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-left").addClass("cdp-arrow-down"),$oArrows.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":`${height+30}px`}),$oBodies.css({"max-height":""}))}function m(){let e=t(".cdp-names-prefix").text(),i=t(".cdp-names-suffix").text(),c={year:(o=new Date).getFullYear(),month:("0"+(o.getMonth()+1)).slice(-2),day:o.getDate()<=9?"0"+o.getDate():o.getDate(),hour:o.getHours()<=9?"0"+o.getHours():o.getHours(),minute:o.getMinutes()<=9?"0"+o.getMinutes():o.getMinutes(),second:o.getSeconds()<=9?"0"+o.getSeconds():o.getSeconds(),week:o.getDay()};var o;let d="(blank)"==t(".cdp-togglable-name-b").text()?"":cdpJS.strTogglableName,p=`${e.trim()} ${d} ${i.trim()}`;p=p.replace(/\[Counter\]/g,"2");let n=t(".cdp-date-picked").val();"1"==n?p=p.replace(/\[CurrentDate\]/g,`${c.month}/${c.day}/${c.year}`):"2"==n?p=p.replace(/\[CurrentDate\]/g,`${c.day}/${c.month}/${c.year}`):"3"==n&&function(e){let i=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_formatted_time",format:i}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{p=p.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(p),p=(p=p.replace(/\[CurrentTime\]/g,`${c.hour}:${c.minute}:${c.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(p)}),"3"!=n&&(p=(p=p.replace(/\[CurrentTime\]/g,`${c.hour}:${c.minute}:${c.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(p))}function h(e=""){before=t(e).html(),text=t(e).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(e).html(text)}function f(){val=t('.cdp-other-options[name="after_copy"]').val(),2==val?t(".cdp-if-edit-page-selected").show(300):t(".cdp-if-edit-page-selected").is(":hidden")||t(".cdp-if-edit-page-selected").hide(300),setTimeout(()=>{jQuery(".cdp-oth-section").css({"max-height":""}),jQuery(".cdp-oth-section").css({"max-height":jQuery(".cdp-oth-section").height()})},310)}function g(c=!1){let o=t(this).attr("data-cdp-btn");1==c&&(o="copy-quick");let d=["copy-quick","copy-custom","copy-custom-link"],p=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(d.includes(o)){let c={type:o};if(o==d[0]){if(c.times=t(".cdp-modal-input-times-tooltip").val(),c.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),c.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),c.swap="2"==t(".cdp-swap").val()?"true":"false",!c.profile||"custom"==c.profile)return t.cdpNotification("warning","Please select settings for this copy."),void _()}else if(o==d[1]||o==d[2]){t("#cdp-copy-modal-global").is(":visible")?($select=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),c.site=t('.cdp-input-dynamic[name="tooltip-which-site-second-modal"]').val(),c.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]').val()):(c.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),c.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val()),c.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),c.swap="2"==t(".cdp-swap").val()?"true":"false",c.custom={};for(let e=0;e<p.length;++e)c.custom[t(p[e]).attr("name")]=t(p[e]).is(":checked")}if(isNaN(parseInt(c.times))||parseInt(c.times)<=0)return void t.cdpNotification("warning",cdpJS.strCopyNumIssue);let n=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];c.profile&&!n.includes(c.profile)||(c.profile=i),L(),function(e=(()=>{})){window.onbeforeunload=(()=>cdpJS.strCopyInProgress),$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")&&($e.show(),$e.animate({opacity:1},300,function(){e(!0)}))}(()=>{t.ajax({type:"POST",url:ajaxurl,data:{action:"cdp_action_handling",token:"cdp",f:"copy_post",origin:"tooltip",id:[e],data:c},timeout:0}).done(function(e){_(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error",cdpJS.strCopyPostIssue):o==d[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_success_img"}),"-28"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),t("#cdp_notice_error_modal").length>0&&(t("#cdp_notice_error_modal").show(),t("#cdp_notice_error_modal").fadeIn(300),t("#cdp_notice_error_modal").animate({opacity:1},500),t("#cdp_notice_error_modal .cdp_notice_content").animate({opacity:1,top:"50%"},500))):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error",cdpJS.strCopyPostIssueConsInfo),_(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification(cdpJS.strTooltipBtnIssue)}function v(e,c=!1){let o=["clear","alloptions","custom","custom_named","null","undefined",null,void 0],d=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),p=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),n=d,s=!1;t("#cdp-copy-modal-global").is(":visible")&&(n=p,s=!0);let a=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),l=n.val();0==e&&0!=c&&(l=c),"custom_named"==l?n.val("custom_named"):void 0===l||"custom"==l||null==l||void 0==l?n.val("custom"):"clear"==l?(0!=e&&e.preventDefault(),a.prop("checked",!1),n.val("custom_named")):"alloptions"==l?(0!=e&&e.preventDefault(),a.prop("checked",!0),n.val("custom_named")):!o.includes(l)&&l.length>=1?b(l,function(e){for(let i in e)"object"!=typeof i&&t(`.cdp-input-dynamic[name="${i}"]`).prop("checked",y(e[i]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning",cdpJS.strSelectedProfIssue)),0==e&&n.val(l),o.includes(l)||(i=l,s?d.val(l):p.val(l)),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function b(e="default",i){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_settings",profile:e}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),e.status&&"error_no_exists"==e.status){t.cdpNotification("warning",cdpJS.strSelectedProfEmpty);let e={},c=t(".cdp-modal-option-r");for(let i=0;i<c.length;i++)e[t(c[i]).attr("name")]=t(c[i]).is(":checked");i(!1)}else i(e)}).fail(e=>{t.cdpNotification("error",cdpJS.strSelectedProfGetIssue),console.log(cdpJS.strConsLogErr),console.log(e),console.log("––––––––––––––––––––––––––"),i(!1)})}function x(){t(this).attr("class");let e=parseInt(t(this).val());e<=0&&(e=1),e>9999&&(e=9999),isNaN(e)&&(e=1),e||(e=1),t(".cdp-modal-input-times").val(e),t(".cdp-modal-input-times-tooltip").val(e),e>50?(t(".cdp-error-span-tooltip").show(300),t(".cdp-tooltip-before").attr("style","height: calc(225px - 20px - 16px) !important")):(t(".cdp-error-span-tooltip").hide(300),t(".cdp-tooltip-before").attr("style","")),e>1?(t(".cdp-multiple-tooltip-count").animate({opacity:1},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').hide()):(t(".cdp-multiple-tooltip-count").animate({opacity:0},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').show()),setTimeout(()=>{O()},310)}function _(e=(()=>{})){window.onbeforeunload=null,$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),e(!0)})}function w(){let e=t(".cdp-profile-selected").val();var i,c;b(e,o=>{if(t.isJsonString(o)||"object"==typeof o){"object"!=typeof o&&(o=JSON.parse(o));let d=["usmplugin","yoast","woo"];for(k in o)"names"==k?(t(".cdp-names-prefix").html(o[k].prefix),t(".cdp-names-suffix").html(o[k].suffix),"3"!=o[k].format||r||(o[k].format="1"),t(".cdp-date-picked").val(o[k].format),t(".cdp-custom-date-picking").val(o[k].custom)):(!d.includes(k)||d.includes(k)&&r&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==o[k]);cdp_tooltips_update_content(),m(),f(),r&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),T(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),i=e,c=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"set_default_profile",selection:i}).done(t=>{c(t)}).fail(()=>{c(!1)})}else t.cdpNotification("warning",cdpJS.strServerDataIssue)})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,i=t(".cdp-input-d-id:checked").length;i==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(i),$visible=t(".cdp-input-d-id:visible").length,$visible_checked=t(".cdp-input-d-id:checked:visible").length,$visible==$visible_checked?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1),function(){let e=t(".cdp-input-d-id").parents("tr"),i=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),i.addClass("cdp-del")}()}function S(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"give_me_current_tasks"}).done(i=>{t.isJsonString(i)&&(i=t.cdpParse(i)),"success"==i.status&&e(i.tasks)})}function C(e){let i=0,c=+new Date/1e3,o=t(".cdp-dd-item");for(let c=0;c<o.length;++c){e[t(o[c]).attr("data-token")]||t(o[c]).remove(),i++}for(task in e){let o=e[task],d=t(t(`.cdp-dd-item[data-token="${task}"]`)[0]);if(0==o.done){if(d.hasClass("cdp-dd-ud"))continue;{d.remove();let e=c-o.done>=86400;t(".cdp-dd-undone-list").append(N(o.shown,task,e,o.f)),i++}}else{if(d.hasClass("cdp-dd-d"))continue;d.remove(),t(".cdp-dd-done-list").append(D(o.data,o.shown,task,o.f)),i++}}(i>0||0==o.length)&&function(){let e=t(".cdp-dd-item").length,i=t(".cdp-dd-d").length,c=t(".cdp-dd-ud").length;i<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").show()),c<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").show()),e<=0?t(".cdp-admin-bar-noti").addClass("cdp-noti-hide"):t(".cdp-admin-bar-noti").removeClass("cdp-noti-hide"),t(".cdp-notis-counter").text(t(".cdp-bnew-notis").length)}()}function T(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let i=t($trs[e]);i.find("input").is(":checked")?i.addClass("cdp-selected-tr-opt"):i.removeClass("cdp-selected-tr-opt")}}function j(e){if(t(".cdp-modal").is(":visible"))return;let i=window;0!=t("#wpbody").scrollTop()&&(i="#wpbody");let c=t(i).scrollTop()+2;c<=0&&(c=2),"click"!=e.type&&t(".cdp-nice-select, .cdp-nice-select .list").css({transition:"all 0s"}),t(".cdp-nice-select .list").css({"margin-top":`${-c}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(p),p=setTimeout(()=>{t(".cdp-cdp-nice-select .list").css({transition:""})},100),clearTimeout(d),d=setTimeout(()=>{let c=t(i).scrollTop()+2;c<=0&&(c=2),"click"!=e.type&&t(".cdp-nice-select .list").css({transition:"all 0s !important"}),t(".cdp-nice-select .list").css({"margin-top":`${-c}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(p),p=setTimeout(()=>{t(".cdp-nice-select .list").css({transition:""})},100)},100)}function J(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),i=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||i?t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml):t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml2)}function I(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col)}t(".cdp-intro-button").on("click",function(){let e=t(".cdp-intro").height();t(".cdp-intro").css({height:e+"px"}),t(".cdp-intro").animate({opacity:0,height:0},300,function(){t(".cdp-intro").hide(10),t("#cdp-never-intro").is(":checked")&&t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"no_intro"}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroSaveIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroSaveIssue2)})}),t(".cdp-s-i-a").show(),t(".cdp-s-i-a").animate({opacity:1},300)}),t(".cdp-save-options").on("click",function(){let e=t(".cdp-data-set"),i=t(".cdp-other-inputs"),c=t(".cdp-profile-selected").val(),o=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),d=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),p={names:{prefix:o,suffix:d,format:t(".cdp-date-picked").val(),custom:t(".cdp-custom-date-picking").val(),display:t(t(`option[value="${t(".cdp-profile-selected").val()}"]`)[0]).text()}},n={afterCopy:t('.cdp-other-options[name="after_copy"]').val(),postConverter:t('.cdp-other-options[name="post_converter"]').val(),others:{}},s={},a=t(".cdp-other-roles");for(let e=0;e<a.length;e++)s[t(a[e]).attr("name")]=t(a[e]).is(":checked");n.roles=s;for(let i=0;i<e.length;i++)p[t(e[i]).attr("data-cdp-opt")]=!!t(e[i]).is(":checked");for(let e=0;e<i.length;e++)n.others[t(i[e]).attr("name")]=!!t(i[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"save_options",options:p,profile:c,entire:n}).done(e=>{"success"==e?t.cdpNotification("success",cdpJS.strSettingsSaved,2e3):"error"==e?t.cdpNotification("error",cdpJS.strSettingsSaveIssue):t.cdpNotification("success",cdpJS.strSettingsSaved,2e3)}).fail(e=>{t.cdpNotification("error",cdpJS.strSettingsSaveIssue2),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again"}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroUpdateIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroUpdateIssue2)}),t(".cdp-s-i-a").animate({opacity:0},300,function(){t(".cdp-s-i-a").hide()}),function(){t(".cdp-intro").show().css({height:""});let e=t(".cdp-intro").height();t(".cdp-intro").css({height:"0px"}),t(".cdp-intro").animate({opacity:1,height:e+"px"},300,function(){})}()}),t(".cdp-show-projects").on("click",function(){t(".cdp-projects").is(":hidden")&&t(".cdp-projects").show(300);t(".cdp-show-projects").removeClass("cdp-pointer").animate({opacity:.5},300)}),t(".cdp-project-box").on("mouseenter",function(){t(".cdp-project-box").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-project-box").on("mouseleave",function(){t(".cdp-project-box").removeClass("cdp-half-opacity")}),t(".cdp-collapsible-title").on("click",u),t(".cdp-magic-input").on("keyup change",function(){before=t(this).html(),text=t(this).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(this).html(text)}),t(".cdp-magic-input").on("focus",function(e,i){if(i)return;let c=t(this).text();" "!=c[0]&&(c="&nbsp;"+c);" "!=c[c.length-1]&&(c+="&nbsp;");t(this).html(c),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),m()},300)}),t(".cdp-support-animated").on("mouseenter",function(){t(".cdp-support-animated").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-name-clickable").on("mouseup",function(e){if(e.preventDefault(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],$box={1:".cdp-names-prefix",2:".cdp-names-real-input",3:".cdp-names-suffix"},t($box[e.which]).append($picks[t(this).attr("data-cdp-val")]),m(),e.which==e)return!1}),t(".cdp-support-animated").on("mouseleave",function(){t(".cdp-support-animated").removeClass("cdp-half-opacity")}),t(".cdp-f-einput-n").on("click","button",function(){let e=t(t(this).parents(".cdp-cf")[0]).find("input"),i=t(this).text(),c="12";"V"==i[0]?c="-51":"D"==i[0]&&(c="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning",cdpJS.strLicenseKeyEmpty);t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"i_love_squirrels",rat:e.val(),m:c}).done(i=>{t.isJsonString(i)&&(i=t.cdpParse(i)),"success"==i.status?"valid"==i.data.license?(t.cdpNotification("success",cdpJS.strLicenseActiveReloading),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==i.data.license?(t.cdpNotification("success",cdpJS.strLicenseValidPressBtn),e.prop("disabled",!0),t(this).text("Activate")):void 0!==i.data&&void 0!==i.data.msg?(t.cdpNotification("success",i.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage):"fail"==i.status?t.cdpNotification(i.fail.type,i.fail.msg):t.cdpNotification("error",cdpJS.strSendRequestIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strSendRequestIssue2)})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",m),t('.cdp-other-options[name="after_copy"]').on("change",f),t("body").on("change keyup",".cdp-input-dynamic",function(){$input=t(t(".cdp-tooltip-content, .cdp-modal-content").find(`[name="${t(this).attr("name")}"]`)),"checkbox"==t(this).attr("type")?$input.prop("checked",t(this).is(":checked")):t($input).is("select")?($input.val(t(this).val()),t($input).hasClass("cdp-modal-input-profiles-r")&&v(!1,t(this).val())):$input.val(t(this).val());if(cdp_tooltips_update_content(),t($input).is("select")&&t($input).hasClass("cdp-premium-modal-dropdown")){let e=t("div.cdp-premium-modal-dropdown"),i=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==i.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html(cdpJS.strChangeTypeOfCopy)):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){l=!0;let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&v(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{O(),setTimeout(()=>{l=!1},2e3)},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){v(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]');t("#cdp-copy-modal-global").is(":visible")&&(e=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'));e.val("custom_named"),cdp_tooltips_update_content(),v(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",x),t("body").on("change",".cdp-modal-input-times",x),t("body").on("click",".cdp-modal-times, .cdp-modal",t.cdpModalClose),t("body").on("click",".cdp-modal-open",t.cdpModal),t("body").on("change",".cdp-profile-selected",w),t("body").on("click",".cdp-show-more-d-title",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-more-d-title").is(":hidden")?(t(".cdp-more-d-title").show(300),t(this).text("(hide more options)")):(t(".cdp-more-d-title").hide(300),t(this).text("(show more options)"));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-first-chapter-cb",function(){t(".cdp-d-section").css({"max-height":"",height:""});let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,i=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,c=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+i+c>1?t(".cdp-d-option-select-parent").show(300):t(".cdp-d-option-select-parent").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("click",".cdp-d-search",function(){let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")?1:0,i=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,d=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+i+d<=0?t.cdpNotification("error",cdpJS.strCheckDuplicatesSearch):null==o?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_all_posts"}).done(i=>{t.isJsonString(i)&&(i=t.cdpParse(i)),e(i)}).fail(i=>{t.cdpNotification("error",cdpJS.strPostListIssue),console.log(i),e(!1)})}(t=>{0!=t&&n(t)}):n(o);function p(t,e){let i=parseInt(e[e.length-1]);for(let c=e.length;c>0&&(i=parseInt(e[c-1]),ext=!1,t.posts.findIndex(t=>t.ID==i)>=0?ext=!0:t.pages.findIndex(t=>t.ID==i)>=0?ext=!0:t.custom.findIndex(t=>t.ID==i)>=0?ext=!0:i=!1,1!=ext);--c);return i}function n(e){let i={posts:[],pages:[],custom:[]},d={},n={};null!=o&&(i=o);let m=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),h=!!t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked"),f=!!t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked"),g=!!t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),v=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),y=!!t('.cdp-d-option[name="cdp-d-c-excerpt"]').is(":checked"),b=!!t('.cdp-d-option[name="cdp-d-c-count"]').is(":checked"),x=t('.cdp-d-option-select[name="cdp-d-d-sel-which"]').val(),k=null,_=null;if(m+h+f>1&&(k=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(_="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==o)for(post_type in e)if("meta"!=post_type)for(post in e[post_type]){post=e[post_type][post],post.post_type=post.post_type[0].toUpperCase()+post.post_type.slice(1);let c=e.meta[post.ID]._cdp_origin,o=e.meta[post.ID]._cdp_counter,d=e.meta[post.ID]._cdp_origin_title,s=l(post.post_content),a={id:post.ID,url:post.guid,slug:post.post_name,type:post.post_type,date:post.post_date,title:post.post_title,status:post.post_status,edit:post.post_modified,excerpt:post.post_excerpt,words:u(s),origin:"object"==typeof c&&p(e,c),counter:"object"==typeof o&&o[o.length-1],origin_title:"object"==typeof d&&d[0]};if(r&&t.cdp.isPremium()&&(a.content=t.cdp.premium.prepareAdvanced(s),a.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof c){let t=parseInt(c[c.length-1]);void 0===n[t]?n[t]=1:n[t]++}i[post_type].push(a)}i=function(t){let e=JSON.parse(JSON.stringify(t));return e.posts.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.pages.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.custom.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e}(i),null==o&&(o=i);let w=[],S=[],C=!1,T=0,j=0,J=[],I=[],N=[];if("2"==k){T=1;let t=[],e=[],c=[];1==m&&(t=i.posts),1==h&&(e=i.pages),1==f&&(c=i.custom),w=(w=[].concat(t,e,c)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),S=P(w)}else{let t=[],e=[],c=[];1==m&&(T+=1),1==h&&(T+=1),1==f&&(T+=1),i.posts=i.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(t=P(i.posts)),i.pages=i.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(e=P(i.pages)),i.custom=i.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(c=P(i.custom)),S=[].concat(t,e,c)}function D(e){1==++j&&(J=e),2==j&&(I=e),3==j&&(N=e),j==T&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((i=e[post],t(`<tr data-id="${i.id}">\n        <td><input type="checkbox" id="cdp_in_${i.id}" class="cdp-input-d-id" name="${i.id}"/></td>\n        <td><label for="cdp_in_${i.id}">${i.title}</label></td>\n        <td><a href="${i.url}" target="_blank">${""!=i.slug?i.slug:i.url}</a></td>\n        <td>${i.type}</td>\n        <td>${i.date.slice(0,-8)}</td>\n        <td>${i.words}</td>\n      </tr>`)));var i;if("1"==x)for(parent in d)for(child in d[parent])t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0);else if("2"==x)for(parent in d){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...d[parent]);for(child in d[parent])d[parent][child]!=e&&t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0)}else"3"==x&&t(".cdp-input-d-id").prop("checked",!0);s=d,a=x;let o=!(g||v||y||b),p=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,n=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,l=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;o&&p+n+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),c.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html(cdpJS.strFilterNotSelected),t('[data-empty-info="true"]').addClass("cdp-customized")):c.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning",cdpJS.strNoDataForFilter),t(".cdp-delete-info").hide(300)):t(".cdp-not-yet-search").is(":visible")||(t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300),setTimeout(()=>{t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-d-section").css({"max-height":`${t(".cdp-d-section").height()}px`})},320))}(S=[].concat(J,I,N))}function P(e){let i=[],c=[],o=!(g||v||y||b);if(!e)return i;function p(t,e){if(t.id==e.origin&&0!=e.origin_title){let t=e.origin_title.replace(/\[Counter\]/g,e.counter);if(e.title==t)return!0}return!1}function n(t){for(let e=0;e<t.length;e++){let i=t[e];if(!c.includes(i.id))for(let d=o?0:e;d<t.length;d++){if(!t[d])continue;if(c.includes(t[d].id))continue;if(d==e)continue;let n=1==g&&(i.title==t[d].title||1==_&&p(i,t[d])),a=1==v&&Q(i.slug,t[d].slug)>=.85,l=!1;l=1==n||1==a?1==y&&(""==i.excerpt||i.excerpt==t[d].excerpt):1==y&&""!=i.excerpt&&i.excerpt==t[d].excerpt;let r=1==b&&i.words==t[d].words,u=1==o&&i.id==t[d].origin&&t.findIndex(e=>e.origin==t[d].id)<=-1;!n&&g||!a&&v||!l&&y||!r&&b||!u&&o||(s(i,!0,!1),s(t[d],!1,i.id))}}D(i)}function s(t,e=!1,o=!1){c.includes(t.id)||(1==e?d[t.id]=[]:0!=o&&d[o].push(t.id),c.push(t.id),i.push(t))}r&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"get_authors"}).done(i=>{if(t.isJsonString(i)&&(i=t.cdpParse(i)),"success"===i.status){let c=i.users;n(e=t.cdp.premium.advancedfilter(e,c))}else!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),n(e)}).fail(()=>{!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),n(e)}):n(e)}}function l(t){return(t=(t=(t=t.replace(/\<\!\-\-(.*?)\-\-\>/gim,"")).replace(/<[^>]*>/gim," ")).replace(/\s+/gim," ")).trim()}function u(t){return(t=t.split(" ")).length}}),t("body").on("change",".cdp-input-d-id",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),i=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(i++,t(this).parents("tr").addClass("cdp-del")):(i--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(i),i==e)t(".cdp-d-select-all").text("Deselect all"),t(".cdp-d-checkbox-all").prop("checked",!0);else{t(".cdp-d-select-all").text("Select all");let e=t(".cdp-input-d-id:visible");for(let i=0;i<e.length;++i){if(!t(e[i]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}i==e.length-1&&t(".cdp-d-checkbox-all").prop("checked",!0)}}}),t("body").on("change",".cdp-d-checkbox-all",function(e){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return e.preventDefault(),void t(this).prop("checked",!1);let i=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=t(".cdp-d-checkbox-all").is(":checked"),o=t(".cdp-input-d-id:visible"),d=0;for(let e=0;e<o.length;++e)t(o[e]).is(":checked")&&!c?d--:!t(o[e]).is(":checked")&&c&&d++,t(o[e]).prop("checked",c);let p=parseInt(t(".cdp-t-d-ct").text())+d;t(".cdp-t-d-ct").text(p),p==i?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all");let n=t(".cdp-input-d-id:visible").parents("tr"),s=t(".cdp-input-d-id:visible:checked").parents("tr");n.removeClass("cdp-del"),s.addClass("cdp-del")}),t("body").on("click",".cdp-d-select-all",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),i=parseInt(t(".cdp-t-d-ct").text()),c=!0;e==i&&(c=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",c);t(".cdp-t-d-ct").text(1==c?e:"0"),0==c?(t(".cdp-d-select-all").text("Select all"),t(".cdp-d-checkbox-all").prop("checked",!1),t(".cdp-input-d-id").parents("tr").removeClass("cdp-del")):(t(".cdp-d-checkbox-all").prop("checked",!0),t(".cdp-d-select-all").text("Deselect all"),t(".cdp-input-d-id").parents("tr").addClass("cdp-del"))}),t("body").on("click",".prev_page, .next_page, .page_link",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;t(".cdp-input-d-id:visible:checked").length==t(".cdp-input-d-id:visible").length?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1)}),t("body").on("click",".cdp-d-real-delete",function e(i=!1,d=null,p=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning",cdpJS.strCheckSteps);let n=[];if(null===d){let e=t(".cdp-input-d-id:checked");for(let i=0;i<e.length;++i)n.push(parseInt(t(e[i]).attr("name")));if(0==n.length)return void t.cdpNotification("warning",cdpJS.strSelectPostToDel)}else n=d;let l=t(".cdp-d-throttling").val(),m=t(".cdp-d-throttling-count").val(),h=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,v="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==l&&(!m||0==m||""==m))return void t.cdpNotification("warning",cdpJS.strFieldWrongCount);r&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(n.length>801&&!0!==i){let t=Math.ceil(n.length/800);for(let i=0,c=!0;i<t;++i)i==t-1&&(c=!1),e(c,n.slice(800*i,800*i+800),i);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",ids:n,throttling:l,thc:m,redi:h,thrs:f,auit:v,auitd:g}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){t("#cdp-d-table-tbody").find(".cdp-del").remove();let e=o.posts.filter(t=>!n.includes(t.id)),d=o.pages.filter(t=>!n.includes(t.id)),s=o.custom.filter(t=>!n.includes(t.id));o={posts:e,pages:d,custom:s},!0!==i&&c.refresh(),$(),0==p&&t.cdpNotification("success",cdpJS.strDeletionProcessStarted),S(C),!0!==i&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col))}else!0!==i&&t.cdpNotification("error",`${cdpJS.strDeletionTaskStart} ${"1"==l?cdpJS.strDeletionTaskEnd:""}`)}).fail(e=>{!0!==i&&t.cdpNotification("error",cdpJS.strDeletionTaskConsInfo),console.log(e)})}),t("body").on("change",".cdp-d-throttling",function(){t(".cdp-d-section").css({"max-height":"",height:""}),"1"==t(this).val()?t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").show(300):t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-throttling-count",function(){let e=parseInt(t(this).val());isNaN(e)?t(this).val(1):e>=1&&e<=10240?e>=1&&e<=1&&t(this).val(1):e<1?t(this).val(1):t(this).val(10240)}),t("body").on("change",".cdp-custom-date-picking",m),t("body").on("mouseover",".cdp-tooltip-copy",function(){if(!0===l)return;t(this).hasClass("cdptipstered")||(t(this).cdptipster({delay:100,timer:400,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"bottom",contentAsHTML:!0,content:t(".cdp-tooltip-content").html(),repositionOnScroll:!0,selfDestruction:!1,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},functionBefore:P,functionReady:M,functionAfter:A,functionFormat:H}),t(this).cdptipster("open"),t("#cdp-hideTT").length>0&&t(".cdptipster-base").hide())}),t("body").on("keyup",".cdp-d-searchbox-c",function(){if(t('[data-empty-info="true"].cdp-customized').length>0)return;let e=t(this).val();e.length>100&&(e=e.substr(0,100));if(e=(e=e.trim().replace(/\s+/gim," ").toLowerCase()).split(" "),$trs=t("#cdp-d-table-tbody").find("tr"),$trs.length<=0)return;$trs.removeAttr("data-ignore");for(let i=0;i<$trs.length;++i){$tr=t($trs[i]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let c=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))c=!0;else{if(!$url.includes(e[t])){c=!1;break}c=!0}0==c&&$tr.attr("data-ignore","true")}clearTimeout(n),n=setTimeout(()=>{c.refresh()},20)}),t("body").on("change",".cdp-data-set",T),t("#wpbody").on("scroll",j),t(window).on("scroll",j),t("body").on("click",".cdp-nice-select",j),t("body").on("click",".cdp-show-the-copies",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t("#cdp-d-table-tbody").find("tr").not('[data-empty-info="true"]').removeAttr("data-ignore"),t(".cdp-d-searchbox-c").val(""),t('[data-empty-info="true"]').addClass("cdp-customized"),c.refresh(),$(),t(".cdp-d-section").css({"max-height":"",height:""}),parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text())>0&&t(".cdp-delete-info").show(300);t(".cdp-not-yet-search").is(":visible")||(t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-per-page-select-show",function(){let e=t(this).val();c.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',J),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',J),t("body").on("click",".cdp-tab-element",function(){if(t(this).hasClass("cdp-tab-active"))return;if("true"==t(this).attr("data-disabled"))return;let e=t(t(`#${t(this).attr("data-box")}`)[0]),i=t(t(`#${t(".cdp-tab-active").attr("data-box")}`)[0]);if(!e||e.length<=0)return;t(".cdp-tab-active").removeClass("cdp-tab-active"),t(this).addClass("cdp-tab-active"),e.show(),e.css({"max-height":"",height:""});let c=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":c+"px",opacity:1},500,function(){let e=t(".cdp-d-section").height();t(".cdp-d-section").css({height:e+"px","max-height":e+"px"})}),t(".cdp-d-section").css({height:"","max-height":""}),i.css({"max-height":i.height()+"px",opacity:1}),i.animate({"max-height":"0px",opacity:0},500,function(){i.hide()}),setTimeout(()=>{i.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let o=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-o},500)}),t("body").on("click",".cdp-premium-element",function(t){t.preventDefault()}),t("body").on("click",".cdp-go-to-names-chapter",function(e){e.preventDefault(),L(),u("cdp-name-section-cnx"),setTimeout(()=>{let e=parseInt(t(window).height()/4);t("#wpbody").animate({scrollTop:t(".cdp-name-section-cnx")[0].offsetTop-e},500)},400)}),t("body").on("click",".cdp-close-chapter",I),t("body").on("click",".cdp-save-options",I),t("body").on("click",".cdp-togglable-name-b",function(){"(Name of original)"==t(".cdp-togglable-name-b").text()?(t(".cdp-togglable-name-b").text("(blank)"),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChange)):(t(".cdp-togglable-name-b").text(cdpJS.strTogglableName),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChangeBlank));m()}),t("body").on("click",".cdp_notice_perf_close",function(){setTimeout(function(){t("#cdp_notice_error_modal").remove()},700),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"hide_cron_notice"})}),t("body").on("click",".cdp-copy-notice-logs",function(){!function(e){try{const i=document.createElement("textarea");i.value=e,i.setAttribute("readonly",""),i.style.position="absolute",i.style.left="-9999px",document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i),t.cdpNotification("success",cdpJS.copySuccessfull)}catch(e){return console.log(e),t.cdpNotification("warning",cdpJS.copyFailed),!1}}(t(".cdp_notice_logs").text())}),t("#cdp_jvlabelWrap-fake").on("click",function(){if(0===t("#support-cdp").length){t(t(".cdp-container")[0]).append('<script id="support-cdp" src="//code.jivosite.com/widget/MoP3Jphzts" async><\/script>'),setTimeout(function(){t("#cdp_jvlabelWrap-fake").hide()},100);var e=!1;let i=setInterval(function(){1==e&&clearInterval(i),void 0!==window.jivo_api&&(window.jivo_api.open(),e=!0)},30)}}),t(".cdp-select").cdpNiceSelect(),t(".cdp-tooltip").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"top",contentAsHTML:!0,maxWidth:600,triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["cdptipster-noir","cdptipster-noir-customized"],repositionOnScroll:!0,functionReady:O}),t("#cdp-d-table").length>0&&(c=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">'+cdpJS.strNoItems+"</div>"})),t(".cdp-copy-button").on("mouseup",function(){g(!0)});let N=(e,i,c,o)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}" data-token="${i}">\n      <div style="display: block; width: calc(100% - 3px);">\n        <div class="cdp-dropdown-left${1==c?" cdp-red":""}">${"delete"==o?cdpJS.strDeletingPosts:cdpJS.strAutoCleanPosts}</div>\n        <div class="cdp-dropdown-right cdp-noti-kill-btn">`+cdpJS.strKill+"</div>\n      </div>\n    </a>"),D=(e,i,c,o)=>{let d="",p="";return void 0!==e&&(void 0!==e["formated-date"]&&(d=e["formated-date"]),void 0!==e.text&&(p=e.text),""!=p&&(p='data-ftext="'+p+'" '),""!=d&&(d='data-fdate="Completed at '+d+'" ')),t(`<a ${d}${p}class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==i?" cdp-bnew-notis":""}" data-token="${c}">\n      <div style="display: block; width: calc(100% - 3px);">\n        <div class="cdp-dropdown-left">${"delete"==o?cdpJS.strDeletedPosts:cdpJS.strAutoCleanedPosts}</div>\n        <div class="cdp-dropdown-right cdp-noti-hide-btn">`+cdpJS.strHide+"</div>\n      </div>\n    </a>")};function Q(t,e){let i=t,c=e;t.length<e.length&&(i=e,c=t);let o=i.length;return 0==o?1:(o-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let i=new Array;for(let c=0;c<=t.length;c++){let o=c;for(let d=0;d<=e.length;d++)if(0==c)i[d]=d;else if(d>0){let p=i[d-1];t.charAt(c-1)!=e.charAt(d-1)&&(p=Math.min(Math.min(p,o),i[d])+1),i[d-1]=o,o=p}c>0&&(i[e.length]=o)}return i[e.length]}(i,c))/parseFloat(o)}function P(i,c){L(!0),t(".cdp-tooltip-before-options").show(),t(".cdp-tooltip-full-options").hide(),$inputs=t(t(".cdp-tooltip-content").find("input, select"));for(let e=0;e<$inputs.length;++e){let i=t($inputs[e]);if("checkbox"==i.attr("type"))i.is(":checked")?i.attr("checked","checked"):i.removeAttr("checked");else if(t(i).is("select"))if("tooltip-which-profile-first"==t(i).attr("name")){let e=t(t('[name="tooltip-which-profile-first"]')[0]).val();"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val(e)},50)}else{let e=t('[name="tooltip-which-profile-second"] option:selected').map(function(t,e){return this.value}).get()[0];"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val("custom"),t('[name="tooltip-which-profile-second-modal"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e),t('[name="tooltip-which-profile-second-modal"]').val(e)},50)}else i.attr("value",i.val())}return cdp_tooltips_update_content(),e=t(c.origin).attr("data-cdp-id"),!0}function M(e,i){$parent=t(i.origin).parents(".row-actions"),$parent.css({left:0});let c=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`${cdpJS.strDefCopySettingsStart} <a href="${c}">${cdpJS.strDefCopySettingsLink}</a>.`,maxWidth:400,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-center"],repositionOnScroll:!0}),r&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),t(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),O(),cdp_tooltips_update_content())}function A(e,i){return $parent=t(i.origin).parents(".row-actions"),$parent.css({left:""}),!1}function H(){return t(t(".cdp-tooltip-content").html())}function O(){setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].reposition()},10)}function L(e=!1){if(e){let e=t.cdptipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{S(t=>{C(t)})},7e3),t(".cdp-drag-name").draggable({containment:".cdp-drags-cont",scroll:!1,helper:"clone",revert:"invalid"}),t(".cdp-names-real-input").droppable({drop:function(e,i){$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],t(this).html(`${t(this).html()}${$picks[t(i.helper).attr("data-cdp-val")]}`),m()}}),"undefined"!=typeof pagenow&&["edit-page","edit-post"].includes(pagenow)&&t(".column-cb, .check-column").find("input").prop("checked",!1),t("#titlediv").find(".inside").length>0&&t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent"),i=t("#cdp-original-post").attr("data-cdp-parent-url");t("#titlediv").find(".inside").append(t(`<div style="padding-left: 10px">${cdpJS.strPostDuplicateOf} <a href="${i}" target="_blank">${e}</a></div>`))}t(".cdp-preloader-c").length>0&&(m(),f(),w(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let i=0;i<e.length;i++){let c=t(`#${t(e[i]).attr("data-box")}`);c.show(),c.css({"max-height":"",height:""});let o=c.height();t(o).css({"max-height":o+"px",height:o+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&t(".cdp-container").length>0&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-container").length>0&&(jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300));const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc-3").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc-3").find("input, select").prop("disabled",!0)):(jQuery('.cdp-option-premium [value="3"]').prop("disabled",!0),setTimeout(()=>{jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),jQuery(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",i=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(i=parseInt(jQuery(e).attr("data-top")));jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:i,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),c=e,jQuery(c).addClass("cdp-premium-element"),jQuery(c).find("input, select").prop("disabled",!0);var c}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let i=t.originalEvent.changedTouches[0],c=document.createEvent("MouseEvents");c.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(c)}}if(t.support.touch="ontouchend"in document,t.support.touch){let i,c=t.ui.mouse.prototype,o=c._mouseInit,d=c._mouseDestroy;c._touchStart=function(t){!i&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(i=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},c._touchMove=function(t){i&&(this._touchMoved=!0,e(t,"mousemove"))},c._touchEnd=function(t){i&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),i=!1)},c._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),o.call(e)},c._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),d.call(e)}}}(jQuery);