vendor: 5,087 bytes, lines 1-2
1/*! For license information please see 291.3318dc78d87615dd52f8.bundle.js.LICENSE.txt */ 2"use strict";(self.webpackChunkgems_web_app=self.webpackChunkgems_web_app||[]).push([[291],{78467:function(t,e,n){n.r(e);var r=n(71002),o=n(15861),a=n(70885),i=n(67294),c=n(89250),u=n(47964),l=n(14642),s=n(5698),f=n(44594),h=n(2586),p=n(16006),d=n(57615),y=n(98833),v=n(24784),m=n(67752),g=n(62051),w=n(43521),b=n(95172),x=n(63161),E=n(86536),L=n(73032),k=n(94358);function Z(){Z=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),c=new O(r||[]);return o(i,"_invoke",{value:E(t,n,c)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function p(){}function d(){}function y(){}var v={};l(v,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(_([])));g&&g!==e&&n.call(g,i)&&(v=g);var w=y.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function a(o,i,c,u){var l=f(t[o],t,i);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==(0,r.Z)(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){a("next",t,c,u)}),(function(t){a("throw",t,c,u)})):e.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return a("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){a(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function E(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=L(i,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function L(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=y,o(w,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:d,configurable:!0}),d.displayName=l(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new x(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(w),l(w,u,"Generator"),l(w,i,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=_,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(I),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.default=function(){var t=(0,v.Z)().os,e=(0,c.UO)(),n=(0,i.useRef)(null),r=(0,i.useRef)(null),I=(0,i.useRef)(null),O=(0,s.Wz)(),_=O.databaseId,j=O.currentPlan,S=(0,p.U)().triggerError,C=(0,i.useState)(""),N=(0,a.Z)(C,2),F=N[0],G=N[1],P=(0,i.useState)(!1),T=(0,a.Z)(P,2),D=T[0],R=T[1],B=(0,i.useState)(null),H=(0,a.Z)(B,2),U=H[0],Y=H[1],A=(0,i.useState)("Loading..."),M=(0,a.Z)(A,2),q=M[0],z=M[1],W=(0,i.useState)(!0),X=(0,a.Z)(W,2),J=X[0],K=X[1],Q=(0,i.useState)(!1),V=(0,a.Z)(Q,2),$=V[0],tt=V[1],et=(0,i.useRef)(!1);function nt(){return(nt=(0,o.Z)(Z().mark((function t(e){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return et.current=!0,G(e),t.next=4,(0,w.XH)(_,r.current,n.current,e,S);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,i.useEffect)((function(){function t(){return(t=(0,o.Z)(Z().mark((function t(){var r,o,a,i;return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,l.iH)((0,l.N8)(),"databases/".concat(_,"/notes/").concat(e.noteId,"/sourceId")),t.next=3,(0,d.Yu)(r);case 3:return o=t.sent,n.current=o.val(),a=(0,l.iH)((0,l.N8)(),"databases/".concat(_,"/sources/").concat(n.current,"/sourceFolderId")),t.next=8,(0,d.Yu)(a);case 8:i=t.sent,I.current=i.val();case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}_&&e.noteId&&function(){t.apply(this,arguments)}()}),[_,e.noteId]),(0,i.useEffect)((function(){var t=[];function n(){return(n=(0,o.Z)(Z().mark((function n(){var o,a,i,c;return Z().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.current=e.noteId,o=(0,l.iH)((0,l.N8)(),"databases/".concat(_,"/notes/").concat(e.noteId,"/archiveDate")),n.next=4,(0,d.Yu)(o);case 4:a=n.sent,Y(a.val()),R(!1),i=(0,l.iH)((0,l.N8)(),"databases/".concat(_,"/notes/").concat(r.current,"/title")),c=(0,l.jM)(i,(function(t){et.current||(G(t.val()?t.val():"Untitled"),R(!0)),et.current=!1})),t.push(c);case 10:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return _&&function(){n.apply(this,arguments)}(),function(){return t.forEach((function(t){return t()}))}}),[_,e.noteId]),(0,i.useEffect)((function(){D?K(!1):(K(!0),z("Loading..."))}),[D]),(0,b.y1)("shift+3",(function(t,e){t.preventDefault(),"shift+3"===e.key&&tt(!0)}),{enabled:!U&&!J&&!$}),i.createElement(f.Z,{header:i.createElement(i.Fragment,null,i.createElement(y.Z,{style:{padding:10,display:"flex",alignItems:"center",flexBasis:"30%"},className:"button button-secondary"}),i.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",flexBasis:"40%",justifyContent:"center"}},i.createElement("input",{type:"text",value:F,disabled:null!==U,onChange:function(t){return function(t){return nt.apply(this,arguments)}(t.target.value)},onBlur:function(){0===F.length&&G("Untitled")},style:{display:"flex",justifyContent:"flex-end",border:0,outline:0,textAlign:"center",backgroundColor:"transparent"}}),!U&&i.createElement(u.Tooltip,{style:{cursor:"pointer"},trigger:"click",position:"bottom",html:i.createElement("div",{style:{width:"250px",backgroundColor:"white",border:"gainsboro solid 2px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 5px 15px",padding:"20px",borderRadius:"10px",margin:20}},i.createElement("button",{style:{width:"100%"},type:"button",className:"button button-danger",onClick:function(){return tt(!0)}},i.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"}},i.createElement("div",{style:{display:"flex",alignItems:"center"}},i.createElement(g.r,null),"Â Delete Source"),i.createElement("b",null,"â§ 3")))
2)},i.createElement(m.r,null))),i.createElement("div",{style:{display:"flex",alignItems:"center",flexBasis:"30%",justifyContent:"flex-end"}},j!==s.fU.EarlyAccess&&i.createElement(k.Z,null),i.createElement(h.Z,{style:{display:"flex"}}))),body:i.createElement(i.Fragment,null,i.createElement(x.Z,{noteId:e.noteId}),i.createElement(E.Z,{isOpen:J,message:q}),i.createElement(L.Z,{isOpen:$,title:"Do you confirm?",message:"This cannot be undone",onCancel:function(){return tt(!1)},onConfirm:(0,o.Z)(Z().mark((function t(){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,K(!0),z("Removing ideas..."),t.next=5,(0,w.wZ)(_,r.current,n.current,S,I.current);case 5:K(!1),tt(!1),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),K(!1),tt(!1);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))})),quickTips:i.createElement(i.Fragment,null,null===U&&i.createElement("span",null,"Cluster notes    ",i.createElement("b",null,t===v.OS.MacOS?i.createElement("span",null,"â â§ enter"):i.createElement("span",null,"Ctrl â§ enter"))),null===U&&i.createElement("span",null,"Delete source",i.createElement("span",null,"   ",i.createElement("b",null,"â§ 3"))),i.createElement("span",null,"Back",i.createElement("span",null,"   ",i.createElement("b",null,"esc"))))})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.