Sid Gifari File Manager
🏠 Root
/
home
/
nradmin
/
www
/
wp-content
/
plugins
/
whatsapp-for-wordpress
/
assets
/
dist
/
js
/
📝 Editing: app.js
(()=>{var t={484:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",o="second",r="minute",s="hour",a="day",c="week",u="month",l="quarter",d="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},b={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(i,u),r=n-o<0,s=e.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:c,d:a,D:f,h:s,m:r,s:o,ms:i,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",y={};y[w]=g;var _="$isDayjsObject",x=function(t){return t instanceof C||!(!t||!t[_])},$=function t(e,n,i){var o;if(!e)return w;if("string"==typeof e){var r=e.toLowerCase();y[r]&&(o=r),n&&(y[r]=n,o=r);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;y[a]=e,o=a}return!i&&o&&(w=o),o||!i&&w},O=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new C(n)},k=b;k.l=$,k.i=x,k.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var C=function(){function g(t){this.$L=$(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(h);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return O(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<O(t)},v.$g=function(t,e,n){return k.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,i=!!k.u(e)||e,l=k.p(t),p=function(t,e){var o=k.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?o:o.endOf(a)},h=function(t,e){return k.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(l){case d:return i?p(1,0):p(31,11);case u:return i?p(1,g):p(0,g+1);case c:var w=this.$locale().weekStart||0,y=(m<w?m+7:m)-w;return p(i?v-y:v+(6-y),g);case a:case f:return h(b+"Hours",0);case s:return h(b+"Minutes",1);case r:return h(b+"Seconds",2);case o:return h(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,c=k.p(t),l="set"+(this.$u?"UTC":""),p=(n={},n[a]=l+"Date",n[f]=l+"Date",n[u]=l+"Month",n[d]=l+"FullYear",n[s]=l+"Hours",n[r]=l+"Minutes",n[o]=l+"Seconds",n[i]=l+"Milliseconds",n)[c],h=c===a?this.$D+(e-this.$W):e;if(c===u||c===d){var m=this.clone().set(f,1);m.$d[p](h),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[k.p(t)]()},v.add=function(i,l){var f,p=this;i=Number(i);var h=k.p(l),m=function(t){var e=O(p);return k.w(e.date(e.date()+Math.round(t*i)),p)};if(h===u)return this.set(u,this.$M+i);if(h===d)return this.set(d,this.$y+i);if(h===a)return m(1);if(h===c)return m(7);var g=(f={},f[r]=e,f[s]=n,f[o]=t,f)[h]||1,v=this.$d.getTime()+i*g;return k.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=k.z(this),r=this.$H,s=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=n.meridiem,d=function(t,n,o,r){return t&&(t[n]||t(e,i))||o[n].slice(0,r)},f=function(t){return k.s(r%12||12,t,"0")},h=l||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return k.s(e.$y,4,"0");case"M":return a+1;case"MM":return k.s(a+1,2,"0");case"MMM":return d(n.monthsShort,a,u,3);case"MMMM":return d(u,a);case"D":return e.$D;case"DD":return k.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,c,2);case"ddd":return d(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(r);case"HH":return k.s(r,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(r,s,!0);case"A":return h(r,s,!1);case"m":return String(s);case"mm":return k.s(s,2,"0");case"s":return String(e.$s);case"ss":return k.s(e.$s,2,"0");case"SSS":return k.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,f,p){var h,m=this,g=k.p(f),v=O(i),b=(v.utcOffset()-this.utcOffset())*e,w=this-v,y=function(){return k.m(m,v)};switch(g){case d:h=y()/12;break;case u:h=y();break;case l:h=y()/3;break;case c:h=(w-b)/6048e5;break;case a:h=(w-b)/864e5;break;case s:h=w/n;break;case r:h=w/e;break;case o:h=w/t;break;default:h=w}return p?h:k.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return y[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=$(t,e,!0);return i&&(n.$L=i),n},v.clone=function(){return k.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),T=C.prototype;return O.prototype=T,[["$ms",i],["$s",o],["$m",r],["$H",s],["$W",a],["$M",u],["$y",d],["$D",f]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,C,O),t.$i=!0),O},O.locale=$,O.isDayjs=x,O.unix=function(t){return O(1e3*t)},O.en=y[w],O.Ls=y,O.p={},O}()},646:function(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,o=36e5,r=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,c=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l={years:a,months:c,days:r,hours:o,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},d=function(t){return t instanceof b},f=function(t,e,n){return new b(t,n,e.$l)},p=function(t){return e.p(t)+"s"},h=function(t){return t<0},m=function(t){return h(t)?Math.ceil(t):Math.floor(t)},g=function(t){return Math.abs(t)},v=function(t,e){return t?h(t)?{negative:!0,format:""+g(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},b=function(){function h(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return f(t*l[p(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(e){i.$d[p(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var o=t.match(u);if(o){var r=o.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var g=h.prototype;return g.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(e,n){return e+(t.$d[n]||0)*l[n]}),0)},g.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=m(t/a),t%=a,this.$d.months=m(t/c),t%=c,this.$d.days=m(t/r),t%=r,this.$d.hours=m(t/o),t%=o,this.$d.minutes=m(t/i),t%=i,this.$d.seconds=m(t/n),t%=n,this.$d.milliseconds=t},g.toISOString=function(){var t=v(this.$d.years,"Y"),e=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),o=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var a=v(s,"S"),c=t.negative||e.negative||i.negative||o.negative||r.negative||a.negative,u=o.format||r.format||a.format?"T":"",l=(c?"-":"")+"P"+t.format+e.format+i.format+u+o.format+r.format+a.format;return"P"===l||"-P"===l?"P0D":l},g.toJSON=function(){return this.toISOString()},g.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(s,(function(t,e){return e||String(i[t])}))},g.as=function(t){return this.$ms/l[p(t)]},g.get=function(t){var e=this.$ms,n=p(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?m(e/l[n]):this.$d[n],e||0},g.add=function(t,e,n){var i;return i=e?t*l[p(e)]:d(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},g.subtract=function(t,e){return this.add(t,e,!0)},g.locale=function(t){var e=this.clone();return e.$l=t,e},g.clone=function(){return f(this.$ms,this)},g.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},h}(),w=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,o){t=o,e=o().$utils(),o.duration=function(t,e){var n=o.locale();return f(t,{$l:n},e)},o.isDuration=d;var r=i.prototype.add,s=i.prototype.subtract;i.prototype.add=function(t,e){return d(t)?w(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return d(t)?w(this,t,-1):s.bind(this)(t,e)}}}()},387:function(t){t.exports=function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,s=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},a=function(e,n){for(var i=s(e,n),r=[],a=0;a<i.length;a+=1){var c=i[a],u=c.type,l=c.value,d=t[u];d>=0&&(r[d]=parseInt(l,10))}var f=r[3],p=24===f?0:f,h=r[0]+"-"+r[1]+"-"+r[2]+" "+p+":"+r[4]+":"+r[5]+":000",m=+e;return(o.utc(h).valueOf()-(m-=m%1e3))/6e4},c=i.prototype;c.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),s=i.toLocaleString("en-US",{timeZone:t}),a=Math.round((i-new Date(s))/1e3/60),c=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-a,!0);if(e){var u=c.utcOffset();c=c.add(n-u,"minute")}return c.$x.$timezone=t,c},c.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var u=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return u.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,s=n||e||r,c=a(+o(),s);if("string"!=typeof t)return o(t).tz(s);var u=function(t,e,n){var i=t-60*e*1e3,o=a(i,n);if(e===o)return[i,e];var r=a(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),c,s),l=u[0],d=u[1],f=o(l).utcOffset(d);return f.$x.$timezone=s,f},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}()},178:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var s=o.prototype;r.utc=function(t){return new o({date:t,utc:!0,args:arguments})},s.utc=function(e){var n=r(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},s.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=s.init;s.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var u=s.utcOffset;s.utcOffset=function(i,o){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?u.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],r=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===r?s:-s}(i),null===i))return this;var s=Math.abs(i)<=16?60*i:i,a=this;if(o)return a.$offset=s,a.$u=0===i,a;if(0!==i){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+c,t)).$offset=s,a.$x.$localOffset=c}else a=this.utc();return a};var l=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=s.diff;s.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var i=this.local(),o=r(t).local();return f.call(i,o,e,n)}}}()}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(484),e=n.n(t),i=n(178),o=n.n(i),r=n(646),s=n.n(r),a=n(387),c=n.n(a);e().extend(o()),e().extend(s()),e().extend(c());const u=e(),l=window.jQuery,d=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],f={autocompleteLoading:function(t){!0!==t?l("#input-users").removeClass("ui-autocomplete-loading"):l("#input-users").addClass("ui-autocomplete-loading")},saveLoading:function(t){t?(l(".wa-save").addClass("disabled"),l(".wa-save span").addClass("dashicons dashicons-update wa-save-loading")):(l(".wa-save").removeClass("disabled"),l(".wa-save span").removeClass("dashicons dashicons-update wa-save-loading"))},parseUtcOffset:function(t){const e=t.split(":");let n,i;return 2===e.length?(n=parseInt(e[0]),i=parseInt(e[1])):(n=parseInt(e[0]),i=0),-1!==t.indexOf("-")?-(60*Math.abs(n)+i):60*n+i},parseTime:function(t){const e=(t||"").split(":");if(e.length>=2){return{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}}return null},compareTime:function(t,e){const n=this.parseTime(t),i=this.parseTime(e),o=n.minutes+60*n.hours,r=i.minutes+60*i.hours;return o===r?0:o>r?1:-1},hasNumber:function(t){return/\d/.test(t)},calcDiffDuration:function(t,e){return 1e3*(3600*(t.hour-e.hour)+60*(t.minute-e.minute))},getBackTime:function(t){let e;if("ON"===t.isAlwaysAvailable)return"online";e=this.hasNumber(njt_wa.timezone)?u().utcOffset(this.parseUtcOffset(njt_wa.timezone)):u(u()).tz(njt_wa.timezone,!0);const n=d[e.get("day")],i=t.daysOfWeekWorking[n];if("OFF"===i.isWorkingOnDay)return t.dayOffsText;for(let n=0;n<i.workHours.length;n++){const o=e.get("hour")+":"+e.get("minute"),r=i.workHours[n].startTime,s=i.workHours[n].endTime;if(-1===this.compareTime(o,r)){const n=this.parseTime(r),i=this.calcDiffDuration({hour:n.hours,minute:n.minutes},{hour:e.get("hour"),minute:e.get("minute")}),o=u.duration(i),s=" "+o.get("hours")+":"+o.get("minutes")+" ";return t.willBeBackText.replace(/\[njwa_time_work\]/gi,s)}if(0===this.compareTime(o,r)||0===this.compareTime(o,s))return"online";if(1===this.compareTime(o,r)&&-1===this.compareTime(o,s))return"online"}return t.dayOffsText}},p=f,h=window.jQuery;var m=[["sunday","Sun"],["monday","Mon"],["tuesday","Tue"],["wednesday","Wed"],["thursday","Thur"],["friday","Fri"],["saturday","Sat"]];const g=function(t=null){if(null!==t)return Backbone.View.extend({el:t,template:_.template(h("#selectedAccountTemplate").html()),events:{"click a.btn-remove-account":"setDeactive","click #input-users":"focusInputUser"},initialize:function(){const t=this;this.collection.fetch({reset:!0,data:{action:"njt_wa_load_accounts_ajax",nonce:njt_wa.nonce},type:"POST",beforeSend:function(){p.autocompleteLoading(!0)},success:function(){p.autocompleteLoading(!1),t.registerAutocomplete()},error:function(){console.log("error")}}),this.accountsListView=new(function(t=null){if(null!==t)return Backbone.View.extend({template:_.template(h(t).html()),initialize:function(){this.render()},registerSortable(){void 0===h("#sortable").sortable("instance")&&h("#sortable").sortable({update:function(t,e){const n=h("#sortable").sortable("toArray",{attribute:"data-index"});h.ajax({url:njt_wa.url,type:"POST",data:{action:"njt_wa_set_account_position",type:njt_wa.selectedAccounts.attrPosition,positions:n,nonce:njt_wa.nonce},beforeSend:function(){p.autocompleteLoading(!0)}}).done((function(t){p.autocompleteLoading(!1),t.success}))}})},render:function(){const t=_.sortBy(this.collection.active(),njt_wa.selectedAccounts.attrPosition);return this.$el.html(this.template({activeAccounts:t,daysOfWeek:m})),this.registerSortable(),this}})}("#accountListTemplate"))({collection:this.collection}),this.listenTo(this.collection,"sync",this.renderAccountList),this.render()},registerAutocomplete:function(){const t=this;h("#input-users").autocomplete({minLength:0,source:this.collection.deactive(),classes:{"ui-autocomplete":"nta-list-box-select"},select:function(e,n){return t.collection.get(n.item.accountId).setActive({onDone:function(){h("#input-users").autocomplete("option","source",t.collection.deactive())}}),!1}}).autocomplete("instance")._renderItem=function(t,e){const n=new(function(t=null){if(null!==t)return Backbone.View.extend({template:_.template(h(t).html()),initialize:function(){this.render()},render:function(){return this.$el.html(this.template({account:this.model,daysOfWeek:m})),this}})}("#accountItemView"))({model:e});return h("<li>").append(n.$el).appendTo(t)}},setDeactive(t){const e=h(t.target).data("remove"),n=this.collection.get(e),i=this;n.setDeactive({onDone:function(){h("#input-users").autocomplete("option","source",i.collection.deactive())}})},focusInputUser(){h("#input-users").autocomplete("search","")},renderAccountList:function(){this.accountsListView.render()},render:function(){return this.$el.html(this.template()),this.$el.append(this.accountsListView.$el),this}})},v=window.jQuery,{styles:b}=window.njt_wa.settings.widget,w=window.buttonStyles,y=Backbone.Model.extend({defaults:{...b},isLaunch:!1}),x=Backbone.Model.extend({defaults:{...w}}),$=Backbone.Model.extend({idAttribute:"accountId",url:njt_wa.url,defaults:{accountId:"",avatar:"",accountName:"",dayOffsText:"",daysOfWeekWorking:[],isAlwaysAvailable:"ON",number:"",predefinedText:"",title:"",wc_position:"",wc_show:"OFF",widget_position:"",widget_show:"OFF",willBeBackText:""},setActive:function(t){this.save(null,{type:"POST",contentType:"application/x-www-form-urlencoded",data:v.param({action:"njt_wa_set_account_status",nonce:njt_wa.nonce,status:"ON",accountId:this.get("accountId"),type:njt_wa.selectedAccounts.attrActive}),beforeSend:function(){p.autocompleteLoading(!0)},success:function(e,n){p.autocompleteLoading(!1),n.success?(e.set(njt_wa.selectedAccounts.attrActive,"ON"),t.onDone()):console.log("Can't update active!")},error:function(t,e){p.autocompleteLoading(!1),console.log("Something went wrong!")}})},setDeactive:function(t){this.save(null,{type:"POST",contentType:"application/x-www-form-urlencoded",data:v.param({action:"njt_wa_set_account_status",nonce:njt_wa.nonce,status:"OFF",accountId:this.get("accountId"),type:njt_wa.selectedAccounts.attrActive}),beforeSend:function(){p.autocompleteLoading(!0)},success:function(e,n){p.autocompleteLoading(!1),n.success?(e.set(njt_wa.selectedAccounts.attrActive,"OFF"),t.onDone()):console.log("Can't update active!")},error:function(t,e){p.autocompleteLoading(!1),console.log("Something went wrong!")}})}}),O=Backbone.Collection.extend({url:njt_wa.url,parse:function(t){return t.data},deactive:function(){return this.where({[njt_wa.selectedAccounts.attrActive]:"OFF"}).map((function(t){return t.toJSON()}))},active:function(){return this.where({[njt_wa.selectedAccounts.attrActive]:"ON"}).map((function(t){return t.attributes.status=p.getBackTime(t.attributes),t.toJSON()}))},model:$});function k(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function C(t){return t instanceof k(t).Element||t instanceof Element}function T(t){return t instanceof k(t).HTMLElement||t instanceof HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof k(t).ShadowRoot||t instanceof ShadowRoot)}var A=Math.max,S=Math.min,j=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function E(){return!/^((?!chrome|android).)*safari/i.test(M())}function L(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),o=1,r=1;e&&T(t)&&(o=t.offsetWidth>0&&j(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&j(i.height)/t.offsetHeight||1);var s=(C(t)?k(t):window).visualViewport,a=!E()&&n,c=(i.left+(a&&s?s.offsetLeft:0))/o,u=(i.top+(a&&s?s.offsetTop:0))/r,l=i.width/o,d=i.height/r;return{width:l,height:d,top:u,right:c+l,bottom:u+d,left:c,x:c,y:u}}function P(t){var e=k(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function B(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function I(t){return L(H(t)).left+P(t).scrollLeft}function W(t){return k(t).getComputedStyle(t)}function N(t){var e=W(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function V(t,e,n){void 0===n&&(n=!1);var i,o,r=T(e),s=T(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,i=j(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=H(e),c=L(t,s,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==B(e)||N(a))&&(u=(i=e)!==k(i)&&T(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:P(i)),T(e)?((l=L(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=I(a))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function Y(t){var e=L(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function z(t){return"html"===B(t)?t:t.assignedSlot||t.parentNode||(D(t)?t.host:null)||H(t)}function F(t){return["html","body","#document"].indexOf(B(t))>=0?t.ownerDocument.body:T(t)&&N(t)?t:F(z(t))}function U(t,e){var n;void 0===e&&(e=[]);var i=F(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),r=k(i),s=o?[r].concat(r.visualViewport||[],N(i)?i:[]):i,a=e.concat(s);return o?a:a.concat(U(z(s)))}function R(t){return["table","td","th"].indexOf(B(t))>=0}function q(t){return T(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Q(t){for(var e=k(t),n=q(t);n&&R(n)&&"static"===W(n).position;)n=q(n);return n&&("html"===B(n)||"body"===B(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(M());if(/Trident/i.test(M())&&T(t)&&"fixed"===W(t).position)return null;var n=z(t);for(D(n)&&(n=n.host);T(n)&&["html","body"].indexOf(B(n))<0;){var i=W(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}var Z="top",J="bottom",G="right",X="left",K="auto",tt=[Z,J,G,X],et="start",nt="end",it="clippingParents",ot="viewport",rt="popper",st="reference",at=tt.reduce((function(t,e){return t.concat([e+"-"+et,e+"-"+nt])}),[]),ct=[].concat(tt,[K]).reduce((function(t,e){return t.concat([e,e+"-"+et,e+"-"+nt])}),[]),ut=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function lt(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}var dt={placement:"bottom",modifiers:[],strategy:"absolute"};function ft(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function pt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,r=void 0===o?dt:o;return function(t,e,n){void 0===n&&(n=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},dt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,l={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:C(t)?U(t):t.contextElement?U(t.contextElement):[],popper:U(e)};var s,u,f=function(t){var e=lt(t);return ut.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(i,a.options.modifiers),u=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(u).map((function(t){return u[t]}))));return a.orderedModifiers=f.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,o=t.effect;if("function"==typeof o){var r=o({state:a,name:e,instance:l,options:i}),s=function(){};c.push(r||s)}})),l.update()},forceUpdate:function(){if(!u){var t=a.elements,e=t.reference,n=t.popper;if(ft(e,n)){a.rects={reference:V(e,Q(n),"fixed"===a.options.strategy),popper:Y(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var o=a.orderedModifiers[i],r=o.fn,s=o.options,c=void 0===s?{}:s,d=o.name;"function"==typeof r&&(a=r({state:a,options:c,name:d,instance:l})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(o())}))}))),s}),destroy:function(){d(),u=!0}};if(!ft(t,e))return l;function d(){c.forEach((function(t){return t()})),c=[]}return l.setOptions(n).then((function(t){!u&&n.onFirstUpdate&&n.onFirstUpdate(t)})),l}}var ht={passive:!0};function mt(t){return t.split("-")[0]}function gt(t){return t.split("-")[1]}function vt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function bt(t){var e,n=t.reference,i=t.element,o=t.placement,r=o?mt(o):null,s=o?gt(o):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(r){case Z:e={x:a,y:n.y-i.height};break;case J:e={x:a,y:n.y+n.height};break;case G:e={x:n.x+n.width,y:c};break;case X:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var u=r?vt(r):null;if(null!=u){var l="y"===u?"height":"width";switch(s){case et:e[u]=e[u]-(n[l]/2-i[l]/2);break;case nt:e[u]=e[u]+(n[l]/2-i[l]/2)}}return e}var wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yt(t){var e,n=t.popper,i=t.popperRect,o=t.placement,r=t.variation,s=t.offsets,a=t.position,c=t.gpuAcceleration,u=t.adaptive,l=t.roundOffsets,d=t.isFixed,f=s.x,p=void 0===f?0:f,h=s.y,m=void 0===h?0:h,g="function"==typeof l?l({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var v=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),w=X,y=Z,_=window;if(u){var x=Q(n),$="clientHeight",O="clientWidth";if(x===k(n)&&"static"!==W(x=H(n)).position&&"absolute"===a&&($="scrollHeight",O="scrollWidth"),o===Z||(o===X||o===G)&&r===nt)y=J,m-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[$])-i.height,m*=c?1:-1;if(o===X||(o===Z||o===J)&&r===nt)w=G,p-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[O])-i.width,p*=c?1:-1}var C,T=Object.assign({position:a},u&&wt),D=!0===l?function(t,e){var n=t.x,i=t.y,o=e.devicePixelRatio||1;return{x:j(n*o)/o||0,y:j(i*o)/o||0}}({x:p,y:m},k(n)):{x:p,y:m};return p=D.x,m=D.y,c?Object.assign({},T,((C={})[y]=b?"0":"",C[w]=v?"0":"",C.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",C)):Object.assign({},T,((e={})[y]=b?m+"px":"",e[w]=v?p+"px":"",e.transform="",e))}const _t={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];T(o)&&B(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});T(i)&&B(i)&&(Object.assign(i.style,r),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.offset,r=void 0===o?[0,0]:o,s=ct.reduce((function(t,n){return t[n]=function(t,e,n){var i=mt(t),o=[X,Z].indexOf(i)>=0?-1:1,r="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=r[0],a=r[1];return s=s||0,a=(a||0)*o,[X,G].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,r),t}),{}),a=s[e.placement],c=a.x,u=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=s}};var $t={left:"right",right:"left",bottom:"top",top:"bottom"};function Ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return $t[t]}))}var kt={start:"end",end:"start"};function Ct(t){return t.replace(/start|end/g,(function(t){return kt[t]}))}function Tt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&D(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Dt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function At(t,e,n){return e===ot?Dt(function(t,e){var n=k(t),i=H(t),o=n.visualViewport,r=i.clientWidth,s=i.clientHeight,a=0,c=0;if(o){r=o.width,s=o.height;var u=E();(u||!u&&"fixed"===e)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:r,height:s,x:a+I(t),y:c}}(t,n)):C(e)?function(t,e){var n=L(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):Dt(function(t){var e,n=H(t),i=P(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=A(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=A(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+I(t),c=-i.scrollTop;return"rtl"===W(o||n).direction&&(a+=A(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:c}}(H(t)))}function St(t,e,n,i){var o="clippingParents"===e?function(t){var e=U(z(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&T(t)?Q(t):t;return C(n)?e.filter((function(t){return C(t)&&Tt(t,n)&&"body"!==B(t)})):[]}(t):[].concat(e),r=[].concat(o,[n]),s=r[0],a=r.reduce((function(e,n){var o=At(t,n,i);return e.top=A(o.top,e.top),e.right=S(o.right,e.right),e.bottom=S(o.bottom,e.bottom),e.left=A(o.left,e.left),e}),At(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function jt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Mt(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function Et(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,r=n.strategy,s=void 0===r?t.strategy:r,a=n.boundary,c=void 0===a?it:a,u=n.rootBoundary,l=void 0===u?ot:u,d=n.elementContext,f=void 0===d?rt:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,v=jt("number"!=typeof g?g:Mt(g,tt)),b=f===rt?st:rt,w=t.rects.popper,y=t.elements[h?b:f],_=St(C(y)?y:y.contextElement||H(t.elements.popper),c,l,s),x=L(t.elements.reference),$=bt({reference:x,element:w,strategy:"absolute",placement:o}),O=Dt(Object.assign({},w,$)),k=f===rt?O:x,T={top:_.top-k.top+v.top,bottom:k.bottom-_.bottom+v.bottom,left:_.left-k.left+v.left,right:k.right-_.right+v.right},D=t.modifiersData.offset;if(f===rt&&D){var A=D[o];Object.keys(T).forEach((function(t){var e=[G,J].indexOf(t)>=0?1:-1,n=[Z,J].indexOf(t)>=0?"y":"x";T[t]+=A[n]*e}))}return T}function Lt(t,e,n){return A(t,S(e,n))}const Pt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,g=Et(e,{boundary:c,rootBoundary:u,padding:d,altBoundary:l}),v=mt(e.placement),b=gt(e.placement),w=!b,y=vt(v),_="x"===y?"y":"x",x=e.modifiersData.popperOffsets,$=e.rects.reference,O=e.rects.popper,k="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(x){if(r){var j,M="y"===y?Z:X,E="y"===y?J:G,L="y"===y?"height":"width",P=x[y],B=P+g[M],H=P-g[E],I=p?-O[L]/2:0,W=b===et?$[L]:O[L],N=b===et?-O[L]:-$[L],V=e.elements.arrow,z=p&&V?Y(V):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=F[M],R=F[E],q=Lt(0,$[L],z[L]),K=w?$[L]/2-I-q-U-C.mainAxis:W-q-U-C.mainAxis,tt=w?-$[L]/2+I+q+R+C.mainAxis:N+q+R+C.mainAxis,nt=e.elements.arrow&&Q(e.elements.arrow),it=nt?"y"===y?nt.clientTop||0:nt.clientLeft||0:0,ot=null!=(j=null==T?void 0:T[y])?j:0,rt=P+tt-ot,st=Lt(p?S(B,P+K-ot-it):B,P,p?A(H,rt):H);x[y]=st,D[y]=st-P}if(a){var at,ct="x"===y?Z:X,ut="x"===y?J:G,lt=x[_],dt="y"===_?"height":"width",ft=lt+g[ct],pt=lt-g[ut],ht=-1!==[Z,X].indexOf(v),bt=null!=(at=null==T?void 0:T[_])?at:0,wt=ht?ft:lt-$[dt]-O[dt]-bt+C.altAxis,yt=ht?lt+$[dt]+O[dt]-bt-C.altAxis:pt,_t=p&&ht?function(t,e,n){var i=Lt(t,e,n);return i>n?n:i}(wt,lt,yt):Lt(p?wt:ft,lt,p?yt:pt);x[_]=_t,D[_]=_t-lt}e.modifiersData[i]=D}},requiresIfExists:["offset"]};const Bt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,o=t.options,r=n.elements.arrow,s=n.modifiersData.popperOffsets,a=mt(n.placement),c=vt(a),u=[X,G].indexOf(a)>=0?"height":"width";if(r&&s){var l=function(t,e){return jt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Mt(t,tt))}(o.padding,n),d=Y(r),f="y"===c?Z:X,p="y"===c?J:G,h=n.rects.reference[u]+n.rects.reference[c]-s[c]-n.rects.popper[u],m=s[c]-n.rects.reference[c],g=Q(r),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,w=l[f],y=v-d[u]-l[p],_=v/2-d[u]/2+b,x=Lt(w,_,y),$=c;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-_,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&Tt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ht(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function It(t){return[Z,G,J,X].some((function(e){return t[e]>=0}))}var Wt=pt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,r=void 0===o||o,s=i.resize,a=void 0===s||s,c=k(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach((function(t){t.addEventListener("scroll",n.update,ht)})),a&&c.addEventListener("resize",n.update,ht),function(){r&&u.forEach((function(t){t.removeEventListener("scroll",n.update,ht)})),a&&c.removeEventListener("resize",n.update,ht)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=bt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,r=n.adaptive,s=void 0===r||r,a=n.roundOffsets,c=void 0===a||a,u={placement:mt(e.placement),variation:gt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,yt(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,yt(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},_t,xt,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,u=n.padding,l=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=e.options.placement,v=mt(g),b=c||(v===g||!h?[Ot(g)]:function(t){if(mt(t)===K)return[];var e=Ot(t);return[Ct(t),e,Ct(e)]}(g)),w=[g].concat(b).reduce((function(t,n){return t.concat(mt(n)===K?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,r=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?ct:c,l=gt(i),d=l?a?at:at.filter((function(t){return gt(t)===l})):tt,f=d.filter((function(t){return u.indexOf(t)>=0}));0===f.length&&(f=d);var p=f.reduce((function(e,n){return e[n]=Et(t,{placement:n,boundary:o,rootBoundary:r,padding:s})[mt(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:n,boundary:l,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),y=e.rects.reference,_=e.rects.popper,x=new Map,$=!0,O=w[0],k=0;k<w.length;k++){var C=w[k],T=mt(C),D=gt(C)===et,A=[Z,J].indexOf(T)>=0,S=A?"width":"height",j=Et(e,{placement:C,boundary:l,rootBoundary:d,altBoundary:f,padding:u}),M=A?D?G:X:D?J:Z;y[S]>_[S]&&(M=Ot(M));var E=Ot(M),L=[];if(r&&L.push(j[T]<=0),a&&L.push(j[M]<=0,j[E]<=0),L.every((function(t){return t}))){O=C,$=!1;break}x.set(C,L)}if($)for(var P=function(t){var e=w.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return O=e,"break"},B=h?3:1;B>0;B--){if("break"===P(B))break}e.placement!==O&&(e.modifiersData[i]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Pt,Bt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=Et(e,{elementContext:"reference"}),a=Et(e,{altBoundary:!0}),c=Ht(s,i),u=Ht(a,o,r),l=It(c),d=It(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}}]}),Nt="njt-tippy-content",Vt="njt-tippy-backdrop",Yt="njt-tippy-arrow",zt="njt-tippy-svg-arrow",Ft={passive:!0,capture:!0};function Ut(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?Array.isArray(n)?n[e]:n:i}return t}function Rt(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function qt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Qt(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout((function(){t(i)}),e)};var n}function Zt(t){return[].concat(t)}function Jt(t,e){-1===t.indexOf(e)&&t.push(e)}function Gt(t){return t.split("-")[0]}function Xt(t){return[].slice.call(t)}function Kt(){return document.createElement("div")}function te(t){return["Element","Fragment"].some((function(e){return Rt(t,e)}))}function ee(t){return Rt(t,"MouseEvent")}function ne(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ie(t){return te(t)?[t]:function(t){return Rt(t,"NodeList")}(t)?Xt(t):Array.isArray(t)?t:Xt(document.querySelectorAll(t))}function oe(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function re(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function se(t){var e,n=Zt(t)[0];return(null==n||null==(e=n.ownerDocument)?void 0:e.body)?n.ownerDocument:document}function ae(t,e,n){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[i](e,n)}))}var ce={isTouch:!1},ue=0;function le(){ce.isTouch||(ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",de))}function de(){var t=performance.now();t-ue<20&&(ce.isTouch=!1,document.removeEventListener("mousemove",de)),ue=t}function fe(){var t=document.activeElement;if(ne(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var pe="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",he=/MSIE |Trident\//.test(pe);var me={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ge=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},me,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ve=Object.keys(ge);function be(t){var e=(t.plugins||[]).reduce((function(e,n){var i=n.name,o=n.defaultValue;return i&&(e[i]=void 0!==t[i]?t[i]:o),e}),{});return Object.assign({},t,{},e)}function we(t,e){var n=Object.assign({},e,{content:qt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(be(Object.assign({},ge,{plugins:e}))):ve).reduce((function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},ge.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}var ye=function(){return"innerHTML"};function _e(t,e){t[ye()]=e}function xe(t){var e=Kt();return!0===t?e.className=Yt:(e.className=zt,te(t)?e.appendChild(t):_e(e,t)),e}function $e(t,e){te(e.content)?(_e(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?_e(t,e.content):t.textContent=e.content)}function Oe(t){var e=t.firstElementChild,n=Xt(e.children);return{box:e,content:n.find((function(t){return t.classList.contains(Nt)})),arrow:n.find((function(t){return t.classList.contains(Yt)||t.classList.contains(zt)})),backdrop:n.find((function(t){return t.classList.contains(Vt)}))}}function ke(t){var e=Kt(),n=Kt();n.className="njt-tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Kt();function o(n,i){var o=Oe(e),r=o.box,s=o.content,a=o.arrow;i.theme?r.setAttribute("data-theme",i.theme):r.removeAttribute("data-theme"),"string"==typeof i.animation?r.setAttribute("data-animation",i.animation):r.removeAttribute("data-animation"),i.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?r.setAttribute("role",i.role):r.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||$e(s,t.props),i.arrow?a?n.arrow!==i.arrow&&(r.removeChild(a),r.appendChild(xe(i.arrow))):r.appendChild(xe(i.arrow)):a&&r.removeChild(a)}return i.className=Nt,i.setAttribute("data-state","hidden"),$e(i,t.props),e.appendChild(n),n.appendChild(i),o(t.props,t.props),{popper:e,onUpdate:o}}ke.$$tippy=!0;var Ce=1,Te=[],De=[];function Ae(t,e){var n,i,o,r,s,a,c,u,l,d=we(t,Object.assign({},ge,{},be((n=e,Object.keys(n).reduce((function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t}),{}))))),f=!1,p=!1,h=!1,m=!1,g=[],v=Qt(Q,d.interactiveDebounce),b=Ce++,w=(l=d.plugins).filter((function(t,e){return l.indexOf(t)===e})),y={id:b,reference:t,popper:Kt(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:w,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(r)},setProps:function(e){0;if(y.state.isDestroyed)return;L("onBeforeUpdate",[y,e]),R();var n=y.props,i=we(t,Object.assign({},y.props,{},e,{ignoreAttributes:!0}));y.props=i,U(),n.interactiveDebounce!==i.interactiveDebounce&&(H(),v=Qt(Q,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Zt(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");B(),E(),$&&$(n,i);y.popperInstance&&(X(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));L("onAfterUpdate",[y,e])},setContent:function(t){y.setProps({content:t})},show:function(){0;var t=y.state.isVisible,e=y.state.isDestroyed,n=!y.state.isEnabled,i=ce.isTouch&&!y.props.touch,o=Ut(y.props.duration,0,ge.duration);if(t||e||n||i)return;if(A().hasAttribute("disabled"))return;if(L("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,D()&&(x.style.visibility="visible");E(),V(),y.state.isMounted||(x.style.transition="none");if(D()){var r=j();oe([r.box,r.content],0)}c=function(){var t;if(y.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=y.props.moveTransition,D()&&y.props.animation){var e=j(),n=e.box,i=e.content;oe([n,i],o),re([n,i],"visible")}P(),B(),Jt(De,y),null==(t=y.popperInstance)||t.forceUpdate(),y.state.isMounted=!0,L("onMount",[y]),y.props.animation&&D()&&function(t,e){z(t,e)}(o,(function(){y.state.isShown=!0,L("onShown",[y])}))}},function(){var t,e=y.props.appendTo,n=A();t=y.props.interactive&&e===ge.appendTo||"parent"===e?n.parentNode:qt(e,[n]);t.contains(x)||t.appendChild(x);X(),!1}()},hide:function(){0;var t=!y.state.isVisible,e=y.state.isDestroyed,n=!y.state.isEnabled,i=Ut(y.props.duration,1,ge.duration);if(t||e||n)return;if(L("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,m=!1,f=!1,D()&&(x.style.visibility="hidden");if(H(),Y(),E(),D()){var o=j(),r=o.box,s=o.content;y.props.animation&&(oe([r,s],i),re([r,s],"hidden"))}P(),B(),y.props.animation?D()&&function(t,e){z(t,(function(){!y.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}(i,y.unmount):y.unmount()},hideWithInteractivity:function(t){0;S().addEventListener("mousemove",v),Jt(Te,v),v(t)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;K(),tt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);De=De.filter((function(t){return t!==y})),y.state.isMounted=!1,L("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),R(),delete t._tippy,y.state.isDestroyed=!0,L("onDestroy",[y])}};if(!d.render)return y;var _=d.render(y),x=_.popper,$=_.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+y.id,y.popper=x,t._tippy=y,x._tippy=y;var O=w.map((function(t){return t.fn(y)})),k=t.hasAttribute("aria-expanded");return U(),B(),E(),L("onCreate",[y]),d.showOnCreate&&et(),x.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(t){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&(S().addEventListener("mousemove",v),v(t))})),y;function C(){var t=y.props.touch;return Array.isArray(t)?t:[t,0]}function T(){return"hold"===C()[0]}function D(){var t;return!!(null==(t=y.props.render)?void 0:t.$$tippy)}function A(){return u||t}function S(){var t=A().parentNode;return t?se(t):document}function j(){return Oe(x)}function M(t){return y.state.isMounted&&!y.state.isVisible||ce.isTouch||s&&"focus"===s.type?0:Ut(y.props.delay,t?0:1,ge.delay)}function E(){x.style.pointerEvents=y.props.interactive&&y.state.isVisible?"":"none",x.style.zIndex=""+y.props.zIndex}function L(t,e,n){var i;(void 0===n&&(n=!0),O.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(i=y.props)[t].apply(i,e)}function P(){var e=y.props.aria;if(e.content){var n="aria-"+e.content,i=x.id;Zt(y.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(n);if(y.state.isVisible)t.setAttribute(n,e?e+" "+i:i);else{var o=e&&e.replace(i,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function B(){!k&&y.props.aria.expanded&&Zt(y.props.triggerTarget||t).forEach((function(t){y.props.interactive?t.setAttribute("aria-expanded",y.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")}))}function H(){S().removeEventListener("mousemove",v),Te=Te.filter((function(t){return t!==v}))}function I(t){if(!(ce.isTouch&&(h||"mousedown"===t.type)||y.props.interactive&&x.contains(t.target))){if(A().contains(t.target)){if(ce.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout((function(){p=!1})),y.state.isMounted||Y())}}function W(){h=!0}function N(){h=!1}function V(){var t=S();t.addEventListener("mousedown",I,!0),t.addEventListener("touchend",I,Ft),t.addEventListener("touchstart",N,Ft),t.addEventListener("touchmove",W,Ft)}function Y(){var t=S();t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchend",I,Ft),t.removeEventListener("touchstart",N,Ft),t.removeEventListener("touchmove",W,Ft)}function z(t,e){var n=j().box;function i(t){t.target===n&&(ae(n,"remove",i),e())}if(0===t)return e();ae(n,"remove",a),ae(n,"add",i),a=i}function F(e,n,i){void 0===i&&(i=!1),Zt(y.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,i),g.push({node:t,eventType:e,handler:n,options:i})}))}function U(){var t;T()&&(F("touchstart",q,{passive:!0}),F("touchend",Z,{passive:!0})),(t=y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(F(t,q),t){case"mouseenter":F("mouseleave",Z);break;case"focus":F(he?"focusout":"blur",J);break;case"focusin":F("focusout",J)}}))}function R(){g.forEach((function(t){var e=t.node,n=t.eventType,i=t.handler,o=t.options;e.removeEventListener(n,i,o)})),g=[]}function q(t){var e,n=!1;if(y.state.isEnabled&&!G(t)&&!p){var i="focus"===(null==(e=s)?void 0:e.type);s=t,u=t.currentTarget,B(),!y.state.isVisible&&ee(t)&&Te.forEach((function(e){return e(t)})),"click"===t.type&&(y.props.trigger.indexOf("mouseenter")<0||f)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:et(t),"click"===t.type&&(f=!n),n&&!i&&nt(t)}}function Q(t){var e=t.target,n=A().contains(e)||x.contains(e);if("mousemove"!==t.type||!n){var i=tt().concat(x).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:d}:null})).filter(Boolean);(function(t,e){var n=e.clientX,i=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,r=t.props.interactiveBorder,s=Gt(o.placement),a=o.modifiersData.offset;if(!a)return!0;var c="bottom"===s?a.top.y:0,u="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,d="left"===s?a.right.x:0,f=e.top-i+c>r,p=i-e.bottom-u>r,h=e.left-n+l>r,m=n-e.right-d>r;return f||p||h||m}))})(i,t)&&(H(),nt(t))}}function Z(t){G(t)||y.props.trigger.indexOf("click")>=0&&f||(y.props.interactive?y.hideWithInteractivity(t):nt(t))}function J(t){y.props.trigger.indexOf("focusin")<0&&t.target!==A()||y.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||nt(t)}function G(t){return!!ce.isTouch&&T()!==t.type.indexOf("touch")>=0}function X(){K();var e=y.props,n=e.popperOptions,i=e.placement,o=e.offset,r=e.getReferenceClientRect,s=e.moveTransition,a=D()?Oe(x).arrow:null,u=r?{getBoundingClientRect:r,contextElement:r.contextElement||A()}:t,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(D()){var n=j().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}},d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},l];D()&&a&&d.push({name:"arrow",options:{element:a,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Wt(u,x,Object.assign({},n,{placement:i,onFirstUpdate:c,modifiers:d}))}function K(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function tt(){return Xt(x.querySelectorAll("[data-tippy-root]"))}function et(t){y.clearDelayTimeouts(),t&&L("onTrigger",[y,t]),V();var e=M(!0),n=C(),o=n[0],r=n[1];ce.isTouch&&"hold"===o&&r&&(e=r),e?i=setTimeout((function(){y.show()}),e):y.show()}function nt(t){if(y.clearDelayTimeouts(),L("onUntrigger",[y,t]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&f)){var e=M(!1);e?o=setTimeout((function(){y.state.isVisible&&y.hide()}),e):r=requestAnimationFrame((function(){y.hide()}))}}else Y()}}function Se(t,e){void 0===e&&(e={});var n=ge.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",le,Ft),window.addEventListener("blur",fe);var i=Object.assign({},e,{plugins:n}),o=ie(t).reduce((function(t,e){var n=e&&Ae(e,i);return n&&t.push(n),t}),[]);return te(t)?o[0]:o}Se.defaultProps=ge,Se.setDefaultProps=function(t){Object.keys(t).forEach((function(e){ge[e]=t[e]}))},Se.currentInput=ce;Object.assign({},_t,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});Se.setDefaultProps({render:ke});const je=Se,Me=window.jQuery,Ee={reorder_attribute_for_custom_time:function(){["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((t=>{const e=jQuery(".working-"+t);for(let n=1;n<e.length;n++)Me(".start-time",e[n]).attr("name",`daysOfWeekWorking[${t}][workHours][${n}][startTime]`),Me(".end-time",e[n]).attr("name",`daysOfWeekWorking[${t}][workHours][${n}][endTime]`)}))},add_custom_time:function(){Me(".nta-btncustom-offline").on("click",".add-custom-time",(function(){const t=Me(this).closest("tr"),e=Me("."+t.attr("class"));if(e.length>=3)return;const n=t.clone();Me("#btn-apply-time",n).closest("td").remove(),Me("td",n).first().empty(),Me("td",n).last().remove(),n.append('<td><a style="color: #a00" href="javascript:;" class="remove-custom-time">Remove</a></td>'),Me(n).insertAfter(e.last()),Ee.reorder_attribute_for_custom_time()}))},remove_custom_time:function(){Me(".nta-btncustom-offline").on("click",".remove-custom-time",(function(){Me(this).closest("tr").remove(),Ee.reorder_attribute_for_custom_time()}))},copy_clipboard_shortcode:function(){Me("#nta-button-shortcode-copy").click((function(){Me(this).focus(),Me(this).select(),document.execCommand("copy"),Me(".nta-shortcode-copy-status").show()}))},selectAll_table_input_shortcode:function(){Me(".nta-shortcode-table").click((function(){Me(this).focus(),Me(this).select()}))},btn_apply_time_all:function(){Me("#btn-apply-time").on("click",(function(){const t=["monday","tuesday","wednesday","thursday","friday","saturday"],e=Me(".working-sunday");for(let n=0;n<e.length;n++){const i=Me(".start-time",e[n]).val(),o=Me(".end-time",e[n]).val();t.forEach((t=>{Me(".working-"+t).slice(n+1).remove();const e=Me(".working-"+t)[n];if(void 0===e){Me(".add-custom-time",Me(".working-"+t)[0]).trigger("click");const e=Me(".working-"+t)[n];Me(".start-time",e).val(i),Me(".end-time",e).val(o)}else Me(".start-time",e).val(i),Me(".end-time",e).val(o)}))}}))},btn_always_available:function(){Me("body.post-type-whatsapp-accounts input#nta-wa-switch").click((function(){Me(this).prop("checked")?Me(".nta-btncustom-offline").hide():Me(".nta-btncustom-offline").show()}))},select_display_pages_option:function(){Me("#displayCondition").change((function(){var t=Me(this).val();"includePages"==t?(Me(".nta-wa-pages-content.include-pages").removeClass("hide-select"),Me(".nta-wa-pages-content.exclude-pages").addClass("hide-select")):"excludePages"==t?(Me(".nta-wa-pages-content.exclude-pages").removeClass("hide-select"),Me(".nta-wa-pages-content.include-pages").addClass("hide-select")):(Me(".nta-wa-pages-content.include-pages").addClass("hide-select"),Me(".nta-wa-pages-content.exclude-pages").addClass("hide-select"))}))},select_display_posts_option:function(){Me("#displayPostCondition").change((function(){var t=Me(this).val();"includePosts"==t?(Me(".nta-wa-post-content.include-posts").removeClass("hide-select"),Me(".nta-wa-post-content.exclude-posts").addClass("hide-select")):"excludePosts"==t?(Me(".nta-wa-post-content.exclude-posts").removeClass("hide-select"),Me(".nta-wa-post-content.include-posts").addClass("hide-select")):(Me(".nta-wa-post-content.include-posts").addClass("hide-select"),Me(".nta-wa-post-content.exclude-posts").addClass("hide-select"))}))},checkAll_SelectPages_List:function(){Me("#exclude-pages-checkall").change((function(){Me(".excludePages").prop("checked",Me(this).prop("checked"))})),Me("#include-pages-checkall").change((function(){Me(".includePages").prop("checked",Me(this).prop("checked"))}))},registerTab:function(){Me("#njt-tabs").tabs({active:0,create:function(t,e){const n=Me("#njt-tabs").tabs("option","active");e.tab.children().addClass("nav-tab-active"),1!=n?Me("#app-preview").hide():Me("#app-preview").show()},activate:function(t,e){1!=Me("#njt-tabs").tabs("option","active")?Me("#app-preview").hide():Me("#app-preview").show(),e.oldTab.children().removeClass("nav-tab-active"),e.newTab.children().addClass("nav-tab-active")}}),Me("#tabs-setting").tabs({active:0})},changeUrlSetting:function(t){const e='div[data-setting="onDesktop"] button';Me(e).click((function(t){Me(e).removeClass("active"),Me(t.target).addClass("active"),Me("#urlOnDesktop").val(t.target.value)}));const n='div[data-setting="onMobile"] button';Me(n).click((function(t){Me(n).removeClass("active"),Me(t.target).addClass("active"),Me("#urlOnMobile").val(t.target.value)}))},changeAnalytics:function(){const t="#enabledGoogleGA4";Me("#enabledGoogle").change((function(e){e.target.checked?Me(t).closest("tr").show():Me(t).closest("tr").hide()}))},enableDokanVendorButton:function(){Me("#nta-wa-checkbox").on("change",(function(t){Me(this).is(":checked")?(Me(".form-table").find("#nta-wa-button-position-td").addClass("nta-wa-section-block"),Me(".form-table").find("#nta-wa-select-accounts-td").addClass("nta-wa-section-block"),Me(".nta-wa-notice").removeClass("hidden")):(Me(".form-table").find("#nta-wa-button-position-td").removeClass("nta-wa-section-block"),Me(".form-table").find("#nta-wa-select-accounts-td").removeClass("nta-wa-section-block"),Me(".nta-wa-notice").addClass("hidden"))}))},saveSetting:function(){Me(".wa-save").click((function(t){t.preventDefault(),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave();const e=Me(".nta-tab-wrapper .nav-tab-active").data("action");let n=Me(".nta-tabs-content form").serializeArray();n.push({name:"action",value:e},{name:"nonce",value:njt_wa.nonce}),n=Me.param(n),Me.ajax({url:njt_wa.url,type:"POST",data:n,beforeSend:function(){p.saveLoading(!0)}}).done((function(t){const e=Me("<p/>",{html:Me("<strong/>",{html:"Settings saved."}).append(Me("<button/>",{class:"notice-dismiss",html:Me("<span/>",{class:"screen-reader-text",html:"Dismiss this notice."}),click:function(){Me(".njt-wa-alert").hide("slow")}}))}),n=Me("<div/>",{class:"notice notice-success settings-error is-dismissible njt-wa-alert",html:Me("<div/>",{class:"wa__popup_notice"}).append(e)});Me(".nta-tab-wrapper").before(n),setTimeout((()=>{n.first().hide("slow")}),3e3),p.saveLoading(!1)}))}))},registerTooltip:function(){je(".njt-wa-tooltip",{content:"Add a scroll bar to your widget in case you have many agents",animation:"shift-away",maxWidth:250}),je('div[data-setting="onDesktop"] .btn-api',{content:"https://api.whatsapp.com/",animation:"shift-away"}),je('div[data-setting="onDesktop"] .btn-web',{content:"https://web.whatsapp.com/",animation:"shift-away"}),je('div[data-setting="onMobile"] .btn-api',{content:"https://api.whatsapp.com/",animation:"shift-away"}),je('div[data-setting="onMobile"] .btn-protocol',{content:"whatsapp://send?phone=",animation:"shift-away"})},registerPost:function(){Me("#njt-post-show-selector, #njt-post-hide-selector").select2({multiple:!0,placeholder:njt_wa.i18n.select_post,width:"100%",allowClear:!0,minimumInputLength:1,ajax:{url:window.njt_wa.url,delay:250,data:function(t){const e=Me(this).select2("data").map((t=>t.id));return{term:t.term,action:"njt_wa_get_posts",nonce:window.njt_wa.nonce,exclude:e}},processResults:function(t){var e=[];return t&&Me.each(t,(function(t,n){e.push({id:t,text:n})})),{results:e}},cache:!0}})}},Le=function(){Object.values(Ee).forEach((t=>t())),jQuery.validator.addMethod("domain",(function(t,e){return this.optional(e)||/^https:\/\/chat.whatsapp.com/.test(t)||/^(\+)\d+$/.test(t)}),"Please enter a valid phone number or group link"),jQuery.validator.setDefaults({errorClass:"wa-validate-error",success:"valid"}),Me(".post-type-whatsapp-accounts #post").validate({rules:{number:{required:!0,domain:!0},title:{maxlength:60},predefinedText:{maxlength:200},post_title:{maxlength:60}}})};!function(t){t(document).ready((function(){const e=jQuery("#app, #app-woo"),n=e.attr("id"),i=new O;if(Le(),t.extend(njt_wa,{selectedAccounts:{renderId:"#"+n,attrActive:"app"===n?"widget_show":"wc_show",attrPosition:"app"===n?"widget_position":"wc_position",init(){new(g(this.renderId))({collection:i})}}}),e.length&&njt_wa.selectedAccounts.init(),t("#app-design, #app-preview").length){const e=new y;t("#app-design").length&&new(function(t=null){if(null!==t)return Backbone.View.extend({el:t,events:{"keypress #title":"setAttributeByEvent","keyup #title":"setAttributeByEvent","keypress #btnLabel":"setAttributeByEvent","keyup #btnLabel":"setAttributeByEvent","change #nta-wa-switch-gdpr":"setGDPR","change #isShowBtnLabel":"setAttributeByCheck","change #isShowScroll":"setAttributeByCheck","input .range input":"setRangeSlider","click .btn-left":"changeWidgetPosition","click .btn-right":"changeWidgetPosition","click .btn-expandable":"changeWidgetType","click .btn-simple":"changeWidgetType"},initialize:function(){var t=this,e="{ margin: 0 !important; font-size: 16px !important}";jQuery(document).on("tinymce-editor-init",(function(n,i){i&&"description"==i.id&&(i.on("keypress keyup",(function(){t.setAttributeByEditor("description")})),i.dom.addStyle(`p ${e}`)),i&&"gdprContent"==i.id&&(i.on("keypress keyup",(function(){t.setAttributeByEditor("gdprContent")})),i.dom.addStyle(`p ${e}`)),i&&"responseText"==i.id&&(i.on("keypress keyup",(function(){t.setAttributeByEditor("responseText")})),i.dom.addStyle(`p ${e}`))})),h(".textColor").wpColorPicker({defaultColor:t.model.get("textColor"),change:function(e,n){t.setAttribute("textColor",n.color.toString())}}),h(".backgroundColor").wpColorPicker({defaultColor:t.model.get("backgroundColor"),change:function(e,n){t.setAttribute("backgroundColor",n.color.toString())}}),h("body").on("click",".wa__btn_popup",(function(){t.changeWidgetLaunch()})),this.model.view=this,this.listenTo(this.collection,"sync",this.checkWidgetType)},changeWidgetLaunch(){const t=this;var e,n;h(".wa__popup_chat_box").hasClass("wa__active")?(h(".wa__popup_chat_box").removeClass("wa__active"),h(".wa__btn_popup").removeClass("wa__active"),clearTimeout(e),h(".wa__popup_chat_box").hasClass("wa__lauch")&&new Promise(((t,e)=>{n=setTimeout((function(){h(".wa__popup_chat_box").removeClass("wa__pending"),h(".wa__popup_chat_box").removeClass("wa__lauch"),t(n)}),400)})).then((()=>{t.setAttribute("isLaunch",!1)}))):(h(".wa__popup_chat_box").addClass("wa__pending"),h(".wa__popup_chat_box").addClass("wa__active"),h(".wa__btn_popup").addClass("wa__active"),clearTimeout(n),h(".wa__popup_chat_box").hasClass("wa__lauch")||(h(".wa__popup_chat_box").addClass("wa__pending"),h(".wa__popup_chat_box").addClass("wa__active"),h(".wa__btn_popup").addClass("wa__active"),new Promise(((t,n)=>{e=setTimeout((function(){h(".wa__popup_chat_box").addClass("wa__lauch"),t(e)}),300)})).then((()=>{t.setAttribute("isLaunch",!0)}))))},changeWidgetPosition(t){const e=t.target.value;h(".setting.align button").removeClass("active"),h(t.target).addClass("active"),h("#btnPosition").val(e),this.setAttribute("btnPosition",e),"left"==e&&(h("#left-range-slider").show(),h("#right-range-slider").hide()),"right"==e&&(h("#left-range-slider").hide(),h("#right-range-slider").show())},checkWidgetType(){1===this.collection.active().length?(h(".setting.type button.btn-simple").prop("disabled",!1),h(".setting.type .btn-expandable").attr("style",""),"simple"===this.model.get("widgetType")&&h(".setting.type .btn-simple").trigger("click",[!0])):(h(".setting.type .btn-expandable").trigger("click",[!0]),h(".setting.type .btn-simple").prop("disabled",!0),h(".setting.type .btn-expandable").css("margin-right",0))},changeWidgetType(t,e=!1){const n=t.target.value;h(".setting.type button").removeClass("active"),h(t.target).addClass("active"),h("#widgetType").val(n),e||this.setAttribute("widgetType",n);const i=[".setting.widget-text",".setting.widget-scrollbar",".setting.widget-scrollbar-control",".setting.widget-powered-by",".setting.response-text",".setting.description",".setting.gdpr-content"].join(",");"expandable"===n?h(i).show():h(i).hide()},setAttribute(t,e){this.model.set({[t]:e})},setGDPR(t){const e=t.target.checked;e?h("#nta-gdpr-editor").removeClass("hidden").show():h("#nta-gdpr-editor").hide(),this.setAttribute("isShowGDPR",e?"ON":"OFF")},setAttributeByCheck:function(t){const e=jQuery(t.target).attr("id");let n=t.target.checked;"isShowBtnLabel"===e&&(n=n?"ON":"OFF","ON"==n?jQuery("#btnLabelWidth, #btnLabel").closest("tr").show():jQuery("#btnLabelWidth, #btnLabel").closest("tr").hide()),"isShowScroll"===e&&(n?jQuery("#scrollHeight").closest("tr").show():jQuery("#scrollHeight").closest("tr").hide()),this.setAttribute(e,n)},setAttributeByEvent:function(t){const e=jQuery(t.target).attr("id"),n=jQuery(t.target).val();this.setAttribute(e,n)},setAttributeByEditor:function(t){const e=tinyMCE.get(t).getContent();this.setAttribute(t,e)},setRangeSlider:function(t){this.setAttribute(t.target.name,t.target.value)}})}("#app-design"))({model:e,collection:i}),t("#app-preview").length&&new(function(t=null){if(null!==t)return Backbone.View.extend({el:t,template:_.template(h("#widget-preview").html()),initialize:function(){this.listenTo(this.model,"change",this.render),this.listenTo(this.collection,"sync",this.render),this.render()},render:function(){const t=this.model.toJSON();return t.responseText=t.responseText.replaceAll(/\r\n\r\n/gm,"<br/>"),t.gdprContent=t.gdprContent.replaceAll(/\r\n\r\n/gm,"<br/>"),t.description=t.description.replaceAll(/\r\n\r\n/gm,"<br/>"),this.$el.html(this.template({settings:t,accounts:this.collection.active()})),this.wgIcon=this.$el.find(".wa__btn_popup_icon"),this.wgBtnIcon=this.$el.find(".wa__btn_popup"),this.wgLabel=this.$el.find(".wa__btn_popup_txt"),this.wgPopup=this.$el.find(".wa__popup_chat_box"),this.wgPopupHeading=this.$el.find(".wa__popup_heading"),this.wgPopupContent=this.$el.find(".wa__popup_content"),this.wgTitle=this.$el.find(".wa__popup_title"),this.wgIntro=this.$el.find(".wa__popup_intro"),this.wgTitle.css({color:this.model.get("textColor")}),this.wgIntro.css({color:"#fff"==this.model.get("textColor")||"#ffffff"==this.model.get("textColor")?"#D9EBC6":this.model.get("textColor"),opacity:"#fff"==this.model.get("textColor")||"#ffffff"==this.model.get("textColor")?1:.8}),this.wgIcon.css({background:this.model.get("backgroundColor")}),this.wgBtnIcon.css({left:"left"===this.model.get("btnPosition")?parseInt(this.model.get("btnLeftDistance")):"unset",right:"right"===this.model.get("btnPosition")?parseInt(this.model.get("btnRightDistance")):"unset",bottom:parseInt(this.model.get("btnBottomDistance"))}),this.wgLabel.css({display:"ON"===this.model.get("isShowBtnLabel")?"block":"none",left:"left"===this.model.get("btnPosition")?"100%":"unset",right:"right"===this.model.get("btnPosition")?"100%":"unset",marginRight:"right"===this.model.get("btnPosition")?"7px":"0px",marginLeft:"left"===this.model.get("btnPosition")?"7px":"0px",width:this.model.get("btnLabelWidth")}),this.wgPopup.css({left:"left"===this.model.get("btnPosition")?parseInt(this.model.get("btnLeftDistance")):"unset",right:"right"===this.model.get("btnPosition")?parseInt(this.model.get("btnRightDistance")):"unset",bottom:parseInt(this.model.get("btnBottomDistance"))+72}),this.wgPopupHeading.css({background:this.model.get("backgroundColor")}),"ON"!==this.model.get("isShowScroll")&&1!=this.model.get("isShowScroll")||this.wgPopupContent.css({maxHeight:parseInt(this.model.get("scrollHeight")),overflow:"auto"}),"left"==this.model.get("btnPosition")?(h("#left-range-slider").show(),h("#right-range-slider").hide()):(h("#left-range-slider").hide(),h("#right-range-slider").show()),"OFF"==this.model.get("isShowGDPR")?h(".nta-wa-gdpr").hide():h(".nta-wa-gdpr").show(),this}})}("#app-preview"))({model:e,collection:i})}if(t("#wa-button, #button-design").length){const e=new x;t("#wa-button").length&&new(function(t=null){if(null!==t)return Backbone.View.extend({el:t,template:_.template(h("#button-preview").html()),initialize:function(){this.render(),this.listenTo(this.model,"change",this.render)},render:function(){let t="";return t+="round"===this.model.get("type")?"wa__r_button ":"wa__sq_button ",t+=_.isEmpty(this.model.get("avatar"))?"wa__btn_w_icon ":"wa__btn_w_img ",t+=_.isEmpty(this.model.get("title"))?"wa__button_text_only":"",this.model.attributes.buttonClass=t,this.$el.html(this.template({buttonStyles:this.model.toJSON()})),this.btn=this.$el.find(".wa__button").css({background:this.model.get("backgroundColor")}),this.$el.find(".wa__btn_txt .wa__cs_name").css({color:"#fff"==this.model.get("textColor")||"#ffffff"==this.model.get("textColor")?"#d5f0d9":this.model.get("textColor"),opacity:"#fff"==this.model.get("textColor")||"#ffffff"==this.model.get("textColor")?1:"0.8"}),this.$el.find(".wa__btn_txt .wa__btn_title").css({color:this.model.get("textColor")}),this}})}("#wa-button"))({model:e}),t("#button-design").length&&new(function(t=null){if(null!==t)return Backbone.View.extend({el:t,events:{"change #textColor":"setAttributeByEvent","change #backgroundColor":"setAttributeByEvent","change #label":"setAttributeByEvent","click .btn-round":"changeButtonType","click .btn-square":"changeButtonType"},initialize:function(){const t=this;this.model.view=this,h("#textColor").wpColorPicker({defaultColor:t.model.get("textColor"),change:function(e,n){t.setAttribute("textColor",n.color.toString())}}),h("#backgroundColor").wpColorPicker({defaultColor:t.model.get("backgroundColor"),change:function(e,n){t.setAttribute("backgroundColor",n.color.toString())}})},setAttribute(t,e){this.model.set({[t]:e})},setAttributeByEvent:function(t){const e=jQuery(t.target).attr("id"),n=jQuery(t.target).val();this.setAttribute(e,n)},changeButtonType(t){const e=t.target.value;h(".setting.align button").removeClass("active"),h(t.target).addClass("active"),h("#btnType").val(e);const n="round"==e?"wa__sq_button":"wa__r_button",i="round"==e?"wa__r_button":"wa__sq_button";h("#njt-wabutton > a").removeClass(n).addClass(i),setTimeout((()=>{this.setAttribute("type",e)}),300)},render:function(){let t="";return t+="round"===this.model.get("type")?"wa__r_button ":"wa__sq_button ",t+=_.isEmpty(this.model.get("avatar"))?"wa__btn_w_icon ":"wa__btn_w_img ",t+=_.isEmpty(this.model.get("title"))?"wa__button_text_only":"",this.model.attributes.buttonClass=t,this.$el.html(this.template({buttonStyles:this.model.toJSON()})),this}})}("#button-design"))({model:e})}}))}(jQuery)})()})();
💾 Save
❌ Cancel
Sid Gifari File Manager v1.0 | Terminal Auto-Sync Enabled | Current Path: /home/nradmin/www/wp-content/plugins/whatsapp-for-wordpress/assets/dist/js