var devowlWp_realUtils;(()=>{"use strict";var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{RatingPointer:()=>d,isRatable:()=>n});const s=devowlWp_utils,o=()=>window[s.BaseOptions.getPureSlug("real-utils",!0)].others;function n(t){return o().canBeRated.indexOf(t)>-1}const r=jQuery;var i=t.n(r);let a;const l=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return(a||(a=(0,s.createLocalizationFactory)("devowl-wp-real-utils"))).__(...e)};let u;const c={path:"/rating/:slug/dismiss",method:s.RouteHttpVerb.DELETE};class d{constructor(t,e,s,o){this.slug=t,this.$handler=e,this.description=s,this.className=o,this.init()}close(t,e){if(t.preventDefault(),this.$handler.pointer("close"),this.$handler.pointer("destroy"),e){const t=o().rateLinks[this.slug];window.open(t,"_blank")}!function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];(u||(u=(0,s.createRequestFactory)(window[s.BaseOptions.getPureSlug("real-utils",!0)]))).request(...e)}({location:c,params:{slug:this.slug,force:e}})}buttons(){const t=i()(`<a class="button" href="#">${l("Not now")}</a>`).click((t=>{this.close(t,!1)})),e=i()(`<a class="button button-primary" href="#">${l("Give it a rating")}</a>`).click((t=>{this.close(t,!0)}));return i()('<div class="real-utils-pointer-buttons" />').append(e,t)}init(){const{canBeRated:t}=o();t.splice(t.indexOf(this.slug),1);const e=l("Do us a favor!"),s=this.description||l("Awesome, you have just used a functionality of <strong>%s</strong>. Do you like it? Please do us a favor and rate us!",o().names[this.slug]);this.$handler.pointer({pointerClass:`wp-pointer real-utils-rate-pointer ${this.className?this.className:""}`,content:`<h3>${e}</h3><p>${s}</p>`,buttons:this.buttons.bind(this)}).pointer("open")}}devowlWp_realUtils=e})();
//# sourceMappingURL=https://sourcemap.devowl.io/real-category-library/4.2.58/5f642bb013cd2b3d2e5d341883c0beef/helper.js.map
