관리-도구
편집 파일: app.js
(()=>{"use strict";var e,t={612:(e,t,n)=>{const a=jQuery;var o=n.n(a);function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=o()('<div class="notice notice-'.concat(t,' is-dismissible" />'));a.html("<p>"+e+'</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>'),o()("#pubguru-notices").append(a),n&&setTimeout((function(){a.fadeOut(500,(function(){a.remove()}))}),3e3)}function c(){var e,t,n,a,c,i,u,d,r,l,p,v,f;e=o()(".js-pubguru-connect"),t=o()(".js-pubguru-disconnect"),n=o()("#advads-m2-connect"),a=o()(".js-pubguru-connecting"),c=o()(".js-pubguru-continue"),i=a.next(".aa-spinner"),u=o()(".pubguru-connected"),d=o()(".pubguru-not-connected"),r=o()("#pubguru-warning"),l=o()(".js-pubguru-cancel"),e.on("click",".button",(function(e){e.preventDefault(),n.show()})),o()("#m2-connect-consent").on("change",(function(){var e=o()(this);c.prop("disabled",!e.is(":checked"))})),l.on("click",(function(e){e.preventDefault(),c.show(),r.addClass("hidden")})),c.on("click",(function(e){e.preventDefault(),c.hide(),r.removeClass("hidden")})),a.on("click",(function(n){n.preventDefault(),i.addClass("show");var a=o()("#m2-oci-test-domain");a=a.length?a.val():"",o().ajax({type:"POST",url:ajaxurl,data:{action:"pubguru_connect",nonce:advadsglobal.ajax_nonce,testDomain:a},dataType:"json"}).done((function(n){n.success&&(d.addClass("hidden"),e.addClass("hidden"),u.removeClass("hidden"),t.removeClass("hidden"),o()(".pg-tc-trail").toggle(!n.data.hasTrafficCop),o()(".pg-tc-install").toggle(n.data.hasTrafficCop),s(n.data.message,"success"))})).fail((function(e){s(e.responseJSON.data,"error")})).complete((function(){return i.removeClass("show")}))})),t.on("click",".button",(function(a){a.preventDefault(),n.hide(),d.removeClass("hidden"),e.removeClass("hidden"),u.addClass("hidden"),t.addClass("hidden"),o().ajax({type:"POST",url:ajaxurl,data:{action:"pubguru_disconnect",nonce:advadsglobal.ajax_nonce},dataType:"json"}).done((function(e){e.success&&s(e.data.message,"success")}))})),p=o()("#pubguru-modules"),v=o()("#pubguru-notices"),f=o()("#pubguru-header-bidding-at-body").closest("div"),p.on("input","input:checkbox",(function(){var e=o()(this),t=e.attr("name"),n=e.is(":checked");"header_bidding"===t&&f.toggle(n),o().ajax({url:p.attr("action"),method:"POST",data:{action:"pubguru_module_change",security:p.data("security"),module:t,status:n}}).done((function(e){var t=e.data.notice,n=void 0===t?"":t;v.html(""),""!==n&&v.html(n)}))})),o()(document).on("click",".js-btn-backup-adstxt",(function(){var e=o()(this),t=e.closest(".notice");e.prop("disabled",!0),e.html(e.data("loading")),o().ajax({url:p.attr("action"),method:"POST",data:{action:"pubguru_backup_ads_txt",security:e.data("security")}}).always((function(){e.prop("disabled",!1),e.html(e.data("text"))})).done((function(e){if(e.success){var n=o()(e.data);v.html(n),t.after(n),t.remove(),setTimeout((function(){n.fadeOut("slow",(function(){n.html("")}))}),4e3)}else v.html(e.data),t.after(e.data)}))})),o()("#advads-overview").on("click",".notice-dismiss",(function(e){e.preventDefault();var t=o()(this).parent();t.fadeOut(500,(function(){t.remove()}))}))}o()((function(){c()}))},576:()=>{}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,a),s.exports}a.m=t,e=[],a.O=(t,n,o,s)=>{if(!n){var c=1/0;for(r=0;r<e.length;r++){for(var[n,o,s]=e[r],i=!0,u=0;u<n.length;u++)(!1&s||c>=s)&&Object.keys(a.O).every((e=>a.O[e](n[u])))?n.splice(u--,1):(i=!1,s<c&&(c=s));if(i){e.splice(r--,1);var d=o();void 0!==d&&(t=d)}}return t}s=s||0;for(var r=e.length;r>0&&e[r-1][2]>s;r--)e[r]=e[r-1];e[r]=[n,o,s]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={845:0,196:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var o,s,[c,i,u]=n,d=0;if(c.some((t=>0!==e[t]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);if(u)var r=u(a)}for(t&&t(n);d<c.length;d++)s=c[d],a.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return a.O(r)},n=globalThis.webpackChunkadvanced_ads=globalThis.webpackChunkadvanced_ads||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.O(void 0,[196],(()=>a(612)));var o=a.O(void 0,[196],(()=>a(576)));o=a.O(o)})();