403Webshell
Server IP : 68.178.247.200  /  Your IP : 216.73.216.110
Web Server : Apache
System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64
User : x9dppmxs4rgd ( 8559391)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/publishpress/modules/calendar/lib/async-calendar/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/publishpress/modules/calendar/lib/async-calendar/js/index.min.js
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=3)}([function(e,t,a){e.exports=function(e,t){var a,n,r=0;function l(){var l,s,i=a,o=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(s=0;s<o;s++)if(i.args[s]!==arguments[s]){i=i.next;continue e}return i!==a&&(i===n&&(n=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=a,i.prev=null,a.prev=i,a=i),i.val}i=i.next}for(l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return i={args:l,val:e.apply(null,l)},a?(a.prev=i,i.next=a):n=i,r===t.maxSize?(n=n.prev).next=null:r++,a=i,i.val}return t=t||{},l.clear=function(){a=null,n=null,r=0},l}},function(e,t,a){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(e){return i(c(e),arguments)}function s(e,t){return l.apply(null,[e].concat(t||[]))}function i(e,t){var a,n,s,i,o,c,u,p,d,h=1,m=e.length,f="";for(n=0;n<m;n++)if("string"==typeof e[n])f+=e[n];else if("object"==typeof e[n]){if((i=e[n]).keys)for(a=t[h],s=0;s<i.keys.length;s++){if(null==a)throw new Error(l('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[s],i.keys[s-1]));a=a[i.keys[s]]}else a=i.param_no?t[i.param_no]:t[h++];if(r.not_type.test(i.type)&&r.not_primitive.test(i.type)&&a instanceof Function&&(a=a()),r.numeric_arg.test(i.type)&&"number"!=typeof a&&isNaN(a))throw new TypeError(l("[sprintf] expecting number but found %T",a));switch(r.number.test(i.type)&&(p=a>=0),i.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,i.width?parseInt(i.width):0);break;case"e":a=i.precision?parseFloat(a).toExponential(i.precision):parseFloat(a).toExponential();break;case"f":a=i.precision?parseFloat(a).toFixed(i.precision):parseFloat(a);break;case"g":a=i.precision?String(Number(a.toPrecision(i.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=i.precision?a.substring(0,i.precision):a;break;case"t":a=String(!!a),a=i.precision?a.substring(0,i.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=i.precision?a.substring(0,i.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=i.precision?a.substring(0,i.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase()}r.json.test(i.type)?f+=a:(!r.number.test(i.type)||p&&!i.sign?d="":(d=p?"+":"-",a=a.toString().replace(r.sign,"")),c=i.pad_char?"0"===i.pad_char?"0":i.pad_char.charAt(1):" ",u=i.width-(d+a).length,o=i.width&&u>0?c.repeat(u):"",f+=i.align?d+a+o:"0"===c?d+o+a:o+d+a)}return f}var o=Object.create(null);function c(e){if(o[e])return o[e];for(var t,a=e,n=[],l=0;a;){if(null!==(t=r.text.exec(a)))n.push(t[0]);else if(null!==(t=r.modulo.exec(a)))n.push("%");else{if(null===(t=r.placeholder.exec(a)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){l|=1;var s=[],i=t[2],c=[];if(null===(c=r.key.exec(i)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(i=i.substring(c[0].length));)if(null!==(c=r.key_access.exec(i)))s.push(c[1]);else{if(null===(c=r.index_access.exec(i)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}a=a.substring(t[0].length)}return o[e]=n}t.sprintf=l,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=l,window.vsprintf=s,void 0===(n=function(){return{sprintf:l,vsprintf:s}}.call(t,a,t,e))||(e.exports=n))}()},,function(e,t,a){"use strict";function n(e){var t;e.icon&&(t=React.createElement("span",{className:"dashicons dashicons-"+e.icon}));var a="publishpress-calendar-button "+(e.className||"");return React.createElement("a",{href:e.href||"#",className:a,onClick:e.onClick},t,e.label)}function r(e){return React.createElement("div",{className:"publishpress-calendar-navigation-bar"},React.createElement(n,{icon:"update-alt",onClick:e.refreshOnClickCallback}),React.createElement(n,{label:"«",onClick:e.backPageOnClickCallback}),React.createElement(n,{label:"‹",onClick:e.backOnClickCallback}),React.createElement(n,{label:"Today",onClick:e.todayOnClickCallback}),React.createElement(n,{label:"›",onClick:e.forwardOnClickCallback}),React.createElement(n,{label:"»",onClick:e.forwardPageOnClickCallback}))}a.r(t);var l=wp.i18n.__;function s(e){for(var t=[l("Sun","publishpress"),l("Mon","publishpress"),l("Tue","publishpress"),l("Wed","publishpress"),l("Thu","publishpress"),l("Fri","publishpress"),l("Sat","publishpress")],a=[],n=(e.weekStartsOnSunday?0:1)-1,r=0;r<7;r++)n++,6!==r||e.weekStartsOnSunday||(n=0),a.push({key:n.toString(),label:t[n]});return React.createElement(React.Fragment,null,a.map((function(e){return React.createElement("th",{key:e.key.toString()},e.label)})))}function i(e){var t=e.showSpinner||!1,a=e.message||"";return React.createElement("div",{className:"publishpress-calendar-message-bar"},t&&React.createElement("span",{className:"dashicons dashicons-update-alt publishpress-spinner"}),React.createElement("span",null,a))}var o=a(0),c=a.n(o);a(1);c()(console.error);var u,p,d,h;u={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},p=["(","?"],d={")":["("],":":["?","?:"]},h=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var m={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,a){if(e)throw t;return a}};function f(e){var t=function(e){for(var t,a,n,r,l=[],s=[];t=e.match(h);){for(a=t[0],(n=e.substr(0,t.index).trim())&&l.push(n);r=s.pop();){if(d[a]){if(d[a][0]===r){a=d[a][1]||a;break}}else if(p.indexOf(r)>=0||u[r]<u[a]){s.push(r);break}l.push(r)}d[a]||s.push(a),e=e.substr(t.index+a.length)}return(e=e.trim())&&l.push(e),l.concat(s.reverse())}(e);return function(e){return function(e,t){var a,n,r,l,s,i,o=[];for(a=0;a<e.length;a++){if(s=e[a],l=m[s]){for(n=l.length,r=Array(n);n--;)r[n]=o.pop();try{i=l.apply(null,r)}catch(e){return e}}else i=t.hasOwnProperty(s)?t[s]:+s;o.push(i)}return o[0]}(t,e)}}var b={contextDelimiter:"",onMissingKey:null};function v(e,t){var a;for(a in this.data=e,this.pluralForms={},this.options={},b)this.options[a]=void 0!==t&&a in t?t[a]:b[a]}v.prototype.getPluralForm=function(e,t){var a,n,r,l,s=this.pluralForms[e];return s||("function"!=typeof(r=(a=this.data[e][""])["Plural-Forms"]||a["plural-forms"]||a.plural_forms)&&(n=function(e){var t,a,n;for(t=e.split(";"),a=0;a<t.length;a++)if(0===(n=t[a].trim()).indexOf("plural="))return n.substr(7)}(a["Plural-Forms"]||a["plural-forms"]||a.plural_forms),l=f(n),r=function(e){return+l({n:e})}),s=this.pluralForms[e]=r),s(t)},v.prototype.dcnpgettext=function(e,t,a,n,r){var l,s,i;return l=void 0===r?0:this.getPluralForm(e,r),s=a,t&&(s=t+this.options.contextDelimiter+a),(i=this.data[e][s])&&i[l]?i[l]:(this.options.onMissingKey&&this.options.onMissingKey(a,e),0===l?a:n)};const g={"":{plural_forms:e=>1===e?0:1}},y=/^i18n\.(n?gettext|has_translation)(_|$)/;var E=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var R=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var k=function(e,t){return function(a,n,r,l=10){const s=e[t];if(!R(a))return;if(!E(n))return;if("function"!=typeof r)return void console.error("The hook callback must be a function.");if("number"!=typeof l)return void console.error("If specified, the hook priority must be a number.");const i={callback:r,priority:l,namespace:n};if(s[a]){const e=s[a].handlers;let t;for(t=e.length;t>0&&!(l>=e[t-1].priority);t--);t===e.length?e[t]=i:e.splice(t,0,i),s.__current.forEach(e=>{e.name===a&&e.currentIndex>=t&&e.currentIndex++})}else s[a]={handlers:[i],runs:0};"hookAdded"!==a&&e.doAction("hookAdded",a,n,r,l)}};var C=function(e,t,a=!1){return function(n,r){const l=e[t];if(!R(n))return;if(!a&&!E(r))return;if(!l[n])return 0;let s=0;if(a)s=l[n].handlers.length,l[n]={runs:l[n].runs,handlers:[]};else{const e=l[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===r&&(e.splice(t,1),s++,l.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,r),s}};var w=function(e,t){return function(a,n){const r=e[t];return void 0!==n?a in r&&r[a].handlers.some(e=>e.namespace===n):a in r}};var x=function(e,t,a=!1){return function(n,...r){const l=e[t];l[n]||(l[n]={handlers:[],runs:0}),l[n].runs++;const s=l[n].handlers;if(!s||!s.length)return a?r[0]:void 0;const i={name:n,currentIndex:0};for(l.__current.push(i);i.currentIndex<s.length;){const e=s[i.currentIndex].callback.apply(null,r);a&&(r[0]=e),i.currentIndex++}return l.__current.pop(),a?r[0]:void 0}};var _=function(e,t){return function(){var a,n;const r=e[t];return null!==(a=null===(n=r.__current[r.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==a?a:null}};var S=function(e,t){return function(a){const n=e[t];return void 0===a?void 0!==n.__current[0]:!!n.__current[0]&&a===n.__current[0].name}};var D=function(e,t){return function(a){const n=e[t];if(R(a))return n[a]&&n[a].runs?n[a].runs:0}};class j{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=k(this,"actions"),this.addFilter=k(this,"filters"),this.removeAction=C(this,"actions"),this.removeFilter=C(this,"filters"),this.hasAction=w(this,"actions"),this.hasFilter=w(this,"filters"),this.removeAllActions=C(this,"actions",!0),this.removeAllFilters=C(this,"filters",!0),this.doAction=x(this,"actions"),this.applyFilters=x(this,"filters",!0),this.currentAction=_(this,"actions"),this.currentFilter=_(this,"filters"),this.doingAction=S(this,"actions"),this.doingFilter=S(this,"filters"),this.didAction=D(this,"actions"),this.didFilter=D(this,"filters")}}const A=function(){return new j}(),{addAction:F,addFilter:T,removeAction:O,removeFilter:I,hasAction:P,hasFilter:N,removeAllActions:M,removeAllFilters:U,doAction:G,applyFilters:L,currentAction:z,currentFilter:V,doingAction:Y,doingFilter:$,didAction:H,didFilter:Q,actions:W,filters:J}=A,Z=((e,t,a)=>{const n=new v({}),r=new Set,l=()=>{r.forEach(e=>e())},s=(e,t="default")=>{n.data[t]={...g,...n.data[t],...e},n.data[t][""]={...g[""],...n.data[t][""]}},i=(e,t)=>{s(e,t),l()},o=(e="default",t,a,r,l)=>(n.data[e]||s(void 0,e),n.dcnpgettext(e,t,a,r,l)),c=(e="default")=>e,u=(e,t,n)=>{let r=o(n,t,e);return a?(r=a.applyFilters("i18n.gettext_with_context",r,e,t,n),a.applyFilters("i18n.gettext_with_context_"+c(n),r,e,t,n)):r};if(e&&i(e,t),a){const e=e=>{y.test(e)&&l()};a.addAction("hookAdded","core/i18n",e),a.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:i,resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},i(e,t)},subscribe:e=>(r.add(e),()=>r.delete(e)),__:(e,t)=>{let n=o(t,void 0,e);return a?(n=a.applyFilters("i18n.gettext",n,e,t),a.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:(e,t,n,r)=>{let l=o(r,void 0,e,t,n);return a?(l=a.applyFilters("i18n.ngettext",l,e,t,n,r),a.applyFilters("i18n.ngettext_"+c(r),l,e,t,n,r)):l},_nx:(e,t,n,r,l)=>{let s=o(l,r,e,t,n);return a?(s=a.applyFilters("i18n.ngettext_with_context",s,e,t,n,r,l),a.applyFilters("i18n.ngettext_with_context_"+c(l),s,e,t,n,r,l)):s},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,r)=>{var l,s;const i=t?t+""+e:e;let o=!(null===(l=n.data)||void 0===l||null===(s=l[null!=r?r:"default"])||void 0===s||!s[i]);return a&&(o=a.applyFilters("i18n.has_translation",o,e,t,r),o=a.applyFilters("i18n.has_translation_"+c(r),o,e,t,r)),o}}})(void 0,void 0,A);Z.getLocaleData.bind(Z),Z.setLocaleData.bind(Z),Z.resetLocaleData.bind(Z),Z.subscribe.bind(Z);const K=Z.__.bind(Z);Z._x.bind(Z),Z._n.bind(Z),Z._nx.bind(Z),Z.isRTL.bind(Z),Z.hasTranslation.bind(Z);function X(e,t,a,n,r,l,s){try{var i=e[l](s),o=i.value}catch(e){return void a(e)}i.done?t(o):Promise.resolve(o).then(n,r)}function q(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var l=e.apply(t,a);function s(e){X(l,n,r,s,i,"next",e)}function i(e){X(l,n,r,s,i,"throw",e)}s(void 0)}))}}function B(e,t){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=new Date(t,0,1+7*(e-1)),r=n.getDay(),l=n;return r<=4?l.setDate(n.getDate()-n.getDay()+1):l.setDate(n.getDate()+8-n.getDay()),a&&l.setDate(l.getDate()-1),l}function ee(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n=a.getDay();a.setDate(a.getDate()+4-(a.getDay()||7));var r=new Date(a.getFullYear(),0,1),l=Math.round(((a-r)/864e5+1)/7);return t&&0===n&&l++,[a.getFullYear(),l]}function te(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=ee(e,t);return B(a[1],a[0],t)}function ae(e){return e.getFullYear()+"-"+(e.getMonth()+1).toString().padStart(2,"0")+"-"+e.getDate().toString().padStart(2,"0")}function ne(e,t){return e.url?React.createElement("a",{href:e.url},e.label):e.action?React.createElement("a",{href:"javascript:void(0);",onClick:function(a){return t(a,e)}},e.label):void 0}function re(e,t,a){return le.apply(this,arguments)}function le(){return(le=q(regeneratorRuntime.mark((function e(t,a,n){var r,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n+"?action="+t,e.t0=regeneratorRuntime.keys(a);case 2:if((e.t1=e.t0()).done){e.next=9;break}if(l=e.t1.value,a.hasOwnProperty(l)){e.next=6;break}return e.abrupt("continue",2);case 6:r+="&"+l+"="+a[l],e.next=2;break;case 9:return e.next=11,fetch(r);case 11:return s=e.sent,e.next=14,s.json();case 14:return e.abrupt("return",e.sent);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return(se=q(regeneratorRuntime.mark((function e(t,a,n,r){var l,s,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=n+"?action="+t,e.t0=regeneratorRuntime.keys(a);case 2:if((e.t1=e.t0()).done){e.next=9;break}if(s=e.t1.value,a.hasOwnProperty(s)){e.next=6;break}return e.abrupt("continue",2);case 6:l+="&"+s+"="+a[s],e.next=2;break;case 9:return e.next=11,fetch(l,{method:"post",body:r});case 11:return i=e.sent,e.next=14,i.json();case 14:return e.abrupt("return",e.sent);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return new Date(String(e).replace(/-/g,"/"))}function oe(e){return e.isEditing?React.createElement("input",{type:"text",id:e.id,value:e.value,onChange:function(t){e.onChange&&e.onChange(t,t.target.value)}}):React.createElement("time",{dateTime:e.value,title:e.value,id:e.id},e.valueString||e.value)}var ce=jQuery;function ue(e){var t,a=React.useRef(null);React.useEffect((function(){var t={placeholder:e.placeholder||!1,tags:!0,allowClear:void 0===e.allowClear||null===e.allowClear||e.allowClear};return e.ajaxUrl&&(t.ajax={delay:250,url:e.ajaxUrl,dataType:"json",data:function(t){var a={q:t.term,action:e.ajaxAction,nonce:e.nonce};if(e.ajaxArgs)for(var n in e.ajaxArgs)e.ajaxArgs.hasOwnProperty(n)&&(a[n]=e.ajaxArgs[n]);return a},processResults:function(e){return{results:e}}}),ce(a.current).pp_select2(t).on("select2:select",(function(t){"function"==typeof e.onSelect&&e.onSelect(t,a.current,ce(a.current).pp_select2("data"))})).on("select2:clear",(function(t){"function"==typeof e.onClear&&e.onClear(t,a.current)})),function(){ce(a.current).pp_select2("destroy")}}),[]),e.options&&(t=e.options.map((function(t){return React.createElement("option",{value:t.value,selected:t.value===e.value},t.text)})));var n="pp_select2";return e.className&&(n+=" "+e.className),React.createElement("select",{className:n,id:e.id,multiple:e.multiple,ref:a},e.placeholder?React.createElement("option",{value:""},e.placeholder):React.createElement(React.Fragment,null),t)}function pe(e){return e.isEditing?React.createElement(ue,{ajaxUrl:e.ajaxUrl,nonce:e.nonce,multiple:e.multiple,ajaxAction:"publishpress_calendar_search_authors",value:e.value,name:e.name,id:e.id,onSelect:e.onSelect,onClear:e.onClear}):React.createElement("span",{id:e.id},e.value.join(", "))}function de(e){return e.isEditing?React.createElement("input",{type:"text",value:e.value}):React.createElement("span",null,e.value)}function he(e){return e.isEditing?React.createElement(ue,{options:e.options,id:e.id,value:e.value,allowClear:e.allowClear,onSelect:e.onSelect,onClear:e.onClear}):React.createElement("span",{id:e.id},e.value)}var me=wp.i18n.__;function fe(e){return e.isEditing?React.createElement(ue,{placeholder:e.placeholder,id:e.id,ajaxUrl:e.ajaxUrl,nonce:e.nonce,ajaxAction:"publishpress_calendar_search_terms",ajaxArgs:{taxonomy:e.taxonomy},value:e.value,multiple:e.multiple,onSelect:e.onSelect,onClear:e.onClear,className:e.className}):void 0===e.value||0===e.value.length?React.createElement("span",{id:e.id,className:"publishpress-calendar-empty-value"},me("No terms","publishpress")):React.createElement("span",{id:e.id},e.value.join(", "))}function be(e){return e.isEditing?React.createElement("input",{type:"checkbox",id:e.id,value:"1",checked:"Yes"===e.value}):"Yes"===e.value?React.createElement("span",{id:e.id,className:"dashicons dashicons-yes-alt"}):React.createElement("span",{id:e.id,className:"dashicons dashicons-no-alt"})}function ve(e){return e.isEditing?React.createElement("input",{type:"location",id:e.id,value:e.value,onChange:function(t){e.onChange&&e.onChange(t,t.target.value)}}):React.createElement("span",{id:e.id},e.value)}function ge(e){return e.isEditing?React.createElement("textarea",{id:e.id,onChange:function(t){e.onChange&&e.onChange(t,t.target.value)}},e.value):React.createElement("div",{id:e.id},e.value)}function ye(e){return e.isEditing?React.createElement("input",{type:"text",id:e.id,value:e.value,onChange:function(t){e.onChange&&e.onChange(t,t.target.value)}}):React.createElement("span",{id:e.id},e.value)}function Ee(e){return e.isEditing?React.createElement("input",{type:"text",id:e.id,value:e.value}):React.createElement("span",{id:e.id},e.value)}function Re(e){var t;return e.isEditing?React.createElement("input",{type:"number",value:e.value,id:e.id,onChange:function(t){e.onChange&&e.onChange(t,t.target.value)}}):(t=0===e.value?"publishpress-calendar-empty-value":"",React.createElement("span",{id:e.id,className:t},e.value))}function ke(e){return React.useEffect((function(){var t="#"+e.id,a={regex:"^([0][0-9]|[1][0-9]|[2][0-3]):[0-5][0-9]$",showMaskOnHover:!1,staticDefinitionSymbol:"*"};e.placeholder&&(a.placeholder=e.placeholder),jQuery(t).inputmask(a),jQuery(t).on("change",(function(t){e.onChange&&e.onChange(t,t.target.value)}))})),e.isEditing?React.createElement("input",{type:"text",id:e.id,placeholder:e.placeholder||null,value:e.value}):React.createElement("span",{id:e.id},e.value)}var Ce=wp.i18n.__,we=jQuery;function xe(e){if(!e.data)return React.createElement(React.Fragment,null);if(!e.target.current)return React.createElement(React.Fragment,null);var t=we(e.target.current).position(),a=we(e.target.current).offset(),n=we(e.target.current).width(),r=t.top,l=a.left+380+10+180>=we(document).width()?t.left-25-380:t.left+n+10,s=function(t,a){t.preventDefault(),re(a.action,a.args,e.ajaxUrl).then((function(t){e.onItemActionClickCallback(a.action,e.id,t)}))};return React.createElement("div",{className:"publishpress-calendar-popup",style:{top:r,left:l}},React.createElement("div",{className:"publishpress-calendar-popup-title",style:{backgroundColor:e.color}},e.icon&&React.createElement("span",{className:"dashicons "+e.icon+" publishpress-calendar-icon"}),e.title,React.createElement("span",{className:"dashicons dashicons-no publishpress-calendar-popup-close",title:Ce("Close","publishpress"),onClick:function(){we(document).trigger("publishpress_calendar:close_popup")}})),React.createElement("table",null,React.createElement("tbody",null,function(){var t,a,n=[];for(var r in e.data.fields)if(e.data.fields.hasOwnProperty(r)){switch((t=e.data.fields[r]).type){case"date":a=React.createElement(oe,{value:t.value,valueString:t.valueString||null,isEditing:!1});break;case"time":a=React.createElement(ke,{value:t.value,isEditing:!1});break;case"authors":a=React.createElement(pe,{value:t.value,isEditing:!1});break;case"type":a=React.createElement(de,{value:t.value,isEditing:!1});break;case"status":a=React.createElement(he,{value:t.value,isEditing:!1});break;case"taxonomy":a=React.createElement(fe,{value:t.value,isEditing:!1});break;case"checkbox":a=React.createElement(be,{value:t.value,isEditing:!1});break;case"location":a=React.createElement(ve,{value:t.value,isEditing:!1});break;case"paragraph":a=React.createElement(ge,{value:t.value,isEditing:!1});break;case"text":a=React.createElement(ye,{value:t.value,isEditing:!1});break;case"user":a=React.createElement(Ee,{value:t.value,isEditing:!1});break;case"number":a=React.createElement(Re,{value:t.value,isEditing:!1});break;default:a=null}n.push(React.createElement("tr",null,React.createElement("th",null,t.label,":"),React.createElement("td",null,a)))}return n}())),React.createElement("hr",null),React.createElement("div",{className:"publishpress-calendar-popup-links"},function(){var t,a=[];for(var n in e.data.links)e.data.links.hasOwnProperty(n)&&((t=e.data.links[n]).url?a.push(React.createElement("a",{href:t.url},t.label)):t.action&&a.push(React.createElement("a",{href:"javascript:void(0);",onClick:function(e){return s(e,t)}},t.label)),a.push(React.createElement("span",null,"|")));return a.pop(),a}()))}var _e=wp.i18n.__,Se=jQuery;function De(e){var t,a=_e("Untitled","publishpress"),n=React.useRef(null),r=e.showIcon&&e.icon?React.createElement("span",{className:"dashicons "+e.icon}," "):null,l=e.showTime?React.createElement("time",{className:"publishpress-calendar-item-time",dateTime:e.timestamp,title:e.timestamp},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ga",a=e.getHours();return"ga"===t||"ha"===t?0===a?a="12am":a<12?("ha"===t&&(a=a.toString().padStart(2,"0")),a+="am"):(a>12&&(a-=12),"ha"===t&&(a=a.toString().padStart(2,"0")),a+="pm"):a=a.toString().padStart(2,"0"),a}(ie(e.timestamp),e.timeFormat||"g:i a")):null,s=e.label||a;return React.createElement("li",{ref:n,className:(t="publishpress-calendar-item",e.isPopupOpened&&(t+=" publishpress-calendar-item-opened-popup"),e.canMove&&(t+=" publishpress-calendar-item-movable"),t),style:{backgroundColor:e.color},"data-index":e.index,"data-id":e.id,"data-datetime":e.timestamp,onClick:function(t){var a;(a=t.target,Se(a).hasClass("publishpress-calendar-popup")||Se(a).parents(".publishpress-calendar-popup").length>0)||e.onClickItemCallback(e.id)}},r,l,s,e.isPopupOpened&&React.createElement(xe,{target:n,id:e.id,title:s,icon:e.icon,timestamp:e.timestamp,color:e.color,data:e.isPopupOpened?e.getPopupItemDataCallback():null,onItemActionClickCallback:e.onItemActionClickCallback,ajaxUrl:e.ajaxUrl}))}function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var n,r,l=[],s=!0,i=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(l.push(n.value),!t||l.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(i)throw r}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ae(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ae(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var Fe=wp.i18n.__;function Te(e){var t,a,n,r,l=je(React.useState(!1),2),s=l[0],i=l[1],o=0,c=function(){i(!s)},u=s||-1===e.maxVisibleItems?e.items:e.items.slice(0,e.maxVisibleItems);return React.createElement("td",{className:(a=e.date,n=e.todayDate,r=[1,2,3,4,5].indexOf(a.getDay())>=0?"business-day":"weekend-day",n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&(r+=" publishpress-calendar-today"),e.isLoading&&(r+=" publishpress-calendar-loading"),s&&(r+=" publishpress-calendar-uncollapse"),1===a.getDate()&&(r+=" publishpress-calendar-first-day-of-month"),e.isHovering&&(r+=" publishpress-calendar-hovering"),"publishpress-calendar-"+r),"data-year":e.date.getFullYear(),"data-month":e.date.getMonth()+1,"data-day":e.date.getDate()},React.createElement("div",null,React.createElement("div",{className:"publishpress-calendar-cell-header"},e.shouldDisplayMonthName&&React.createElement("span",{className:"publishpress-calendar-month-name"},(t=e.date.getMonth(),[K("Jan","publishpress"),K("Feb","publishpress"),K("Mar","publishpress"),K("Apr","publishpress"),K("May","publishpress"),K("Jun","publishpress"),K("Jul","publishpress"),K("Aug","publishpress"),K("Sep","publishpress"),K("Oct","publishpress"),K("Nov","publishpress"),K("Dec","publishpress")][t])),React.createElement("span",{className:"publishpress-calendar-date"},e.date.getDate()),e.isHovering&&React.createElement("span",{className:"publishpress-calendar-cell-click-to-add"},Fe("Click to add","publishpress"))),React.createElement("ul",{className:"publishpress-calendar-day-items"},u.map((function(t){var a=t.id===e.openedItemId;return React.createElement(De,{key:"item-"+t.id+"-"+e.date.getTime(),icon:t.icon,color:t.color,label:t.label,id:t.id,timestamp:t.timestamp,timeFormat:e.timeFormat,showTime:t.showTime,showIcon:!0,index:o++,canMove:t.canEdit,isPopupOpened:a,getPopupItemDataCallback:e.getOpenedItemDataCallback,onClickItemCallback:e.onClickItemCallback,onItemActionClickCallback:e.onItemActionClickCallback,ajaxUrl:e.ajaxUrl})}))),function(){if(-1===e.maxVisibleItems)return React.createElement(React.Fragment,null);if(e.items.length>e.maxVisibleItems){var t=e.items.length-e.maxVisibleItems,a=s?"Hide the "+t+" last items":"Show "+t+" more",n=s?"publishpress-calendar-hide-items":"publishpress-calendar-show-more",r=s?"hidden":"visibility";return React.createElement("a",{href:"javascript:void(0);",className:n,onClick:c},React.createElement("span",{className:"dashicons dashicons-"+r})," ",a)}return React.createElement(React.Fragment,null)}()))}var Oe=wp.i18n.__,Ie=wp.i18n._n;function Pe(e){for(var t=function(t,a){var n=a?a[0].id:null;e.onChange(t,n)},a=function(e,a,n){t("status",n)},n=function(e,a,n){t("category",n)},r=function(e,a,n){t("tag",n)},l=function(e,a,n){t("author",n)},s=function(e,a,n){t("postType",n)},i=function(e,a,n){t("weeks",n)},o=function(e){return Ie("%d week","%d weeks",e,"publishpress").replace("%d",e)},c=o(e.numberOfWeeksToDisplay),u=[],p=1;p<=12;p++)u.push({value:p,text:o(p)});return React.createElement("div",{className:"publishpress-calendar-filter-bar"},React.createElement(ue,{placeholder:Oe("All statuses","publishpress"),options:e.statuses,onSelect:a,onClear:a}),React.createElement(fe,{placeholder:Oe("All categories","publishpress"),isEditing:!0,ajaxUrl:e.ajaxUrl,nonce:e.nonce,taxonomy:"category",onSelect:n,onClear:n,multiple:!1,className:"publishpress-calendar-category-filter"}),React.createElement(fe,{placeholder:Oe("All tags","publishpress"),isEditing:!0,ajaxUrl:e.ajaxUrl,nonce:e.nonce,taxonomy:"post_tag",onSelect:r,onClear:r,multiple:!1,className:"publishpress-calendar-tag-filter"}),React.createElement(ue,{placeholder:Oe("All authors","publishpress"),ajaxUrl:e.ajaxUrl,nonce:e.nonce,ajaxAction:"publishpress_calendar_search_authors",onSelect:l,onClear:l}),React.createElement(ue,{placeholder:Oe("All types","publishpress"),options:e.postTypes,onSelect:s,onClear:s}),React.createElement(ue,{placeholder:c,options:u,onSelect:i,onClear:i}))}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var n,r,l=[],s=!0,i=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(l.push(n.value),!t||l.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(i)throw r}}return l}(e,t)||Me(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(e,t){if(e){if("string"==typeof e)return Ue(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ue(e,t):void 0}}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var Ge=wp.i18n.__,Le=jQuery;function ze(e){var t=Ne(React.useState(e.postTypes[0].value),2),a=t[0],n=t[1],r=Ne(React.useState([]),2),l=r[0],s=r[1],i=Ne(React.useState(!1),2),o=i[0],c=i[1],u=Ne(React.useState(!1),2),p=u[0],d=u[1],h=Ne(React.useState(),2),m=h[0],f=h[1],b=function(){g(),R()},v=function(){Le("#wpwrap").css("overflow","hidden")},g=function(){Le("#wpwrap").css("overflow","auto")},y=function(){k("post_type",e.postTypes[0].value),k("status","draft")},E=function(e){return void 0===window.publishpressCalendarGlobalData&&(window.publishpressCalendarGlobalData={}),void 0===window.publishpressCalendarGlobalData.formFieldsData&&(window.publishpressCalendarGlobalData.formFieldsData={}),window.publishpressCalendarGlobalData.formFieldsData.hasOwnProperty(e)?window.publishpressCalendarGlobalData.formFieldsData[e]:null},R=function(){void 0!==window.publishpressCalendarGlobalData&&void 0!==window.publishpressCalendarGlobalData.formFieldsData&&(window.publishpressCalendarGlobalData.formFieldsData=[])},k=function(e,t){!function(e,t){E(e),window.publishpressCalendarGlobalData.formFieldsData[e]=t}(e,t)},C=function(t,a){t.preventDefault(),c(!0),d(a.id),f(null),function(e,t,a,n){return se.apply(this,arguments)}(a.action,a.args,e.ajaxUrl,function(){var t=new FormData;for(var a in t.append("date",ae(e.date)),t.append("nonce",e.nonce),window.publishpressCalendarGlobalData.formFieldsData)window.publishpressCalendarGlobalData.formFieldsData.hasOwnProperty(a)&&t.append(a,window.publishpressCalendarGlobalData.formFieldsData[a]);return t}()).then((function(t){"create"===a.id?(c(!1),d(null),"success"===t.status?e.onCloseCallback&&e.onCloseCallback():f(t.message)):"edit"===a.id&&("success"===t.status?window.location.href=t.data.link:(c(!1),d(null),f(t.message)))}))},w=function(){setTimeout((function(){Le(".publishpress-calendar-popup-form input").first().focus()}),500)};React.useEffect((function(){return R(),n(e.postTypes[0].value),y(),v(),b}),[]),React.useEffect((function(){c(!0);var t={nonce:e.nonce,postType:E("post_type"),date:ae(e.date)};s(null),re(e.actionGetPostTypeFields,t,e.ajaxUrl).then((function(e){s(e.fields)})).then((function(){w(),c(!1)}))}),[a]);var x=function(){var t,a,n,r,s=[],i=function(i){if(!l.hasOwnProperty(i))return"continue";switch(n="publishpress-calendar-field-"+i,t=l[i],r=t.placeholder?t.placeholder:null,t.type){case"date":a=React.createElement(oe,{value:t.value,isEditing:!0,id:n,onChange:function(e,t){k(i,t)}});break;case"authors":a=React.createElement(pe,{value:t.value,isEditing:!0,name:i,id:n,nonce:e.nonce,ajaxUrl:e.ajaxUrl,multiple:e.allowAddingMultipleAuthors,onSelect:function(e,t,a){for(var n=[],r=0;r<a.length;r++)n.push(a[r].id);k(i,n)},onClear:function(e,t){k(i,null)}});break;case"status":a=React.createElement(he,{value:t.value,isEditing:!0,id:n,options:t.options,onSelect:function(e,t,a){var n=null;a.length>0&&(n=a[0].id),k(i,n)},onClear:function(e,t){k(i,null)}});break;case"taxonomy":a=React.createElement(fe,{value:t.value,isEditing:!0,id:n,taxonomy:t.taxonomy,nonce:e.nonce,ajaxUrl:e.ajaxUrl,multiple:!0,onSelect:function(e,t,a){for(var n=[],r=0;r<a.length;r++)n.push(a[r].id);k(i,n)},onClear:function(e,t){k(i,null)}});break;case"checkbox":a=React.createElement(be,{isEditing:!0,id:n,value:t.value});break;case"location":a=React.createElement(ve,{value:t.value,isEditing:!0,id:n,onChange:function(e,t){k(i,t)}});break;case"html":a=React.createElement(ge,{value:t.value,isEditing:!0,id:n,onChange:function(e,t){k(i,t)}});break;case"text":a=React.createElement(ye,{value:t.value,isEditing:!0,id:n,placeholder:r,onChange:function(e,t){k(i,t)}});break;case"user":a=React.createElement(Ee,{value:t.value,isEditing:!0,id:n});break;case"number":a=React.createElement(Re,{value:t.value,isEditing:!0,id:n,onChange:function(e,t){k(i,t)}});break;case"time":a=React.createElement(ke,{value:t.value,isEditing:!0,id:n,placeholder:r,onChange:function(e,t){k(i,t)}});break;default:a=null}s.push(React.createElement("tr",null,React.createElement("th",null,React.createElement("label",{htmlFor:n},t.label,":")),React.createElement("td",null,a)))};for(var o in l)i(o);return s}();return React.createElement(React.Fragment,null,React.createElement("div",{className:"publishpress-calendar-popup-screen-lock"}),React.createElement("div",{className:"publishpress-calendar-popup publishpress-calendar-popup-form"},React.createElement("div",{className:"publishpress-calendar-popup-title"},e.postId?"":Ge("Add content for %s","publishpress").replace("%s",date_i18n(e.dateFormat,e.date)),React.createElement("span",{className:"dashicons dashicons-no publishpress-calendar-popup-close",title:Ge("Close","publishpress"),onClick:e.onCloseCallback})),React.createElement("hr",null),React.createElement("table",null,React.createElement("tbody",null,e.postTypes.length>1&&React.createElement("tr",null,React.createElement("th",null,React.createElement("label",null,Ge("Post type:","publishpress"))),React.createElement("td",null,React.createElement(ue,{options:e.postTypes,allowClear:!1,onSelect:function(e){var t=Le(e.target).pp_select2("data")[0].id;n(t),k("post_type",t)}}))),1===e.postTypes.length&&React.createElement("tr",null,React.createElement("th",null,React.createElement("label",null,Ge("Post type:","publishpress"))),React.createElement("td",null,function(t){var a,n=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=Me(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,i=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){i=!0,l=e},f:function(){try{s||null==a.return||a.return()}finally{if(i)throw l}}}}(e.postTypes);try{for(n.s();!(a=n.n()).done;){var r=a.value;if(r.value===t)return r.text}}catch(e){n.e(e)}finally{n.f()}return Ge("Post type not found","publishpress")}(a))),x.length>0&&x)),0===x.length&&React.createElement("div",{className:"publishpress-calendar-popup-loading-fields"},Ge("Please, wait! Loading the form fields...","publishpress")),m&&React.createElement("div",{className:"publishpress-calendar-popup-error-message"},React.createElement("span",{className:"dashicons dashicons-warning"}),m),React.createElement("hr",{className:"publishpress-calendar-popup-links-hr"}),React.createElement("div",{className:"publishpress-calendar-popup-links"},function(){var e,t=[{id:"create",label:Ge("Save","publishpress"),labelLoading:Ge("Saving...","publishpress"),action:"publishpress_calendar_create_item"},{id:"edit",label:Ge("Save and edit","publishpress"),labelLoading:Ge("Saving...","publishpress"),action:"publishpress_calendar_create_item"}],a=[];for(var n in t)t.hasOwnProperty(n)&&(e=t[n],p===e.id?a.push(React.createElement("span",null,e.labelLoading)):a.push(ne(e,C)),a.push(React.createElement("span",null,"|")));return a.pop(),a}(),o&&React.createElement("span",{className:"dashicons dashicons-update-alt publishpress-spinner"}))))}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==a)return;var n,r,l=[],s=!0,i=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(l.push(n.value),!t||l.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(i)throw r}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ye(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ye(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var $e=wp.i18n.__,He=jQuery;function Qe(e){var t=e.theme||"light",a=Ve(React.useState(te(e.firstDateToDisplay,e.weekStartsOnSunday)),2),n=a[0],l=a[1],o=Ve(React.useState(e.numberOfWeeksToDisplay),2),c=o[0],u=o[1],p=Ve(React.useState(e.items),2),d=p[0],h=p[1],m=Ve(React.useState(!1),2),f=m[0],b=m[1],v=Ve(React.useState(!1),2),g=v[0],y=v[1],E=Ve(React.useState(),2),R=E[0],k=E[1],C=Ve(React.useState(),2),w=C[0],x=C[1],_=Ve(React.useState(),2),S=_[0],D=_[1],j=Ve(React.useState(),2),A=j[0],F=j[1],T=Ve(React.useState(),2),O=T[0],I=T[1],P=Ve(React.useState(),2),N=P[0],M=P[1],U=Ve(React.useState(e.numberOfWeeksToDisplay),2),G=U[0],L=U[1],z=Ve(React.useState(),2),V=z[0],Y=z[1],$=Ve(React.useState([]),2),H=$[0],Q=$[1],W=Ve(React.useState(0),2),J=W[0],Z=W[1],K=Ve(React.useState(0),2),X=K[0],q=K[1],B=Ve(React.useState(),2),ee=B[0],ne=B[1],re=Ve(React.useState(),2),le=re[0],se=re[1],oe=function(t,a){return a||(a=""),e.ajaxUrl+"?action="+t+"&nonce="+e.nonce+a},ce=function(){document.removeEventListener("keydown",Ee),He(".publishpress-calendar tbody > tr > td").off("mouseenter")},ue=function(){He(".publishpress-calendar-day-hover").removeClass("publishpress-calendar-day-hover"),He(".publishpress-calendar-loading").removeClass("publishpress-calendar-loading")},pe=function(e){l(new Date(n.getTime()+7*e*24*60*60*1e3))},de=function(t,a){var n=He(t.target),r=He(a.draggable[0]),l=ae(ie(r.data("datetime")));He(t.target).addClass("publishpress-calendar-loading"),function(t,a,n,r,l){var s=d[t][a];b(!0),k($e("Moving the item...","publishpress"));var i=oe(e.actionMoveItem),o=new FormData;o.append("id",s.id),o.append("year",n),o.append("month",r),o.append("day",l),fetch(i,{method:"POST",body:o}).then((function(e){return e.json()})).then((function(){q(X+1)}))}(l,r.data("index"),n.data("year"),n.data("month"),n.data("day"))},he=function(e,t){ue(),He(e.target).addClass("publishpress-calendar-day-hover")},me=function(e){var t=He(e);return t.is("td.publishpress-calendar-business-day, td.publishpress-calendar-weekend-day")?t:t.is(".publishpress-calendar-cell-header, .publishpress-calendar-date, .publishpress-calendar-cell-click-to-add, .publishpress-calendar-month-name")?t.parents("td"):null},fe=function(e){var t=ie(e.data("year")+"-"+e.data("month")+"-"+e.data("day"));return t.getHours()>0&&t.setTime(t.getTime()+6e4*t.getTimezoneOffset()),t},be=function(){var e;He(".publishpress-calendar tbody > tr > td").on("mouseover",(function(t){t.preventDefault(),t.stopPropagation();var a=me(t.target);if(a){if(function(e){return He(e).hasClass("publishpress-calendar-day-hover")}(a))return;ne(fe(a)),e=fe(a)}})).on("mouseout",(function(t){t.stopPropagation(),t.preventDefault(),me(t.relatedTarget)||(ne(null),e=null)})).on("click",(function(t){me(t.target)&&(Y(null),se(e))}))},ve=function(){Y(null),Q(null),se(null)},ge=function(e){Q(null),ne(null),se(null),Y(e)},ye=function(e,t,a){Z(J+1)},Ee=function(e){"Escape"===e.key&&ve()},Re=function(){return H},ke=function(){Y(null)};React.useEffect((function(){return document.addEventListener("keydown",Ee),He(document).on("publishpress_calendar:close_popup",ke),e.userCanAddPosts&&be(),ce}),[]),React.useEffect((function(){He(".publishpress-calendar-day-items li").draggable({zIndex:99999,helper:"clone",containment:".publishpress-calendar table",start:function(e,t){return He(e.target).data("id")!==V&&(!!He(e.target).hasClass("publishpress-calendar-item-movable")&&(He(e.target).addClass("ui-draggable-target"),ve(),void y(!0)))},stop:function(e,t){He(".ui-draggable-target").removeClass("ui-draggable-target"),y(!1)}}),He(".publishpress-calendar tbody > tr > td").droppable({drop:de,over:he})})),e.userCanAddPosts&&React.useEffect(be,[n,c,G,O,A,S,w,N,X]),React.useEffect((function(){b(!0),k($e("Loading...","publishpress"));var t=oe(e.actionGetData,"&start_date="+ae(te(n,e.weekStartsOnSunday))+"&number_of_weeks="+c);w&&(t+="&post_status="+w),S&&(t+="&category="+S),A&&(t+="&post_tag="+A),O&&(t+="&post_author="+O),N&&(t+="&post_type="+N),G&&(t+="&weeks="+G),fetch(t).then((function(e){return e.json()})).then((function(e){h(e),b(!1),k(null),ue()}))}),[n,c,G,O,A,S,w,N,X]),React.useEffect((function(){if(V){b(!0),k($e("Loading item...","publishpress"));var t=e.ajaxUrl+"?action=publishpress_calendar_get_post_data&nonce="+e.nonce+"&id="+V;fetch(t).then((function(e){return e.json()})).then((function(e){b(!1),k(null),Q(e)}))}}),[V,J]);var Ce=["publishpress-calendar","publishpress-calendar-theme-"+t];return e.userCanAddPosts&&Ce.push("user-can-add-posts"),React.createElement("div",{className:Ce.join(" ")},React.createElement(Pe,{statuses:e.statuses,postTypes:e.postTypes,numberOfWeeksToDisplay:c,ajaxUrl:e.ajaxUrl,nonce:e.nonce,onChange:function(t,a){"status"===t&&x(a),"category"===t&&D(a),"tag"===t&&F(a),"author"===t&&I(a),"postType"===t&&M(a),"weeks"===t&&((0===(a=parseInt(a))||isNaN(a))&&(a=e.numberOfWeeksToDisplay),L(a),u(a))}}),React.createElement(r,{refreshOnClickCallback:function(e){e.preventDefault(),q(X+1)},backPageOnClickCallback:function(e){e.preventDefault(),pe(-1*c)},backOnClickCallback:function(e){e.preventDefault(),pe(-1)},forwardOnClickCallback:function(e){e.preventDefault(),pe(1)},forwardPageOnClickCallback:function(e){e.preventDefault(),pe(c)},todayOnClickCallback:function(t){t.preventDefault(),l(te(e.todayDate,e.weekStartsOnSunday))}}),React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement(s,{weekStartsOnSunday:e.weekStartsOnSunday}))),React.createElement("tbody",null,function(){for(var t,a,r=7*c,l=te(n,e.weekStartsOnSunday),s=[],i=[],o=0,u=l.getMonth(),p=0;p<r;p++)0===o&&(i=[]),(t=new Date(l)).setDate(t.getDate()+p),a=ae(t),i.push(React.createElement(Te,{key:"day-"+t.getTime(),date:t,shouldDisplayMonthName:u!==t.getMonth()||0===p,todayDate:e.todayDate,isLoading:!1,isHovering:!g&&ee&&ee.getTime()===t.getTime()&&!le,items:d[a]||[],maxVisibleItems:parseInt(e.maxVisibleItems),timeFormat:e.timeFormat,openedItemId:V,getOpenedItemDataCallback:Re,ajaxUrl:e.ajaxUrl,onClickItemCallback:ge,onItemActionClickCallback:ye})),7===++o&&(o=0,s.push(React.createElement("tr",null,i))),u=t.getMonth();return s}())),le&&React.createElement(ze,{date:le,ajaxUrl:e.ajaxUrl,dateFormat:e.dateFormat,postTypes:e.postTypesCanCreate,statuses:e.statuses,actionGetPostTypeFields:e.actionGetPostTypeFields,nonce:e.nonce,onCloseCallback:function(){q(X+1),se(null)},allowAddingMultipleAuthors:e.allowAddingMultipleAuthors}),React.createElement(i,{showSpinner:f,message:R}))}jQuery((function(){var e,t,a;ReactDOM.render(React.createElement(Qe,{firstDateToDisplay:(e=publishpressCalendarParams.firstDateToDisplay,t=new Date(e),a=6e4*t.getTimezoneOffset(),new Date(t.getTime()+a)),weekStartsOnSunday:1===parseInt(publishpressCalendarParams.weekStartsOnSunday),numberOfWeeksToDisplay:publishpressCalendarParams.numberOfWeeksToDisplay,todayDate:ie(publishpressCalendarParams.todayDate),dateFormat:publishpressCalendarParams.dateFormat,timeFormat:publishpressCalendarParams.timeFormat,theme:publishpressCalendarParams.theme,statusesToDisplayTime:publishpressCalendarParams.statusesToDisplayTime,maxVisibleItems:publishpressCalendarParams.maxVisibleItems,ajaxUrl:publishpressCalendarParams.ajaxUrl,actionGetData:"publishpress_calendar_get_data",actionMoveItem:"publishpress_calendar_move_item",actionGetPostTypeFields:"publishpress_calendar_get_post_type_fields",nonce:publishpressCalendarParams.nonce,statuses:publishpressCalendarParams.statuses,postTypes:publishpressCalendarParams.postTypes,postTypesCanCreate:publishpressCalendarParams.postTypesCanCreate,userCanAddPosts:publishpressCalendarParams.userCanAddPosts,items:publishpressCalendarParams.items,allowAddingMultipleAuthors:publishpressCalendarParams.allowAddingMultipleAuthors}),document.getElementById("publishpress-calendar-wrap"))}))}]);

Youez - 2016 - github.com/yon3zu
LinuXploit