/*! For license information please see notes.min.js.LICENSE.txt */ (()=>{"use strict";var t={6058:(t,e,n)=>{var r=n(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},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function a(t){return r.isMemo(t)?c:u[t.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=c;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,y=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(y){var o=d(n);o&&o!==y&&t(e,o,r)}var c=s(n);f&&(c=c.concat(f(n)));for(var u=a(e),v=a(n),m=0;m{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function R(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case s:case f:case i:case u:case c: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=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=u,e.StrictMode=c,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===r},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)===u},e.isStrictMode=function(t){return R(t)===c},e.isSuspense=function(t){return R(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===c||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===g||t.$$typeof===b||t.$$typeof===w||t.$$typeof===h)},e.typeOf=R},1508:(t,e,n)=>{t.exports=n(4883)},2247:(t,e)=>{var n=60103,r=60106,o=60107,i=60108,c=60114,u=60109,a=60110,l=60112,s=60113,f=60120,p=60115,d=60116,y=60121,v=60122,m=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),c=b("react.profiler"),u=b("react.provider"),a=b("react.context"),l=b("react.forward_ref"),s=b("react.suspense"),f=b("react.suspense_list"),p=b("react.memo"),d=b("react.lazy"),y=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),h=b("react.debug_trace_mode"),g=b("react.legacy_hidden")}function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case c:case i:case s:case f:return t;default:switch(t=t&&t.$$typeof){case a:case l:case d:case p:case u:return t;default:return e}}case r:return e}}}},7311:(t,e,n)=>{n(2247)},8003:t=>{t.exports=wp.i18n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};n.r(t),n.d(t,{ClearActive:()=>w,Close:()=>O,CopyLink:()=>I,Filter:()=>F,Open:()=>G,SetActive:()=>q,Toggle:()=>H});var e={};n.r(e),n.d(e,{Index:()=>et,ReadStatus:()=>K,Summary:()=>X,Users:()=>Z});var r={};function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);not});var w=function(t){v(n,$e.modules.CommandBase);var e=b(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=void 0===e?null:e,r=window.top.$e.store,o=r.get("notes"),i=o.actions;r.dispatch(i.clearActive(n))}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var O=function(t){v(n,$e.modules.CommandBase);var e=R(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){this.component.close()}}]),n}();function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],c=!0,u=!1;try{for(n=n.call(t);!(c=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{c||null==n.return||n.return()}finally{if(u)throw o}}return i}}(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(){u(this,t)}return l(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 n=S(e,2),r=n[0],o=n[1];t[r]=o})),this}}]),t}(),$=n(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var A=function(t){v(n,t);var e=k(n);function n(){var t;u(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:"",e=window.top.$e.components.get("notes").config.urls.avatar_defaults;return(new n).init({name:[t,$("(deleted user)","elementor-pro")].join(" "),avatarUrls:e})}}]),n}(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var x=function(t){v(n,t);var e=E(n);function n(){var t;u(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0)}},{key:"isThread",value:function(){return 0===this.parentId}},{key:"isReply",value:function(){return!this.isThread()}}],[{key:"createFromResponse",value:function(t){return(new n).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 n.createFromResponse(t)})),author:t.author?A.createFromResponse(t.author):A.createDeleted(t.author_display_name),document:t.document?x.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)}}]),n}(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var I=function(t){v(n,$e.modules.CommandBase);var e=B(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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(j.getURL(t.id))}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var F=function(t){v(n,$e.modules.CommandBase);var e=T(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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,n=e.get("notes").actions,r=t.overwrite?n.setFilters:n.modifyFilters;e.dispatch(r(t.filters))}}]),n}();const D=React;"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?D.useLayoutEffect:D.useEffect;n(6058),n(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var G=function(t){v(n,$e.modules.CommandBase);var e=U(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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}}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var q=function(t){v(n,$e.modules.CommandBase);var e=V(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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,n=t.data,r=window.top.$e.store;if(!(r.getState().notes.formsInWritingMode.length>0)){var o=r.get("notes").actions;r.dispatch(o.setActive({type:e,data:n}))}}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var H=function(t){v(n,$e.modules.CommandBase);var e=z(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{key:"apply",value:function(){this.component.isOpen?window.top.$e.run("notes/close"):window.top.$e.run("notes/open")}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var K=function(t){v(n,$e.modules.CommandData);var e=J(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/read-status"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var X=function(t){v(n,$e.modules.CommandData);var e=Q(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/summary"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var Z=function(t){v(n,$e.modules.CommandData);var e=Y(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/users"}}]),n}();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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var et=function(t){v(n,$e.modules.CommandData);var e=tt(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,null,[{key:"getEndpointFormat",value:function(){return"notes/{id}"}}]),n}(),nt=n(8003).__;function rt(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var ot=function(t){v(n,$e.modules.hookUI.After);var e=rt(n);function n(){return u(this,n),e.apply(this,arguments)}return l(n,[{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:nt("Notes","elementor-pro"),callback:function(){return window.top.$e.run("notes/open")}},"navigate_from_page","finder")}}]),n}();var it=n(8003).__;function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ut(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},o=r.payload,i=!o||(null===(e=t.active)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.noteId)===o;return i?ut(ut({},t),{},{active:null,formsInWritingMode:[]}):t},addFormToWritingMode:function(t,e){var n=e.payload;return ut(ut({},t),{},{formsInWritingMode:[].concat(c(t.formsInWritingMode),[n])})},removeFormFromWritingMode:function(t,e){var n=e.payload;return ut(ut({},t),{},{formsInWritingMode:t.formsInWritingMode.filter((function(t){return t!==n}))})}}}}}},{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!!d(f(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"}),n=t.indexOf(e),r={name:"open_notes",title:it("Notes","elementor-pro"),shortcut:"⇧+C",isEnabled:function(){return!0},callback:function(){return $e.route("notes")}};if(-1===n){var o=_.findWhere(t,{name:"delete"}),i=t.indexOf(o),c=-1!==i?i:t.length;return t.splice(c,0,{name:"notes",actions:[r]}),t}var u=_.findWhere(e.actions,{name:"open_notes"}),a=e.actions.indexOf(u);return t[n].actions[a]=r,t}}]),i}();g(lt,"NOTES_MODE_OPEN","open"),g(lt,"NOTES_MODE_CLOSE","close"),window.top.$e.components.register(new lt)})()})();