-
Notifications
You must be signed in to change notification settings - Fork 45
/
5428.js
1 lines (1 loc) · 14.5 KB
/
5428.js
1
(global.webpackChunkxmind_vana=global.webpackChunkxmind_vana||[]).push([[5428],{71623:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>i});var n=o(23645),r=o.n(n)()((function(e){return e[1]}));r.push([e.id,".card-text {\n max-height: 44px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n#delete-icon {\n display: none;\n}\n#inforrmation-button:hover #delete-icon {\n display: block;\n}\n",""]);const i=r},10454:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>i});var n=o(23645),r=o.n(n)()((function(e){return e[1]}));r.push([e.id,".topic-popover-overlay {\n display: block;\n margin: 0;\n padding: 0;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1010;\n background-color: transparent;\n border: none;\n}\n",""]);const i=r},96874:e=>{e.exports=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}},34865:(e,t,o)=>{var n=o(89465),r=o(77813),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,o){var l=e[t];i.call(e,t)&&r(l,o)&&(void 0!==o||t in e)||n(e,t,o)}},89465:(e,t,o)=>{var n=o(38777);e.exports=function(e,t,o){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},21078:(e,t,o)=>{var n=o(62488),r=o(37285);e.exports=function e(t,o,i,l,a){var u=-1,c=t.length;for(i||(i=r),a||(a=[]);++u<c;){var d=t[u];o>0&&i(d)?o>1?e(d,o-1,i,l,a):n(a,d):l||(a[a.length]=d)}return a}},25970:(e,t,o)=>{var n=o(63012),r=o(79095);e.exports=function(e,t){return n(e,t,(function(t,o){return r(e,o)}))}},63012:(e,t,o)=>{var n=o(97786),r=o(10611),i=o(71811);e.exports=function(e,t,o){for(var l=-1,a=t.length,u={};++l<a;){var c=t[l],d=n(e,c);o(d,c)&&r(u,i(c,e),d)}return u}},10611:(e,t,o)=>{var n=o(34865),r=o(71811),i=o(65776),l=o(13218),a=o(40327);e.exports=function(e,t,o,u){if(!l(e))return e;for(var c=-1,d=(t=r(t,e)).length,s=d-1,p=e;null!=p&&++c<d;){var v=a(t[c]),h=o;if("__proto__"===v||"constructor"===v||"prototype"===v)return e;if(c!=s){var f=p[v];void 0===(h=u?u(f,v,p):void 0)&&(h=l(f)?f:i(t[c+1])?[]:{})}n(p,v,h),p=p[v]}return e}},56560:(e,t,o)=>{var n=o(75703),r=o(38777),i=o(6557),l=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=l},38777:(e,t,o)=>{var n=o(10852),r=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},99021:(e,t,o)=>{var n=o(85564),r=o(45357),i=o(30061);e.exports=function(e){return i(r(e,void 0,n),e+"")}},37285:(e,t,o)=>{var n=o(62705),r=o(35694),i=o(1469),l=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||r(e)||!!(l&&e&&e[l])}},45357:(e,t,o)=>{var n=o(96874),r=Math.max;e.exports=function(e,t,o){return t=r(void 0===t?e.length-1:t,0),function(){for(var i=arguments,l=-1,a=r(i.length-t,0),u=Array(a);++l<a;)u[l]=i[t+l];l=-1;for(var c=Array(t+1);++l<t;)c[l]=i[l];return c[t]=o(u),n(e,this,c)}}},30061:(e,t,o)=>{var n=o(56560),r=o(21275)(n);e.exports=r},21275:e=>{var t=Date.now;e.exports=function(e){var o=0,n=0;return function(){var r=t(),i=16-(r-n);if(n=r,i>0){if(++o>=800)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}},75703:e=>{e.exports=function(e){return function(){return e}}},85564:(e,t,o)=>{var n=o(21078);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},78718:(e,t,o)=>{var n=o(25970),r=o(99021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=r},85428:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>y});var n=o(2954),r=o(84374),i=o(46016);const l=(0,n.aZ)({__name:"card-template",props:{cardLeftIconSrc:null,cardContent:null},emits:["handleCardClick","handleDeleteIconClick","handleCardContextmenu","handleCardContentClick"],setup:(e,{emit:t})=>({__sfc:!0,props:e,emits:t})});o(72179);var a=o(51900);const u=(0,a.Z)(l,(function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t("button",{staticClass:"uk-button uk-position-relative uk-button-tile uk-button-icon uk-padding-small uk-flex uk-flex-row uk-flex-left",attrs:{id:"inforrmation-button"},on:{click:function(e){return o.emits("handleCardClick")},contextmenu:function(e){return o.emits("handleCardContextmenu")}}},[t("img",{staticClass:"uk-margin-xsmall-right uk-margin-small-left uk-preserve uk-background-norepeat",staticStyle:{width:"14px",height:"14px"},attrs:{"uk-svg":"",draggable:"false",src:e.$toResourceURL(o.props.cardLeftIconSrc)}}),e._v(" "),t("span",{staticClass:"uk-text-left uk-overflow-hidden uk-text-break card-text",staticStyle:{width:"200px"},on:{click:function(e){return e.stopPropagation(),o.emits("handleCardContentClick")}}},[e._v("\n "+e._s(o.props.cardContent)+"\n ")]),e._v(" "),t("span",{staticClass:"uk-margin-small-right uk-button-tile uk-position-center-right",attrs:{id:"delete-icon","uk-icon":"icon: trash"},on:{click:function(e){return e.stopPropagation(),o.emits("handleDeleteIconClick")}}})])}),[],!1,null,null,null).exports;var c=o(53419),d=o(67657),s=o(78152),p=o(27049);var v=o(63111),h=o(54856),f=o(31621),m=o(90435),k=o(94593),w=o(85786),C=o(5893);var x=o(83063);const g=(0,n.aZ)({__name:"informationcard",setup(e){const{domRectForSelection:t}=(0,r.nZ)(),{setPopoverEditorVisible:o}=(0,i.$)(),{hyperlink:l,openHyperlink:a,deleteHyperlink:g,showHyperlinkMenu:y,showHyperlinkEditor:b}=(()=>{const{T:e}=(0,s.JE)(),{handleCommand:t}=(0,s.JX)(),{setPopoverEditorVisible:o}=(0,i.$)(),{document:l,selection:a,properties:u,activeSheet:c,executePropertyAction:p}=(0,r.nZ)(),x=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=u.value.webLink)||void 0===e?void 0:e.value)||void 0===t?void 0:t.href})),g=(0,n.Fl)((()=>{var e;return null===(e=u.value.topicLink)||void 0===e?void 0:e.value})),y=(0,n.Fl)((()=>{if(g.value){const e=l.value.query({id:g.value});return e?`${e.asTopic().title} (${c.value.title})`:" "}})),b=(0,n.Fl)((()=>u.value.fileLink.value)),_=(0,n.Fl)((()=>{var e,t;return null!==(t=null!==(e=x.value)&&void 0!==e?e:y.value)&&void 0!==t?t:b.value})),E=()=>{p({name:"mutateProperty:webLink"}),p({name:"mutateProperty:topicLink"}),p({name:"mutateProperty:fileLink"})},P=(0,n.Fl)((()=>{let e;if(g.value){const t=g.value.replace("xmind:#",""),o=l.value.query({id:t}).asTopic();e=`${o.title} (${o.ownerSheet.title})`}else e=_.value;return e}));return{hyperlink:_,formatHyperlink:P,openHyperlink:()=>{if(v.nd)m.ZP.fetch(h.QN);else{const t=a.value.modelIds[0];if(g.value)(0,f.U)(g.value,t);else if(x.value)(0,w.DL)(x.value,e);else if(b.value){const e=(0,C.iZ)(b.value);(0,f.Q)(e)}}o("")},deleteHyperlink:E,showHyperlinkMenu:()=>{const n=_.value&&!_.value.startsWith("xap:")&&(!!g.value||!!x.value||!!b.value),r=new d.Menu;[{label:e("Edit"),enabled:n,click:()=>{g.value?t("editor.showTopiclinkEditor"):x.value?t("editor.showHyperlinkEditor"):b.value&&(k.Z.isDirectorySync(b.value)?t("editor.addFolderLink"):t("editor.addFileLink")),o("")}},{type:"separator"},{label:e("Delete"),click:E}].forEach((e=>r.append(new d.MenuItem(e)))),r.popup({window:(0,d.getCurrentWindow)()})},showHyperlinkEditor:()=>{x.value?t("editor.showHyperlinkEditor",!0):g.value?t("editor.showTopiclinkEditor"):b.value&&(k.Z.isDirectorySync(b.value)?t("editor.addFolderLink"):t("editor.addFileLink"))}}})(),{attachmentFileName:_,openAttachment:E,deleteAttachment:P,showAttachmentMenu:M}=(()=>{const{T:e}=(0,s.JE)(),{setPopoverEditorVisible:t}=(0,i.$)(),{properties:o,executeMutationAction:l}=(0,r.nZ)(),a=(0,n.Fl)((()=>{var e,t;return null===(t=null===(e=o.value.attachmentFile)||void 0===e?void 0:e.value)||void 0===t?void 0:t.fileName})),u=(0,n.Fl)((()=>{var e,t;const n=null===(t=null===(e=o.value.attachmentFile)||void 0===e?void 0:e.value)||void 0===t?void 0:t.resourcePath;return n&&"xap:"+n})),c=()=>{l({name:"mutate:removeAttachment"})};return{attachmentFileName:a,openAttachment:()=>{(0,x.F)(a.value,u.value),t("")},deleteAttachment:c,showAttachmentMenu:()=>{const t=new d.Menu;[{label:e("Edit"),enabled:!1},{type:"separator"},{label:e("Delete"),click:c}].forEach((e=>t.append(new d.MenuItem(e)))),t.popup({window:(0,d.getCurrentWindow)()})}}})(),{audioName:A,openAudio:L,showAudioMenu:F,deleteAudio:H}=(()=>{const{T:e}=(0,s.JE)(),{updateAudioBarMode:t}=(0,p.E)(),{setPopoverEditorVisible:o}=(0,i.$)(),{properties:l,executeMutationAction:a}=(0,r.nZ)(),u=(0,n.Fl)((()=>l.value.audioNotes.value)),c=(0,n.Fl)((()=>u.value&&u.value.title)),v=()=>{a({name:"mutate:removeAudioNotes"})};return{audioName:c,openAudio:()=>{if(o(""),!u.value||!u.value.resourcePath||(0,p.E)().audioRecording)return;const e="open_new_audio_play"===(0,p.E)().audioBarMode?"audio_play":"open_new_audio_play";t({audioBarMode:e,audioAutoplay:!0})},deleteAudio:v,showAudioMenu:()=>{const t=new d.Menu;[{label:e("Edit"),enabled:!1},{type:"separator"},{label:e("Delete"),click:v}].forEach((e=>t.append(new d.MenuItem(e)))),t.popup({window:(0,d.getCurrentWindow)()})}}})(),{notesText:T,showNotesEditor:I,showNotesMenu:S,deleteNotes:N}=(()=>{const{T:e}=(0,s.JE)(),{setPopoverEditorVisible:t}=(0,i.$)(),{properties:o,executePropertyAction:l}=(0,r.nZ)(),a=(0,n.Fl)((()=>{var e,t,n;return null===(n=null===(t=null===(e=o.value)||void 0===e?void 0:e.notes)||void 0===t?void 0:t.value)||void 0===n?void 0:n.text})),u=()=>{t("notes")},c=()=>{l({name:"mutateProperty:notes",inputValue:null})};return{notesText:a,deleteNotes:c,showNotesMenu:()=>{const t=new d.Menu;[{label:e("Edit"),click:u},{type:"separator"},{label:e("Delete"),click:c}].forEach((e=>t.append(new d.MenuItem(e)))),t.popup({window:(0,d.getCurrentWindow)()})},showNotesEditor:u}})(),Z=(0,n.Fl)((()=>{var e,t,o;return Boolean(null!==(o=null!==(t=null!==(e=l.value)&&void 0!==e?e:T.value)&&void 0!==t?t:A.value)&&void 0!==o?o:_.value)})),D=(0,n.Fl)((()=>[{content:T.value,cardLeftIconSrc:"static/images/information-icon/info_notes.svg",handleCardClick:I,handleCardContentClick:I,handleCardContextmenu:S,handleDeleteIconClick:N},{content:l.value,cardLeftIconSrc:"static/images/information-icon/info_hyperlink.svg",handleCardClick:b,handleCardContentClick:a,handleCardContextmenu:y,handleDeleteIconClick:g},{content:_.value,cardLeftIconSrc:"static/images/information-icon/info_attachment.svg",handleCardClick:E,handleCardContentClick:E,handleCardContextmenu:M,handleDeleteIconClick:P},{content:A.value,cardLeftIconSrc:"static/images/information-icon/info_audionotes.svg",handleCardClick:L,handleCardContentClick:L,handleCardContextmenu:F,handleDeleteIconClick:H}].filter((e=>!!e.content)))),R=()=>o("");return(0,n.YP)((()=>Z.value),(e=>{!1===e&&R()})),{__sfc:!0,topicRect:t,setPopoverEditorVisible:o,hyperlink:l,openHyperlink:a,deleteHyperlink:g,showHyperlinkMenu:y,showHyperlinkEditor:b,attachmentFileName:_,openAttachment:E,deleteAttachment:P,showAttachmentMenu:M,audioName:A,openAudio:L,showAudioMenu:F,deleteAudio:H,notesText:T,showNotesEditor:I,showNotesMenu:S,deleteNotes:N,isEmpty:Z,cardLists:D,close:R,CardTemplate:u,TopicPopoverContainer:c.Z}}});const y=(0,a.Z)(g,(function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t(o.TopicPopoverContainer,{attrs:{"topic-height":o.topicRect.height,"topic-width":o.topicRect.width,"topic-top":o.topicRect.y,"topic-left":o.topicRect.x,"popover-width":264},on:{"popover-close":o.close}},[t("div",{staticClass:"uk-flex uk-flex-column uk-padding-small uk-padding-remove-horizontal"},e._l(o.cardLists,(function(e,n){return t(o.CardTemplate,{key:n,attrs:{"card-content":e.content,"card-left-icon-src":e.cardLeftIconSrc},on:{handleCardClick:e.handleCardClick,handleDeleteIconClick:e.handleDeleteIconClick,handleCardContextmenu:e.handleCardContextmenu,handleCardContentClick:e.handleCardContentClick}})})),1)])}),[],!1,null,null,null).exports},53419:(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var n=o(2954),r=o(78718),i=o.n(r),l=o(84374),a=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function l(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(l,a)}u((n=n.apply(e,t||[])).next())}))};const u=(0,n.aZ)({__name:"topic-popover-container",props:{topicHeight:null,topicWidth:null,topicLeft:null,topicTop:null,popoverWidth:null,popoverHeight:null,viewPortPadding:null,autoShowOnMounted:null},emits:["popover-close"],setup(e,{emit:t}){const o=e,r=(0,n.FN)(),u=(0,n.iH)(null),c=(0,n.Fl)((()=>{const{viewPortPadding:e}=o;return void 0===e?16:e})),d=(0,n.Fl)((()=>{const{autoShowOnMounted:e}=o;return void 0===e||e})),s=(0,n.Fl)((()=>({top:o.topicTop+"px",left:o.topicLeft+"px",width:o.topicWidth+"px",height:o.topicHeight+"px"}))),p=e=>{const t=e.getBoundingClientRect();return Object.assign({},i()(t,"top","left","right","bottom","width","height"),{offsetTop:e.offsetTop,offsetLeft:e.offsetLeft})},v=()=>{const e=document.querySelector("#editor-container");return e?p(e):null},h=()=>{const e=v();if(!e)return!1;const{popoverHeight:t,popoverWidth:n,topicTop:r,topicLeft:i,topicWidth:a,topicHeight:u}=o,d=i+v().left,s=r+v().top,p=e.offsetTop>s,h=e.offsetTop+e.height<u+s+t,f=d-(e.left+e.offsetLeft)<n/2-a/2,m=e.left+e.offsetLeft+e.width<d+a/2+n/2,k=u+t>e.height,w=a>e.width;let C=e.offsetLeft,x=e.offsetTop;p&&(x=s-c.value),h&&(x=s+u+o.popoverHeight-e.height+c.value),k&&(x=Math.max(u-e.height,0)+s+o.popoverHeight);const g=Math.max((o.popoverWidth-a)/2,0);if(f&&(C=d-e.left-c.value-g),m&&(C=d-e.left+a-e.width+g+c.value),w&&(C=d+g),p||h||f||m||k||w){const{moveViewport:e}=(0,l.nZ)();return e(C,x),!0}return!0},f=()=>a(this,void 0,void 0,(function*(){if(!(yield h()))return m(!1);m(!0)})),m=e=>{setTimeout((()=>{r.proxy.$withUIKit((t=>{const o=t.pop(u.value);o&&(e?o.show():o.hide())}))}),50)};return(0,n.bv)((()=>{d.value&&f(),(0,n.Y3)((()=>{r.proxy.$withUIKit((e=>{e.util.on(u.value,"hidden",(()=>{t("popover-close")}))}))}))})),{__sfc:!0,props:o,emits:t,vm:r,popoverEl:u,viewPortPadding:c,isAutoShowOnMounted:d,topicRectStyle:s,getElementRect:p,getWindowBounds:v,moveViewport:h,showPopover:f,_togglePopover:m}}});o(19455);const c=(0,o(51900).Z)(u,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"focus-contexts",rawName:"v-focus-contexts:group",value:["focus.popover"],expression:"['focus.popover']",arg:"group"}]},[t("div",{staticClass:"uk-position-absolute",style:e._self._setupProxy.topicRectStyle}),e._v(" "),t("div",{ref:"popoverEl",style:{width:e.popoverWidth+"px",height:e.popoverHeight+"px"??"auto"},attrs:{"uk-popover":"","data-cls-overlay":"topic-popover-overlay"}},[e._t("default")],2)])}),[],!1,null,null,null).exports},72179:(e,t,o)=>{var n=o(71623);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);(0,o(45346).Z)("200ad6b9",n,!0,{})},19455:(e,t,o)=>{var n=o(10454);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);(0,o(45346).Z)("b6d891a8",n,!0,{})}}]);