Plugin Directory

Changeset 2717061


Ignore:
Timestamp:
05/02/2022 09:18:38 AM (3 years ago)
Author:
mahfuz01
Message:

Tagging version trunk

Location:
product-quotation-for-woocommerce/trunk
Files:
1 added
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified product-quotation-for-woocommerce/trunk/README.txt

    r2716683 r2717061  
    44Requires at least: 4.0
    55Tested up to: 5.9
    6 Stable tag: 2.0.0
     6Stable tag: 2.0.1
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6868== Changelog ==
    6969
     70= 2.0.1- 02-05-2022 =
     71* ADDED Feature: Privacy policy field on the Quotation Cart form
     72* Fixed: minor bugs
     73
    7074= 2.0.0- 30-04-2022 =
    7175* ADDED: New settings panel.
  • TabularUnified product-quotation-for-woocommerce/trunk/assets/css/pqfw-frontend.css

    r2716683 r2717061  
    139139
    140140a.pqfw-view-quotation-cart {font-size: 14px;display: block;text-decoration: underline;}
     141
     142li.pqfw-privacy-policy {
     143    margin-left: 0;
     144    margin-bottom: 10px;
     145    padding: 0 10px;
     146}
     147
     148.pqfw-privacy-policy-inner p {
     149    margin: 0 0 10px;
     150}
     151
     152.pqfw-privacy-policy-inner {
     153    font-size: 16px;
     154}
     155
     156.pqfw-privacy-policy-inner label {
     157    margin-bottom: 0 !important;
     158}
  • TabularUnified product-quotation-for-woocommerce/trunk/assets/js/pqfw-frontend.js

    r2716683 r2717061  
    149149                    }
    150150                });
     151
     152                if ( ! errors ) {
     153                    var privacyPolicy = $( '#pqfw_privacy_policy_checkbox' );
     154                    if ( privacyPolicy.length && ! privacyPolicy.prop('checked') ) {
     155                        errors = true;
     156                        privacyPolicy.parents( '.pqfw-privacy-policy' ).addClass('hasError');
     157                        alert( 'Please accept privacy policy If you want to proceed.' );
     158                    }
     159                }
    151160
    152161                if ( ! errors ) {
  • TabularUnified product-quotation-for-woocommerce/trunk/build/index.asset.php

    r2716683 r2717061  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-element'), 'version' => '01499f70d3e15f9bc3a50e5762f75527');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-element'), 'version' => '11773b60f52872ed16ec7b3f3137b87b');
  • TabularUnified product-quotation-for-woocommerce/trunk/build/index.js

    r2716683 r2717061  
    1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var t;e.g.importScripts&&(t=e.g.location+"");var n=e.g.document;if(!t&&n&&(n.currentScript&&(t=n.currentScript.src),!t)){var o=n.getElementsByTagName("script");o.length&&(t=o[o.length-1].src)}if(!t)throw new O("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t}();var t=window.wp.element,n=window.React,o=e.n(n),a=window.ReactDOM,r=e.n(a);function s(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=s(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function l(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}function u(e){return"number"==typeof e&&!isNaN(e)}function m(e){return"boolean"==typeof e}function d(e){return"string"==typeof e}function g(e){return"function"==typeof e}function p(e){return d(e)||g(e)?e:null}function f(e){return 0===e||e}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function E(e){return(0,n.isValidElement)(e)||d(e)||g(e)||u(e)}var h={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},b={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function w(e){var t=e.enter,a=e.exit,r=e.appendPosition,s=void 0!==r&&r,l=e.collapse,i=void 0===l||l,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,l=e.position,c=e.preventExitTransition,m=e.done,d=e.nodeRef,g=e.isIn,p=s?t+"--"+l:t,f=s?a+"--"+l:a,v=(0,n.useRef)(),E=(0,n.useRef)(0);function h(e){if(e.target===d.current){var t=d.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",h),t.removeEventListener("animationcancel",h),0===E.current&&(t.className=v.current)}}function b(){var e=d.current;e.removeEventListener("animationend",b),i?function(e,t,n){void 0===n&&(n=300);var o=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=o+"px",a.transition="all "+n+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)}))}))}(e,m,u):m()}return(0,n.useLayoutEffect)((function(){var e;e=d.current,v.current=e.className,e.className+=" "+p,e.addEventListener("animationend",h),e.addEventListener("animationcancel",h)}),[]),(0,n.useEffect)((function(){g||(c?b():function(){E.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",b)}())}),[g]),o().createElement(o().Fragment,null,r)}}var y={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];this.list.has(e)&&this.list.get(e).forEach((function(n){var a=setTimeout((function(){n.apply(void 0,o)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(a)}))}},_=["delay","staleId"];function C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function L(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function M(e){var t=e.closeToast,o=e.theme,a=e.ariaLabel,r=void 0===a?"close":a;return(0,n.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+o,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":r},(0,n.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,n.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function N(e){var t,o,a=e.delay,r=e.isRunning,s=e.closeToast,c=e.type,u=e.hide,m=e.className,d=e.style,p=e.controlledProgress,f=e.progress,v=e.rtl,E=e.isIn,h=e.theme,b=i({},d,{animationDuration:a+"ms",animationPlayState:r?"running":"paused",opacity:u?0:1});p&&(b.transform="scaleX("+f+")");var w=l("Toastify__progress-bar",p?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+h,"Toastify__progress-bar--"+c,((t={})["Toastify__progress-bar--rtl"]=v,t)),y=g(m)?m({rtl:v,type:c,defaultClassName:w}):l(w,m),_=((o={})[p&&f>=1?"onTransitionEnd":"onAnimationEnd"]=p&&f<1?null:function(){E&&s()},o);return(0,n.createElement)("div",Object.assign({role:"progressbar","aria-hidden":u?"true":"false","aria-label":"notification timer",className:y,style:b},_))}N.defaultProps={type:b.DEFAULT,hide:!1};var T=["theme","type"],S=function(e){var t=e.theme,o=e.type,a=c(e,T);return(0,n.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+o+")"},a))};function O(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}var D={info:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:O,spinner:function(){return(0,n.createElement)("div",{className:"Toastify__spinner"})}},j=function(e){var t,o,a=function(e){var t=(0,n.useState)(!1),o=t[0],a=t[1],r=(0,n.useState)(!1),s=r[0],l=r[1],i=(0,n.useRef)(null),c=(0,n.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=(0,n.useRef)(e),m=e.autoClose,d=e.pauseOnHover,p=e.closeToast,f=e.onClick,v=e.closeOnClick;function E(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",y),document.addEventListener("mouseup",_),document.addEventListener("touchmove",y),document.addEventListener("touchend",_);var n=i.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=C(t.nativeEvent),c.y=L(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(){if(c.boundingRect){var t=c.boundingRect,n=t.top,o=t.bottom,a=t.left,r=t.right;e.pauseOnHover&&c.x>=a&&c.x<=r&&c.y>=n&&c.y<=o?w():b()}}function b(){a(!0)}function w(){a(!1)}function y(t){var n=i.current;c.canDrag&&n&&(c.didMove=!0,o&&w(),c.x=C(t),c.y=L(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",n.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function _(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",_);var t=i.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return l(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,n.useEffect)((function(){u.current=e})),(0,n.useEffect)((function(){return i.current&&i.current.addEventListener("d",b,{once:!0}),g(e.onOpen)&&e.onOpen((0,n.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;g(e.onClose)&&e.onClose((0,n.isValidElement)(e.children)&&e.children.props)}}),[]),(0,n.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||w(),window.addEventListener("focus",b),window.addEventListener("blur",w)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",w))}}),[e.pauseOnFocusLoss]);var M={onMouseDown:E,onTouchStart:E,onMouseUp:h,onTouchEnd:h};return m&&d&&(M.onMouseEnter=w,M.onMouseLeave=b),v&&(M.onClick=function(e){f&&f(e),c.canCloseOnClick&&p()}),{playToast:b,pauseToast:w,isRunning:o,preventExitTransition:s,toastRef:i,eventHandlers:M}}(e),r=a.isRunning,s=a.preventExitTransition,i=a.toastRef,c=a.eventHandlers,u=e.closeButton,m=e.children,p=e.autoClose,f=e.onClick,v=e.type,E=e.hideProgressBar,h=e.closeToast,b=e.transition,w=e.position,y=e.className,_=e.style,M=e.bodyClassName,T=e.bodyStyle,S=e.progressClassName,O=e.progressStyle,j=e.updateId,k=e.role,I=e.progress,A=e.rtl,x=e.toastId,q=e.deleteToast,R=e.isIn,z=e.isLoading,P=e.icon,B=e.theme,F=l("Toastify__toast","Toastify__toast-theme--"+B,"Toastify__toast--"+v,((t={})["Toastify__toast--rtl"]=A,t)),Q=g(y)?y({rtl:A,position:w,type:v,defaultClassName:F}):l(F,y),Y=!!I,H=D[v],U={theme:B,type:v},G=H&&H(U);return!1===P?G=void 0:g(P)?G=P(U):(0,n.isValidElement)(P)?G=(0,n.cloneElement)(P,U):d(P)?G=P:z&&(G=D.spinner()),(0,n.createElement)(b,{isIn:R,done:q,position:w,preventExitTransition:s,nodeRef:i},(0,n.createElement)("div",Object.assign({id:x,onClick:f,className:Q},c,{style:_,ref:i}),(0,n.createElement)("div",Object.assign({},R&&{role:k},{className:g(M)?M({type:v}):l("Toastify__toast-body",M),style:T}),G&&(0,n.createElement)("div",{className:l("Toastify__toast-icon",(o={},o["Toastify--animate-icon Toastify__zoom-enter"]=!z,o))},G),(0,n.createElement)("div",null,m)),function(e){if(e){var t={closeToast:h,type:v,theme:B};return g(e)?e(t):(0,n.isValidElement)(e)?(0,n.cloneElement)(e,t):void 0}}(u),(p||Y)&&(0,n.createElement)(N,Object.assign({},j&&!Y?{key:"pb-"+j}:{},{rtl:A,theme:B,delay:p,isRunning:r,isIn:R,closeToast:h,hide:E,type:v,style:O,className:S,controlledProgress:Y,progress:I}))))},k=function(e){var t=function(e){var t=(0,n.useReducer)((function(e){return e+1}),0)[1],o=(0,n.useState)([]),a=o[0],r=o[1],s=(0,n.useRef)(null),l=(0,n.useRef)(new Map).current,i=function(e){return-1!==a.indexOf(e)},v=(0,n.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:function(e){return l.get(e)}}).current;function h(e){var t=e.containerId;!v.props.limit||t&&v.containerId!==t||(v.count-=v.queue.length,v.queue=[])}function b(e){r((function(t){return f(e)?t.filter((function(t){return t!==e})):[]}))}function w(){var e=v.queue.shift();L(e.toastContent,e.toastProps,e.staleId)}function C(e,o){var a=o.delay,r=o.staleId,i=c(o,_);if(E(e)&&!function(e){return!s.current||v.props.enableMultiContainer&&e.containerId!==v.props.containerId||l.has(e.toastId)&&null==e.updateId}(i)){var h=i.toastId,y=i.updateId,C=i.data,M=v.props,N=function(){return b(h)},T=null==y;T&&v.count++;var S,O,D={toastId:h,updateId:y,isLoading:i.isLoading,theme:i.theme||M.theme,icon:null!=i.icon?i.icon:M.icon,isIn:!1,key:i.key||v.toastKey++,type:i.type,closeToast:N,closeButton:i.closeButton,rtl:M.rtl,position:i.position||M.position,transition:i.transition||M.transition,className:p(i.className||M.toastClassName),bodyClassName:p(i.bodyClassName||M.bodyClassName),style:i.style||M.toastStyle,bodyStyle:i.bodyStyle||M.bodyStyle,onClick:i.onClick||M.onClick,pauseOnHover:m(i.pauseOnHover)?i.pauseOnHover:M.pauseOnHover,pauseOnFocusLoss:m(i.pauseOnFocusLoss)?i.pauseOnFocusLoss:M.pauseOnFocusLoss,draggable:m(i.draggable)?i.draggable:M.draggable,draggablePercent:i.draggablePercent||M.draggablePercent,draggableDirection:i.draggableDirection||M.draggableDirection,closeOnClick:m(i.closeOnClick)?i.closeOnClick:M.closeOnClick,progressClassName:p(i.progressClassName||M.progressClassName),progressStyle:i.progressStyle||M.progressStyle,autoClose:!i.isLoading&&(S=i.autoClose,O=M.autoClose,!1===S||u(S)&&S>0?S:O),hideProgressBar:m(i.hideProgressBar)?i.hideProgressBar:M.hideProgressBar,progress:i.progress,role:i.role||M.role,deleteToast:function(){l.delete(h);var e=v.queue.length;if(v.count=f(h)?v.count-1:v.count-v.displayedToast,v.count<0&&(v.count=0),e>0){var n=f(h)?1:v.props.limit;if(1===e||1===n)v.displayedToast++,w();else{var o=n>e?e:n;v.displayedToast=o;for(var a=0;a<o;a++)w()}}else t()}};g(i.onOpen)&&(D.onOpen=i.onOpen),g(i.onClose)&&(D.onClose=i.onClose),D.closeButton=M.closeButton,!1===i.closeButton||E(i.closeButton)?D.closeButton=i.closeButton:!0===i.closeButton&&(D.closeButton=!E(M.closeButton)||M.closeButton);var j=e;(0,n.isValidElement)(e)&&!d(e.type)?j=(0,n.cloneElement)(e,{closeToast:N,toastProps:D,data:C}):g(e)&&(j=e({closeToast:N,toastProps:D,data:C})),M.limit&&M.limit>0&&v.count>M.limit&&T?v.queue.push({toastContent:j,toastProps:D,staleId:r}):u(a)&&a>0?setTimeout((function(){L(j,D,r)}),a):L(j,D,r)}}function L(e,t,n){var o=t.toastId;n&&l.delete(n),l.set(o,{content:e,props:t}),r((function(e){return[].concat(e,[o]).filter((function(e){return e!==n}))}))}return(0,n.useEffect)((function(){return v.containerId=e.containerId,y.cancelEmit(3).on(0,C).on(1,(function(e){return s.current&&b(e)})).on(5,h).emit(2,v),function(){return y.emit(3,v)}}),[]),(0,n.useEffect)((function(){v.isToastActive=i,v.displayedToast=a.length,y.emit(4,a.length,e.containerId)}),[a]),(0,n.useEffect)((function(){v.props=e})),{getToastToRender:function(t){var n=new Map,o=Array.from(l.values());return e.newestOnTop&&o.reverse(),o.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:i}}(e),o=t.getToastToRender,a=t.containerRef,r=t.isToastActive,s=e.className,v=e.style,h=e.rtl,b=e.containerId;function w(e){var t,n=l("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=h,t));return g(s)?s({position:e,rtl:h,defaultClassName:n}):l(n,p(s))}return(0,n.createElement)("div",{ref:a,className:"Toastify",id:b},o((function(e,t){var o=t.length?i({},v):i({},v,{pointerEvents:"none"});return(0,n.createElement)("div",{className:w(e),style:o,key:"container-"+e},t.map((function(e){var t=e.content,o=e.props;return(0,n.createElement)(j,Object.assign({},o,{isIn:r(o.toastId),key:"toast-"+o.key,closeButton:!0===o.closeButton?M:o.closeButton}),t)})))})))};k.defaultProps={position:h.TOP_RIGHT,transition:w({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:M,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var I,A,x,q=new Map,R=[],z=!1;function P(){return Math.random().toString(36).substring(2,9)}function B(e){return e&&(d(e.toastId)||u(e.toastId))?e.toastId:P()}function F(e,t){return q.size>0?y.emit(0,e,t):(R.push({content:e,options:t}),z&&v&&(z=!1,A=document.createElement("div"),document.body.appendChild(A),(0,a.render)((0,n.createElement)(k,Object.assign({},x)),A))),t.toastId}function Q(e,t){return i({},t,{type:t&&t.type||e,toastId:B(t)})}function Y(e){return function(t,n){return F(t,Q(e,n))}}function H(e,t){return F(e,Q(b.DEFAULT,t))}H.loading=function(e,t){return F(e,Q(b.DEFAULT,i({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},H.promise=function(e,t,n){var o,a=t.pending,r=t.error,s=t.success;a&&(o=d(a)?H.loading(a,n):H.loading(a.render,i({},n,a)));var l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=function(e,t,a){if(null!=t){var r=i({type:e},l,n,{data:a}),s=d(t)?{render:t}:t;return o?H.update(o,i({},r,s)):H(s.render,i({},r,s)),a}H.dismiss(o)},u=g(e)?e():e;return u.then((function(e){return c("success",s,e)})).catch((function(e){return c("error",r,e)})),u},H.success=Y(b.SUCCESS),H.info=Y(b.INFO),H.error=Y(b.ERROR),H.warning=Y(b.WARNING),H.warn=H.warning,H.dark=function(e,t){return F(e,Q(b.DEFAULT,i({theme:"dark"},t)))},H.dismiss=function(e){return y.emit(1,e)},H.clearWaitingQueue=function(e){return void 0===e&&(e={}),y.emit(5,e)},H.isActive=function(e){var t=!1;return q.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},H.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,o=q.get(n||I);return o?o.getToast(e):null}(e,t);if(n){var o=n.props,a=n.content,r=i({},o,t,{toastId:t.toastId||e,updateId:P()});r.toastId!==e&&(r.staleId=e);var s=r.render||a;delete r.render,F(s,r)}}),0)},H.done=function(e){H.update(e,{progress:1})},H.onChange=function(e){return g(e)&&y.on(4,e),function(){g(e)&&y.off(4,e)}},H.configure=function(e){void 0===e&&(e={}),z=!0,x=e},H.POSITION=h,H.TYPE=b,y.on(2,(function(e){I=e.containerId||e,q.set(I,e),R.forEach((function(e){y.emit(0,e.content,e.options)})),R=[]})).on(3,(function(e){q.delete(e.containerId||e),0===q.size&&y.off(0).off(1).off(5),v&&A&&document.body.removeChild(A)}));var U=window.wp.components,G=e.p+"images/reset.3bcbcd44.png",V=e=>{let{settings:o,setSettings:a,saveSettings:r}=e;const[s,l]=(0,n.useState)(!1),[i,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(!1),[d,g]=(0,n.useState)(!1),p=(0,n.useRef)(null),f=(0,n.useRef)(null),v=(0,n.useRef)(null),E=(0,n.useRef)(null),h=e=>{p.current&&!p.current.contains(e.target)&&l(!1),f.current&&!f.current.contains(e.target)&&c(!1),v.current&&!v.current.contains(e.target)&&m(!1),E.current&&!E.current.contains(e.target)&&g(!1)};return(0,n.useEffect)((()=>(document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)})),[h]),console.log("settings",o),(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Button Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own button settings and styles that will ensure the design compatibility with your active theme, as wel as functionality"),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_shop_page_button,onChange:e=>a({...o,pqfw_shop_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on category/shop/loop page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_product_page_button,onChange:e=>a({...o,pqfw_product_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Text"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",className:"regular-text",value:null==o?void 0:o.button_text,onChange:e=>a({...o,button_text:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Loop"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position,hideLabelFromVision:!0,options:[{label:"At product end",value:"woocommerce_after_shop_loop_item"},{label:"At product start",value:"woocommerce_before_shop_loop_item"},{label:"Before product title",value:"woocommerce_before_shop_loop_item_title"},{label:"After product title",value:"woocommerce_after_shop_loop_item_title"}],onChange:e=>a({...o,button_position:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Single Product"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position_single_product,hideLabelFromVision:!0,options:[{label:"Before add to cart button",value:"woocommerce_after_add_to_cart_quantity"},{label:"After add to cart button",value:"woocommerce_after_add_to_cart_button"},{label:"End of product",value:"woocommerce_share"}],onChange:e=>a({...o,button_position_single_product:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.TabPanel,{className:"my-tab-panel",activeClass:"active-tab",initialTabName:"normal",tabs:[{name:"normal",title:"Normal",className:"normal-color"},{name:"hover",title:"Hover",className:"hover-color"}]},(e=>(0,t.createElement)("div",{className:"pqfw-color-picker-container"},"hover"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_color,onClick:()=>l(!s)}),s&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:p},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_color,onChange:e=>a({...o,button_hover_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_bg_color,onClick:()=>c(!i)}),i&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:f},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_bg_color,onChange:e=>a({...o,button_hover_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_bg_color})),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_hover_color:"",button_hover_bg_color:""})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset")),"normal"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_color,onClick:()=>m(!u)}),u&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:v},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_color,onChange:e=>a({...o,button_normal_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_bg_color,onClick:()=>g(!d)}),d&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:E},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_bg_color,onChange:e=>a({...o,button_normal_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_bg_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Font Size"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_font_size,onChange:e=>a({...o,button_font_size:e}),max:50}),(0,t.createElement)("p",{className:"color-picker-label"},"Width"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_width,onChange:e=>a({...o,button_width:e}),max:300}),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_normal_color:"",button_normal_bg_color:"",button_font_size:0,button_width:0})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset"))))))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:r},"Save Changes")))},W=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Email Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Receive Email"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_send_mail,onChange:e=>o({...n,pqfw_form_send_mail:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Recipient"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",value:null==n?void 0:n.recipient,className:"regular-text",onChange:e=>o({...n,recipient:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Add recipient email ID that will receive each quotation on the email."))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))},Z=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Form Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own form styles that will ensure the design compatibility with your active theme."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Default Form Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_default_design,onChange:e=>o({...n,pqfw_form_default_design:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use default form style that comes with this plugin or you can clean design your own form styles rather not overriding each css class."))),null!=n&&n.pqfw_form_default_design?(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Floated Form"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_floating_form,onChange:e=>o({...n,pqfw_floating_form:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use floated or stacked styled form on the ",(0,t.createElement)("strong",null,"Quotations Cart")," Page."))):"")),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))},X=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"General Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,'Hide "Add to cart" Button'),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.hide_add_to_cart_button,onChange:e=>o({...n,hide_add_to_cart_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Hide product prices"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.hide_product_prices,onChange:e=>o({...n,hide_product_prices:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))};const J=Object.assign({},window.PQFW_OBJECT);delete window.PQFW_OBJECT.ajaxurl,delete window.PQFW_OBJECT.nonce,delete window.PQFW_OBJECT.settings;var $=e.p+"images/button.3f1daf8f.png",K=e.p+"images/form.3bf7f595.png",ee=e.p+"images/email.5183ffb9.png";r().render((0,t.createElement)((()=>{const e=localStorage.getItem("pqfw_settings_active_tab")||"button",[o,a]=(0,n.useState)(e),[r,s]=(0,n.useState)(J.settings),l=e=>{localStorage.setItem("pqfw_settings_active_tab",e)},i=e=>{let t=e.target;t.classList.add("updating-message"),wp.ajax.send("pqrf_save_settings",{data:{_wpnonce:J.nonce,settings:JSON.stringify(r)},success:function(e){H.success(e.message)},error:function(e){H.error(e.message)},complete:function(){t.classList.remove("updating-message")}})};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h1",{className:"pqfw-app-title"},"Settings"),(0,t.createElement)("div",{className:"pqfw-settings-tabs-warp"},(0,t.createElement)(k,{position:"top-right",autoClose:2e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,pauseOnHover:!0,theme:"colored"}),(0,t.createElement)("div",{id:"pqfw-settings-tabs"},(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("general"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("general"),l("general")}},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMS4yNCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiM5YjU5YjZ9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkdlbmVyYWwgU2V0dGluZzwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48cGF0aCBkPSJNMTkuNTksMTMuNThsLTEuODctMS40NGEuMjcuMjcsMCwwLDEtLjEzLS4zLDYuNTMsNi41MywwLDAsMCwwLTIuNDIuMjguMjgsMCwwLDEsLjE0LS4zM2wxLjg3LTEuNDRhLjg0Ljg0LDAsMCwwLC4yNC0xLjJsLTEuMy0yLjI2YS44Ni44NiwwLDAsMC0xLjE4LS40bC0yLjIuOTFhLjMuMywwLDAsMS0uMzYtLjA1LDcuMDYsNy4wNiwwLDAsMC0yLTEuMTguMzIuMzIsMCwwLDEtLjI0LS4zYy0uMS0uNzgtLjIxLTEuNTYtLjMtMi4zNEEuODUuODUsMCwwLDAsMTEuMzUsMFExMCwwLDguNjQsMGEuODUuODUsMCwwLDAtLjg4LjgzYy0uMS43OC0uMjEsMS41Ni0uMzEsMi4zNGEuMy4zLDAsMCwxLS4yMi4yOSw3LDcsMCwwLDAtMiwxLjE3LjMyLjMyLDAsMCwxLS4zOC4wNkwyLjY2LDMuOGEuODYuODYsMCwwLDAtMS4yMS40MkwuMiw2LjM2QS44OS44OSwwLDAsMCwuNDcsNy43MkwyLjI5LDkuMTFhLjI1LjI1LDAsMCwxLC4xMi4yOSw2LjQ1LDYuNDUsMCwwLDAsMCwyLjQuMzQuMzQsMCwwLDEtLjE3LjM4Yy0uNi40NS0xLjIuOTEtMS43OSwxLjM4YS44Ny44NywwLDAsMC0uMjYsMS4zTDEuNDUsMTdhLjg3Ljg3LDAsMCwwLDEuMi40MWwyLjE4LS45YS4zMi4zMiwwLDAsMSwuMzguMDUsNyw3LDAsMCwwLDIsMS4xNy4zNC4zNCwwLDAsMSwuMjUuMzFjLjEuNzcuMiwxLjU0LjMsMi4zMWEuODYuODYsMCwwLDAsLjkyLjg0aDIuNjZhLjg1Ljg1LDAsMCwwLC45LS44NGMuMS0uNzguMjEtMS41Ni4zMS0yLjM0YS4zLjMsMCwwLDEsLjIyLS4yOCw3LDcsMCwwLDAsMi0xLjE4LjMyLjMyLDAsMCwxLC4zOC0uMDVsMi4yLjkxYTIuMTgsMi4xOCwwLDAsMCwuMzEuMDkuODguODgsMCwwLDAsLjg0LS40NmwxLjMtMi4yNkEuODUuODUsMCwwLDAsMTkuNTksMTMuNThabS02LjE2LTIuODNhMy40NCwzLjQ0LDAsMCwxLTYuODgtLjEzLDMuNDQsMy40NCwwLDEsMSw2Ljg4LjEzWiIgY2xhc3M9ImNscy0xIi8+PC9nPjwvZz48L3N2Zz4="})," General Settings"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("button"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("button"),l("button")}},(0,t.createElement)("img",{src:$})," Button"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("form"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("form"),l("form")}},(0,t.createElement)("img",{src:K})," Form"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("email"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("email"),l("email")}},(0,t.createElement)("img",{src:ee})," Email")),(0,t.createElement)("div",{id:"pqfw-settings-tabs-contents"},"general"===o&&(0,t.createElement)(X,{settings:r,setSettings:s,saveSettings:i}),"button"===o&&(0,t.createElement)(V,{settings:r,setSettings:s,saveSettings:i}),"email"===o&&(0,t.createElement)(W,{settings:r,setSettings:s,saveSettings:i}),"form"===o&&(0,t.createElement)(Z,{settings:r,setSettings:s,saveSettings:i}))))}),null),document.getElementById("pqfw-app"))}();
     1!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var t;e.g.importScripts&&(t=e.g.location+"");var n=e.g.document;if(!t&&n&&(n.currentScript&&(t=n.currentScript.src),!t)){var o=n.getElementsByTagName("script");o.length&&(t=o[o.length-1].src)}if(!t)throw new O("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t}();var t=window.wp.element,n=window.React,o=e.n(n),a=window.ReactDOM,r=e.n(a);function s(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=s(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function l(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}function u(e){return"number"==typeof e&&!isNaN(e)}function m(e){return"boolean"==typeof e}function d(e){return"string"==typeof e}function p(e){return"function"==typeof e}function g(e){return d(e)||p(e)?e:null}function f(e){return 0===e||e}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function E(e){return(0,n.isValidElement)(e)||d(e)||p(e)||u(e)}var h={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},b={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function y(e){var t=e.enter,a=e.exit,r=e.appendPosition,s=void 0!==r&&r,l=e.collapse,i=void 0===l||l,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,l=e.position,c=e.preventExitTransition,m=e.done,d=e.nodeRef,p=e.isIn,g=s?t+"--"+l:t,f=s?a+"--"+l:a,v=(0,n.useRef)(),E=(0,n.useRef)(0);function h(e){if(e.target===d.current){var t=d.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",h),t.removeEventListener("animationcancel",h),0===E.current&&(t.className=v.current)}}function b(){var e=d.current;e.removeEventListener("animationend",b),i?function(e,t,n){void 0===n&&(n=300);var o=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=o+"px",a.transition="all "+n+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)}))}))}(e,m,u):m()}return(0,n.useLayoutEffect)((function(){var e;e=d.current,v.current=e.className,e.className+=" "+g,e.addEventListener("animationend",h),e.addEventListener("animationcancel",h)}),[]),(0,n.useEffect)((function(){p||(c?b():function(){E.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",b)}())}),[p]),o().createElement(o().Fragment,null,r)}}var w={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];this.list.has(e)&&this.list.get(e).forEach((function(n){var a=setTimeout((function(){n.apply(void 0,o)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(a)}))}},_=["delay","staleId"];function C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function L(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function M(e){var t=e.closeToast,o=e.theme,a=e.ariaLabel,r=void 0===a?"close":a;return(0,n.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+o,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":r},(0,n.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,n.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function N(e){var t,o,a=e.delay,r=e.isRunning,s=e.closeToast,c=e.type,u=e.hide,m=e.className,d=e.style,g=e.controlledProgress,f=e.progress,v=e.rtl,E=e.isIn,h=e.theme,b=i({},d,{animationDuration:a+"ms",animationPlayState:r?"running":"paused",opacity:u?0:1});g&&(b.transform="scaleX("+f+")");var y=l("Toastify__progress-bar",g?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+h,"Toastify__progress-bar--"+c,((t={})["Toastify__progress-bar--rtl"]=v,t)),w=p(m)?m({rtl:v,type:c,defaultClassName:y}):l(y,m),_=((o={})[g&&f>=1?"onTransitionEnd":"onAnimationEnd"]=g&&f<1?null:function(){E&&s()},o);return(0,n.createElement)("div",Object.assign({role:"progressbar","aria-hidden":u?"true":"false","aria-label":"notification timer",className:w,style:b},_))}N.defaultProps={type:b.DEFAULT,hide:!1};var T=["theme","type"],S=function(e){var t=e.theme,o=e.type,a=c(e,T);return(0,n.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+o+")"},a))};function O(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}var D={info:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:O,spinner:function(){return(0,n.createElement)("div",{className:"Toastify__spinner"})}},k=function(e){var t,o,a=function(e){var t=(0,n.useState)(!1),o=t[0],a=t[1],r=(0,n.useState)(!1),s=r[0],l=r[1],i=(0,n.useRef)(null),c=(0,n.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=(0,n.useRef)(e),m=e.autoClose,d=e.pauseOnHover,g=e.closeToast,f=e.onClick,v=e.closeOnClick;function E(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",w),document.addEventListener("mouseup",_),document.addEventListener("touchmove",w),document.addEventListener("touchend",_);var n=i.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=C(t.nativeEvent),c.y=L(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(){if(c.boundingRect){var t=c.boundingRect,n=t.top,o=t.bottom,a=t.left,r=t.right;e.pauseOnHover&&c.x>=a&&c.x<=r&&c.y>=n&&c.y<=o?y():b()}}function b(){a(!0)}function y(){a(!1)}function w(t){var n=i.current;c.canDrag&&n&&(c.didMove=!0,o&&y(),c.x=C(t),c.y=L(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",n.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function _(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",_);var t=i.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return l(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,n.useEffect)((function(){u.current=e})),(0,n.useEffect)((function(){return i.current&&i.current.addEventListener("d",b,{once:!0}),p(e.onOpen)&&e.onOpen((0,n.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;p(e.onClose)&&e.onClose((0,n.isValidElement)(e.children)&&e.children.props)}}),[]),(0,n.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",b),window.addEventListener("blur",y)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",y))}}),[e.pauseOnFocusLoss]);var M={onMouseDown:E,onTouchStart:E,onMouseUp:h,onTouchEnd:h};return m&&d&&(M.onMouseEnter=y,M.onMouseLeave=b),v&&(M.onClick=function(e){f&&f(e),c.canCloseOnClick&&g()}),{playToast:b,pauseToast:y,isRunning:o,preventExitTransition:s,toastRef:i,eventHandlers:M}}(e),r=a.isRunning,s=a.preventExitTransition,i=a.toastRef,c=a.eventHandlers,u=e.closeButton,m=e.children,g=e.autoClose,f=e.onClick,v=e.type,E=e.hideProgressBar,h=e.closeToast,b=e.transition,y=e.position,w=e.className,_=e.style,M=e.bodyClassName,T=e.bodyStyle,S=e.progressClassName,O=e.progressStyle,k=e.updateId,j=e.role,I=e.progress,x=e.rtl,A=e.toastId,P=e.deleteToast,q=e.isIn,R=e.isLoading,z=e.icon,F=e.theme,B=l("Toastify__toast","Toastify__toast-theme--"+F,"Toastify__toast--"+v,((t={})["Toastify__toast--rtl"]=x,t)),Y=p(w)?w({rtl:x,position:y,type:v,defaultClassName:B}):l(B,w),Q=!!I,H=D[v],U={theme:F,type:v},G=H&&H(U);return!1===z?G=void 0:p(z)?G=z(U):(0,n.isValidElement)(z)?G=(0,n.cloneElement)(z,U):d(z)?G=z:R&&(G=D.spinner()),(0,n.createElement)(b,{isIn:q,done:P,position:y,preventExitTransition:s,nodeRef:i},(0,n.createElement)("div",Object.assign({id:A,onClick:f,className:Y},c,{style:_,ref:i}),(0,n.createElement)("div",Object.assign({},q&&{role:j},{className:p(M)?M({type:v}):l("Toastify__toast-body",M),style:T}),G&&(0,n.createElement)("div",{className:l("Toastify__toast-icon",(o={},o["Toastify--animate-icon Toastify__zoom-enter"]=!R,o))},G),(0,n.createElement)("div",null,m)),function(e){if(e){var t={closeToast:h,type:v,theme:F};return p(e)?e(t):(0,n.isValidElement)(e)?(0,n.cloneElement)(e,t):void 0}}(u),(g||Q)&&(0,n.createElement)(N,Object.assign({},k&&!Q?{key:"pb-"+k}:{},{rtl:x,theme:F,delay:g,isRunning:r,isIn:q,closeToast:h,hide:E,type:v,style:O,className:S,controlledProgress:Q,progress:I}))))},j=function(e){var t=function(e){var t=(0,n.useReducer)((function(e){return e+1}),0)[1],o=(0,n.useState)([]),a=o[0],r=o[1],s=(0,n.useRef)(null),l=(0,n.useRef)(new Map).current,i=function(e){return-1!==a.indexOf(e)},v=(0,n.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:function(e){return l.get(e)}}).current;function h(e){var t=e.containerId;!v.props.limit||t&&v.containerId!==t||(v.count-=v.queue.length,v.queue=[])}function b(e){r((function(t){return f(e)?t.filter((function(t){return t!==e})):[]}))}function y(){var e=v.queue.shift();L(e.toastContent,e.toastProps,e.staleId)}function C(e,o){var a=o.delay,r=o.staleId,i=c(o,_);if(E(e)&&!function(e){return!s.current||v.props.enableMultiContainer&&e.containerId!==v.props.containerId||l.has(e.toastId)&&null==e.updateId}(i)){var h=i.toastId,w=i.updateId,C=i.data,M=v.props,N=function(){return b(h)},T=null==w;T&&v.count++;var S,O,D={toastId:h,updateId:w,isLoading:i.isLoading,theme:i.theme||M.theme,icon:null!=i.icon?i.icon:M.icon,isIn:!1,key:i.key||v.toastKey++,type:i.type,closeToast:N,closeButton:i.closeButton,rtl:M.rtl,position:i.position||M.position,transition:i.transition||M.transition,className:g(i.className||M.toastClassName),bodyClassName:g(i.bodyClassName||M.bodyClassName),style:i.style||M.toastStyle,bodyStyle:i.bodyStyle||M.bodyStyle,onClick:i.onClick||M.onClick,pauseOnHover:m(i.pauseOnHover)?i.pauseOnHover:M.pauseOnHover,pauseOnFocusLoss:m(i.pauseOnFocusLoss)?i.pauseOnFocusLoss:M.pauseOnFocusLoss,draggable:m(i.draggable)?i.draggable:M.draggable,draggablePercent:i.draggablePercent||M.draggablePercent,draggableDirection:i.draggableDirection||M.draggableDirection,closeOnClick:m(i.closeOnClick)?i.closeOnClick:M.closeOnClick,progressClassName:g(i.progressClassName||M.progressClassName),progressStyle:i.progressStyle||M.progressStyle,autoClose:!i.isLoading&&(S=i.autoClose,O=M.autoClose,!1===S||u(S)&&S>0?S:O),hideProgressBar:m(i.hideProgressBar)?i.hideProgressBar:M.hideProgressBar,progress:i.progress,role:i.role||M.role,deleteToast:function(){l.delete(h);var e=v.queue.length;if(v.count=f(h)?v.count-1:v.count-v.displayedToast,v.count<0&&(v.count=0),e>0){var n=f(h)?1:v.props.limit;if(1===e||1===n)v.displayedToast++,y();else{var o=n>e?e:n;v.displayedToast=o;for(var a=0;a<o;a++)y()}}else t()}};p(i.onOpen)&&(D.onOpen=i.onOpen),p(i.onClose)&&(D.onClose=i.onClose),D.closeButton=M.closeButton,!1===i.closeButton||E(i.closeButton)?D.closeButton=i.closeButton:!0===i.closeButton&&(D.closeButton=!E(M.closeButton)||M.closeButton);var k=e;(0,n.isValidElement)(e)&&!d(e.type)?k=(0,n.cloneElement)(e,{closeToast:N,toastProps:D,data:C}):p(e)&&(k=e({closeToast:N,toastProps:D,data:C})),M.limit&&M.limit>0&&v.count>M.limit&&T?v.queue.push({toastContent:k,toastProps:D,staleId:r}):u(a)&&a>0?setTimeout((function(){L(k,D,r)}),a):L(k,D,r)}}function L(e,t,n){var o=t.toastId;n&&l.delete(n),l.set(o,{content:e,props:t}),r((function(e){return[].concat(e,[o]).filter((function(e){return e!==n}))}))}return(0,n.useEffect)((function(){return v.containerId=e.containerId,w.cancelEmit(3).on(0,C).on(1,(function(e){return s.current&&b(e)})).on(5,h).emit(2,v),function(){return w.emit(3,v)}}),[]),(0,n.useEffect)((function(){v.isToastActive=i,v.displayedToast=a.length,w.emit(4,a.length,e.containerId)}),[a]),(0,n.useEffect)((function(){v.props=e})),{getToastToRender:function(t){var n=new Map,o=Array.from(l.values());return e.newestOnTop&&o.reverse(),o.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:i}}(e),o=t.getToastToRender,a=t.containerRef,r=t.isToastActive,s=e.className,v=e.style,h=e.rtl,b=e.containerId;function y(e){var t,n=l("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=h,t));return p(s)?s({position:e,rtl:h,defaultClassName:n}):l(n,g(s))}return(0,n.createElement)("div",{ref:a,className:"Toastify",id:b},o((function(e,t){var o=t.length?i({},v):i({},v,{pointerEvents:"none"});return(0,n.createElement)("div",{className:y(e),style:o,key:"container-"+e},t.map((function(e){var t=e.content,o=e.props;return(0,n.createElement)(k,Object.assign({},o,{isIn:r(o.toastId),key:"toast-"+o.key,closeButton:!0===o.closeButton?M:o.closeButton}),t)})))})))};j.defaultProps={position:h.TOP_RIGHT,transition:y({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:M,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var I,x,A,P=new Map,q=[],R=!1;function z(){return Math.random().toString(36).substring(2,9)}function F(e){return e&&(d(e.toastId)||u(e.toastId))?e.toastId:z()}function B(e,t){return P.size>0?w.emit(0,e,t):(q.push({content:e,options:t}),R&&v&&(R=!1,x=document.createElement("div"),document.body.appendChild(x),(0,a.render)((0,n.createElement)(j,Object.assign({},A)),x))),t.toastId}function Y(e,t){return i({},t,{type:t&&t.type||e,toastId:F(t)})}function Q(e){return function(t,n){return B(t,Y(e,n))}}function H(e,t){return B(e,Y(b.DEFAULT,t))}H.loading=function(e,t){return B(e,Y(b.DEFAULT,i({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},H.promise=function(e,t,n){var o,a=t.pending,r=t.error,s=t.success;a&&(o=d(a)?H.loading(a,n):H.loading(a.render,i({},n,a)));var l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=function(e,t,a){if(null!=t){var r=i({type:e},l,n,{data:a}),s=d(t)?{render:t}:t;return o?H.update(o,i({},r,s)):H(s.render,i({},r,s)),a}H.dismiss(o)},u=p(e)?e():e;return u.then((function(e){return c("success",s,e)})).catch((function(e){return c("error",r,e)})),u},H.success=Q(b.SUCCESS),H.info=Q(b.INFO),H.error=Q(b.ERROR),H.warning=Q(b.WARNING),H.warn=H.warning,H.dark=function(e,t){return B(e,Y(b.DEFAULT,i({theme:"dark"},t)))},H.dismiss=function(e){return w.emit(1,e)},H.clearWaitingQueue=function(e){return void 0===e&&(e={}),w.emit(5,e)},H.isActive=function(e){var t=!1;return P.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},H.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,o=P.get(n||I);return o?o.getToast(e):null}(e,t);if(n){var o=n.props,a=n.content,r=i({},o,t,{toastId:t.toastId||e,updateId:z()});r.toastId!==e&&(r.staleId=e);var s=r.render||a;delete r.render,B(s,r)}}),0)},H.done=function(e){H.update(e,{progress:1})},H.onChange=function(e){return p(e)&&w.on(4,e),function(){p(e)&&w.off(4,e)}},H.configure=function(e){void 0===e&&(e={}),R=!0,A=e},H.POSITION=h,H.TYPE=b,w.on(2,(function(e){I=e.containerId||e,P.set(I,e),q.forEach((function(e){w.emit(0,e.content,e.options)})),q=[]})).on(3,(function(e){P.delete(e.containerId||e),0===P.size&&w.off(0).off(1).off(5),v&&x&&document.body.removeChild(x)}));var U=window.wp.components,G=e.p+"images/reset.3bcbcd44.png",W=e=>{let{settings:o,setSettings:a,saveSettings:r}=e;const[s,l]=(0,n.useState)(!1),[i,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(!1),[d,p]=(0,n.useState)(!1),g=(0,n.useRef)(null),f=(0,n.useRef)(null),v=(0,n.useRef)(null),E=(0,n.useRef)(null),h=e=>{g.current&&!g.current.contains(e.target)&&l(!1),f.current&&!f.current.contains(e.target)&&c(!1),v.current&&!v.current.contains(e.target)&&m(!1),E.current&&!E.current.contains(e.target)&&p(!1)};return(0,n.useEffect)((()=>(document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)})),[h]),(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Button Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own button settings and styles that will ensure the design compatibility with your active theme, as wel as functionality"),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_shop_page_button,onChange:e=>a({...o,pqfw_shop_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on category/shop/loop page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_product_page_button,onChange:e=>a({...o,pqfw_product_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Text"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",className:"regular-text",value:null==o?void 0:o.button_text,onChange:e=>a({...o,button_text:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Loop"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position,hideLabelFromVision:!0,options:[{label:"At product end",value:"woocommerce_after_shop_loop_item"},{label:"At product start",value:"woocommerce_before_shop_loop_item"},{label:"Before product title",value:"woocommerce_before_shop_loop_item_title"},{label:"After product title",value:"woocommerce_after_shop_loop_item_title"}],onChange:e=>a({...o,button_position:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Single Product"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position_single_product,hideLabelFromVision:!0,options:[{label:"Before add to cart button",value:"woocommerce_after_add_to_cart_quantity"},{label:"After add to cart button",value:"woocommerce_after_add_to_cart_button"},{label:"End of product",value:"woocommerce_share"}],onChange:e=>a({...o,button_position_single_product:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.TabPanel,{className:"my-tab-panel",activeClass:"active-tab",initialTabName:"normal",tabs:[{name:"normal",title:"Normal",className:"normal-color"},{name:"hover",title:"Hover",className:"hover-color"}]},(e=>(0,t.createElement)("div",{className:"pqfw-color-picker-container"},"hover"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_color,onClick:()=>l(!s)}),s&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:g},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_color,onChange:e=>a({...o,button_hover_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_bg_color,onClick:()=>c(!i)}),i&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:f},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_bg_color,onChange:e=>a({...o,button_hover_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_bg_color})),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_hover_color:"",button_hover_bg_color:""})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset")),"normal"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_color,onClick:()=>m(!u)}),u&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:v},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_color,onChange:e=>a({...o,button_normal_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_bg_color,onClick:()=>p(!d)}),d&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:E},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_bg_color,onChange:e=>a({...o,button_normal_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_bg_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Font Size"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_font_size,onChange:e=>a({...o,button_font_size:e}),max:50}),(0,t.createElement)("p",{className:"color-picker-label"},"Width"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_width,onChange:e=>a({...o,button_width:e}),max:300}),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_normal_color:"",button_normal_bg_color:"",button_font_size:0,button_width:0})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset"))))))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:r},"Save Changes")))},V=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Email Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Receive Email"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_send_mail,onChange:e=>o({...n,pqfw_form_send_mail:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Recipient"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",value:null==n?void 0:n.recipient,className:"regular-text",onChange:e=>o({...n,recipient:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Add recipient email ID that will receive each quotation on the email."))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))},Z=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Form Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own form styles that will ensure the design compatibility with your active theme."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Default Form Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_default_design,onChange:e=>o({...n,pqfw_form_default_design:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use default form style that comes with this plugin or you can clean design your own form styles rather not overriding each css class."))),null!=n&&n.pqfw_form_default_design?(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Floated Form"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_floating_form,onChange:e=>o({...n,pqfw_floating_form:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use floated or stacked styled form on the ",(0,t.createElement)("strong",null,"Quotations Cart")," Page."))):"",(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Add Privacy Policy"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.privacy_policy,onChange:e=>o({...n,privacy_policy:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Ask user to accept terms and condition before submitting the quotation form."))),null!=n&&n.privacy_policy?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Privacy Policy Label"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",className:"regular-text",value:null==n?void 0:n.privacy_policy_label,onChange:e=>o({...n,privacy_policy_label:e.target.value})}),(0,t.createElement)("p",{className:"description"},"You can use the shortcode [terms] and [privacy_policy] (from WooCommerce 3.4.0)"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Privacy Policy"),(0,t.createElement)("td",null,(0,t.createElement)("textarea",{cols:"30",rows:"5",className:"regular-text",onChange:e=>o({...n,privacy_policy_content:e.target.value})},null==n?void 0:n.privacy_policy_content),(0,t.createElement)("p",{className:"description"},"You can use the shortcode [terms] and [privacy_policy] (from WooCommerce 3.4.0)")))):"")),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))},X=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"General Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,'Hide "Add to cart" Button'),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.hide_add_to_cart_button,onChange:e=>o({...n,hide_add_to_cart_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Hide product prices"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.hide_product_prices,onChange:e=>o({...n,hide_product_prices:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))};const J=Object.assign({},window.PQFW_OBJECT);delete window.PQFW_OBJECT.ajaxurl,delete window.PQFW_OBJECT.nonce,delete window.PQFW_OBJECT.settings;var $=e.p+"images/button.3f1daf8f.png",K=e.p+"images/form.3bf7f595.png",ee=e.p+"images/email.5183ffb9.png";r().render((0,t.createElement)((()=>{const e=localStorage.getItem("pqfw_settings_active_tab")||"button",[o,a]=(0,n.useState)(e),[r,s]=(0,n.useState)(J.settings),l=e=>{localStorage.setItem("pqfw_settings_active_tab",e)},i=e=>{let t=e.target;t.classList.add("updating-message"),wp.ajax.send("pqrf_save_settings",{data:{_wpnonce:J.nonce,settings:JSON.stringify(r)},success:function(e){H.success(e.message)},error:function(e){H.error(e.message)},complete:function(){t.classList.remove("updating-message")}})};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h1",{className:"pqfw-app-title"},"Settings"),(0,t.createElement)("div",{className:"pqfw-settings-tabs-warp"},(0,t.createElement)(j,{position:"top-right",autoClose:2e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,pauseOnHover:!0,theme:"colored"}),(0,t.createElement)("div",{id:"pqfw-settings-tabs"},(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("general"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("general"),l("general")}},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMS4yNCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiM5YjU5YjZ9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkdlbmVyYWwgU2V0dGluZzwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48cGF0aCBkPSJNMTkuNTksMTMuNThsLTEuODctMS40NGEuMjcuMjcsMCwwLDEtLjEzLS4zLDYuNTMsNi41MywwLDAsMCwwLTIuNDIuMjguMjgsMCwwLDEsLjE0LS4zM2wxLjg3LTEuNDRhLjg0Ljg0LDAsMCwwLC4yNC0xLjJsLTEuMy0yLjI2YS44Ni44NiwwLDAsMC0xLjE4LS40bC0yLjIuOTFhLjMuMywwLDAsMS0uMzYtLjA1LDcuMDYsNy4wNiwwLDAsMC0yLTEuMTguMzIuMzIsMCwwLDEtLjI0LS4zYy0uMS0uNzgtLjIxLTEuNTYtLjMtMi4zNEEuODUuODUsMCwwLDAsMTEuMzUsMFExMCwwLDguNjQsMGEuODUuODUsMCwwLDAtLjg4LjgzYy0uMS43OC0uMjEsMS41Ni0uMzEsMi4zNGEuMy4zLDAsMCwxLS4yMi4yOSw3LDcsMCwwLDAtMiwxLjE3LjMyLjMyLDAsMCwxLS4zOC4wNkwyLjY2LDMuOGEuODYuODYsMCwwLDAtMS4yMS40MkwuMiw2LjM2QS44OS44OSwwLDAsMCwuNDcsNy43MkwyLjI5LDkuMTFhLjI1LjI1LDAsMCwxLC4xMi4yOSw2LjQ1LDYuNDUsMCwwLDAsMCwyLjQuMzQuMzQsMCwwLDEtLjE3LjM4Yy0uNi40NS0xLjIuOTEtMS43OSwxLjM4YS44Ny44NywwLDAsMC0uMjYsMS4zTDEuNDUsMTdhLjg3Ljg3LDAsMCwwLDEuMi40MWwyLjE4LS45YS4zMi4zMiwwLDAsMSwuMzguMDUsNyw3LDAsMCwwLDIsMS4xNy4zNC4zNCwwLDAsMSwuMjUuMzFjLjEuNzcuMiwxLjU0LjMsMi4zMWEuODYuODYsMCwwLDAsLjkyLjg0aDIuNjZhLjg1Ljg1LDAsMCwwLC45LS44NGMuMS0uNzguMjEtMS41Ni4zMS0yLjM0YS4zLjMsMCwwLDEsLjIyLS4yOCw3LDcsMCwwLDAsMi0xLjE4LjMyLjMyLDAsMCwxLC4zOC0uMDVsMi4yLjkxYTIuMTgsMi4xOCwwLDAsMCwuMzEuMDkuODguODgsMCwwLDAsLjg0LS40NmwxLjMtMi4yNkEuODUuODUsMCwwLDAsMTkuNTksMTMuNThabS02LjE2LTIuODNhMy40NCwzLjQ0LDAsMCwxLTYuODgtLjEzLDMuNDQsMy40NCwwLDEsMSw2Ljg4LjEzWiIgY2xhc3M9ImNscy0xIi8+PC9nPjwvZz48L3N2Zz4="})," General Settings"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("button"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("button"),l("button")}},(0,t.createElement)("img",{src:$})," Button"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("form"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("form"),l("form")}},(0,t.createElement)("img",{src:K})," Form"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("email"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("email"),l("email")}},(0,t.createElement)("img",{src:ee})," Email")),(0,t.createElement)("div",{id:"pqfw-settings-tabs-contents"},"general"===o&&(0,t.createElement)(X,{settings:r,setSettings:s,saveSettings:i}),"button"===o&&(0,t.createElement)(W,{settings:r,setSettings:s,saveSettings:i}),"email"===o&&(0,t.createElement)(V,{settings:r,setSettings:s,saveSettings:i}),"form"===o&&(0,t.createElement)(Z,{settings:r,setSettings:s,saveSettings:i}))))}),null),document.getElementById("pqfw-app"))}();
  • TabularUnified product-quotation-for-woocommerce/trunk/includes/Classes/class-form-handler.php

    r2709540 r2717061  
    4242        $fullname = sanitize_user( $_POST['pqfw_customer_name'] );
    4343        $email    = sanitize_email( $_POST['pqfw_customer_email'] );
    44         $phone    = pqfw()->utils->sanitize_phone_number( $_POST['pqfw_customer_phone'] );
     44        $phone    = pqfw()->helpers->sanitizePhoneNumber( $_POST['pqfw_customer_phone'] );
    4545        $subject  = sanitize_text_field( $_POST['pqfw_customer_subject'] );
    4646        $comments = sanitize_text_field( $_POST['pqfw_customer_comments'] );
     
    5353        ];
    5454
    55         $validate = pqfw()->utils->validate( $mapedDataToSave );
     55        $validate = pqfw()->helpers->validate( $mapedDataToSave );
    5656
    5757        if ( $validate->has_errors() ) {
  • TabularUnified product-quotation-for-woocommerce/trunk/includes/Classes/class-form.php

    r2716683 r2717061  
    210210                    <ul class="pqfw-frontend-form">
    211211                        <?php pqfw()->controlsManager->generate_fields(); ?>
     212                        <?php if ( pqfw()->settings->get( 'privacy_policy' ) ) : ?>
     213                        <li class="pqfw-privacy-policy">
     214                            <div class="pqfw-privacy-policy-inner">
     215                                <p><?php echo wp_kses_post( pqfw()->helpers->generatePrivacyPolicy( pqfw()->settings->get( 'privacy_policy_content' ) ) ); ?></p>
     216
     217                                <div class="pqfw-privacy-policy-checkbox">
     218                                    <input type="checkbox" name="pqfw_privacy_policy_checkbox" id="pqfw_privacy_policy_checkbox" required="1">
     219                                    <label for="pqfw_privacy_policy_checkbox"><?php echo wp_kses_post( pqfw()->helpers->generatePrivacyPolicy( pqfw()->settings->get( 'privacy_policy_label' ) ) ); ?></label>
     220                                </div>
     221                            </div>
     222                        </li>
     223                        <?php endif; ?>
    212224                    </ul>
    213225
  • TabularUnified product-quotation-for-woocommerce/trunk/includes/Classes/class-settings.php

    r2716683 r2717061  
    108108            'button_position'                => 'woocommerce_after_shop_loop_item',
    109109            'button_position_single_product' => 'woocommerce_after_add_to_cart_quantity',
     110            'privacy_policy'                 => false,
     111            'privacy_policy_label'           => __( 'I have read and agree to the website terms and conditions.', 'pqfw' ),
     112            'privacy_policy_content'         => __( 'Your personal data will be used to process your request, support your experience throughout this website, and for other purposes described in our  [privacy_policy].', 'pqfw' )
    110113        ];
    111114
  • TabularUnified product-quotation-for-woocommerce/trunk/includes/PQFW.php

    r2716683 r2717061  
    104104            $this->quotations      = new \PQFW\Classes\Quotations();
    105105            $this->shortcode       = new \PQFW\Classes\Shortcode();
    106             $this->utils           = new \PQFW\Classes\Utils();
    107             $this->table           = new \PQFW\Classes\Table();
     106            $this->helpers         = new \PQFW\Classes\Helpers();
    108107            $this->frontend        = new \PQFW\Classes\Frontend();
    109108            $this->controlsManager = new \PQFW\Classes\Controls_Manager();
  • TabularUnified product-quotation-for-woocommerce/trunk/product-quotation-for-woocommerce.php

    r2716683 r2717061  
    44 * Plugin URI: https://github.com/mahafuz/product-quotation-for-woocommerce
    55 * Description: Removes the 'Add to cart' button from WooCommerce and adds a simple 'Request for quotation' form on all product pages instead of it.
    6  * Version: 2.0.0
     6 * Version: 2.0.1
    77 * Author: Mahafuz <m.mahfuz.me@gmail.com>
    88 * Author URI: https://github.com/mahafuz/
     
    2727define( 'PQFW_PLUGIN_VIEWS', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes/Views' ) );
    2828define( 'PQFW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
    29 define( 'PQFW_PLUGIN_VERSION', '2.0.0' );
     29define( 'PQFW_PLUGIN_VERSION', '2.0.1' );
    3030
    3131/**
Note: See TracChangeset for help on using the changeset viewer.