1function beats_tree_panel(){var e=$("#jstree-container"),t=$(e.data("target"));$.ajax({type:"get",url:Routing.generate("options_beats_tree"),dataType:"json",success:function(n){let s=[],a=e.data("slim-beats"),o=a?a.toString().split(","):[];!function e(t,n){t.forEach((t=>{n.push({id:t.id,text:t.name,state:{selected:o.includes(t.id.toString())},icon:!1}),t.children&&t.children.length&&(n[n.length-1].children=[],e(t.children,n[n.length-1].children))}))}(n,s),e.jstree({plugins:[],core:{multiple:!1,data:s,themes:{name:"proton",responsive:!0}}}).on("loaded.jstree",(function(e,t){var n=t.instance,a=n.get_selected();s.forEach((function(e){e.state.selected&&e.children.forEach((function(e){e.state.selected||-1===a.indexOf(String(e.id))||n.deselect_node([e.id])}))}))})).on("changed.jstree",(function(t,n){if(("select_node"===n.action||"deselect_node"===n.action)&&$(t.target).is("a")){var s=n.node,a=s.children,o=n.instance;a.forEach((function(e){o.get_node(e).state.selected=!1;var t=n.selected.indexOf(e);n.selected.splice(t,1)})),s.state.selected=!0,e.jstree("show_all"),-1==n.selected.indexOf(s.id)&&n.selected.push(s.id)}})),$("#save-beats").on("click",(function(t){var n=e.jstree("get_selected"),s=$(t.target);$.ajax({type:"POST",dataType:"json",url:Routing.generate("options_save_user_slims"),data:{beats_ids:n.join(","),is_beats_hints:1},beforeSend:function(){s.prop("disabled",1).mask()},success:function(t){app.createNotification(t.message),e.jstree("deselect_all").jstree("select_node",n)},error:function(){app.createNotification("<b>Error!</b> Beats not load. Please try again later","danger")},complete:function(){s.prop("disabled",0).unmask()}})})),$("#clear-beats").on("click",(function(t){e.jstree("deselect_all").jstree("close_all")})),e.on("ready.jstree",(function(e){$(e.target).on("changed.jstree",(function(e,n){var s,a=n.selected.join(",");t.length?s=t.data("scroller"):scrollers.forEach((function(e){e.data.params.beats_ids=a,e.$el.is(":visible")?s=e:e.isNeedReload=!0})),s.refresh()}))}))}})}$(document).on("ready",(function(){"undefined"!=typeof isCoreLoaded&&isCoreLoaded?(console.log("isCoreLoaded"),beats_tree_panel()):(console.log("isCoreLoaded else"),$(document).on("isCoreLoaded","",(function(){console.log("isCoreLoaded on"),beats_tree_panel()})))}));
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.