text: /**
   * skylark-elfinder - A version of elfinder that ported to running on skylarkjs.
   * @author 
   * @version v0.9.0
   * @link 
   * @license MIT
   */
  define(["../elFinder"],function(e){return(e.prototype.commands.help=function(){"use strict";var e,i,t,n,a,s,d=this.fm,l=this,r='<div class="elfinder-help-link"> <a href="{url}" target="_blank">{link}</a></div>',o='<div class="elfinder-help-team"><div>{author}</div>{work}</div>',p=/\{url\}/,u=/\{link\}/,h=/\{author\}/,c=/\{work\}/,g="replace",f="ui-priority-primary",b="ui-priority-secondary",v="elfinder-help-license",m='<li class="'+d.res("class","tabstab")+' elfinder-help-tab-{id}"><a href="#'+d.namespace+'-help-{id}" class="ui-tabs-anchor">{title}</a></li>',y=['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">','<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],k='<div class="elfinder-help-separator"/>',w=$("base").length?document.location.href.replace(/#.*$/,""):"",x=d.res("class","tabsactive"),j=function(){return d.theme&&d.theme.author?o[g]("elfinder-help-team","elfinder-help-team elfinder-help-term-theme")[g](h,d.i18n(d.theme.author)+(d.theme.email?" &lt;"+d.theme.email+"&gt;":""))[g](c,d.i18n("theme")+" ("+d.i18n(d.theme.name)+")"):'<div class="elfinder-help-team elfinder-help-term-theme" style="display:none"></div>'},A=!1,C=!1,S="";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.state=-1,this.shortcuts=[{pattern:"f1",description:this.title}],d.bind("load",function(){var D,F,O,P,T,_,I,L=l.options.view||["about","shortcuts","help","integrations","debug"];-1!==(D=$.inArray("preference",L))&&L.splice(D,1),$.fn.tabs||-1!==(D=$.inArray(L,"debug"))&&L.splice(D,1),$.each(L,function(e,i){y.push(m[g](/\{id\}/g,i)[g](/\{title\}/,d.i18n(i)))}),y.push("</ul>"),-1!==$.inArray("about",L)&&(y.push('<div id="'+d.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"/>'),y.push("<h3>elFinder</h3>"),y.push('<div class="'+f+'">'+d.i18n("webfm")+"</div>"),y.push('<div class="'+b+'">'+d.i18n("ver")+": "+d.version+"</div>"),y.push('<div class="'+b+'">'+d.i18n("protocolver")+': <span class="apiver"></span></div>'),y.push('<div class="'+b+'">jQuery/jQuery UI: '+$().jquery+"/"+$.ui.version+"</div>"),y.push(k),y.push(r[g](p,"https://studio-42.github.io/elFinder/")[g](u,d.i18n("homepage"))),y.push(r[g](p,"https://github.com/Studio-42/elFinder/wiki")[g](u,d.i18n("docs"))),y.push(r[g](p,"https://github.com/Studio-42/elFinder")[g](u,d.i18n("github"))),y.push(k),y.push('<div class="'+f+'">'+d.i18n("team")+"</div>"),y.push(o[g](h,'Dmitry "dio" Levashov &lt;dio@std42.ru&gt;')[g](c,d.i18n("chiefdev"))),y.push(o[g](h,"Naoki Sawada &lt;hypweb+elfinder@gmail.com&gt;")[g](c,d.i18n("developer"))),y.push(o[g](h,"Troex Nevelin &lt;troex@fury.scancode.ru&gt;")[g](c,d.i18n("maintainer"))),y.push(o[g](h,"Alexey Sukhotin &lt;strogg@yandex.ru&gt;")[g](c,d.i18n("contributor"))),d.i18[d.lang].translator&&$.each(d.i18[d.lang].translator.split(", "),function(){y.push(o[g](h,$.trim(this))[g](c,d.i18n("translator")+" ("+d.i18[d.lang].language+")"))}),y.push(j()),y.push(k),y.push('<div class="'+v+'">'+d.i18n("icons")+': Pixelmixer, <a href="http://p.yusukekamiyamane.com" target="_blank">Fugue</a>, <a href="https://icons8.com" target="_blank">Icons8</a></div>'),y.push(k),y.push('<div class="'+v+'">Licence: 3-clauses BSD Licence</div>'),y.push('<div class="'+v+'">Copyright © 2009-2020, Studio 42</div>'),y.push('<div class="'+v+'">„ …'+d.i18n("dontforget")+" ”</div>"),y.push("</div>")),-1!==$.inArray("shortcuts",L)&&(I=d.shortcuts(),y.push('<div id="'+d.namespace+'-help-shortcuts" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),I.length?(y.push('<div class="ui-widget-content elfinder-help-shortcuts">'),$.each(I,function(e,i){y.push('<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>'.replace(/\{pattern\}/,i[0]).replace(/\{descrip\}/,i[1]))}),y.push("</div>")):y.push('<div class="elfinder-help-disabled">'+d.i18n("shortcutsof")+"</div>"),y.push("</div>")),-1!==$.inArray("help",L)&&(F=d.i18nBaseUrl+"help/%s.html.js",y.push('<div id="'+d.namespace+'-help-help" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),y.push('<a href="https://github.com/Studio-42/elFinder/wiki" target="_blank" class="elfinder-dont-panic"><span>DON\'T PANIC</span></a>'),y.push("</div>")),-1!==$.inArray("integrations",L)&&(A=!0,y.push('<div id="'+d.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"/>')),-1!==$.inArray("debug",L)&&(C=!0,y.push('<div id="'+d.namespace+'-help-debug" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),y.push('<div class="ui-widget-content elfinder-help-debug"><ul></ul></div>'),y.push("</div>")),y.push("</div>"),(S=$(y.join(""))).find(".ui-tabs-nav li").on("mouseenter mouseleave",function(e){$(this).toggleClass("ui-state-hover","mouseenter"===e.type)}).on("focus blur","a",function(e){$(e.delegateTarget).toggleClass("ui-state-focus","focusin"===e.type)}).children().on("click",function(e){var i=$(this);e.preventDefault(),e.stopPropagation(),i.parent().addClass(x).siblings().removeClass(x),S.children(".ui-tabs-panel").hide().filter(i.attr("href")).show()}).filter(":first").trigger("click"),A&&(i=S.find(".elfinder-help-tab-integrations").hide(),t=S.find("#"+d.namespace+"-help-integrations").hide().append($('<div class="elfinder-help-integrations-desc"/>').html(d.i18n("integrationWith"))),d.bind("helpIntegration",function(e){var n,a,s,l,r=t.children("ul:first");e.data&&($.isPlainObject(e.data)?((n=Object.assign({link:"",title:"",banner:""},e.data)).title||n.link)&&(n.title||(n.title=n.link),a=n.link?$("<a/>").attr("href",n.link).attr("target","_blank").text(n.title):$("<span/>").text(n.title),n.banner&&(a=$("<span/>").append($("<img/>").attr(n.banner),a))):(a=$(e.data)).filter("a").each(function(){var e=$(this);e.attr("target")||e.attr("target","_blank")}),a&&(i.show(),r.length||(r=$('<ul class="elfinder-help-integrations"/>').appendTo(t)),n&&n.cmd?(l="elfinder-help-integration-"+n.cmd,(s=r.find("ul."+l)).length||(s=$('<ul class="'+l+'"/>'),r.append($("<li/>").append($("<span/>").html(d.i18n("cmd"+n.cmd))).append(s))),a=s.append($("<li/>").append(a))):r.append($("<li/>").append(a))))}).bind("themechange",function(){S.find("div.elfinder-help-term-theme").replaceWith(j())})),C&&(n=S.find(".elfinder-help-tab-debug").hide(),a=S.find("#"+d.namespace+"-help-debug").children("div:first"),s=a.children("ul:first").on("click",function(e){e.preventDefault(),e.stopPropagation()}),l.debug={},d.bind("backenddebug",function(i){var t,n,r,o,p,u,h,c;C&&i.data&&i.data.debug&&(l.debug={options:i.data.options,debug:Object.assign({cmd:d.currentReqCmd},i.data.debug)},l.dialog&&(h=function(e,i){return $.each(i,function(i,t){e.append($("<dt/>").text(i)),void 0===t?e.append($("<dd/>").append($("<span/>").text("undfined"))):"object"!=typeof t||t?"object"==typeof t&&($.isPlainObject(t)||t.length)?e.append($("<dd/>").append(h($("<dl/>"),t))):e.append($("<dd/>").append($("<span/>").text(t&&"object"==typeof t?"[]":t||'""'))):e.append($("<dd/>").append($("<span/>").text("null")))}),e},c=s.children("li").length,(l.debug.options||l.debug.debug)&&(c>=5&&(p=s.children("li:last"),(u=a.children("div:last")).is(":hidden")?(p.remove(),u.remove()):(p.prev().remove(),u.prev().remove())),r=d.namespace+"-help-debug-"+ +new Date,t=$("<li/>").html('<a href="'+w+"#"+r+'">'+l.debug.debug.cmd+"</a>").prependTo(s),n=$('<div id="'+r+'"/>').data("debug",l.debug),t.on("click.debugrender",function(){var e=n.data("debug");n.removeData("debug"),e&&(n.hide(),e.debug&&(o=$("<fieldset>").append($("<legend/>").text("debug"),h($("<dl/>"),e.debug)),n.append(o)),e.options&&(o=$("<fieldset>").append($("<legend/>").text("options"),h($("<dl/>"),e.options)),n.append(o)),n.show()),t.off("click.debugrender")}),s.after(n),e&&a.tabs("refresh"))))})),S.find("#"+d.namespace+"-help-about").find(".apiver").text(d.api),l.dialog=l.fmDialog(S,{title:l.title,width:530,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,close:function(){C&&(n.hide(),a.tabs("destroy")),e=!1}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),O=l.dialog.children(".ui-tabs"),P=O.children(".ui-tabs-nav:first"),T=O.children(".ui-tabs-panel"),_=l.dialog.outerHeight(!0)-l.dialog.height(),l.dialog.closest(".ui-dialog").on("resize",function(){T.height(l.dialog.height()-_-P.outerHeight(!0)-20)}),F&&l.dialog.one("initContents",function(){$.ajax({url:l.options.helpSource?l.options.helpSource:F.replace("%s",d.lang),dataType:"html"}).done(function(e){$("#"+d.namespace+"-help-help").html(e)}).fail(function(){$.ajax({url:F.replace("%s","en"),dataType:"html"}).done(function(e){$("#"+d.namespace+"-help-help").html(e)})})}),l.state=0,d.trigger("helpBuilded",l.dialog)}).one("open",function(){var e=!1;d.one("backenddebug",function(){e=!0}).one("opendone",function(){requestAnimationFrame(function(){!e&&C&&(C=!1,n.hide(),a.hide(),s.hide())})})}),this.getstate=function(){return 0},this.exec=function(i,t){var d=t?t.tab:void 0;return C&&(a.tabs(),s.find("a:first").trigger("click"),n.show(),e=!0),this.dialog.trigger("initContents").elfinderdialog("open").find((d?".elfinder-help-tab-"+d:".ui-tabs-nav li")+" a:first").trigger("click"),$.Deferred().resolve()}}).prototype={forceLoad:!0},e});
  //# sourceMappingURL=../sourcemaps/commands/help.js.map
  