"use strict";(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[7482],{7482:(t,e,n)=>{n.r(e);var r=n(85704),o=n(15521);r.registerHelper("hint","lean",(function(t){return e=this,n=void 0,i=function(){function e(t){var e,n;try{for(var r=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=r.next();!o.done;o=r.next()){var l=o.value;i[l]||(i[l]=!0,a.push({text:l,displayText:"◇ ".concat(l)}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}var n,l,i,a,c,u,s,f,h,p,y;return function(t,e){var n,r,o,l,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(l){return function(a){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,a])}}}(this,(function(b){switch(b.label){case 0:return n=t.getDoc().getCursor(),l=t.getTokenAt(n),i={},a=[],null!=(c=r.hint.anyword(t))&&null!=c.list&&e(c.list),null!=(c=r.hint.fromList(t,{words:o.completions}))&&null!=c.list&&e(c.list),a.sort(),void 0===t.cocalc_actions?[3,2]:[4,t.cocalc_actions.complete(n.line,n.ch)];case 1:for(u=b.sent(),s=0;s<u.length;s++)f=u[s],h=f.text,p=f.type,y="▣ ".concat(h," : ").concat(p),a.push({text:h,displayText:y});b.label=2;case 2:return[2,{list:a,from:r.Pos(n.line,l.start),to:r.Pos(n.line,l.end)}]}}))},new((l=Promise)||(l=Promise))((function(t,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function a(t){try{c(i.throw(t))}catch(t){r(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof l?n:new l((function(t){t(n)}))).then(o,a)}c((i=i.apply(e,n||[])).next())}));var e,n,l,i}))}}]);