/*! For license information please see notes.min.js.LICENSE.txt */
(()=>{"use strict";var t={6058:(t,e,r)=>{var n=r(1508),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function a(t){return n.isMemo(t)?u:c[t.$$typeof]||o}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[n.Memo]=u;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,y=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(y){var o=d(r);o&&o!==y&&t(e,o,n)}var u=s(r);f&&(u=u.concat(f(r)));for(var c=a(e),v=a(r),m=0;m<u.length;++m){var h=u[m];if(!(i[h]||n&&n[h]||v&&v[h]||c&&c[h])){var b=p(r,h);try{l(e,h,b)}catch(t){}}}}return e}},4883:(t,e)=>{var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,h=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function R(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case s:case f:case i:case c:case u:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case m:case v:case a:return t;default:return e}}case o:return e}}}function O(t){return R(t)===f}e.AsyncMode=s,e.ConcurrentMode=f,e.ContextConsumer=l,e.ContextProvider=a,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=c,e.StrictMode=u,e.Suspense=d,e.isAsyncMode=function(t){return O(t)||R(t)===s},e.isConcurrentMode=O,e.isContextConsumer=function(t){return R(t)===l},e.isContextProvider=function(t){return R(t)===a},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return R(t)===p},e.isFragment=function(t){return R(t)===i},e.isLazy=function(t){return R(t)===m},e.isMemo=function(t){return R(t)===v},e.isPortal=function(t){return R(t)===o},e.isProfiler=function(t){return R(t)===c},e.isStrictMode=function(t){return R(t)===u},e.isSuspense=function(t){return R(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===c||t===u||t===d||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===a||t.$$typeof===l||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===w||t.$$typeof===h)},e.typeOf=R},1508:(t,e,r)=>{t.exports=r(4883)},2247:(t,e)=>{var r=60103,n=60106,o=60107,i=60108,u=60114,c=60109,a=60110,l=60112,s=60113,f=60120,p=60115,d=60116,y=60121,v=60122,m=60117,h=60129,b=60131;if("function"==typeof Symbol&&Symbol.for){var g=Symbol.for;r=g("react.element"),n=g("react.portal"),o=g("react.fragment"),i=g("react.strict_mode"),u=g("react.profiler"),c=g("react.provider"),a=g("react.context"),l=g("react.forward_ref"),s=g("react.suspense"),f=g("react.suspense_list"),p=g("react.memo"),d=g("react.lazy"),y=g("react.block"),v=g("react.server.block"),m=g("react.fundamental"),h=g("react.debug_trace_mode"),b=g("react.legacy_hidden")}function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case o:case u:case i:case s:case f:return t;default:switch(t=t&&t.$$typeof){case a:case l:case d:case p:case c:return t;default:return e}}case n:return e}}}},7311:(t,e,r)=>{r(2247)},8003:t=>{t.exports=wp.i18n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};r.r(t),r.d(t,{ClearActive:()=>w,Close:()=>O,CopyLink:()=>I,Filter:()=>F,Open:()=>G,SetActive:()=>q,Toggle:()=>H});var e={};r.r(e),r.d(e,{Index:()=>et,ReadStatus:()=>K,Summary:()=>X,Users:()=>Z});var n={};function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function u(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function f(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},y.apply(this,arguments)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function h(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function b(t,e,r){return(e=l(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}r.r(n),r.d(n,{NotesAddPanelMenuItem:()=>ot});var w=function(t){m(r,$e.modules.CommandBase);var e=g(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id,e=void 0===t?null:t,r=window.top.$e.store,n=r.get("notes").actions;r.dispatch(n.clearActive(e))}}]),r}();function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var O=function(t){m(r,$e.modules.CommandBase);var e=R(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){this.component.close()}}]),r}();function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,c=[],a=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(t,e)||i(t,e)||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.")}()}var P=function(){function t(){c(this,t)}return f(t,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).forEach((function(e){var r=S(e,2),n=r[0],o=r[1];t[n]=o})),this}}]),t}(),$=r(8003).__;function k(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var A=function(t){m(r,t);var e=k(r);function r(){var t;c(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return b(p(t=e.call.apply(e,[this].concat(o))),"id",null),b(p(t),"name",""),b(p(t),"slug",""),b(p(t),"avatarUrls",{24:null,48:null,96:null}),b(p(t),"capabilities",{}),t}return f(r,null,[{key:"createFromResponse",value:function(t){var e,n,o,i;return(new r).init({id:t.id,name:t.name,slug:t.slug,avatarUrls:t.avatar_urls,capabilities:{notes:{read:null===(e=t.capabilities)||void 0===e||null===(n=e.notes)||void 0===n?void 0:n.can_read},post:{edit:null===(o=t.capabilities)||void 0===o||null===(i=o.post)||void 0===i?void 0:i.can_edit}}})}},{key:"createDeleted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=window.top.$e.components.get("notes").config.urls.avatar_defaults;return(new r).init({name:[t,$("(deleted user)","elementor-pro")].join(" "),avatarUrls:e})}}]),r}(P);function E(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var j=function(t){m(r,t);var e=E(r);function r(){var t;c(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return b(p(t=e.call.apply(e,[this].concat(o))),"id",void 0),b(p(t),"type",void 0),b(p(t),"typeTitle",void 0),t}return f(r,null,[{key:"createFromResponse",value:function(t){return(new r).init({id:t.id,type:t.type,typeTitle:t.type_title})}}]),r}(P);function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var C=function(t){m(r,t);var e=x(r);function r(){var t;c(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return b(p(t=e.call.apply(e,[this].concat(o))),"id",null),b(p(t),"parentId",0),b(p(t),"elementId",null),b(p(t),"content",""),b(p(t),"position",{x:0,y:0}),b(p(t),"repliesCount",0),b(p(t),"unreadRepliesCount",0),b(p(t),"replies",[]),b(p(t),"author",null),b(p(t),"readers",[]),b(p(t),"isRead",!1),b(p(t),"isResolved",!1),b(p(t),"routeUrl",""),b(p(t),"routeTitle",""),b(p(t),"userCan",{}),b(p(t),"createdAt",null),b(p(t),"updatedAt",null),b(p(t),"lastActivityAt",null),b(p(t),"_formattedLastActivityAt",""),b(p(t),"_formattedCreatedAt",""),t}return f(r,[{key:"getFormattedLastActivityAt",value:function(){return this._formattedLastActivityAt||(this._formattedLastActivityAt=this.lastActivityAt.toLocaleString()),this._formattedLastActivityAt}},{key:"getFormattedCreatedAt",value:function(){return this._formattedCreatedAt||(this._formattedCreatedAt=this.createdAt.toLocaleString()),this._formattedCreatedAt}},{key:"getURL",value:function(){var t=this.isReply()?this.parentId:this.id;return this.constructor.getURL(t)}},{key:"isUnreadThread",value:function(){return this.isThread()&&(!this.isRead||this.unreadRepliesCount>0)}},{key:"isThread",value:function(){return 0===this.parentId}},{key:"isReply",value:function(){return!this.isThread()}}],[{key:"createFromResponse",value:function(t){return(new r).init({id:t.id,parentId:t.parent_id,elementId:t.element_id,content:t.content,position:t.position,repliesCount:t.replies_count,unreadRepliesCount:t.unread_replies_count,replies:t.replies.map((function(t){return r.createFromResponse(t)})),author:t.author?A.createFromResponse(t.author):A.createDeleted(t.author_display_name),document:t.document?j.createFromResponse(t.document):null,readers:t.readers?t.readers.map((function(t){return A.createFromResponse(t)})):[],isRead:t.is_read,isResolved:t.is_resolved,routeUrl:t.route_url,routeTitle:t.route_title,userCan:t.user_can,createdAt:new Date(t.created_at),updatedAt:new Date(t.updated_at),lastActivityAt:new Date(t.last_activity_at)})}},{key:"getURL",value:function(t){return window.top.$e.components.get("notes").config.route.note_url_pattern.replace("{{NOTE_ID}}",t)}}]),r}(P);function M(t){if(null===(e=navigator)||void 0===e||!e.clipboard)throw new Error("Cannot copy to clipboard, please make sure you are using SSL in your website.");var e;navigator.clipboard.writeText(t)}function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var I=function(t){m(r,$e.modules.CommandBase);var e=B(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgumentType("id","number",t)}},{key:"apply",value:function(t){return M(C.getURL(t.id))}}]),r}();function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var F=function(t){m(r,$e.modules.CommandBase);var e=T(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgument("filters",t)}},{key:"apply",value:function(t){var e=window.top.$e.store,r=e.get("notes").actions,n=t.overwrite?r.setFilters:r.modifyFilters;e.dispatch(n(t.filters))}}]),r}();const D=React;"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?D.useLayoutEffect:D.useEffect;r(6058),r(7311);const L=ReactDOM;var N;N=L.unstable_batchedUpdates;var W="thread";function U(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var G=function(t){m(r,$e.modules.CommandBase);var e=U(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(t){window.top.$e.route(this.component.getNamespace());var e=parseInt(t.id||"0");e>0&&window.top.$e.run("notes/set-active",{type:W,data:{noteId:e}})}}],[{key:"getInfo",value:function(){return{isSafe:!0,isSafeWithArgs:!0}}}]),r}();function V(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var q=function(t){m(r,$e.modules.CommandBase);var e=V(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"validateArgs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.requireArgument("type",t),this.requireArgument("data",t)}},{key:"apply",value:function(t){var e=t.type,r=t.data,n=window.top.$e.store;if(!(n.getState().notes.formsInWritingMode.length>0)){var o=n.get("notes").actions;n.dispatch(o.setActive({type:e,data:r}))}}}]),r}();function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var H=function(t){m(r,$e.modules.CommandBase);var e=z(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"apply",value:function(){this.component.isOpen?window.top.$e.run("notes/close"):window.top.$e.run("notes/open")}}]),r}();function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var K=function(t){m(r,$e.modules.CommandData);var e=J(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/read-status"}}]),r}();function Q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var X=function(t){m(r,$e.modules.CommandData);var e=Q(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/summary"}}]),r}();function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var Z=function(t){m(r,$e.modules.CommandData);var e=Y(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/users"}}]),r}();function tt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var et=function(t){m(r,$e.modules.CommandData);var e=tt(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,null,[{key:"getEndpointFormat",value:function(){return"notes/{id}"}}]),r}(),rt=r(8003).__;function nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var ot=function(t){m(r,$e.modules.hookUI.After);var e=nt(r);function r(){return c(this,r),e.apply(this,arguments)}return f(r,[{key:"getCommand",value:function(){return"panel/state-ready"}},{key:"getId",value:function(){return"notes-add-panel-menu-item"}},{key:"apply",value:function(){elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"notes",icon:"eicon-commenting-o",title:rt("Notes","elementor-pro"),callback:function(){return window.top.$e.run("notes/open")}},"navigate_from_page","finder")}}]),r}();var it=r(8003).__;function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function at(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}var lt=function(r){m(i,$e.modules.ComponentBase);var o=at(i);function i(t){var e;return c(this,i),b(p(e=o.call(this,t)),"config",{}),window.addEventListener("message",(function(t){"elementor-pro/notes/config"===t.data.name&&(e.config=ct(ct({},e.config),t.data.payload),e.isInEditor()||window.top.$e.extras.hashCommands.runOnce(),e.contextMenuNotesGroup())})),window.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("wp-admin-bar-elementor_notes");t&&t.addEventListener("click",(function(t){t.preventDefault(),window.top.$e.run("notes/toggle")}))})),e}return f(i,[{key:"getNamespace",value:function(){return"notes"}},{key:"defaultRoutes",value:function(){return{"":function(){}}}},{key:"defaultCommands",value:function(){var e=["create","reply","edit","delete","resolve","re-open","cancel-create","cancel-reply","cancel-edit","choose-mention","open-note-actions","close-note-actions","open-panel-filters","close-panel-filters","refresh-panel"].reduce((function(t,e){return ct(ct({},t),{},b({},e,(function(){})))}),{});return ct(ct({},this.importCommands(t)),e)}},{key:"defaultData",value:function(){return this.importCommands(e)}},{key:"defaultHooks",value:function(){return this.importHooks(n)}},{key:"defaultShortcuts",value:function(){return{toggle:{keys:"shift+c",exclude:["input","textarea"]}}}},{key:"defaultStates",value:function(){return{"":{initialState:{active:null,formsInWritingMode:[],filters:{is_resolved:null,only_unread:null,only_relevant:null}},reducers:{setFilters:function(t,e){var r=e.payload;return ct(ct({},t),{},{filters:r})},modifyFilters:function(t,e){var r=e.payload;return ct(ct({},t),{},{filters:ct(ct({},t.filters),r)})},setActive:function(t,e){var r=e.payload;return ct(ct({},t),{},{active:{type:r.type,data:r.data},formsInWritingMode:[]})},clearActive:function(t){var e,r,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload;return!n||(null===(e=t.active)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.noteId)===n?ct(ct({},t),{},{active:null,formsInWritingMode:[]}):t},addFormToWritingMode:function(t,e){var r=e.payload;return ct(ct({},t),{},{formsInWritingMode:[].concat(u(t.formsInWritingMode),[r])})},removeFormFromWritingMode:function(t,e){var r=e.payload;return ct(ct({},t),{},{formsInWritingMode:t.formsInWritingMode.filter((function(t){return t!==r}))})}}}}}},{key:"open",value:function(){return!this.isOpen&&(this.isInEditor()&&this.updateEditorState(this.constructor.NOTES_MODE_OPEN),this.getPreviewFrame().postMessage({name:"elementor-pro/notes/open"},"*"),!0)}},{key:"close",value:function(){return!!y(d(i.prototype),"close",this).call(this)&&(this.isInEditor()&&this.updateEditorState(this.constructor.NOTES_MODE_CLOSE),this.getPreviewFrame().postMessage({name:"elementor-pro/notes/close"},"*"),!0)}},{key:"isInEditor",value:function(){return!!window.elementor}},{key:"updateEditorState",value:function(t){var e=this;switch(t){case this.constructor.NOTES_MODE_OPEN:elementor.getPanelView().modeSwitcher.currentView.setMode("preview"),elementor.channels.dataEditMode.once("switch",(function(){e.isOpen&&window.top.$e.run("notes/close")}));break;case this.constructor.NOTES_MODE_CLOSE:elementor.getPanelView().modeSwitcher.currentView.setMode("editor");break;default:throw new Error("mode '".concat(t,"' is not supported."))}}},{key:"getPreviewFrame",value:function(){return this.isInEditor()?elementor.$preview[0].contentWindow:window}},{key:"contextMenuNotesGroup",value:function(){var t=this;if(this.isInEditor()){["widget","section","column","container"].forEach((function(e){elementor.hooks.addFilter("elements/".concat(e,"/contextMenuGroups"),t.contextMenuAddGroup)}))}}},{key:"contextMenuAddGroup",value:function(t){var e=_.findWhere(t,{name:"notes"}),r=t.indexOf(e),n={name:"open_notes",title:it("Notes","elementor-pro"),shortcut:"⇧+C",isEnabled:function(){return!0},callback:function(){return $e.route("notes")}};if(-1===r){var o=_.findWhere(t,{name:"delete"}),i=t.indexOf(o),u=-1!==i?i:t.length;return t.splice(u,0,{name:"notes",actions:[n]}),t}var c=_.findWhere(e.actions,{name:"open_notes"}),a=e.actions.indexOf(c);return t[r].actions[a]=n,t}}]),i}();b(lt,"NOTES_MODE_OPEN","open"),b(lt,"NOTES_MODE_CLOSE","close"),window.top.$e.components.register(new lt)})()})()