Fixed icon regression in <Breadcrumb>

This commit is contained in:
Ingo Schommer 2016-09-01 14:07:02 +12:00
parent d38db31eb4
commit ecaed8c08d
2 changed files with 4 additions and 2 deletions

View File

@ -51,7 +51,7 @@ for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[i
}),obj=obj.detach(),-1!==p&&0===p.find("> ul > li").length&&p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"),this.clean_node(p),this.__callback({obj:obj,prev:prev,parent:p}),obj},prepare_move:function(o,r,pos,cb,is_cb){var p={};if(p.ot=$.jstree._reference(o)||this,p.o=p.ot._get_node(o),p.r=-1===r?-1:this._get_node(r),p.p="undefined"==typeof pos||pos===!1?"last":pos,!is_cb&&prepared_move.o&&prepared_move.o[0]===p.o[0]&&prepared_move.r[0]===p.r[0]&&prepared_move.p===p.p)return this.__callback(prepared_move),void(cb&&cb.call(this,prepared_move));if(p.ot=$.jstree._reference(p.o)||this,p.rt=$.jstree._reference(p.r)||this,-1!==p.r&&p.r){if(!/^(before|after)$/.test(p.p)&&!this._is_loaded(p.r))return this.load_node(p.r,function(){this.prepare_move(o,r,pos,cb,!0)});switch(p.p){case"before":p.cp=p.r.index(),p.cr=p.rt._get_parent(p.r);break;case"after":p.cp=p.r.index()+1,p.cr=p.rt._get_parent(p.r);break;case"inside":case"first":p.cp=0,p.cr=p.r;break;case"last":p.cp=p.r.find(" > ul > li").length,p.cr=p.r;break;default:p.cp=p.p,p.cr=p.r}}else switch(p.cr=-1,p.p){case"first":case"before":case"inside":p.cp=0;break;case"after":case"last":p.cp=p.rt.get_container().find(" > ul > li").length;break;default:p.cp=p.p}p.np=-1==p.cr?p.rt.get_container():p.cr,p.op=p.ot._get_parent(p.o),p.cop=p.o.index(),-1===p.op&&(p.op=p.ot?p.ot.get_container():this.get_container()),!/^(before|after)$/.test(p.p)&&p.op&&p.np&&p.op[0]===p.np[0]&&p.o.index()<p.cp&&p.cp++,p.or=p.np.find(" > ul > li:nth-child("+(p.cp+1)+")"),prepared_move=p,this.__callback(prepared_move),cb&&cb.call(this,prepared_move)},check_move:function(){var obj=prepared_move,ret=!0,r=-1===obj.r?this.get_container():obj.r;if(!obj||!obj.o||obj.or[0]===obj.o[0])return!1;if(!obj.cy){if(obj.op&&obj.np&&obj.op[0]===obj.np[0]&&obj.cp-1===obj.o.index())return!1;obj.o.each(function(){return-1!==r.parentsUntil(".jstree","li").andSelf().index(this)?(ret=!1,!1):void 0})}return ret},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){if(!is_prepared)return this.prepare_move(obj,ref,position,function(p){this.move_node(p,!1,!1,is_copy,!0,skip_check)});if(is_copy&&(prepared_move.cy=!0),!skip_check&&!this.check_move())return!1;this.__rollback();var o=!1;is_copy?(o=obj.o.clone(!0),o.find("*[id]").andSelf().each(function(){this.id&&(this.id="copy_"+this.id)})):o=obj.o,obj.or.length?obj.or.before(o):(obj.np.children("ul").length||$("<ul />").appendTo(obj.np),obj.np.children("ul:eq(0)").append(o));try{obj.ot.clean_node(obj.op),obj.rt.clean_node(obj.np),obj.op.find("> ul > li").length||obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(e){}return is_copy&&(prepared_move.cy=!0,prepared_move.oc=o),this.__callback(prepared_move),prepared_move},_get_move:function(){return prepared_move}}})}(jQuery),function($){var scrollbar_width,e1,e2;$(function(){/msie/.test(navigator.userAgent.toLowerCase())?(e1=$('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),e2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),scrollbar_width=e1.width()-e2.width(),e1.add(e2).remove()):(e1=$("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200}),scrollbar_width=100-e1.width(),e1.parent().remove())}),$.jstree.plugin("ui",{__init:function(){this.data.ui.selected=$(),this.data.ui.last_selected=!1,this.data.ui.hovered=null,this.data.ui.to_select=this.get_settings().ui.initially_select,this.get_container().delegate("a","click.jstree",$.proxy(function(event){event.preventDefault(),event.currentTarget.blur(),$(event.currentTarget).hasClass("jstree-loading")||this.select_node(event.currentTarget,!0,event)},this)).delegate("a","mouseenter.jstree",$.proxy(function(event){$(event.currentTarget).hasClass("jstree-loading")||this.hover_node(event.target)},this)).delegate("a","mouseleave.jstree",$.proxy(function(event){$(event.currentTarget).hasClass("jstree-loading")||this.dehover_node(event.target)},this)).bind("reopen.jstree",$.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",$.proxy(function(){this.dehover_node(),this.save_selected()},this)).bind("set_rollback.jstree",$.proxy(function(){this.reselect()},this)).bind("close_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui,obj=this._get_node(data.rslt.obj),clk=obj&&obj.length?obj.children("ul").find("a.jstree-clicked"):$(),_this=this;s.selected_parent_close!==!1&&clk.length&&clk.each(function(){_this.deselect_node(this),"select_parent"===s.selected_parent_close&&_this.select_node(obj)})},this)).bind("delete_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui.select_prev_on_delete,obj=this._get_node(data.rslt.obj),clk=obj&&obj.length?obj.find("a.jstree-clicked"):[],_this=this;clk.each(function(){_this.deselect_node(this)}),s&&clk.length&&data.rslt.prev.each(function(){return this.parentNode?(_this.select_node(this),!1):void 0})},this)).bind("move_node.jstree",$.proxy(function(event,data){data.rslt.cy&&data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:!0,select_prev_on_delete:!0,disable_selecting_children:!1,initially_select:[]},_fn:{_get_node:function(obj,allow_multiple){if("undefined"==typeof obj||null===obj)return allow_multiple?this.data.ui.selected:this.data.ui.last_selected;var $obj=$(obj,this.get_container());return $obj.is(".jstree")||-1==obj?-1:($obj=$obj.closest("li",this.get_container()),$obj.length?$obj:!1)},_ui_notify:function(n,data){data.selected&&this.select_node(n,!1)},save_selected:function(){var _this=this;this.data.ui.to_select=[],this.data.ui.selected.each(function(){this.id&&_this.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(this.data.ui.to_select)},reselect:function(){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),$.each(s,function(i,val){val&&"#"!==val&&_this.select_node(val)}),this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode}),this.__callback()},refresh:function(obj){return this.save_selected(),this.__call_old()},hover_node:function(obj){return obj=this._get_node(obj),obj.length?(obj.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=obj.children("a").addClass("jstree-hovered").parent(),this._fix_scroll(obj),void this.__callback({obj:obj})):!1},dehover_node:function(){var p,obj=this.data.ui.hovered;return obj&&obj.length?(p=obj.children("a").removeClass("jstree-hovered").parent(),this.data.ui.hovered[0]===p[0]&&(this.data.ui.hovered=null),void this.__callback({obj:obj})):!1},select_node:function(obj,check,e){if(obj=this._get_node(obj),-1==obj||!obj||!obj.length)return!1;var s=this._get_settings().ui,is_multiple="on"==s.select_multiple_modifier||s.select_multiple_modifier!==!1&&e&&e[s.select_multiple_modifier+"Key"],is_range=s.select_range_modifier!==!1&&e&&e[s.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==obj[0]&&this.data.ui.last_selected.parent()[0]===obj.parent()[0],is_selected=this.is_selected(obj),proceed=!0,t=this;if(check){if(s.disable_selecting_children&&is_multiple&&(obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length||obj.children("ul").find("a.jstree-clicked:eq(0)").length))return!1;switch(proceed=!1,!0){case is_range:this.data.ui.last_selected.addClass("jstree-last-selected"),obj=obj[obj.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf(),-1==s.select_limit||obj.length<s.select_limit?(this.data.ui.last_selected.removeClass("jstree-last-selected"),this.data.ui.selected.each(function(){this!==t.data.ui.last_selected[0]&&t.deselect_node(this)}),is_selected=!1,proceed=!0):proceed=!1;break;case is_selected&&!is_multiple:this.deselect_all(),is_selected=!1,proceed=!0;break;case!is_selected&&!is_multiple:(-1==s.select_limit||s.select_limit>0)&&(this.deselect_all(),proceed=!0);break;case is_selected&&is_multiple:this.deselect_node(obj);break;case!is_selected&&is_multiple:(-1==s.select_limit||this.data.ui.selected.length+1<=s.select_limit)&&(proceed=!0)}}proceed&&!is_selected&&(is_range||(this.data.ui.last_selected=obj),obj.children("a").addClass("jstree-clicked"),s.selected_parent_open&&obj.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)}),this.data.ui.selected=this.data.ui.selected.add(obj),this._fix_scroll(obj.eq(0)),this.__callback({obj:obj,e:e}))},_fix_scroll:function(obj){var t,c=this.get_container()[0];if(c.scrollHeight>c.offsetHeight){if(obj=this._get_node(obj),!obj||-1===obj||!obj.length||!obj.is(":visible"))return;t=obj.offset().top-this.get_container().offset().top,0>t&&(c.scrollTop=c.scrollTop+t-1),t+this.data.core.li_height+(c.scrollWidth>c.offsetWidth?scrollbar_width:0)>c.offsetHeight&&(c.scrollTop=c.scrollTop+(t-c.offsetHeight+this.data.core.li_height+1+(c.scrollWidth>c.offsetWidth?scrollbar_width:0)))}},deselect_node:function(obj){return obj=this._get_node(obj),obj.length?void(this.is_selected(obj)&&(obj.children("a").removeClass("jstree-clicked"),this.data.ui.selected=this.data.ui.selected.not(obj),this.data.ui.last_selected.get(0)===obj.get(0)&&(this.data.ui.last_selected=this.data.ui.selected.eq(0)),this.__callback({obj:obj}))):!1},toggle_select:function(obj){return obj=this._get_node(obj),obj.length?void(this.is_selected(obj)?this.deselect_node(obj):this.select_node(obj)):!1},is_selected:function(obj){return this.data.ui.selected.index(this._get_node(obj))>=0},get_selected:function(context){return context?$(context).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(context){var ret=context?$(context).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();ret.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=$([]),this.data.ui.last_selected=!1,this.__callback({obj:ret})}}}),$.jstree.defaults.plugins.push("ui")}(jQuery),function($){$.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",$.proxy(function(e,data){if(this._get_settings().crrm.move.open_onmove){var t=this;data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}},this))},defaults:{input_width_limit:200,move:{always_copy:!1,open_onmove:!0,default_position:"last",check_move:function(m){return!0}}},_fn:{_show_input:function(obj,callback){obj=this._get_node(obj);var rtl=this._get_settings().core.rtl,w=this._get_settings().crrm.input_width_limit,w1=obj.children("ins").width(),w2=obj.find("> a:visible > ins").width()*obj.find("> a:visible > ins").length,t=this.get_text(obj),h1=$("<div />",{css:{position:"absolute",top:"-200px",left:rtl?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),h2=obj.css("position","relative").append($("<input />",{value:t,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:rtl?"auto":w1+w2+4+"px",right:rtl?w1+w2+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:$.proxy(function(){var i=obj.children(".jstree-rename-input"),v=i.val();""===v&&(v=t),h1.remove(),i.remove(),this.set_text(obj,t),this.rename_node(obj,v),callback.call(this,obj,v,t),obj.css("position","")},this),keyup:function(event){var key=event.keyCode||event.which;return 27==key?(this.value=t,void this.blur()):13==key?void this.blur():void h2.width(Math.min(h1.text("pW"+this.value).width(),w))},keypress:function(event){var key=event.keyCode||event.which;return 13==key?!1:void 0}})).children(".jstree-rename-input");this.set_text(obj,""),h1.css({fontFamily:h2.css("fontFamily")||"",fontSize:h2.css("fontSize")||"",fontWeight:h2.css("fontWeight")||"",fontStyle:h2.css("fontStyle")||"",fontStretch:h2.css("fontStretch")||"",fontVariant:h2.css("fontVariant")||"",letterSpacing:h2.css("letterSpacing")||"",wordSpacing:h2.css("wordSpacing")||""}),h2.width(Math.min(h1.text("pW"+h2[0].value).width(),w))[0].select()},rename:function(obj){obj=this._get_node(obj),this.__rollback();var f=this.__callback;this._show_input(obj,function(obj,new_name,old_name){f.call(this,{obj:obj,new_name:new_name,old_name:old_name})})},create:function(obj,position,js,callback,skip_rename){var t,_this=this;return obj=this._get_node(obj),obj||(obj=-1),this.__rollback(),t=this.create_node(obj,position,js,function(t){var p=this._get_parent(t),pos=$(t).index();callback&&callback.call(this,t),p.length&&p.hasClass("jstree-closed")&&this.open_node(p,!1,!0),skip_rename?_this.__callback({obj:t,name:this.get_text(t),parent:p,position:pos}):this._show_input(t,function(obj,new_name,old_name){_this.__callback({obj:obj,name:new_name,parent:p,position:pos})})})},remove:function(obj){obj=this._get_node(obj,!0);var p=this._get_parent(obj),prev=this._get_prev(obj);this.__rollback(),obj=this.delete_node(obj),obj!==!1&&this.__callback({obj:obj,prev:prev,parent:p})},check_move:function(){if(!this.__call_old())return!1;var s=this._get_settings().crrm.move;return!!s.check_move.call(this,this._get_move())},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){var s=this._get_settings().crrm.move;return is_prepared?((s.always_copy===!0||"multitree"===s.always_copy&&obj.rt.get_index()!==obj.ot.get_index())&&(is_copy=!0),void this.__call_old(!0,obj,ref,position,is_copy,!0,skip_check)):("undefined"==typeof position&&(position=s.default_position),"inside"!==position||s.default_position.match(/^(before|after)$/)||(position=s.default_position),this.__call_old(!0,obj,ref,position,is_copy,!1,skip_check))},cut:function(obj){return obj=this._get_node(obj,!0),obj&&obj.length?(this.data.crrm.cp_nodes=!1,this.data.crrm.ct_nodes=obj,void this.__callback({obj:obj})):!1},copy:function(obj){return obj=this._get_node(obj,!0),obj&&obj.length?(this.data.crrm.ct_nodes=!1,this.data.crrm.cp_nodes=obj,void this.__callback({obj:obj})):!1},paste:function(obj){if(obj=this._get_node(obj),!obj||!obj.length)return!1;var nodes=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;return this.data.crrm.ct_nodes||this.data.crrm.cp_nodes?(this.data.crrm.ct_nodes&&(this.move_node(this.data.crrm.ct_nodes,obj),this.data.crrm.ct_nodes=!1),this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,obj,!1,!0),void this.__callback({obj:obj,nodes:nodes})):!1}}})}(jQuery),function($){var themes_loaded=[];$.jstree._themes=!1,$.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",$.proxy(function(){var s=this._get_settings().themes;this.data.themes.dots=s.dots,this.data.themes.icons=s.icons,this.set_theme(s.theme,s.url)},this)).bind("loaded.jstree",$.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:!1,dots:!0,icons:!0},_fn:{set_theme:function(theme_name,theme_url){return theme_name?(theme_url||(theme_url=$.jstree._themes+theme_name+"/style.css"),-1==$.inArray(theme_url,themes_loaded)&&($.vakata.css.add_sheet({url:theme_url}),themes_loaded.push(theme_url)),this.data.themes.theme!=theme_name&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=theme_name),this.get_container().addClass("jstree-"+theme_name),this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons(),void this.__callback()):!1},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=!0,this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=!1,this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=!0,this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=!1,this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}}),$(function(){$.jstree._themes===!1&&$("script").each(function(){return this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)?($.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),$.jstree._themes===!1&&($.jstree._themes="themes/")}),$.jstree.defaults.plugins.push("themes")}(jQuery),function($){function exec(i,event){var tmp,f=$.jstree._focused();return f&&f.data&&f.data.hotkeys&&f.data.hotkeys.enabled&&(tmp=f._get_settings().hotkeys[i])?tmp.call(f,event):void 0}var bound=[];$.jstree.plugin("hotkeys",{__init:function(){if("undefined"==typeof $.hotkeys)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";$.each(this._get_settings().hotkeys,function(i,v){v!==!1&&-1==$.inArray(i,bound)&&($(document).bind("keydown",i,function(event){return exec(i,event)}),bound.push(i))}),this.get_container().bind("lock.jstree",$.proxy(function(){this.data.hotkeys.enabled&&(this.data.hotkeys.enabled=!1,this.data.hotkeys.revert=!0)},this)).bind("unlock.jstree",$.proxy(function(){this.data.hotkeys.revert&&(this.data.hotkeys.enabled=!0)},this)),this.enable_hotkeys()},defaults:{up:function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(o)),!1},"ctrl+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(o)),!1},"shift+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(o)),!1},down:function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(o)),!1},"ctrl+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(o)),!1},"shift+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(o)),!1},left:function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&(o.hasClass("jstree-open")?this.close_node(o):this.hover_node(this._get_prev(o))),!1},"ctrl+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&(o.hasClass("jstree-open")?this.close_node(o):this.hover_node(this._get_prev(o))),!1},"shift+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&(o.hasClass("jstree-open")?this.close_node(o):this.hover_node(this._get_prev(o))),!1},right:function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&o.length&&(o.hasClass("jstree-closed")?this.open_node(o):this.hover_node(this._get_next(o))),!1},"ctrl+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&o.length&&(o.hasClass("jstree-closed")?this.open_node(o):this.hover_node(this._get_next(o))),!1},"shift+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;return o&&o.length&&(o.hasClass("jstree-closed")?this.open_node(o):this.hover_node(this._get_next(o))),!1},space:function(){return this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click(),!1},"ctrl+space":function(event){return event.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(event),!1},"shift+space":function(event){return event.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(event),!1},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}})}(jQuery),function($){$.jstree.plugin("json_data",{__init:function(){var s=this._get_settings().json_data;s.progressive_unload&&this.get_container().bind("after_close.jstree",function(e,data){data.rslt.obj.children("ul").remove()})},defaults:{data:!1,ajax:!1,correct_state:!0,progressive_render:!1,progressive_unload:!1},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_json(obj,function(){_this.__callback({obj:_this._get_node(obj)}),s_call.call(this)},e_call)},_is_loaded:function(obj){var s=this._get_settings().json_data;return obj=this._get_node(obj),-1==obj||!obj||!s.ajax&&!s.progressive_render&&!$.isFunction(s.data)||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").length>0},refresh:function(obj){obj=this._get_node(obj);var s=this._get_settings().json_data;return obj&&-1!==obj&&s.progressive_unload&&($.isFunction(s.data)||s.ajax)&&obj.removeData("jstree_children"),this.__call_old()},load_node_json:function(obj,s_call,e_call){var d,s=this.get_settings().json_data,error_func=function(){},success_func=function(){};if(obj=this._get_node(obj),obj&&-1!==obj&&(s.progressive_render||s.progressive_unload)&&!obj.is(".jstree-open, .jstree-leaf")&&0===obj.children("ul").children("li").length&&obj.data("jstree_children"))return d=this._parse_json(obj.data("jstree_children"),obj),d&&(obj.append(d),s.progressive_unload||obj.removeData("jstree_children")),this.clean_node(obj),void(s_call&&s_call.call(this));if(obj&&-1!==obj){if(obj.data("jstree_is_loading"))return;obj.data("jstree_is_loading",!0)}switch(!0){case!s.data&&!s.ajax:throw"Neither data nor ajax settings supplied.";case $.isFunction(s.data):s.data.call(this,obj,$.proxy(function(d){d=this._parse_json(d,obj),d?(-1!==obj&&obj?(obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()),this.clean_node(obj),s_call&&s_call.call(this)):(-1!==obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&this.correct_state(obj)):s.correct_state&&this.get_container().children("ul").empty(),e_call&&e_call.call(this))},this));break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!obj||-1===obj):obj&&-1!=obj||(d=this._parse_json(s.data,obj),d?(this.get_container().children("ul").empty().append(d.children()),this.clean_node()):s.correct_state&&this.get_container().children("ul").empty()),s_call&&s_call.call(this);break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&obj&&-1!==obj:error_func=function(x,t,e){var ef=this.get_settings().json_data.ajax.error;ef&&ef.call(this,x,t,e),-1!=obj&&obj.length?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),"success"===t&&s.correct_state&&this.correct_state(obj)):"success"===t&&s.correct_state&&this.get_container().children("ul").empty(),e_call&&e_call.call(this)},success_func=function(d,t,x){var sf=this.get_settings().json_data.ajax.success;return sf&&(d=sf.call(this,d,t,x)||d),""===d||d&&d.toString&&""===d.toString().replace(/^[\s\n]+$/,"")||!$.isArray(d)&&!$.isPlainObject(d)?error_func.call(this,x,t,""):(d=this._parse_json(d,obj),void(d?(-1!==obj&&obj?(obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()),this.clean_node(obj),s_call&&s_call.call(this)):-1!==obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this))))},s.ajax.context=this,s.ajax.error=error_func,s.ajax.success=success_func,s.ajax.dataType||(s.ajax.dataType="json"),$.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,obj)),$.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,obj)),$.ajax(s.ajax)}},_parse_json:function(js,obj,is_callback){var tmp,i,j,ul1,ul2,d=!1,p=this._get_settings(),s=p.json_data,t=p.core.html_titles;if(!js)return d;if(s.progressive_unload&&obj&&-1!==obj&&obj.data("jstree_children",d),$.isArray(js)){if(d=$(),!js.length)return!1;for(i=0,j=js.length;j>i;i++)tmp=this._parse_json(js[i],obj,!0),tmp.length&&(d=d.add(tmp))}else{if("string"==typeof js&&(js={data:js}),!js.data&&""!==js.data)return d;d=$("<li />"),js.attr&&d.attr(js.attr),js.metadata&&d.data(js.metadata),js.state&&d.addClass("jstree-"+js.state),$.isArray(js.data)||(tmp=js.data,js.data=[],js.data.push(tmp)),$.each(js.data,function(i,m){tmp=$("<a />"),$.isFunction(m)&&(m=m.call(this,js)),"string"==typeof m?tmp.attr("href","#")[t?"html":"text"](m):(m.attr||(m.attr={}),m.attr.href||(m.attr.href="#"),tmp.attr(m.attr)[t?"html":"text"](m.title),m.language&&tmp.addClass(m.language)),tmp.prepend("<ins class='jstree-icon'>&#160;</ins>"),!m.icon&&js.icon&&(m.icon=js.icon),m.icon&&(-1===m.icon.indexOf("/")?tmp.children("ins").addClass(m.icon):tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat")),d.append(tmp)}),d.prepend("<ins class='jstree-icon'>&#160;</ins>"),js.children&&(s.progressive_render&&"open"!==js.state?d.addClass("jstree-closed").data("jstree_children",js.children):(s.progressive_unload&&d.data("jstree_children",js.children),$.isArray(js.children)&&js.children.length&&(tmp=this._parse_json(js.children,obj,!0),tmp.length&&(ul2=$("<ul />"),ul2.append(tmp),d.append(ul2)))))}return is_callback||(ul1=$("<ul />"),ul1.append(d),d=ul1),d},get_json:function(obj,li_attr,a_attr,is_callback){var tmp1,tmp2,li,a,t,lang,result=[],s=this._get_settings(),_this=this;return obj=this._get_node(obj),obj&&-1!==obj||(obj=this.get_container().find("> ul > li")),li_attr=$.isArray(li_attr)?li_attr:["id","class"],!is_callback&&this.data.types&&li_attr.push(s.types.type_attr),a_attr=$.isArray(a_attr)?a_attr:[],obj.each(function(){li=$(this),tmp1={data:[]},li_attr.length&&(tmp1.attr={}),$.each(li_attr,function(i,v){tmp2=li.attr(v),tmp2&&tmp2.length&&tmp2.replace(/jstree[^ ]*/gi,"").length&&(tmp1.attr[v]=(" "+tmp2).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))}),li.hasClass("jstree-open")&&(tmp1.state="open"),li.hasClass("jstree-closed")&&(tmp1.state="closed"),li.data()&&(tmp1.metadata=li.data()),a=li.children("a"),a.each(function(){t=$(this),a_attr.length||-1!==$.inArray("languages",s.plugins)||t.children("ins").get(0).style.backgroundImage.length||t.children("ins").get(0).className&&t.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").length?(lang=!1,-1!==$.inArray("languages",s.plugins)&&$.isArray(s.languages)&&s.languages.length&&$.each(s.languages,function(l,lv){return t.hasClass(lv)?(lang=lv,!1):void 0}),tmp2={attr:{},title:_this.get_text(t,lang)},$.each(a_attr,function(k,z){tmp2.attr[z]=(" "+(t.attr(z)||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")}),-1!==$.inArray("languages",s.plugins)&&$.isArray(s.languages)&&s.languages.length&&$.each(s.languages,function(k,z){return t.hasClass(z)?(tmp2.language=z,!0):void 0}),t.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(tmp2.icon=t.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")),t.children("ins").get(0).style.backgroundImage.length&&(tmp2.icon=t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""))):tmp2=_this.get_text(t),a.length>1?tmp1.data.push(tmp2):tmp1.data=tmp2}),li=li.find("> ul > li"),li.length&&(tmp1.children=_this.get_json(li,li_attr,a_attr,!0)),result.push(tmp1)}),result}}})}(jQuery),function($){var sh=!1;$.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(i){var langs=this._get_settings().languages,st=!1,selector=".jstree-"+this.get_index()+" a";if(!$.isArray(langs)||0===langs.length)return!1;if(-1==$.inArray(i,langs)){if(!langs[i])return!1;i=langs[i]}return i==this.data.languages.current_language?!0:(st=$.vakata.css.get_css(selector+"."+this.data.languages.current_language,!1,sh),st!==!1&&(st.style.display="none"),st=$.vakata.css.get_css(selector+"."+i,!1,sh),st!==!1&&(st.style.display=""),this.data.languages.current_language=i,this.__callback(i),!0)},get_lang:function(){return this.data.languages.current_language},_get_string:function(key,lang){var langs=this._get_settings().languages,s=this._get_settings().core.strings;return $.isArray(langs)&&langs.length&&(lang=lang&&-1!=$.inArray(lang,langs)?lang:this.data.languages.current_language),s[lang]&&s[lang][key]?s[lang][key]:s[key]?s[key]:key},get_text:function(obj,lang){if(obj=this._get_node(obj)||this.data.ui.last_selected,!obj.size())return!1;var langs=this._get_settings().languages,s=this._get_settings().core.html_titles;return $.isArray(langs)&&langs.length?(lang=lang&&-1!=$.inArray(lang,langs)?lang:this.data.languages.current_language,obj=obj.children("a."+lang)):obj=obj.children("a:eq(0)"),s?(obj=obj.clone(),obj.children("INS").remove(),obj.html()):(obj=obj.contents().filter(function(){return 3==this.nodeType})[0],obj.nodeValue)},set_text:function(obj,val,lang){if(obj=this._get_node(obj)||this.data.ui.last_selected,!obj.size())return!1;var tmp,langs=this._get_settings().languages,s=this._get_settings().core.html_titles;return $.isArray(langs)&&langs.length?(lang=lang&&-1!=$.inArray(lang,langs)?lang:this.data.languages.current_language,obj=obj.children("a."+lang)):obj=obj.children("a:eq(0)"),s?(tmp=obj.children("INS").clone(),obj.html(val).prepend(tmp),this.__callback({obj:obj,name:val,lang:lang}),!0):(obj=obj.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:obj,name:val,lang:lang}),obj.nodeValue=val)},_load_css:function(){var ln,langs=this._get_settings().languages,str="/* languages css */",selector=".jstree-"+this.get_index()+" a";if($.isArray(langs)&&langs.length){for(this.data.languages.current_language=langs[0],ln=0;ln<langs.length;ln++)str+=selector+"."+langs[ln]+" {",langs[ln]!=this.data.languages.current_language&&(str+=" display:none; "),str+=" } ";sh=$.vakata.css.add_sheet({str:str,title:"jstree-languages"})}},create_node:function(obj,position,js,callback){var t=this.__call_old(!0,obj,position,js,function(t){var ln,langs=this._get_settings().languages,a=t.children("a");if($.isArray(langs)&&langs.length){for(ln=0;ln<langs.length;ln++)a.is("."+langs[ln])||t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));a.not("."+langs.join(", .")).remove()}callback&&callback.call(this,t)});return t}}})}(jQuery),function($){$.jstree.plugin("cookies",{__init:function(){if("undefined"==typeof $.cookie)throw"jsTree cookie: jQuery cookie plugin not included.";var tmp,s=this._get_settings().cookies;s.save_loaded&&(tmp=$.cookie(s.save_loaded),tmp&&tmp.length&&(this.data.core.to_load=tmp.split(","))),s.save_opened&&(tmp=$.cookie(s.save_opened),tmp&&tmp.length&&(this.data.core.to_open=tmp.split(","))),s.save_selected&&(tmp=$.cookie(s.save_selected),tmp&&tmp.length&&this.data.ui&&(this.data.ui.to_select=tmp.split(","))),this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",$.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",$.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:!0,
cookie_options:{}},_fn:{save_cookie:function(c){if(!this.data.core.refreshing){var s=this._get_settings().cookies;if(!c)return s.save_loaded&&(this.save_loaded(),$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options)),s.save_opened&&(this.save_opened(),$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options)),void(s.save_selected&&this.data.ui&&(this.save_selected(),$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options)));switch(c){case"open_node":case"close_node":s.save_opened&&(this.save_opened(),$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options)),s.save_loaded&&(this.save_loaded(),$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options));break;case"select_node":case"deselect_node":s.save_selected&&this.data.ui&&(this.save_selected(),$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options))}}}}})}(jQuery),function($){$.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",$.proxy(function(e,data){var obj=this._get_node(data.rslt.obj);obj=-1===obj?this.get_container().children("ul"):obj.children("ul"),this.sort(obj)},this)).bind("rename_node.jstree create_node.jstree create.jstree",$.proxy(function(e,data){this.sort(data.rslt.obj.parent())},this)).bind("move_node.jstree",$.proxy(function(e,data){var m=-1==data.rslt.np?this.get_container():data.rslt.np;this.sort(m.children("ul"))},this))},defaults:function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},_fn:{sort:function(obj){var s=this._get_settings().sort,t=this;obj.append($.makeArray(obj.children("li")).sort($.proxy(s,t))),obj.find("> li > ul").each(function(){t.sort($(this))}),this.clean_node(obj)}}})}(jQuery),function($){var o=!1,r=!1,m=!1,ml=!1,sli=!1,sti=!1,dir1=!1,dir2=!1,last_pos=!1;$.vakata.dnd={is_down:!1,is_drag:!1,helper:!1,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(e,data,html){$.vakata.dnd.is_drag&&$.vakata.drag_stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.MozUserSelect="none")}catch(err){}return $.vakata.dnd.init_x=e.pageX,$.vakata.dnd.init_y=e.pageY,$.vakata.dnd.user_data=data,$.vakata.dnd.is_down=!0,$.vakata.dnd.helper=$("<div id='vakata-dragged' />").html(html),$(document).bind("mousemove",$.vakata.dnd.drag),$(document).bind("mouseup",$.vakata.dnd.drag_stop),!1},drag:function(e){if($.vakata.dnd.is_down){if(!$.vakata.dnd.is_drag){if(!(Math.abs(e.pageX-$.vakata.dnd.init_x)>5||Math.abs(e.pageY-$.vakata.dnd.init_y)>5))return;$.vakata.dnd.helper.appendTo("body"),$.vakata.dnd.is_drag=!0,$(document).triggerHandler("drag_start.vakata",{event:e,data:$.vakata.dnd.user_data})}if("mousemove"===e.type){var d=$(document),t=d.scrollTop(),l=d.scrollLeft();e.pageY-t<20?(sti&&"down"===dir1&&(clearInterval(sti),sti=!1),sti||(dir1="up",sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()-$.vakata.dnd.scroll_spd)},150))):sti&&"up"===dir1&&(clearInterval(sti),sti=!1),$(window).height()-(e.pageY-t)<20?(sti&&"up"===dir1&&(clearInterval(sti),sti=!1),sti||(dir1="down",sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()+$.vakata.dnd.scroll_spd)},150))):sti&&"down"===dir1&&(clearInterval(sti),sti=!1),e.pageX-l<20?(sli&&"right"===dir2&&(clearInterval(sli),sli=!1),sli||(dir2="left",sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()-$.vakata.dnd.scroll_spd)},150))):sli&&"left"===dir2&&(clearInterval(sli),sli=!1),$(window).width()-(e.pageX-l)<20?(sli&&"left"===dir2&&(clearInterval(sli),sli=!1),sli||(dir2="right",sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()+$.vakata.dnd.scroll_spd)},150))):sli&&"right"===dir2&&(clearInterval(sli),sli=!1)}$.vakata.dnd.helper.css({left:e.pageX+$.vakata.dnd.helper_left+"px",top:e.pageY+$.vakata.dnd.helper_top+"px"}),$(document).triggerHandler("drag.vakata",{event:e,data:$.vakata.dnd.user_data})}},drag_stop:function(e){sli&&clearInterval(sli),sti&&clearInterval(sti),$(document).unbind("mousemove",$.vakata.dnd.drag),$(document).unbind("mouseup",$.vakata.dnd.drag_stop),$(document).triggerHandler("drag_stop.vakata",{event:e,data:$.vakata.dnd.user_data}),$.vakata.dnd.helper.remove(),$.vakata.dnd.init_x=0,$.vakata.dnd.init_y=0,$.vakata.dnd.user_data={},$.vakata.dnd.is_down=!1,$.vakata.dnd.is_drag=!1}},$(function(){var css_string="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";$.vakata.css.add_sheet({str:css_string,title:"vakata"})}),$.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:!1,after:!1,inside:!1,before:!1,off:!1,prepared:!1,w:0,to1:!1,to2:!1,cof:!1,cw:!1,ch:!1,i1:!1,i2:!1,mto:!1},this.get_container().bind("mouseenter.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&(this.data.themes&&(m.attr("class","jstree-"+this.data.themes.theme),ml&&ml.attr("class","jstree-"+this.data.themes.theme),$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target)){var dc,tr=$.jstree._reference(e.target);tr.data.dnd.foreign?(dc=tr._get_settings().dnd.drag_check.call(this,{o:o,r:tr.get_container(),is_root:!0}),dc!==!0&&dc.inside!==!0&&dc.before!==!0&&dc.after!==!0||$.vakata.dnd.helper.children("ins").attr("class","jstree-ok")):(tr.prepare_move(o,tr.get_container(),"last"),tr.check_move()&&$.vakata.dnd.helper.children("ins").attr("class","jstree-ok"))}},this)).bind("mouseup.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target){var dc,tr=$.jstree._reference(e.currentTarget);tr.data.dnd.foreign?(dc=tr._get_settings().dnd.drag_check.call(this,{o:o,r:tr.get_container(),is_root:!0}),dc!==!0&&dc.inside!==!0&&dc.before!==!0&&dc.after!==!0||tr._get_settings().dnd.drag_finish.call(this,{o:o,r:tr.get_container(),is_root:!0})):tr.move_node(o,tr.get_container(),"last",e[tr._get_settings().dnd.copy_modifier+"Key"])}},this)).bind("mouseleave.jstree",$.proxy(function(e){return e.relatedTarget&&e.relatedTarget.id&&"jstree-marker-line"===e.relatedTarget.id?!1:void($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),$.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")))},this)).bind("mousemove.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){var cnt=this.get_container()[0];e.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft+=$.vakata.dnd.scroll_spd},cnt),100)):e.pageX-24<this.data.dnd.cof.left?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft-=$.vakata.dnd.scroll_spd},cnt),100)):this.data.dnd.i1&&clearInterval(this.data.dnd.i1),e.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop+=$.vakata.dnd.scroll_spd},cnt),100)):e.pageY-24<this.data.dnd.cof.top?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop-=$.vakata.dnd.scroll_spd},cnt),100)):this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("scroll.jstree",$.proxy(function(e){$.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&m&&ml&&(m.hide(),ml.hide())},this)).delegate("a","mousedown.jstree",$.proxy(function(e){return 1===e.which?(this.start_drag(e.currentTarget,e),!1):void 0},this)).delegate("a","mouseenter.jstree",$.proxy(function(e){$.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&this.dnd_enter(e.currentTarget)},this)).delegate("a","mousemove.jstree",$.proxy(function(e){$.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&(r&&r.length&&r.children("a")[0]===e.currentTarget||this.dnd_enter(e.currentTarget),"undefined"==typeof this.data.dnd.off.top&&(this.data.dnd.off=$(e.target).offset()),this.data.dnd.w=(e.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height,this.data.dnd.w<0&&(this.data.dnd.w+=this.data.core.li_height),this.dnd_show())},this)).delegate("a","mouseleave.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(e.relatedTarget&&e.relatedTarget.id&&"jstree-marker-line"===e.relatedTarget.id)return!1;m&&m.hide(),ml&&ml.hide(),this.data.dnd.mto=setTimeout(function(t){return function(){t.dnd_leave(e)}}(this),0)}},this)).delegate("a, #jstree-marker-line","mouseup.jstree",$.proxy(function(e){$.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&this.dnd_finish(e)},this)),$(document).bind("drag_stop.vakata",$.proxy(function(){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,this.data.dnd.off=!1,this.data.dnd.prepared=!1,this.data.dnd.w=!1,this.data.dnd.to1=!1,this.data.dnd.to2=!1,this.data.dnd.i1=!1,this.data.dnd.i2=!1,this.data.dnd.active=!1,this.data.dnd.foreign=!1,m&&m.css({top:"-2000px"}),ml&&ml.css({top:"-2000px"})},this)).bind("drag_start.vakata",$.proxy(function(e,data){if(data.data.jstree){var et=$(data.event.target);et.closest(".jstree").hasClass("jstree-"+this.get_index())&&this.dnd_enter(et)}},this));var s=this._get_settings().dnd;s.drag_target&&$(document).delegate(s.drag_target,"mousedown.jstree-"+this.get_index(),$.proxy(function(e){o=e.target,$.vakata.dnd.drag_start(e,{jstree:!0,obj:e.target},"<ins class='jstree-icon'></ins>"+$(e.target).text()),this.data.themes&&(m&&m.attr("class","jstree-"+this.data.themes.theme),ml&&ml.attr("class","jstree-"+this.data.themes.theme),$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var cnt=this.get_container();this.data.dnd.cof=cnt.offset(),this.data.dnd.cw=parseInt(cnt.width(),10),this.data.dnd.ch=parseInt(cnt.height(),10),this.data.dnd.foreign=!0,e.preventDefault()},this)),s.drop_target&&$(document).delegate(s.drop_target,"mouseenter.jstree-"+this.get_index(),$.proxy(function(e){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:o,r:$(e.target),e:e})&&$.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(s.drop_target,"mouseleave.jstree-"+this.get_index(),$.proxy(function(e){this.data.dnd.active&&$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(s.drop_target+", #jstree-marker-line","mouseup.jstree-"+this.get_index(),$.proxy(function(e){this.data.dnd.active&&$.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:o,r:$(e.target),e:e})},this))},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(data){return!0},drop_finish:$.noop,drag_target:".jstree-draggable",drag_finish:$.noop,drag_check:function(data){return{after:!1,before:!1,inside:!0}}},__destroy:function(){$(".jstree").length<=1&&$(document).unbind("drag_start.vakata").unbind("drag_stop.vakata"),o=!1},_fn:{dnd_prepare:function(){if(r&&r.length){if(this.data.dnd.off=r.offset(),this._get_settings().core.rtl&&(this.data.dnd.off.right=this.data.dnd.off.left+r.width()),this.data.dnd.foreign){var a=this._get_settings().dnd.drag_check.call(this,{o:o,r:r});return this.data.dnd.after=a.after,this.data.dnd.before=a.before,this.data.dnd.inside=a.inside,this.data.dnd.prepared=!0,this.dnd_show()}return this.prepare_move(o,r,"before"),this.data.dnd.before=this.check_move(),this.prepare_move(o,r,"after"),this.data.dnd.after=this.check_move(),this._is_loaded(r)?(this.prepare_move(o,r,"inside"),this.data.dnd.inside=this.check_move()):this.data.dnd.inside=!1,this.data.dnd.prepared=!0,this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var pos,o=["before","inside","after"],r=!1,rtl=this._get_settings().core.rtl;switch(o=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=2*this.data.core.li_height/3?this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"],$.each(o,$.proxy(function(i,val){return this.data.dnd[val]?($.vakata.dnd.helper.children("ins").attr("class","jstree-ok"),r=val,!1):void 0},this)),r===!1&&$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),pos=rtl?this.data.dnd.off.right-18:this.data.dnd.off.left+10,r){case"before":m.css({left:pos+"px",top:this.data.dnd.off.top-6+"px"}).show(),ml&&ml.css({left:pos+8+"px",top:this.data.dnd.off.top-1+"px"}).show();break;case"after":m.css({left:pos+"px",top:this.data.dnd.off.top+this.data.core.li_height-6+"px"}).show(),ml&&ml.css({left:pos+8+"px",top:this.data.dnd.off.top+this.data.core.li_height-1+"px"}).show();break;case"inside":m.css({left:pos+(rtl?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show(),ml&&ml.hide();break;default:m.hide(),ml&&ml.hide()}return last_pos=r,r}},dnd_open:function(){this.data.dnd.to2=!1,this.open_node(r,$.proxy(this.dnd_prepare,this),!0)},dnd_finish:function(e){this.data.dnd.foreign?(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)&&this._get_settings().dnd.drag_finish.call(this,{o:o,r:r,p:last_pos}):(this.dnd_prepare(),this.move_node(o,r,last_pos,e[this._get_settings().dnd.copy_modifier+"Key"])),o=!1,r=!1,m.hide(),ml&&ml.hide()},dnd_enter:function(obj){this.data.dnd.mto&&(clearTimeout(this.data.dnd.mto),this.data.dnd.mto=!1);var s=this._get_settings().dnd;this.data.dnd.prepared=!1,r=this._get_node(obj),s.check_timeout?(this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to1=setTimeout($.proxy(this.dnd_prepare,this),s.check_timeout)):this.dnd_prepare(),s.open_timeout?(this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),r&&r.length&&r.hasClass("jstree-closed")&&(this.data.dnd.to2=setTimeout($.proxy(this.dnd_open,this),s.open_timeout))):r&&r.length&&r.hasClass("jstree-closed")&&this.dnd_open()},dnd_leave:function(e){this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),m.hide(),ml&&ml.hide(),r&&r[0]===e.target.parentNode&&(this.data.dnd.to1&&(clearTimeout(this.data.dnd.to1),this.data.dnd.to1=!1),this.data.dnd.to2&&(clearTimeout(this.data.dnd.to2),this.data.dnd.to2=!1))},start_drag:function(obj,e){o=this._get_node(obj),this.data.ui&&this.is_selected(o)&&(o=this._get_node(null,!0));var dt=o.length>1?this._get_string("multiple_selection"):this.get_text(o),cnt=this.get_container();this._get_settings().core.html_titles||(dt=dt.replace(/</gi,"&lt;").replace(/>/gi,"&gt;")),$.vakata.dnd.drag_start(e,{jstree:!0,obj:o},"<ins class='jstree-icon'></ins>"+dt),this.data.themes&&(m&&m.attr("class","jstree-"+this.data.themes.theme),ml&&ml.attr("class","jstree-"+this.data.themes.theme),$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),this.data.dnd.cof=cnt.offset(),this.data.dnd.cw=parseInt(cnt.width(),10),this.data.dnd.ch=parseInt(cnt.height(),10),this.data.dnd.active=!0}}}),$(function(){var css_string="#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";$.vakata.css.add_sheet({str:css_string,title:"jstree"}),m=$("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;").bind("mouseleave mouseenter",function(e){return m.hide(),ml.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1}).appendTo("body"),ml=$("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){return r&&r.length?(r.children("a").trigger(e),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).bind("mouseleave",function(e){var rt=$(e.relatedTarget);return(rt.is(".jstree")||0===rt.closest(".jstree").length)&&r&&r.length?(r.children("a").trigger(e),m.hide(),ml.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).appendTo("body"),$(document).bind("drag_start.vakata",function(e,data){data.data.jstree&&(m.show(),ml&&ml.show())}),$(document).bind("drag_stop.vakata",function(e,data){data.data.jstree&&(m.hide(),ml&&ml.hide())})})}(jQuery),function($){$.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui,this.data.ui&&this.data.checkbox.noui&&(this.select_node=this.deselect_node=this.deselect_all=$.noop,this.get_selected=this.get_checked),this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",$.proxy(function(e,data){this._prepare_checkboxes(data.rslt.obj)},this)).bind("loaded.jstree",$.proxy(function(e){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",$.proxy(function(e){return e.preventDefault(),this._get_node(e.target).hasClass("jstree-checked")?this.uncheck_node(e.target):this.check_node(e.target),this.data.ui&&this.data.checkbox.noui?(this.save_selected(),void(this.data.cookies&&this.save_cookie("select_node"))):(e.stopImmediatePropagation(),!1)},this))},defaults:{override_ui:!1,two_state:!1,real_checkboxes:!1,checked_parent_open:!0,real_checkboxes_names:function(n){return["check_"+(n[0].id||Math.ceil(1e4*Math.random())),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(n,data){data.checked&&this.check_node(n,!1)},_prepare_checkboxes:function(obj){if(obj=obj&&-1!=obj?this._get_node(obj):this.get_container().find("> ul > li"),obj!==!1){var c,t,_this=this,ts=this._get_settings().checkbox.two_state,rc=this._get_settings().checkbox.real_checkboxes,rcn=this._get_settings().checkbox.real_checkboxes_names;obj.each(function(){t=$(this),c=t.is("li")&&(t.hasClass("jstree-checked")||rc&&t.children(":checked").length)?"jstree-checked":"jstree-unchecked",t.find("li").andSelf().each(function(){var nm,$t=$(this);$t.children("a"+(_this.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(ts?"jstree-unchecked":c),rc&&($t.children(":checkbox").length?$t.children(":checkbox").addClass("jstree-real-checkbox"):(nm=rcn.call(_this,$t),$t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+nm[0]+"' name='"+nm[0]+"' value='"+nm[1]+"' />"))),ts?($t.hasClass("jstree-checked")||$t.children(":checked").length)&&$t.addClass("jstree-checked").children(":checkbox").prop("checked",!0):("jstree-checked"===c||$t.hasClass("jstree-checked")||$t.children(":checked").length)&&$t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",!0)})}),ts||obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this)})}},change_state:function(obj,state){obj=this._get_node(obj);var coll=!1,rc=this._get_settings().checkbox.real_checkboxes;if(!obj||-1===obj)return!1;if(state=state===!1||state===!0?state:obj.hasClass("jstree-checked"),this._get_settings().checkbox.two_state)state?(obj.removeClass("jstree-checked").addClass("jstree-unchecked"),rc&&obj.children(":checkbox").prop("checked",!1)):(obj.removeClass("jstree-unchecked").addClass("jstree-checked"),rc&&obj.children(":checkbox").prop("checked",!0));else{if(state){if(coll=obj.find("li").andSelf(),!coll.filter(".jstree-checked, .jstree-undetermined").length)return!1;coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),rc&&coll.children(":checkbox").prop("checked",!1)}else{if(coll=obj.find("li").andSelf(),!coll.filter(".jstree-unchecked, .jstree-undetermined").length)return!1;coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),rc&&coll.children(":checkbox").prop("checked",!0),this.data.ui&&(this.data.ui.last_selected=obj),this.data.checkbox.last_selected=obj}obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length)return $this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),rc&&$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),rc&&$this.children(":checkbox").prop("checked",!1)}else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length)return $this.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),rc&&$this.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),rc&&$this.children(":checkbox").prop("checked",!0)}})}return this.data.ui&&this.data.checkbox.noui&&(this.data.ui.selected=this.get_checked()),this.__callback(obj),!0},check_node:function(obj){if(this.change_state(obj,!1)){if(obj=this._get_node(obj),this._get_settings().checkbox.checked_parent_open){var t=this;obj.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}this.__callback({obj:obj})}},uncheck_node:function(obj){this.change_state(obj,!0)&&this.__callback({obj:this._get_node(obj)})},check_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,!1)}),this.__callback()},uncheck_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,!0)}),this.__callback()},is_checked:function(obj){return obj=this._get_node(obj),obj.length?obj.is(".jstree-checked"):!1},get_checked:function(obj,get_all){return obj=obj&&-1!==obj?this._get_node(obj):this.get_container(),get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-checked"):obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(obj,get_all){return obj=obj&&-1!==obj?this._get_node(obj):this.get_container(),get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-unchecked"):obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(obj){if(obj=this._get_node(obj),obj.length){if(this._get_settings().checkbox.two_state)return void obj.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!0);var rc=this._get_settings().checkbox.real_checkboxes,a=obj.find("> ul > .jstree-checked").length,b=obj.find("> ul > .jstree-undetermined").length,c=obj.find("> ul > li").length;0===c?obj.hasClass("jstree-undetermined")&&this.change_state(obj,!1):0===a&&0===b?this.change_state(obj,!0):a===c?this.change_state(obj,!1):(obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),rc&&obj.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1))}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.deselect_all(),$.each(s,function(i,val){_this.check_node(val)}),this.__callback()}else this.__call_old()},save_loaded:function(){var _this=this;this.data.core.to_load=[],this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&_this.data.core.to_load.push("#"+this.id)})}}}),$(function(){var css_string=".jstree .jstree-real-checkbox { display:none; } ";$.vakata.css.add_sheet({str:css_string,title:"jstree"})})}(jQuery),function($){$.vakata.xslt=function(xml,xsl,callback){var xm,xs,processor,support,rs="";return document.recalc?(xm=document.createElement("xml"),xs=document.createElement("xml"),xm.innerHTML=xml,xs.innerHTML=xsl,$("body").append(xm).append(xs),setTimeout(function(xm,xs,callback){return function(){callback.call(null,xm.transformNode(xs.XMLDocument)),setTimeout(function(xm,xs){return function(){$(xm).remove(),$(xs).remove()}}(xm,xs),200)}}(xm,xs,callback),100),!0):("undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"==typeof window.XSLTProcessor&&(xml=(new DOMParser).parseFromString(xml,"text/xml"),xsl=(new DOMParser).parseFromString(xsl,"text/xml")),"undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"!=typeof window.XSLTProcessor?(processor=new XSLTProcessor,(support=$.isFunction(processor.transformDocument)?"undefined"!=typeof window.XMLSerializer:!0)?(xml=(new DOMParser).parseFromString(xml,"text/xml"),xsl=(new DOMParser).parseFromString(xsl,"text/xml"),$.isFunction(processor.transformDocument)?(rs=document.implementation.createDocument("","",null),processor.transformDocument(xml,xsl,rs,null),callback.call(null,(new XMLSerializer).serializeToString(rs)),!0):(processor.importStylesheet(xsl),rs=processor.transformToFragment(xml,document),callback.call(null,$("<div />").append(rs).html()),!0)):!1):!1)};var xsl={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </ul></xsl:template></xsl:stylesheet>',flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'
},escape_xml=function(string){return string.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")};$.jstree.plugin("xml_data",{defaults:{data:!1,ajax:!1,xsl:"flat",clean_node:!1,correct_state:!0,get_skip_empty:!1,get_include_preamble:!0},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_xml(obj,function(){_this.__callback({obj:_this._get_node(obj)}),s_call.call(this)},e_call)},_is_loaded:function(obj){var s=this._get_settings().xml_data;return obj=this._get_node(obj),-1==obj||!obj||!s.ajax&&!$.isFunction(s.data)||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0},load_node_xml:function(obj,s_call,e_call){var s=this.get_settings().xml_data,error_func=function(){},success_func=function(){};if(obj=this._get_node(obj),obj&&-1!==obj){if(obj.data("jstree_is_loading"))return;obj.data("jstree_is_loading",!0)}switch(!0){case!s.data&&!s.ajax:throw"Neither data nor ajax settings supplied.";case $.isFunction(s.data):s.data.call(this,obj,$.proxy(function(d){this.parse_xml(d,$.proxy(function(d){d&&(d=d.replace(/ ?xmlns="[^"]*"/gi,""),d.length>10?(d=$(d),-1!==obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.append(d),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()),s.clean_node&&this.clean_node(obj),s_call&&s_call.call(this)):obj&&-1!==obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this)))},this))},this));break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!obj||-1===obj):obj&&-1!=obj||this.parse_xml(s.data,$.proxy(function(d){d?(d=d.replace(/ ?xmlns="[^"]*"/gi,""),d.length>10&&(d=$(d),this.get_container().children("ul").empty().append(d.children()),s.clean_node&&this.clean_node(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this))},this));break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&obj&&-1!==obj:error_func=function(x,t,e){var ef=this.get_settings().xml_data.ajax.error;ef&&ef.call(this,x,t,e),-1!==obj&&obj.length?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),"success"===t&&s.correct_state&&this.correct_state(obj)):"success"===t&&s.correct_state&&this.get_container().children("ul").empty(),e_call&&e_call.call(this)},success_func=function(d,t,x){d=x.responseText;var sf=this.get_settings().xml_data.ajax.success;return sf&&(d=sf.call(this,d,t,x)||d),""===d||d&&d.toString&&""===d.toString().replace(/^[\s\n]+$/,"")?error_func.call(this,x,t,""):void this.parse_xml(d,$.proxy(function(d){d&&(d=d.replace(/ ?xmlns="[^"]*"/gi,""),d.length>10?(d=$(d),-1!==obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.append(d),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()),s.clean_node&&this.clean_node(obj),s_call&&s_call.call(this)):obj&&-1!==obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this)))},this))},s.ajax.context=this,s.ajax.error=error_func,s.ajax.success=success_func,s.ajax.dataType||(s.ajax.dataType="xml"),$.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,obj)),$.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,obj)),$.ajax(s.ajax)}},parse_xml:function(xml,callback){var s=this._get_settings().xml_data;$.vakata.xslt(xml,xsl[s.xsl],callback)},get_xml:function(tp,obj,li_attr,a_attr,is_callback){var tmp1,tmp2,li,a,lang,result="",s=this._get_settings(),_this=this;return tp||(tp="flat"),is_callback||(is_callback=0),obj=this._get_node(obj),obj&&-1!==obj||(obj=this.get_container().find("> ul > li")),li_attr=$.isArray(li_attr)?li_attr:["id","class"],!is_callback&&this.data.types&&-1===$.inArray(s.types.type_attr,li_attr)&&li_attr.push(s.types.type_attr),a_attr=$.isArray(a_attr)?a_attr:[],is_callback||(s.xml_data.get_include_preamble&&(result+='<?xml version="1.0" encoding="UTF-8"?>'),result+="<root>"),obj.each(function(){result+="<item",li=$(this),$.each(li_attr,function(i,v){var t=li.attr(v);s.xml_data.get_skip_empty&&"undefined"==typeof t||(result+=" "+v+'="'+escape_xml((" "+(t||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),li.hasClass("jstree-open")&&(result+=' state="open"'),li.hasClass("jstree-closed")&&(result+=' state="closed"'),"flat"===tp&&(result+=' parent_id="'+escape_xml(is_callback)+'"'),result+=">",result+="<content>",a=li.children("a"),a.each(function(){tmp1=$(this),lang=!1,result+="<name",-1!==$.inArray("languages",s.plugins)&&$.each(s.languages,function(k,z){return tmp1.hasClass(z)?(result+=' lang="'+escape_xml(z)+'"',lang=z,!1):void 0}),a_attr.length&&$.each(a_attr,function(k,z){var t=tmp1.attr(z);s.xml_data.get_skip_empty&&"undefined"==typeof t||(result+=" "+z+'="'+escape_xml((" "+t||"").replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(result+=' icon="'+escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"'),tmp1.children("ins").get(0).style.backgroundImage.length&&(result+=' icon="'+escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/gi,"").replace(/"/gi,""))+'"'),result+=">",result+="<![CDATA["+_this.get_text(tmp1,lang)+"]]>",result+="</name>"}),result+="</content>",tmp2=li[0].id||!0,li=li.find("> ul > li"),tmp2=li.length?_this.get_xml(tp,li,li_attr,a_attr,tmp2):"","nest"==tp&&(result+=tmp2),result+="</item>","flat"==tp&&(result+=tmp2)}),is_callback||(result+="</root>"),result}}})}(jQuery),function($){$.expr[":"].jstree_contains=function(a,i,m){return(a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0},$.expr[":"].jstree_title_contains=function(a,i,m){return(a.getAttribute("title")||"").toLowerCase().indexOf(m[3].toLowerCase())>=0},$.jstree.plugin("search",{__init:function(){this.data.search.str="",this.data.search.result=$(),this._get_settings().search.show_only_matches&&this.get_container().bind("search.jstree",function(e,data){$(this).children("ul").find("li").hide().removeClass("jstree-last"),data.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){$(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){$(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})},defaults:{ajax:!1,search_method:"jstree_contains",show_only_matches:!1},_fn:{search:function(str,skip_async){if(""===$.trim(str))return void this.clear_search();var s=this.get_settings().search,t=this,error_func=function(){},success_func=function(){};return this.data.search.str=str,!skip_async&&s.ajax!==!1&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0?(this.search.supress_callback=!0,error_func=function(){},success_func=function(d,t,x){var sf=this.get_settings().search.ajax.success;sf&&(d=sf.call(this,d,t,x)||d),this.data.search.to_open=d,this._search_open()},s.ajax.context=this,s.ajax.error=error_func,s.ajax.success=success_func,$.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,str)),$.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,str)),s.ajax.data||(s.ajax.data={search_string:str}),s.ajax.dataType&&!/^json/.exec(s.ajax.dataType)||(s.ajax.dataType="json"),void $.ajax(s.ajax)):(this.data.search.result.length&&this.clear_search(),this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+s.search_method+"("+this.data.search.str+")"),this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)}),void this.__callback({nodes:this.data.search.result,str:str}))},clear_search:function(str){this.data.search.result.removeClass("jstree-search"),this.__callback(this.data.search.result),this.data.search.result=$()},_search_open:function(is_callback){var _this=this,done=!0,current=[],remaining=[];this.data.search.to_open.length&&($.each(this.data.search.to_open,function(i,val){return"#"==val?!0:void($(val).length&&$(val).is(".jstree-closed")?current.push(val):remaining.push(val))}),current.length&&(this.data.search.to_open=remaining,$.each(current,function(i,val){_this.open_node(val,function(){_this._search_open(!0)})}),done=!1)),done&&this.search(this.data.search.str,!0)}}})}(jQuery),function($){$.vakata.context={hide_on_mouseleave:!1,cnt:$("<div id='vakata-contextmenu' />"),vis:!1,tgt:!1,par:!1,func:!1,data:!1,rtl:!1,show:function(s,t,x,y,d,p,rtl){$.vakata.context.rtl=!!rtl;var h,w,html=$.vakata.context.parse(s);html&&($.vakata.context.vis=!0,$.vakata.context.tgt=t,$.vakata.context.par=p||t||null,$.vakata.context.data=d||null,$.vakata.context.cnt.html(html).css({visibility:"hidden",display:"block",left:0,top:0}),$.vakata.context.hide_on_mouseleave&&$.vakata.context.cnt.one("mouseleave",function(e){$.vakata.context.hide()}),h=$.vakata.context.cnt.height(),w=$.vakata.context.cnt.width(),x+w>$(document).width()&&(x=$(document).width()-(w+5),$.vakata.context.cnt.find("li > ul").addClass("right")),y+h>$(document).height()&&(y-=h+t[0].offsetHeight,$.vakata.context.cnt.find("li > ul").addClass("bottom")),$.vakata.context.cnt.css({left:x,top:y}).find("li:has(ul)").bind("mouseenter",function(e){var w=$(document).width(),h=$(document).height(),ul=$(this).children("ul").show();w!==$(document).width()&&ul.toggleClass("right"),h!==$(document).height()&&ul.toggleClass("bottom")}).bind("mouseleave",function(e){$(this).children("ul").hide()}).end().css({visibility:"visible"}).show(),$(document).triggerHandler("context_show.vakata"))},hide:function(){$.vakata.context.vis=!1,$.vakata.context.cnt.attr("class","").css({visibility:"hidden"}),$(document).triggerHandler("context_hide.vakata")},parse:function(s,is_callback){if(!s)return!1;var str="",tmp=!1,was_sep=!0;return is_callback||($.vakata.context.func={}),str+="<ul>",$.each(s,function(i,val){return val?($.vakata.context.func[i]=val.action,!was_sep&&val.separator_before&&(str+="<li class='vakata-separator vakata-separator-before'></li>"),was_sep=!1,str+="<li class='"+(val._class||"")+(val._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ",val.icon&&-1===val.icon.indexOf("/")&&(str+=" class='"+val.icon+"' "),val.icon&&-1!==val.icon.indexOf("/")&&(str+=" style='background:url("+val.icon+") center center no-repeat;' "),str+=">&#160;</ins><a href='#' rel='"+i+"'>",val.submenu&&(str+="<span style='float:"+($.vakata.context.rtl?"left":"right")+";'>&raquo;</span>"),str+=val.label+"</a>",val.submenu&&(tmp=$.vakata.context.parse(val.submenu,!0),tmp&&(str+=tmp)),str+="</li>",void(val.separator_after&&(str+="<li class='vakata-separator vakata-separator-after'></li>",was_sep=!0))):!0}),str=str.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,""),str+="</ul>",$(document).triggerHandler("context_parse.vakata"),str.length>10?str:!1},exec:function(i){return $.isFunction($.vakata.context.func[i])?($.vakata.context.func[i].call($.vakata.context.data,$.vakata.context.par),!0):!1}},$(function(){var css_string="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ";$.vakata.css.add_sheet({str:css_string,title:"vakata"}),$.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(e){!$(this).parent().hasClass("jstree-contextmenu-disabled")&&$.vakata.context.exec($(this).attr("rel"))?$.vakata.context.hide():$(this).blur()}).delegate("a","mouseover",function(){$.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),$(document).bind("mousedown",function(e){$.vakata.context.vis&&!$.contains($.vakata.context.cnt[0],e.target)&&$.vakata.context.hide()}),"undefined"!=typeof $.hotkeys&&$(document).bind("keydown","up",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();o.length||(o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),o.addClass("vakata-hover"),e.stopImmediatePropagation(),e.preventDefault()}}).bind("keydown","down",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();o.length||(o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),o.addClass("vakata-hover"),e.stopImmediatePropagation(),e.preventDefault()}}).bind("keydown","right",function(e){$.vakata.context.vis&&($.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),e.stopImmediatePropagation(),e.preventDefault())}).bind("keydown","left",function(e){$.vakata.context.vis&&($.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),e.stopImmediatePropagation(),e.preventDefault())}).bind("keydown","esc",function(e){$.vakata.context.hide(),e.preventDefault()}).bind("keydown","space",function(e){$.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),e.preventDefault()})}),$.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",$.proxy(function(e){e.preventDefault(),$(e.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY)},this)).delegate("a","click.jstree",$.proxy(function(e){this.data.contextmenu&&$.vakata.context.hide()},this)).bind("destroy.jstree",$.proxy(function(){this.data.contextmenu&&$.vakata.context.hide()},this)),$(document).bind("context_hide.vakata",$.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){$(".jstree").length<=1&&$(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(obj){this.create(obj)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(obj){this.rename(obj)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(obj){this.is_selected(obj)?this.remove():this.remove(obj)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(obj){this.cut(obj)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(obj){this.copy(obj)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(obj){this.paste(obj)}}}}}},_fn:{show_contextmenu:function(obj,x,y){obj=this._get_node(obj);var s=this.get_settings().contextmenu,a=obj.children("a:visible:eq(0)"),o=!1,i=!1;s.select_node&&this.data.ui&&!this.is_selected(obj)&&(this.deselect_all(),this.select_node(obj,!0)),(s.show_at_node||"undefined"==typeof x||"undefined"==typeof y)&&(o=a.offset(),x=o.left,y=o.top+this.data.core.li_height),i=obj.data("jstree")&&obj.data("jstree").contextmenu?obj.data("jstree").contextmenu:s.items,$.isFunction(i)&&(i=i.call(this,obj)),this.data.contextmenu=!0,$.vakata.context.show(i,a,x,y,this,obj,this._get_settings().core.rtl),this.data.themes&&$.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function($){$.jstree.plugin("types",{__init:function(){var s=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",$.proxy(function(){var types=s.types,attr=s.type_attr,icons_css="",_this=this;$.each(types,function(i,tp){return $.each(tp,function(k,v){/^(max_depth|max_children|icon|valid_children)$/.test(k)||_this.data.types.attach_to.push(k)}),tp.icon?void((tp.icon.image||tp.icon.position)&&(icons_css+="default"==i?".jstree-"+_this.get_index()+" a > .jstree-icon { ":".jstree-"+_this.get_index()+" li["+attr+'="'+i+'"] > a > .jstree-icon { ',tp.icon.image&&(icons_css+=" background-image:url("+tp.icon.image+"); "),icons_css+=tp.icon.position?" background-position:"+tp.icon.position+"; ":" background-position:0 0; ",icons_css+="} ")):!0}),""!==icons_css&&$.vakata.css.add_sheet({str:icons_css,title:"jstree-types"})},this)).bind("before.jstree",$.proxy(function(e,data){var s,t,o=this._get_settings().types.use_data?this._get_node(data.args[0]):!1,d=o&&-1!==o&&o.length?o.data("jstree"):!1;if(d&&d.types&&d.types[data.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==$.inArray(data.func,this.data.types.attach_to)){if(!data.args[0]||!data.args[0].tagName&&!data.args[0].jquery)return;if(s=this._get_settings().types.types,t=this._get_type(data.args[0]),(s[t]&&"undefined"!=typeof s[t][data.func]||s["default"]&&"undefined"!=typeof s["default"][data.func])&&this._check(data.func,data.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),is_ie6&&this.get_container().bind("load_node.jstree set_type.jstree",$.proxy(function(e,data){var r=data&&data.rslt&&data.rslt.obj&&-1!==data.rslt.obj?this._get_node(data.rslt.obj).parent():this.get_container_ul(),c=!1,s=this._get_settings().types;$.each(s.types,function(i,tp){tp.icon&&(tp.icon.image||tp.icon.position)&&(c="default"===i?r.find("li > a > .jstree-icon"):r.find("li["+s.type_attr+"='"+i+"'] > a > .jstree-icon"),tp.icon.image&&c.css("backgroundImage","url("+tp.icon.image+")"),c.css("backgroundPosition",tp.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(n,data){data.type&&this._get_settings().types.use_data&&this.set_type(data.type,n)},_get_type:function(obj){return obj=this._get_node(obj),obj&&obj.length?obj.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(str,obj){obj=this._get_node(obj);var ret=obj.length&&str?obj.attr(this._get_settings().types.type_attr,str):!1;return ret&&this.__callback({obj:obj,type:str}),ret},_check:function(rule,obj,opts){obj=this._get_node(obj);var v=!1,t=this._get_type(obj),d=0,_this=this,s=this._get_settings().types,data=!1;if(-1===obj){if(!s[rule])return;v=s[rule]}else{if(t===!1)return;data=s.use_data?obj.data("jstree"):!1,data&&data.types&&"undefined"!=typeof data.types[rule]?v=data.types[rule]:s.types[t]&&"undefined"!=typeof s.types[t][rule]?v=s.types[t][rule]:s.types["default"]&&"undefined"!=typeof s.types["default"][rule]&&(v=s.types["default"][rule])}return $.isFunction(v)&&(v=v.call(this,obj)),"max_depth"===rule&&-1!==obj&&opts!==!1&&-2!==s.max_depth&&0!==v&&obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function(i){return-1!==s.max_depth&&s.max_depth-(i+1)<=0?(v=0,!1):(d=0===i?v:_this._check(rule,this,!1),-1!==d&&0>=d-(i+1)?(v=0,!1):(d>=0&&(v>d-(i+1)||0>v)&&(v=d-(i+1)),void(s.max_depth>=0&&(s.max_depth-(i+1)<v||0>v)&&(v=s.max_depth-(i+1)))))}),v},check_move:function(){if(!this.__call_old())return!1;var t,m=this._get_move(),s=m.rt._get_settings().types,mc=m.rt._check("max_children",m.cr),md=m.rt._check("max_depth",m.cr),vc=m.rt._check("valid_children",m.cr),ch=0,d=1;if("none"===vc)return!1;if($.isArray(vc)&&m.ot&&m.ot._get_type&&(m.o.each(function(){return-1===$.inArray(m.ot._get_type(this),vc)?(d=!1,!1):void 0}),d===!1))return!1;if(-2!==s.max_children&&-1!==mc&&(ch=-1===m.cr?this.get_container().find("> ul > li").not(m.o).length:m.cr.find("> ul > li").not(m.o).length,ch+m.o.length>mc))return!1;if(-2!==s.max_depth&&-1!==md){if(d=0,0===md)return!1;if("undefined"==typeof m.o.d){for(t=m.o;t.length>0;)t=t.find("> ul > li"),d++;m.o.d=d}if(md-m.o.d<0)return!1}return!0},create_node:function(obj,position,js,callback,is_loaded,skip_check){if(!skip_check&&(is_loaded||this._is_loaded(obj))){var ch,p="string"==typeof position&&position.match(/^before|after$/i)&&-1!==obj?this._get_parent(obj):this._get_node(obj),s=this._get_settings().types,mc=this._check("max_children",p),md=this._check("max_depth",p),vc=this._check("valid_children",p);if("string"==typeof js&&(js={data:js}),js||(js={}),"none"===vc)return!1;if($.isArray(vc))if(js.attr&&js.attr[s.type_attr]){if(-1===$.inArray(js.attr[s.type_attr],vc))return!1}else js.attr||(js.attr={}),js.attr[s.type_attr]=vc[0];if(-2!==s.max_children&&-1!==mc&&(ch=-1===p?this.get_container().find("> ul > li").length:p.find("> ul > li").length,ch+1>mc))return!1;if(-2!==s.max_depth&&-1!==md&&0>md-1)return!1}return this.__call_old(!0,obj,position,js,callback,is_loaded,skip_check)}}})}(jQuery),function($){$.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_html(obj,function(){_this.__callback({obj:_this._get_node(obj)}),s_call.call(this)},e_call)},_is_loaded:function(obj){return obj=this._get_node(obj),-1==obj||!obj||!this._get_settings().html_data.ajax&&!$.isFunction(this._get_settings().html_data.data)||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0},load_node_html:function(obj,s_call,e_call){var d,s=this.get_settings().html_data,error_func=function(){},success_func=function(){};if(obj=this._get_node(obj),obj&&-1!==obj){if(obj.data("jstree_is_loading"))return;obj.data("jstree_is_loading",!0)}switch(!0){case $.isFunction(s.data):s.data.call(this,obj,$.proxy(function(d){d&&""!==d&&d.toString&&""!==d.toString().replace(/^[\s\n]+$/,"")?(d=$(d),d.is("ul")||(d=$("<ul />").append(d)),-1!=obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(obj),s_call&&s_call.call(this)):obj&&-1!==obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this))},this));break;case!s.data&&!s.ajax:obj&&-1!=obj||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),s_call&&s_call.call(this);break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!obj||-1===obj):obj&&-1!=obj||(d=$(s.data),d.is("ul")||(d=$("<ul />").append(d)),this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),s_call&&s_call.call(this);break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&obj&&-1!==obj:obj=this._get_node(obj),error_func=function(x,t,e){var ef=this.get_settings().html_data.ajax.error;ef&&ef.call(this,x,t,e),-1!=obj&&obj.length?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),"success"===t&&s.correct_state&&this.correct_state(obj)):"success"===t&&s.correct_state&&this.get_container().children("ul").empty(),e_call&&e_call.call(this)},success_func=function(d,t,x){var sf=this.get_settings().html_data.ajax.success;return sf&&(d=sf.call(this,d,t,x)||d),""===d||d&&d.toString&&""===d.toString().replace(/^[\s\n]+$/,"")?error_func.call(this,x,t,""):void(d?(d=$(d),d.is("ul")||(d=$("<ul />").append(d)),-1!=obj&&obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),obj.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(obj),s_call&&s_call.call(this)):obj&&-1!==obj?(obj.children("a.jstree-loading").removeClass("jstree-loading"),obj.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(obj),s_call&&s_call.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),s_call&&s_call.call(this)))},s.ajax.context=this,s.ajax.error=error_func,s.ajax.success=success_func,s.ajax.dataType||(s.ajax.dataType="html"),$.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,obj)),$.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,obj)),$.ajax(s.ajax)}}}}),$.jstree.defaults.plugins.push("html_data")}(jQuery),function($){$.jstree.plugin("themeroller",{__init:function(){var s=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(e){$(e.currentTarget).hasClass("jstree-loading")||$(this).addClass(s.item_h)}).delegate("a","mouseleave.jstree",function(){$(this).removeClass(s.item_h)}).bind("init.jstree",$.proxy(function(e,data){data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(data.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",$.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj)},this)).bind("delete_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.parent)},this)).bind("correct_state.jstree",$.proxy(function(e,data){data.rslt.obj.children("ins.jstree-icon").removeClass(s.opened+" "+s.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")}).removeClass(s.item_open+" "+s.item_clsd).addClass(s.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").addClass(s.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",$.proxy(function(e,data){this.get_container().find("a."+s.item_a).removeClass(s.item_a).end().find("a.jstree-clicked").addClass(s.item_a)},this)).bind("dehover_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").removeClass(s.item_h)},this)).bind("hover_node.jstree",$.proxy(function(e,data){this.get_container().find("a."+s.item_h).not(data.rslt.obj).removeClass(s.item_h),data.rslt.obj.children("a").addClass(s.item_h)},this)).bind("move_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.o),this._themeroller(data.rslt.op)},this))},__destroy:function(){var s=this._get_settings().themeroller,c=["ui-icon"];$.each(s,function(i,v){v=v.split(" "),v.length&&(c=c.concat(v))}),this.get_container().removeClass("ui-widget-content").find("."+c.join(", .")).removeClass(c.join(" "))},_fn:{_themeroller:function(obj){var s=this._get_settings().themeroller;obj=obj&&-1!=obj?this._get_node(obj):this.get_container_ul(),obj=obj&&-1!=obj?obj.parent():this.get_container_ul(),obj.find("li.jstree-closed").children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon "+s.closed).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")}).removeClass(s.item_leaf+" "+s.item_open).addClass(s.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon "+s.opened).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")}).removeClass(s.item_leaf+" "+s.item_clsd).addClass(s.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(s.closed+" ui-icon "+s.opened).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")}).removeClass(s.item_clsd+" "+s.item_open).addClass(s.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),$(function(){var css_string=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";$.vakata.css.add_sheet({str:css_string,title:"jstree"})})}(jQuery),function($){$.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",$.proxy(function(e,data){var p,t,nms=[],res=!0;return"move_node"==data.func&&data.args[4]===!0&&data.args[0].o&&data.args[0].o.length&&(data.args[0].o.children("a").each(function(){
nms.push($(this).text().replace(/^\s+/g,""))}),res=this._check_unique(nms,data.args[0].np.find("> ul > li").not(data.args[0].o),"move_node")),"create_node"==data.func&&(data.args[4]||this._is_loaded(data.args[0]))&&(p=this._get_node(data.args[0]),!data.args[1]||"before"!==data.args[1]&&"after"!==data.args[1]||(p=this._get_parent(data.args[0]),p&&-1!==p||(p=this.get_container())),"string"==typeof data.args[2]?nms.push(data.args[2]):data.args[2]&&data.args[2].data?nms.push(data.args[2].data):nms.push(this._get_string("new_node")),res=this._check_unique(nms,p.find("> ul > li"),"create_node")),"rename_node"==data.func&&(nms.push(data.args[1]),t=this._get_node(data.args[0]),p=this._get_parent(t),p&&-1!==p||(p=this.get_container()),res=this._check_unique(nms,p.find("> ul > li").not(t),"rename_node")),res?void 0:(e.stopPropagation(),!1)},this))},defaults:{error_callback:$.noop},_fn:{_check_unique:function(nms,p,func){var cnms=[],ok=!0;return p.children("a").each(function(){cnms.push($(this).text().replace(/^\s+/g,""))}),cnms.length&&nms.length?($.each(nms,function(i,v){return-1!==$.inArray(v,cnms)?(ok=!1,!1):void 0}),ok||this._get_settings().unique.error_callback.call(null,nms,p,func),ok):!0},check_move:function(){if(!this.__call_old())return!1;var p=this._get_move(),nms=[];return p.o&&p.o.length?(p.o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""))}),this._check_unique(nms,p.np.find("> ul > li").not(p.o),"check_move")):!0}}})}(jQuery),function($){$.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",$.proxy(function(e,data){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",$.proxy(function(e,data){this._prepare_wholerow_span(data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",$.proxy(function(e,data){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(t,o){return function(){t._prepare_wholerow_ul(o)}}(this,data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",$.proxy(function(e,data){data.rslt.obj.each(function(){var ref=data.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt(($(this).offset().top-data.inst.get_container().offset().top+data.inst.get_container()[0].scrollTop)/data.inst.data.core.li_height,10)+")");ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",$.proxy(function(e,data){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var ref=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((data.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var n=$(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&n.closest("li").is(".jstree-open, .jstree-closed")||(n.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",$.proxy(function(e){return e.stopImmediatePropagation(),$(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",$.proxy(function(e){$(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(is_ie7||is_ie6)&&$.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(obj){obj=obj&&-1!=obj?this._get_node(obj):this.get_container().find("> ul > li"),obj!==!1&&obj.each(function(){$(this).find("li").andSelf().each(function(){var $t=$(this);return $t.children(".jstree-wholerow-span").length?!0:void $t.prepend("<span class='jstree-wholerow-span' style='width:"+18*$t.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var o=this.get_container().children("ul").eq(0),h=o.html();o.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==h&&(this.data.wholerow.last_html=h,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(o.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(o.parent()[0].scrollWidth).css("top",-1*(o.height()+(is_ie7?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),$(function(){var css_string=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";is_ff2&&(css_string+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(is_ie7||is_ie6)&&(css_string+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),$.vakata.css.add_sheet({str:css_string,title:"jstree"})})}(jQuery),function($){var nodeInterface=["getChildren","getChildrenCount","getAttr","getName","getProps"],validateInterface=function(obj,inter){var valid=!0;return obj=obj||{},inter=[].concat(inter),$.each(inter,function(i,v){return $.isFunction(obj[v])?void 0:(valid=!1,!1)}),valid};$.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,b){var obj=-1==n?this._get_settings().model.object:n.data("jstree_model");return validateInterface(obj,nodeInterface)?void(this._get_settings().model.async?obj.getChildren($.proxy(function(data){this.model_done(data,b)},this)):this.model_done(obj.getChildren(),b)):b.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(data,callback){var ret=[],s=this._get_settings(),_this=this;$.isArray(data)||(data=[data]),$.each(data,function(i,nd){var r=nd.getProps()||{};r.attr=nd.getAttr()||{},nd.getChildrenCount()&&(r.state="closed"),r.data=nd.getName(),$.isArray(r.data)||(r.data=[r.data]),_this.data.types&&$.isFunction(nd.getType)&&(r.attr[s.types.type_attr]=nd.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=nd,ret.push(r)}),callback.call(null,ret)}}})}(jQuery)}}()},{}],"bootstrap-collapse":[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define(["exports","module","./util"],factory);else if("undefined"!=typeof exports&&"undefined"!=typeof module)factory(exports,module,require("./util"));else{var mod={exports:{}};factory(mod.exports,mod,global.Util),global.collapse=mod.exports}}(this,function(exports,module,_util){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=_interopRequireDefault(_util),Collapse=function($){var NAME="collapse",VERSION="4.0.0-alpha",DATA_KEY="bs.collapse",EVENT_KEY="."+DATA_KEY,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],TRANSITION_DURATION=600,Default={toggle:!0,parent:""},DefaultType={toggle:"boolean",parent:"string"},Event={SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY},ClassName={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},Dimension={WIDTH:"width",HEIGHT:"height"},Selector={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},Collapse=function(){function Collapse(element,config){_classCallCheck(this,Collapse),this._isTransitioning=!1,this._element=element,this._config=this._getConfig(config),this._triggerArray=$.makeArray($('[data-toggle="collapse"][href="#'+element.id+'"],'+('[data-toggle="collapse"][data-target="#'+element.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return _createClass(Collapse,[{key:"toggle",value:function(){$(this._element).hasClass(ClassName.IN)?this.hide():this.show()}},{key:"show",value:function(){var _this=this;if(!this._isTransitioning&&!$(this._element).hasClass(ClassName.IN)){var actives=void 0,activesData=void 0;if(this._parent&&(actives=$.makeArray($(Selector.ACTIVES)),actives.length||(actives=null)),!(actives&&(activesData=$(actives).data(DATA_KEY),activesData&&activesData._isTransitioning))){var startEvent=$.Event(Event.SHOW);if($(this._element).trigger(startEvent),!startEvent.isDefaultPrevented()){actives&&(Collapse._jQueryInterface.call($(actives),"hide"),activesData||$(actives).data(DATA_KEY,null));var dimension=this._getDimension();$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING),this._element.style[dimension]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var complete=function(){$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN),_this._element.style[dimension]="",_this.setTransitioning(!1),$(_this._element).trigger(Event.SHOWN)};if(!_Util["default"].supportsTransitionEnd())return void complete();var capitalizedDimension=dimension[0].toUpperCase()+dimension.slice(1),scrollSize="scroll"+capitalizedDimension;$(this._element).one(_Util["default"].TRANSITION_END,complete).emulateTransitionEnd(TRANSITION_DURATION),this._element.style[dimension]=this._element[scrollSize]+"px"}}}}},{key:"hide",value:function(){var _this2=this;if(!this._isTransitioning&&$(this._element).hasClass(ClassName.IN)){var startEvent=$.Event(Event.HIDE);if($(this._element).trigger(startEvent),!startEvent.isDefaultPrevented()){var dimension=this._getDimension(),offsetDimension=dimension===Dimension.WIDTH?"offsetWidth":"offsetHeight";this._element.style[dimension]=this._element[offsetDimension]+"px",_Util["default"].reflow(this._element),$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&$(this._triggerArray).addClass(ClassName.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var complete=function(){_this2.setTransitioning(!1),$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN)};return this._element.style[dimension]=0,_Util["default"].supportsTransitionEnd()?void $(this._element).one(_Util["default"].TRANSITION_END,complete).emulateTransitionEnd(TRANSITION_DURATION):void complete()}}}},{key:"setTransitioning",value:function(isTransitioning){this._isTransitioning=isTransitioning}},{key:"dispose",value:function(){$.removeData(this._element,DATA_KEY),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(config){return config=$.extend({},Default,config),config.toggle=Boolean(config.toggle),_Util["default"].typeCheckConfig(NAME,config,DefaultType),config}},{key:"_getDimension",value:function(){var hasWidth=$(this._element).hasClass(Dimension.WIDTH);return hasWidth?Dimension.WIDTH:Dimension.HEIGHT}},{key:"_getParent",value:function(){var _this3=this,parent=$(this._config.parent)[0],selector='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return $(parent).find(selector).each(function(i,element){_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element),[element])}),parent}},{key:"_addAriaAndCollapsedClass",value:function(element,triggerArray){if(element){var isOpen=$(element).hasClass(ClassName.IN);element.setAttribute("aria-expanded",isOpen),triggerArray.length&&$(triggerArray).toggleClass(ClassName.COLLAPSED,!isOpen).attr("aria-expanded",isOpen)}}}],[{key:"_getTargetFromElement",value:function(element){var selector=_Util["default"].getSelectorFromElement(element);return selector?$(selector)[0]:null}},{key:"_jQueryInterface",value:function(config){return this.each(function(){var $this=$(this),data=$this.data(DATA_KEY),_config=$.extend({},Default,$this.data(),"object"==typeof config&&config);if(!data&&_config.toggle&&/show|hide/.test(config)&&(_config.toggle=!1),data||(data=new Collapse(this,_config),$this.data(DATA_KEY,data)),"string"==typeof config){if(void 0===data[config])throw new Error('No method named "'+config+'"');data[config]()}})}},{key:"VERSION",get:function(){return VERSION}},{key:"Default",get:function(){return Default}}]),Collapse}();return $(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){event.preventDefault();var target=Collapse._getTargetFromElement(this),data=$(target).data(DATA_KEY),config=data?"toggle":$(this).data();Collapse._jQueryInterface.call($(target),config)}),$.fn[NAME]=Collapse._jQueryInterface,$.fn[NAME].Constructor=Collapse,$.fn[NAME].noConflict=function(){return $.fn[NAME]=JQUERY_NO_CONFLICT,Collapse._jQueryInterface},Collapse}(jQuery);module.exports=Collapse})},{"./util":313}],"components/Breadcrumb/Breadcrumb":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_reactRouter=require("react-router"),Breadcrumb=function(_SilverStripeComponen){function Breadcrumb(){return _classCallCheck(this,Breadcrumb),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(Breadcrumb,_SilverStripeComponen),Breadcrumb.prototype.render=function(){return _react2["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},Breadcrumb.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(crumb,index){return[_react2["default"].createElement("li",{className:"breadcrumb__item"},_react2["default"].createElement(_reactRouter.Link,{key:index,className:"breadcrumb__item-title",to:crumb.href},crumb.text))]}),this.props.crumbs.slice(-1).map(function(crumb,index){var iconClassNames=["breadcrumb__icon",crumb.icon.className].join(" ");return[_react2["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},_react2["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:index},crumb.text,crumb.icon&&_react2["default"].createElement("span",{className:iconClassNames,onClick:crumb.icon.action})))]}))},Breadcrumb}(_SilverStripeComponent2["default"]);Breadcrumb.propTypes={crumbs:_react2["default"].PropTypes.array},exports["default"]=Breadcrumb},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react","react-router":"react-router"}],"components/Form/FormConstants":[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={CSRF_HEADER:"X-SecurityID"}},{}],"components/Form/Form":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),Form=function(_SilverStripeComponen){function Form(props){_classCallCheck(this,Form);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleSubmit=_this.handleSubmit.bind(_this),_this}return _inherits(Form,_SilverStripeComponen),Form.prototype.componentWillUnmount=function(){"undefined"!=typeof this.props.componentWillUnmount&&this.props.componentWillUnmount(this.props.formId)},Form.prototype.render=function(){var defaultFormProps={className:"form",onSubmit:this.handleSubmit},formProps=_extends({},defaultFormProps,this.props.attributes),fields=this.props.mapFieldsToComponents(this.props.fields),actions=this.props.mapActionsToComponents(this.props.actions);return _react2["default"].createElement("form",formProps,fields&&_react2["default"].createElement("fieldset",null,fields),actions&&_react2["default"].createElement("div",{className:"btn-toolbar",role:"group"},actions))},Form.prototype.handleSubmit=function(event){"undefined"!=typeof this.props.handleSubmit&&this.props.handleSubmit(event)},Form}(_SilverStripeComponent2["default"]);Form.propTypes={actions:_react2["default"].PropTypes.array,attributes:_react2["default"].PropTypes.shape({action:_react2["default"].PropTypes.string.isRequired,className:_react2["default"].PropTypes.string,encType:_react2["default"].PropTypes.string,id:_react2["default"].PropTypes.string,method:_react2["default"].PropTypes.string.isRequired}),componentWillUnmount:_react2["default"].PropTypes.func,data:_react2["default"].PropTypes.array,fields:_react2["default"].PropTypes.array.isRequired,formId:_react2["default"].PropTypes.string.isRequired,handleSubmit:_react2["default"].PropTypes.func,mapActionsToComponents:_react2["default"].PropTypes.func.isRequired,mapFieldsToComponents:_react2["default"].PropTypes.func.isRequired},exports["default"]=Form},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/FormAction/FormAction":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),FormAction=function(_SilverStripeComponen){function FormAction(props){_classCallCheck(this,FormAction);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleClick=_this.handleClick.bind(_this),_this}return _inherits(FormAction,_SilverStripeComponen),FormAction.prototype.render=function(){return _react2["default"].createElement("button",this.getButtonProps(),this.getLoadingIcon(),this.props.title)},FormAction.prototype.getButtonProps=function(){return _extends({},"undefined"==typeof this.props.attributes?{}:this.props.attributes,{id:this.props.id,className:this.getButtonClasses(),disabled:this.props.disabled,onClick:this.handleClick})},FormAction.prototype.getButtonClasses=function(){var buttonClasses=["btn"],style=this.getButtonStyle();style&&buttonClasses.push("btn-"+style),"undefined"==typeof this.props.title&&buttonClasses.push("btn--no-text");var icon=this.getIcon();return icon&&buttonClasses.push("font-icon-"+icon),this.props.loading===!0&&buttonClasses.push("btn--loading"),this.props.disabled===!0&&buttonClasses.push("disabled"),"undefined"!=typeof this.props.extraClass&&buttonClasses.push(this.props.extraClass),buttonClasses.join(" ")},FormAction.prototype.getButtonStyle=function(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle;var extraClasses=this.props.extraClass.split(" ");return extraClasses.find(function(className){return className.indexOf("btn-")>-1})?null:"action_save"===this.props.name||extraClasses.find(function(className){return"ss-ui-action-constructive"===className})?"primary":"secondary"},FormAction.prototype.getIcon=function(){return this.props.icon||this.props.data.icon||null},FormAction.prototype.getLoadingIcon=function(){return this.props.loading===!0?_react2["default"].createElement("div",{className:"btn__loading-icon"},_react2["default"].createElement("span",{className:"btn__circle btn__circle--1"}),_react2["default"].createElement("span",{className:"btn__circle btn__circle--2"}),_react2["default"].createElement("span",{className:"btn__circle btn__circle--3"})):null},FormAction.prototype.handleClick=function(event){"function"==typeof this.props.handleClick&&this.props.handleClick(event,this.props.name||this.props.id)},FormAction}(_SilverStripeComponent2["default"]);FormAction.propTypes={id:_react2["default"].PropTypes.string,name:_react2["default"].PropTypes.string,handleClick:_react2["default"].PropTypes.func,title:_react2["default"].PropTypes.string,type:_react2["default"].PropTypes.string,loading:_react2["default"].PropTypes.bool,icon:_react2["default"].PropTypes.string,disabled:_react2["default"].PropTypes.bool,data:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.array,_react2["default"].PropTypes.shape({buttonStyle:_react2["default"].PropTypes.string})]),extraClass:_react2["default"].PropTypes.string,attributes:_react2["default"].PropTypes.object},FormAction.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1},exports["default"]=FormAction},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/FormBuilder/FormBuilder":[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj["default"]=obj,newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}function mapStateToProps(state){return{config:state.config,form:state.form,schemas:state.schemas}}function mapDispatchToProps(dispatch){return{formActions:(0,_redux.bindActionCreators)(formActions,dispatch),schemaActions:(0,_redux.bindActionCreators)(schemaActions,dispatch)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormBuilderComponent=void 0;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_redux=require("redux"),_FormActions=require("state/form/FormActions"),formActions=_interopRequireWildcard(_FormActions),_SchemaActions=require("state/schema/SchemaActions"),schemaActions=_interopRequireWildcard(_SchemaActions),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_Form=require("components/Form/Form"),_Form2=_interopRequireDefault(_Form),_isomorphicFetch=require("isomorphic-fetch"),_isomorphicFetch2=_interopRequireDefault(_isomorphicFetch),_Backend=require("lib/Backend"),_Backend2=_interopRequireDefault(_Backend),_Injector=require("lib/Injector"),_Injector2=_interopRequireDefault(_Injector),_merge=require("merge"),_merge2=_interopRequireDefault(_merge),_es6Promise=require("es6-promise"),_es6Promise2=_interopRequireDefault(_es6Promise);_es6Promise2["default"].polyfill();var FormBuilderComponent=exports.FormBuilderComponent=function(_SilverStripeComponen){function FormBuilderComponent(props){_classCallCheck(this,FormBuilderComponent);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.formSchemaPromise=null,_this.state={isFetching:!1},_this.mapActionsToComponents=_this.mapActionsToComponents.bind(_this),_this.mapFieldsToComponents=_this.mapFieldsToComponents.bind(_this),_this.handleFieldUpdate=_this.handleFieldUpdate.bind(_this),_this.handleSubmit=_this.handleSubmit.bind(_this),_this.handleAction=_this.handleAction.bind(_this),_this.removeForm=_this.removeForm.bind(_this),_this.getFormId=_this.getFormId.bind(_this),_this.getFormSchema=_this.getFormSchema.bind(_this),_this}return _inherits(FormBuilderComponent,_SilverStripeComponen),FormBuilderComponent.prototype.getFormSchema=function(){return this.props.schemas[this.props.schemaUrl]},FormBuilderComponent.prototype.getFormId=function(){var schema=this.getFormSchema();return schema?schema.id:null},FormBuilderComponent.prototype.componentDidMount=function(){this.fetch()},FormBuilderComponent.prototype.componentDidUpdate=function(prevProps){this.props.schemaUrl!==prevProps.schemaUrl&&this.fetch()},FormBuilderComponent.prototype.fetch=function(){var _this2=this,schema=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],state=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],headerValues=[];return this.state.isFetching===!0?this.formSchemaPromise:(schema===!0&&headerValues.push("schema"),
nms.push($(this).text().replace(/^\s+/g,""))}),res=this._check_unique(nms,data.args[0].np.find("> ul > li").not(data.args[0].o),"move_node")),"create_node"==data.func&&(data.args[4]||this._is_loaded(data.args[0]))&&(p=this._get_node(data.args[0]),!data.args[1]||"before"!==data.args[1]&&"after"!==data.args[1]||(p=this._get_parent(data.args[0]),p&&-1!==p||(p=this.get_container())),"string"==typeof data.args[2]?nms.push(data.args[2]):data.args[2]&&data.args[2].data?nms.push(data.args[2].data):nms.push(this._get_string("new_node")),res=this._check_unique(nms,p.find("> ul > li"),"create_node")),"rename_node"==data.func&&(nms.push(data.args[1]),t=this._get_node(data.args[0]),p=this._get_parent(t),p&&-1!==p||(p=this.get_container()),res=this._check_unique(nms,p.find("> ul > li").not(t),"rename_node")),res?void 0:(e.stopPropagation(),!1)},this))},defaults:{error_callback:$.noop},_fn:{_check_unique:function(nms,p,func){var cnms=[],ok=!0;return p.children("a").each(function(){cnms.push($(this).text().replace(/^\s+/g,""))}),cnms.length&&nms.length?($.each(nms,function(i,v){return-1!==$.inArray(v,cnms)?(ok=!1,!1):void 0}),ok||this._get_settings().unique.error_callback.call(null,nms,p,func),ok):!0},check_move:function(){if(!this.__call_old())return!1;var p=this._get_move(),nms=[];return p.o&&p.o.length?(p.o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""))}),this._check_unique(nms,p.np.find("> ul > li").not(p.o),"check_move")):!0}}})}(jQuery),function($){$.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",$.proxy(function(e,data){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",$.proxy(function(e,data){this._prepare_wholerow_span(data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",$.proxy(function(e,data){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(t,o){return function(){t._prepare_wholerow_ul(o)}}(this,data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",$.proxy(function(e,data){data.rslt.obj.each(function(){var ref=data.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt(($(this).offset().top-data.inst.get_container().offset().top+data.inst.get_container()[0].scrollTop)/data.inst.data.core.li_height,10)+")");ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",$.proxy(function(e,data){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var ref=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((data.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var n=$(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&n.closest("li").is(".jstree-open, .jstree-closed")||(n.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",$.proxy(function(e){return e.stopImmediatePropagation(),$(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",$.proxy(function(e){$(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(is_ie7||is_ie6)&&$.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(obj){obj=obj&&-1!=obj?this._get_node(obj):this.get_container().find("> ul > li"),obj!==!1&&obj.each(function(){$(this).find("li").andSelf().each(function(){var $t=$(this);return $t.children(".jstree-wholerow-span").length?!0:void $t.prepend("<span class='jstree-wholerow-span' style='width:"+18*$t.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var o=this.get_container().children("ul").eq(0),h=o.html();o.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==h&&(this.data.wholerow.last_html=h,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(o.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(o.parent()[0].scrollWidth).css("top",-1*(o.height()+(is_ie7?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),$(function(){var css_string=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";is_ff2&&(css_string+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(is_ie7||is_ie6)&&(css_string+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),$.vakata.css.add_sheet({str:css_string,title:"jstree"})})}(jQuery),function($){var nodeInterface=["getChildren","getChildrenCount","getAttr","getName","getProps"],validateInterface=function(obj,inter){var valid=!0;return obj=obj||{},inter=[].concat(inter),$.each(inter,function(i,v){return $.isFunction(obj[v])?void 0:(valid=!1,!1)}),valid};$.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,b){var obj=-1==n?this._get_settings().model.object:n.data("jstree_model");return validateInterface(obj,nodeInterface)?void(this._get_settings().model.async?obj.getChildren($.proxy(function(data){this.model_done(data,b)},this)):this.model_done(obj.getChildren(),b)):b.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(data,callback){var ret=[],s=this._get_settings(),_this=this;$.isArray(data)||(data=[data]),$.each(data,function(i,nd){var r=nd.getProps()||{};r.attr=nd.getAttr()||{},nd.getChildrenCount()&&(r.state="closed"),r.data=nd.getName(),$.isArray(r.data)||(r.data=[r.data]),_this.data.types&&$.isFunction(nd.getType)&&(r.attr[s.types.type_attr]=nd.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=nd,ret.push(r)}),callback.call(null,ret)}}})}(jQuery)}}()},{}],"bootstrap-collapse":[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define(["exports","module","./util"],factory);else if("undefined"!=typeof exports&&"undefined"!=typeof module)factory(exports,module,require("./util"));else{var mod={exports:{}};factory(mod.exports,mod,global.Util),global.collapse=mod.exports}}(this,function(exports,module,_util){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_Util=_interopRequireDefault(_util),Collapse=function($){var NAME="collapse",VERSION="4.0.0-alpha",DATA_KEY="bs.collapse",EVENT_KEY="."+DATA_KEY,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],TRANSITION_DURATION=600,Default={toggle:!0,parent:""},DefaultType={toggle:"boolean",parent:"string"},Event={SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY},ClassName={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},Dimension={WIDTH:"width",HEIGHT:"height"},Selector={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},Collapse=function(){function Collapse(element,config){_classCallCheck(this,Collapse),this._isTransitioning=!1,this._element=element,this._config=this._getConfig(config),this._triggerArray=$.makeArray($('[data-toggle="collapse"][href="#'+element.id+'"],'+('[data-toggle="collapse"][data-target="#'+element.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return _createClass(Collapse,[{key:"toggle",value:function(){$(this._element).hasClass(ClassName.IN)?this.hide():this.show()}},{key:"show",value:function(){var _this=this;if(!this._isTransitioning&&!$(this._element).hasClass(ClassName.IN)){var actives=void 0,activesData=void 0;if(this._parent&&(actives=$.makeArray($(Selector.ACTIVES)),actives.length||(actives=null)),!(actives&&(activesData=$(actives).data(DATA_KEY),activesData&&activesData._isTransitioning))){var startEvent=$.Event(Event.SHOW);if($(this._element).trigger(startEvent),!startEvent.isDefaultPrevented()){actives&&(Collapse._jQueryInterface.call($(actives),"hide"),activesData||$(actives).data(DATA_KEY,null));var dimension=this._getDimension();$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING),this._element.style[dimension]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var complete=function(){$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN),_this._element.style[dimension]="",_this.setTransitioning(!1),$(_this._element).trigger(Event.SHOWN)};if(!_Util["default"].supportsTransitionEnd())return void complete();var capitalizedDimension=dimension[0].toUpperCase()+dimension.slice(1),scrollSize="scroll"+capitalizedDimension;$(this._element).one(_Util["default"].TRANSITION_END,complete).emulateTransitionEnd(TRANSITION_DURATION),this._element.style[dimension]=this._element[scrollSize]+"px"}}}}},{key:"hide",value:function(){var _this2=this;if(!this._isTransitioning&&$(this._element).hasClass(ClassName.IN)){var startEvent=$.Event(Event.HIDE);if($(this._element).trigger(startEvent),!startEvent.isDefaultPrevented()){var dimension=this._getDimension(),offsetDimension=dimension===Dimension.WIDTH?"offsetWidth":"offsetHeight";this._element.style[dimension]=this._element[offsetDimension]+"px",_Util["default"].reflow(this._element),$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&$(this._triggerArray).addClass(ClassName.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var complete=function(){_this2.setTransitioning(!1),$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN)};return this._element.style[dimension]=0,_Util["default"].supportsTransitionEnd()?void $(this._element).one(_Util["default"].TRANSITION_END,complete).emulateTransitionEnd(TRANSITION_DURATION):void complete()}}}},{key:"setTransitioning",value:function(isTransitioning){this._isTransitioning=isTransitioning}},{key:"dispose",value:function(){$.removeData(this._element,DATA_KEY),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(config){return config=$.extend({},Default,config),config.toggle=Boolean(config.toggle),_Util["default"].typeCheckConfig(NAME,config,DefaultType),config}},{key:"_getDimension",value:function(){var hasWidth=$(this._element).hasClass(Dimension.WIDTH);return hasWidth?Dimension.WIDTH:Dimension.HEIGHT}},{key:"_getParent",value:function(){var _this3=this,parent=$(this._config.parent)[0],selector='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return $(parent).find(selector).each(function(i,element){_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element),[element])}),parent}},{key:"_addAriaAndCollapsedClass",value:function(element,triggerArray){if(element){var isOpen=$(element).hasClass(ClassName.IN);element.setAttribute("aria-expanded",isOpen),triggerArray.length&&$(triggerArray).toggleClass(ClassName.COLLAPSED,!isOpen).attr("aria-expanded",isOpen)}}}],[{key:"_getTargetFromElement",value:function(element){var selector=_Util["default"].getSelectorFromElement(element);return selector?$(selector)[0]:null}},{key:"_jQueryInterface",value:function(config){return this.each(function(){var $this=$(this),data=$this.data(DATA_KEY),_config=$.extend({},Default,$this.data(),"object"==typeof config&&config);if(!data&&_config.toggle&&/show|hide/.test(config)&&(_config.toggle=!1),data||(data=new Collapse(this,_config),$this.data(DATA_KEY,data)),"string"==typeof config){if(void 0===data[config])throw new Error('No method named "'+config+'"');data[config]()}})}},{key:"VERSION",get:function(){return VERSION}},{key:"Default",get:function(){return Default}}]),Collapse}();return $(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){event.preventDefault();var target=Collapse._getTargetFromElement(this),data=$(target).data(DATA_KEY),config=data?"toggle":$(this).data();Collapse._jQueryInterface.call($(target),config)}),$.fn[NAME]=Collapse._jQueryInterface,$.fn[NAME].Constructor=Collapse,$.fn[NAME].noConflict=function(){return $.fn[NAME]=JQUERY_NO_CONFLICT,Collapse._jQueryInterface},Collapse}(jQuery);module.exports=Collapse})},{"./util":313}],"components/Breadcrumb/Breadcrumb":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_reactRouter=require("react-router"),Breadcrumb=function(_SilverStripeComponen){function Breadcrumb(){return _classCallCheck(this,Breadcrumb),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(Breadcrumb,_SilverStripeComponen),Breadcrumb.prototype.render=function(){return _react2["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},Breadcrumb.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(crumb,index){return[_react2["default"].createElement("li",{className:"breadcrumb__item"},_react2["default"].createElement(_reactRouter.Link,{key:index,className:"breadcrumb__item-title",to:crumb.href},crumb.text))]}),this.props.crumbs.slice(-1).map(function(crumb,index){var iconClassNames=["breadcrumb__icon",crumb.icon?crumb.icon.className:""].join(" ");return[_react2["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},_react2["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:index},crumb.text,crumb.icon&&_react2["default"].createElement("span",{className:iconClassNames,onClick:crumb.icon.action})))]}))},Breadcrumb}(_SilverStripeComponent2["default"]);Breadcrumb.propTypes={crumbs:_react2["default"].PropTypes.array},exports["default"]=Breadcrumb},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react","react-router":"react-router"}],"components/Form/FormConstants":[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={CSRF_HEADER:"X-SecurityID"}},{}],"components/Form/Form":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),Form=function(_SilverStripeComponen){function Form(props){_classCallCheck(this,Form);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleSubmit=_this.handleSubmit.bind(_this),_this}return _inherits(Form,_SilverStripeComponen),Form.prototype.componentWillUnmount=function(){"undefined"!=typeof this.props.componentWillUnmount&&this.props.componentWillUnmount(this.props.formId)},Form.prototype.render=function(){var defaultFormProps={className:"form",onSubmit:this.handleSubmit},formProps=_extends({},defaultFormProps,this.props.attributes),fields=this.props.mapFieldsToComponents(this.props.fields),actions=this.props.mapActionsToComponents(this.props.actions);return _react2["default"].createElement("form",formProps,fields&&_react2["default"].createElement("fieldset",null,fields),actions&&_react2["default"].createElement("div",{className:"btn-toolbar",role:"group"},actions))},Form.prototype.handleSubmit=function(event){"undefined"!=typeof this.props.handleSubmit&&this.props.handleSubmit(event)},Form}(_SilverStripeComponent2["default"]);Form.propTypes={actions:_react2["default"].PropTypes.array,attributes:_react2["default"].PropTypes.shape({action:_react2["default"].PropTypes.string.isRequired,className:_react2["default"].PropTypes.string,encType:_react2["default"].PropTypes.string,id:_react2["default"].PropTypes.string,method:_react2["default"].PropTypes.string.isRequired}),componentWillUnmount:_react2["default"].PropTypes.func,data:_react2["default"].PropTypes.array,fields:_react2["default"].PropTypes.array.isRequired,formId:_react2["default"].PropTypes.string.isRequired,handleSubmit:_react2["default"].PropTypes.func,mapActionsToComponents:_react2["default"].PropTypes.func.isRequired,mapFieldsToComponents:_react2["default"].PropTypes.func.isRequired},exports["default"]=Form},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/FormAction/FormAction":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),FormAction=function(_SilverStripeComponen){function FormAction(props){_classCallCheck(this,FormAction);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleClick=_this.handleClick.bind(_this),_this}return _inherits(FormAction,_SilverStripeComponen),FormAction.prototype.render=function(){return _react2["default"].createElement("button",this.getButtonProps(),this.getLoadingIcon(),this.props.title)},FormAction.prototype.getButtonProps=function(){return _extends({},"undefined"==typeof this.props.attributes?{}:this.props.attributes,{id:this.props.id,className:this.getButtonClasses(),disabled:this.props.disabled,onClick:this.handleClick})},FormAction.prototype.getButtonClasses=function(){var buttonClasses=["btn"],style=this.getButtonStyle();style&&buttonClasses.push("btn-"+style),"undefined"==typeof this.props.title&&buttonClasses.push("btn--no-text");var icon=this.getIcon();return icon&&buttonClasses.push("font-icon-"+icon),this.props.loading===!0&&buttonClasses.push("btn--loading"),this.props.disabled===!0&&buttonClasses.push("disabled"),"undefined"!=typeof this.props.extraClass&&buttonClasses.push(this.props.extraClass),buttonClasses.join(" ")},FormAction.prototype.getButtonStyle=function(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle;var extraClasses=this.props.extraClass.split(" ");return extraClasses.find(function(className){return className.indexOf("btn-")>-1})?null:"action_save"===this.props.name||extraClasses.find(function(className){return"ss-ui-action-constructive"===className})?"primary":"secondary"},FormAction.prototype.getIcon=function(){return this.props.icon||this.props.data.icon||null},FormAction.prototype.getLoadingIcon=function(){return this.props.loading===!0?_react2["default"].createElement("div",{className:"btn__loading-icon"},_react2["default"].createElement("span",{className:"btn__circle btn__circle--1"}),_react2["default"].createElement("span",{className:"btn__circle btn__circle--2"}),_react2["default"].createElement("span",{className:"btn__circle btn__circle--3"})):null},FormAction.prototype.handleClick=function(event){"function"==typeof this.props.handleClick&&this.props.handleClick(event,this.props.name||this.props.id)},FormAction}(_SilverStripeComponent2["default"]);FormAction.propTypes={id:_react2["default"].PropTypes.string,name:_react2["default"].PropTypes.string,handleClick:_react2["default"].PropTypes.func,title:_react2["default"].PropTypes.string,type:_react2["default"].PropTypes.string,loading:_react2["default"].PropTypes.bool,icon:_react2["default"].PropTypes.string,disabled:_react2["default"].PropTypes.bool,data:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.array,_react2["default"].PropTypes.shape({buttonStyle:_react2["default"].PropTypes.string})]),extraClass:_react2["default"].PropTypes.string,attributes:_react2["default"].PropTypes.object},FormAction.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1},exports["default"]=FormAction},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/FormBuilder/FormBuilder":[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj["default"]=obj,newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}function mapStateToProps(state){return{config:state.config,form:state.form,schemas:state.schemas}}function mapDispatchToProps(dispatch){return{formActions:(0,_redux.bindActionCreators)(formActions,dispatch),schemaActions:(0,_redux.bindActionCreators)(schemaActions,dispatch)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormBuilderComponent=void 0;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_redux=require("redux"),_FormActions=require("state/form/FormActions"),formActions=_interopRequireWildcard(_FormActions),_SchemaActions=require("state/schema/SchemaActions"),schemaActions=_interopRequireWildcard(_SchemaActions),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_Form=require("components/Form/Form"),_Form2=_interopRequireDefault(_Form),_isomorphicFetch=require("isomorphic-fetch"),_isomorphicFetch2=_interopRequireDefault(_isomorphicFetch),_Backend=require("lib/Backend"),_Backend2=_interopRequireDefault(_Backend),_Injector=require("lib/Injector"),_Injector2=_interopRequireDefault(_Injector),_merge=require("merge"),_merge2=_interopRequireDefault(_merge),_es6Promise=require("es6-promise"),_es6Promise2=_interopRequireDefault(_es6Promise);_es6Promise2["default"].polyfill();var FormBuilderComponent=exports.FormBuilderComponent=function(_SilverStripeComponen){function FormBuilderComponent(props){_classCallCheck(this,FormBuilderComponent);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.formSchemaPromise=null,_this.state={isFetching:!1},_this.mapActionsToComponents=_this.mapActionsToComponents.bind(_this),_this.mapFieldsToComponents=_this.mapFieldsToComponents.bind(_this),_this.handleFieldUpdate=_this.handleFieldUpdate.bind(_this),_this.handleSubmit=_this.handleSubmit.bind(_this),_this.handleAction=_this.handleAction.bind(_this),_this.removeForm=_this.removeForm.bind(_this),_this.getFormId=_this.getFormId.bind(_this),_this.getFormSchema=_this.getFormSchema.bind(_this),_this}return _inherits(FormBuilderComponent,_SilverStripeComponen),FormBuilderComponent.prototype.getFormSchema=function(){return this.props.schemas[this.props.schemaUrl]},FormBuilderComponent.prototype.getFormId=function(){var schema=this.getFormSchema();return schema?schema.id:null},FormBuilderComponent.prototype.componentDidMount=function(){this.fetch()},FormBuilderComponent.prototype.componentDidUpdate=function(prevProps){this.props.schemaUrl!==prevProps.schemaUrl&&this.fetch()},FormBuilderComponent.prototype.fetch=function(){var _this2=this,schema=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],state=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],headerValues=[];return this.state.isFetching===!0?this.formSchemaPromise:(schema===!0&&headerValues.push("schema"),
state===!0&&headerValues.push("state"),this.formSchemaPromise=(0,_isomorphicFetch2["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":headerValues.join()},credentials:"same-origin"}).then(function(response){return response.json()}).then(function(json){var formSchema=_extends({},{id:json.id,schema:json.schema}),formState=_extends({},json.state);if("undefined"!=typeof formSchema.id){var defaultData={SecurityID:_this2.props.config.SecurityID};formSchema.schema.actions.length>0&&(defaultData[formSchema.schema.actions[0].name]=1),_this2.submitApi=_Backend2["default"].createEndpointFetcher({url:formSchema.schema.attributes.action,method:formSchema.schema.attributes.method,defaultData:defaultData}),_this2.props.schemaActions.setSchema(formSchema)}"undefined"!=typeof formState.id&&_this2.props.formActions.addForm(formState)}),this.formSchemaPromise)},FormBuilderComponent.prototype.handleFieldUpdate=function(event,updates,fn){"undefined"!=typeof fn?fn(this.getFormId(),this.props.formActions.updateField):this.props.formActions.updateField(this.getFormId(),updates)},FormBuilderComponent.prototype.handleAction=function(event,submitAction){this.props.formActions.setSubmitAction(this.getFormId(),submitAction),"function"==typeof this.props.handleAction&&this.props.handleAction(event,submitAction,this.getFieldValues())},FormBuilderComponent.prototype.handleSubmit=function(event){var _this3=this,fieldValues=this.getFieldValues(),submitFn=function(){return _this3.props.formActions.submitForm(_this3.submitApi,_this3.getFormId(),fieldValues)};return"undefined"!=typeof this.props.handleSubmit?this.props.handleSubmit(event,fieldValues,submitFn):(event.preventDefault(),submitFn())},FormBuilderComponent.prototype.getFieldValues=function(){var schemaFields=this.props.schemas[this.props.schemaUrl].schema.fields;return this.props.form[this.getFormId()].fields.reduce(function(prev,curr){var match=schemaFields.find(function(schemaField){return schemaField.id===curr.id});return match?_extends({},prev,_defineProperty({},match.name,curr.value)):prev},{})},FormBuilderComponent.prototype.buildComponent=function(field){var extraProps=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],Component=null!==field.component?_Injector2["default"].getComponentByName(field.component):_Injector2["default"].getComponentByDataType(field.type);if(null===Component)return null;var props=_extends({},field,extraProps),createFn=this.props.createFn;return"function"==typeof createFn?createFn(Component,props):_react2["default"].createElement(Component,_extends({key:props.id},props))},FormBuilderComponent.prototype.mapFieldsToComponents=function(fields){var _this4=this;return fields.map(function(field){var extraProps={onChange:_this4.handleFieldUpdate};return field.children&&(extraProps.children=_this4.mapFieldsToComponents(field.children)),_this4.buildComponent(field,extraProps)})},FormBuilderComponent.prototype.mapActionsToComponents=function(actions){var _this5=this,form=this.props.form[this.getFormId()];return actions.map(function(action){var loading=form&&form.submitting&&form.submitAction===action.name,extraProps={handleClick:_this5.handleAction,loading:loading,disabled:loading||action.disabled};return action.children&&(extraProps.children=_this5.mapActionsToComponents(action.children)),_this5.buildComponent(action,extraProps)})},FormBuilderComponent.prototype.mergeFieldData=function(structure,state){return"undefined"==typeof state?structure:_merge2["default"].recursive(!0,structure,{data:_extends({},structure.data,state.data),source:state.source,messages:state.messages,valid:state.valid,value:state.value})},FormBuilderComponent.prototype.removeForm=function(formId){this.props.formActions.removeForm(formId)},FormBuilderComponent.prototype.render=function(){var _this6=this,formId=this.getFormId();if(!formId)return null;var formSchema=this.getFormSchema(),formState=this.props.form[formId];if(!formSchema)return null;var attributes=_extends({},formSchema.schema.attributes,{"class":null,className:formSchema.schema.attributes["class"],enctype:null,encType:formSchema.schema.attributes.enctype}),fieldData=formSchema.schema&&formState&&formState.fields?formSchema.schema.fields.map(function(field){var state=formState.fields.find(function(item){return item.id===field.id});return _this6.mergeFieldData(field,state)}):formSchema.schema.fields,formProps={actions:formSchema.schema.actions,attributes:attributes,componentWillUnmount:this.removeForm,data:formSchema.schema.data,fields:fieldData,formId:formId,handleSubmit:this.handleSubmit,mapActionsToComponents:this.mapActionsToComponents,mapFieldsToComponents:this.mapFieldsToComponents};return _react2["default"].createElement(_Form2["default"],formProps)},FormBuilderComponent}(_SilverStripeComponent2["default"]);FormBuilderComponent.propTypes={config:_react2["default"].PropTypes.object,createFn:_react2["default"].PropTypes.func,form:_react2["default"].PropTypes.object.isRequired,formActions:_react2["default"].PropTypes.object.isRequired,handleSubmit:_react2["default"].PropTypes.func,handleAction:_react2["default"].PropTypes.func,schemas:_react2["default"].PropTypes.object.isRequired,schemaActions:_react2["default"].PropTypes.object.isRequired,schemaUrl:_react2["default"].PropTypes.string.isRequired},exports["default"]=(0,_reactRedux.connect)(mapStateToProps,mapDispatchToProps)(FormBuilderComponent)},{"components/Form/Form":"components/Form/Form","es6-promise":322,"isomorphic-fetch":341,"lib/Backend":"lib/Backend","lib/Injector":"lib/Injector","lib/SilverStripeComponent":"lib/SilverStripeComponent",merge:343,react:"react","react-redux":"react-redux",redux:"redux","state/form/FormActions":8,"state/schema/SchemaActions":12}],"components/FormBuilderModal/FormBuilderModal":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactBootstrap=require("react-bootstrap-4"),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_FormBuilder=require("components/FormBuilder/FormBuilder"),_FormBuilder2=_interopRequireDefault(_FormBuilder),FormBuilderModal=function(_SilverStripeComponen){function FormBuilderModal(props){_classCallCheck(this,FormBuilderModal);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleSubmit=_this.handleSubmit.bind(_this),_this.handleHide=_this.handleHide.bind(_this),_this.clearResponse=_this.clearResponse.bind(_this),_this}return _inherits(FormBuilderModal,_SilverStripeComponen),FormBuilderModal.prototype.getForm=function(){return _react2["default"].createElement(_FormBuilder2["default"],{schemaUrl:this.props.schemaUrl,handleSubmit:this.handleSubmit,handleAction:this.props.handleAction})},FormBuilderModal.prototype.getResponse=function(){if(!this.state||!this.state.response)return null;var className="";return className=this.state.error?this.props.responseClassBad||"response error":this.props.responseClassGood||"response good",_react2["default"].createElement("div",{className:className},_react2["default"].createElement("div",{className:"response-wrapper"},_react2["default"].createElement("span",null,this.state.response)))},FormBuilderModal.prototype.clearResponse=function(){this.setState({response:null})},FormBuilderModal.prototype.handleHide=function(){this.clearResponse(),"function"==typeof this.props.handleHide&&this.props.handleHide()},FormBuilderModal.prototype.handleSubmit=function(event,fieldValues,submitFn){var _this2=this,promise=null;return"function"==typeof this.props.handleSubmit?promise=this.props.handleSubmit(event,fieldValues,submitFn):(event.preventDefault(),promise=submitFn()),promise&&promise.then(function(response){return _this2.setState({response:response.message,error:!1}),response})["catch"](function(errorPromise){errorPromise.then(function(errorText){_this2.setState({response:errorText,error:!0})})}),promise},FormBuilderModal.prototype.render=function(){var form=this.getForm(),response=this.getResponse();return _react2["default"].createElement(_reactBootstrap.Modal,{show:this.props.show,onHide:this.handleHide,className:this.props.className},this.props.title!==!1&&_react2["default"].createElement(_reactBootstrap.Modal.Header,{closeButton:!0},_react2["default"].createElement(_reactBootstrap.Modal.Title,null,this.props.title)),_react2["default"].createElement(_reactBootstrap.Modal.Body,{className:this.props.bodyClassName},response,form,this.props.children))},FormBuilderModal}(_SilverStripeComponent2["default"]);FormBuilderModal.propTypes={show:_react2["default"].PropTypes.bool,title:_react2["default"].PropTypes.string,className:_react2["default"].PropTypes.string,bodyClassName:_react2["default"].PropTypes.string,handleHide:_react2["default"].PropTypes.func,schemaUrl:_react2["default"].PropTypes.string,handleSubmit:_react2["default"].PropTypes.func,handleAction:_react2["default"].PropTypes.func,responseClassGood:_react2["default"].PropTypes.string,responseClassBad:_react2["default"].PropTypes.string},FormBuilderModal.defaultProps={show:!1,title:null},exports["default"]=FormBuilderModal},{"components/FormBuilder/FormBuilder":"components/FormBuilder/FormBuilder","lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react","react-bootstrap-4":"react-bootstrap-4"}],"components/GridField/GridFieldCell":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),GridFieldCell=function(_SilverStripeComponen){function GridFieldCell(props){_classCallCheck(this,GridFieldCell);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleDrillDown=_this.handleDrillDown.bind(_this),_this}return _inherits(GridFieldCell,_SilverStripeComponen),GridFieldCell.prototype.render=function(){var classNames=["grid-field__cell"];"undefined"!=typeof this.props.className&&classNames.push(this.props.className);var props={className:classNames.join(" "),onClick:this.handleDrillDown};return _react2["default"].createElement("td",props,this.props.children)},GridFieldCell.prototype.handleDrillDown=function(event){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(event)},GridFieldCell}(_SilverStripeComponent2["default"]);GridFieldCell.PropTypes={className:_react2["default"].PropTypes.string,width:_react2["default"].PropTypes.number,handleDrillDown:_react2["default"].PropTypes.func},exports["default"]=GridFieldCell},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/GridField/GridFieldHeaderCell":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),GridFieldHeaderCell=function(_SilverStripeComponen){function GridFieldHeaderCell(){return _classCallCheck(this,GridFieldHeaderCell),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(GridFieldHeaderCell,_SilverStripeComponen),GridFieldHeaderCell.prototype.render=function(){return _react2["default"].createElement("th",null,this.props.children)},GridFieldHeaderCell}(_SilverStripeComponent2["default"]);GridFieldHeaderCell.PropTypes={width:_react2["default"].PropTypes.number},exports["default"]=GridFieldHeaderCell},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/GridField/GridFieldHeader":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_GridFieldRow=require("./GridFieldRow"),_GridFieldRow2=_interopRequireDefault(_GridFieldRow),GridFieldHeader=function(_SilverStripeComponen){function GridFieldHeader(){return _classCallCheck(this,GridFieldHeader),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(GridFieldHeader,_SilverStripeComponen),GridFieldHeader.prototype.render=function(){return _react2["default"].createElement(_GridFieldRow2["default"],null,this.props.children)},GridFieldHeader}(_SilverStripeComponent2["default"]);exports["default"]=GridFieldHeader},{"./GridFieldRow":"components/GridField/GridFieldRow","lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/GridField/GridFieldRow":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),GridFieldRow=function(_SilverStripeComponen){function GridFieldRow(){return _classCallCheck(this,GridFieldRow),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(GridFieldRow,_SilverStripeComponen),GridFieldRow.prototype.render=function(){var className="grid-field__row "+this.props.className;return _react2["default"].createElement("tr",{tabIndex:"0",className:className},this.props.children)},GridFieldRow}(_SilverStripeComponent2["default"]);exports["default"]=GridFieldRow},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/GridField/GridFieldTable":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),GridFieldTable=function(_SilverStripeComponen){function GridFieldTable(){return _classCallCheck(this,GridFieldTable),_possibleConstructorReturn(this,_SilverStripeComponen.apply(this,arguments))}return _inherits(GridFieldTable,_SilverStripeComponen),GridFieldTable.prototype.render=function(){return _react2["default"].createElement("div",{className:"grid-field"},_react2["default"].createElement("table",{className:"table table-hover grid-field__table"},_react2["default"].createElement("thead",null,this.generateHeader()),_react2["default"].createElement("tbody",null,this.generateRows())))},GridFieldTable.prototype.generateHeader=function(){return"undefined"!=typeof this.props.header?this.props.header:("undefined"!=typeof this.props.data,null)},GridFieldTable.prototype.generateRows=function(){return"undefined"!=typeof this.props.rows?this.props.rows:("undefined"!=typeof this.props.data,null)},GridFieldTable}(_SilverStripeComponent2["default"]);GridFieldTable.propTypes={data:_react2["default"].PropTypes.object,header:_react2["default"].PropTypes.object,rows:_react2["default"].PropTypes.array},exports["default"]=GridFieldTable},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/GridField/GridField":[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj["default"]=obj,newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}function mapStateToProps(state,ownProps){var recordType=ownProps.data?ownProps.data.recordType:null;return{config:state.config,records:recordType&&state.records[recordType]?state.records[recordType]:NotYetLoaded}}function mapDispatchToProps(dispatch){return{actions:(0,_redux.bindActionCreators)(actions,dispatch)}}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_redux=require("redux"),_reactRedux=require("react-redux"),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_GridFieldTable=require("./GridFieldTable"),_GridFieldTable2=_interopRequireDefault(_GridFieldTable),_GridFieldHeader=require("./GridFieldHeader"),_GridFieldHeader2=_interopRequireDefault(_GridFieldHeader),_GridFieldHeaderCell=require("./GridFieldHeaderCell"),_GridFieldHeaderCell2=_interopRequireDefault(_GridFieldHeaderCell),_GridFieldRow=require("./GridFieldRow"),_GridFieldRow2=_interopRequireDefault(_GridFieldRow),_GridFieldCell=require("./GridFieldCell"),_GridFieldCell2=_interopRequireDefault(_GridFieldCell),_GridFieldAction=require("./GridFieldAction"),_GridFieldAction2=_interopRequireDefault(_GridFieldAction),_FormConstants=require("components/Form/FormConstants"),_FormConstants2=_interopRequireDefault(_FormConstants),_RecordsActions=require("state/records/RecordsActions"),actions=_interopRequireWildcard(_RecordsActions),NotYetLoaded={},GridField=function(_SilverStripeComponen){function GridField(props){_classCallCheck(this,GridField);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.deleteRecord=_this.deleteRecord.bind(_this),_this.editRecord=_this.editRecord.bind(_this),_this}return _inherits(GridField,_SilverStripeComponen),GridField.prototype.componentDidMount=function(){_SilverStripeComponen.prototype.componentDidMount.call(this);var data=this.props.data;this.props.actions.fetchRecords(data.recordType,data.collectionReadEndpoint.method,data.collectionReadEndpoint.url)},GridField.prototype.render=function(){var _this2=this;if(this.props.records===NotYetLoaded)return _react2["default"].createElement("div",null,"Loading...");if(!Object.getOwnPropertyNames(this.props.records).length)return _react2["default"].createElement("div",null,"No campaigns created yet.");var actionPlaceholder=_react2["default"].createElement("th",{key:"holder",className:"grid-field__action-placeholder"}),headerCells=this.props.data.columns.map(function(column){return _react2["default"].createElement(_GridFieldHeaderCell2["default"],{key:""+column.name},column.name)}),header=_react2["default"].createElement(_GridFieldHeader2["default"],null,headerCells.concat(actionPlaceholder)),rows=Object.keys(this.props.records).map(function(key){return _this2.createRow(_this2.props.records[key])});return _react2["default"].createElement(_GridFieldTable2["default"],{header:header,rows:rows})},GridField.prototype.createRowActions=function(record){return _react2["default"].createElement(_GridFieldCell2["default"],{className:"grid-field__cell--actions",key:"Actions"},_react2["default"].createElement(_GridFieldAction2["default"],{icon:"cog",handleClick:this.editRecord,record:record}),_react2["default"].createElement(_GridFieldAction2["default"],{icon:"cancel",handleClick:this.deleteRecord,record:record}))},GridField.prototype.createCell=function(record,column){var handleDrillDown=this.props.data.handleDrillDown,cellProps={className:handleDrillDown?"grid-field__cell--drillable":"",handleDrillDown:handleDrillDown?function(event){return handleDrillDown(event,record)}:null,key:""+column.name,width:column.width},val=column.field.split(".").reduce(function(a,b){return a[b]},record);return _react2["default"].createElement(_GridFieldCell2["default"],cellProps,val)},GridField.prototype.createRow=function(record){var _this3=this,rowProps={className:this.props.data.handleDrillDown?"grid-field__row--drillable":"",key:""+record.ID},cells=this.props.data.columns.map(function(column){return _this3.createCell(record,column)}),rowActions=this.createRowActions(record);return _react2["default"].createElement(_GridFieldRow2["default"],rowProps,cells,rowActions)},GridField.prototype.deleteRecord=function(event,id){event.preventDefault();var headers={};headers[_FormConstants2["default"].CSRF_HEADER]=this.props.config.SecurityID,this.props.actions.deleteRecord(this.props.data.recordType,id,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url,headers)},GridField.prototype.editRecord=function(event,id){event.preventDefault(),"undefined"!=typeof this.props.data&&"undefined"!=typeof this.props.data.handleEditRecord&&this.props.data.handleEditRecord(event,id)},GridField}(_SilverStripeComponent2["default"]);GridField.propTypes={data:_react2["default"].PropTypes.shape({recordType:_react2["default"].PropTypes.string.isRequired,headerColumns:_react2["default"].PropTypes.array,collectionReadEndpoint:_react2["default"].PropTypes.object,handleDrillDown:_react2["default"].PropTypes.func,handleEditRecord:_react2["default"].PropTypes.func})},exports["default"]=(0,_reactRedux.connect)(mapStateToProps,mapDispatchToProps)(GridField)},{"./GridFieldAction":3,"./GridFieldCell":"components/GridField/GridFieldCell","./GridFieldHeader":"components/GridField/GridFieldHeader","./GridFieldHeaderCell":"components/GridField/GridFieldHeaderCell","./GridFieldRow":"components/GridField/GridFieldRow","./GridFieldTable":"components/GridField/GridFieldTable","components/Form/FormConstants":"components/Form/FormConstants","lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react","react-redux":"react-redux",redux:"redux","state/records/RecordsActions":10}],"components/HiddenField/HiddenField":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),HiddenField=function(_SilverStripeComponen){function HiddenField(props){_classCallCheck(this,HiddenField);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleChange=_this.handleChange.bind(_this),_this}return _inherits(HiddenField,_SilverStripeComponen),HiddenField.prototype.render=function(){return _react2["default"].createElement("div",{className:"field hidden"},_react2["default"].createElement("input",this.getInputProps()))},HiddenField.prototype.getInputProps=function(){return{className:["hidden",this.props.extraClass].join(" "),id:this.props.id,name:this.props.name,onChange:this.props.onChange,type:"hidden",value:this.props.value}},HiddenField.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},HiddenField}(_SilverStripeComponent2["default"]);HiddenField.propTypes={extraClass:_react2["default"].PropTypes.string,name:_react2["default"].PropTypes.string.isRequired,onChange:_react2["default"].PropTypes.func,value:_react2["default"].PropTypes.any},exports["default"]=HiddenField},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",
react:"react"}],"components/PopoverField/PopoverField":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactBootstrap=require("react-bootstrap-4"),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),PopoverField=function(_SilverStripeComponen){function PopoverField(props){_classCallCheck(this,PopoverField);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleShow=_this.handleShow.bind(_this),_this.handleHide=_this.handleHide.bind(_this),_this.state={showing:!1},_this}return _inherits(PopoverField,_SilverStripeComponen),PopoverField.prototype.handleShow=function(){this.setState({showing:!0})},PopoverField.prototype.handleHide=function(){this.setState({showing:!1})},PopoverField.prototype.render=function(){var placement=this.getPlacement(),overlay=_react2["default"].createElement(_reactBootstrap.Popover,{id:this.props.id+"_Popover",className:"fade in popover-"+placement,title:this.props.data.popoverTitle},this.props.children),buttonClasses=["btn","btn-secondary"];return this.state.showing&&buttonClasses.push("btn--no-focus"),this.props.title||buttonClasses.push("font-icon-dot-3 btn--no-text btn--icon-xl"),_react2["default"].createElement(_reactBootstrap.OverlayTrigger,{rootClose:!0,trigger:"click",container:this,placement:placement,overlay:overlay,onEnter:this.handleShow,onExited:this.handleHide},_react2["default"].createElement("button",{id:this.props.id,type:"button",className:buttonClasses.join(" ")},this.props.title))},PopoverField.prototype.getPlacement=function(){var placement=this.props.data.placement;return placement||"bottom"},PopoverField}(_SilverStripeComponent2["default"]);PopoverField.propTypes={id:_react2["default"].PropTypes.string,title:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string,_react2["default"].PropTypes.bool]),data:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.array,_react2["default"].PropTypes.shape({popoverTitle:_react2["default"].PropTypes.string,placement:_react2["default"].PropTypes.oneOf(["top","right","bottom","left"])})])},exports["default"]=PopoverField},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react","react-bootstrap-4":"react-bootstrap-4"}],"components/SingleSelectField/SingleSelectField":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_FieldHolder=require("components/FieldHolder/FieldHolder"),_FieldHolder2=_interopRequireDefault(_FieldHolder),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n),SingleSelectField=function(_SilverStripeComponen){function SingleSelectField(props){_classCallCheck(this,SingleSelectField);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleChange=_this.handleChange.bind(_this),_this}return _inherits(SingleSelectField,_SilverStripeComponen),SingleSelectField.prototype.render=function(){var field=null;return field=this.props.readOnly?this.getReadonlyField:this.getSelectField()},SingleSelectField.prototype.getReadonlyField=function(){var _this2=this,label=this.props.source.find(function(item){return item.value===_this2.props.value});return label=void 0!==label?label:this.props.value,_react2["default"].createElement("div",null,_react2["default"].createElement("i",null,label))},SingleSelectField.prototype.getSelectField=function(){var _this3=this,options=this.props.source||[];return this.props.data.hasEmptyDefault&&options.unshift({value:"",title:this.props.data.emptyString,disabled:!1}),_react2["default"].createElement("select",this.getInputProps(),options.map(function(item){var key=_this3.props.name+"-"+(item.value||"null");return _react2["default"].createElement("option",{key:key,value:item.value,disabled:item.disabled},item.title)}))},SingleSelectField.prototype.getInputProps=function(){return{className:["form-control",this.props.extraClass].join(" "),id:this.props.id,name:this.props.name,onChange:this.handleChange,value:this.props.value}},SingleSelectField.prototype.handleChange=function(event){"function"==typeof this.props.onChange&&this.props.onChange(event,{id:this.props.id,value:event.target.value})},SingleSelectField}(_SilverStripeComponent2["default"]);SingleSelectField.propTypes={id:_react2["default"].PropTypes.string,name:_react2["default"].PropTypes.string.isRequired,onChange:_react2["default"].PropTypes.func,value:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string,_react2["default"].PropTypes.number]),readOnly:_react2["default"].PropTypes.bool,source:_react2["default"].PropTypes.arrayOf(_react2["default"].PropTypes.shape({value:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string,_react2["default"].PropTypes.number]),title:_react2["default"].PropTypes.string,disabled:_react2["default"].PropTypes.bool})),data:_react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.array,_react2["default"].PropTypes.shape({hasEmptyDefault:_react2["default"].PropTypes.bool,emptyString:_react2["default"].PropTypes.string})])},SingleSelectField.defaultProps={source:[],data:{emptyString:_i18n2["default"]._t("Boolean.ANY","Any")}},exports["default"]=(0,_FieldHolder2["default"])(SingleSelectField)},{"components/FieldHolder/FieldHolder":2,i18n:"i18n","lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/TextField/TextField":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_FieldHolder=require("components/FieldHolder/FieldHolder"),_FieldHolder2=_interopRequireDefault(_FieldHolder),TextField=function(_SilverStripeComponen){function TextField(props){_classCallCheck(this,TextField);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleChange=_this.handleChange.bind(_this),_this}return _inherits(TextField,_SilverStripeComponen),TextField.prototype.render=function(){var field=null;return field=this.props.readOnly?_react2["default"].createElement("div",null,_react2["default"].createElement("i",null,this.props.value)):_react2["default"].createElement("input",this.getInputProps())},TextField.prototype.getInputProps=function(){return{className:["form-control",this.props.extraClass].join(" "),id:this.props.id,name:this.props.name,onChange:this.handleChange,type:"text",value:this.props.value}},TextField.prototype.handleChange=function(event){"function"==typeof this.props.onChange&&this.props.onChange(event,{id:this.props.id,value:event.target.value})},TextField}(_SilverStripeComponent2["default"]);TextField.propTypes={extraClass:_react2["default"].PropTypes.string,id:_react2["default"].PropTypes.string,name:_react2["default"].PropTypes.string.isRequired,onChange:_react2["default"].PropTypes.func,value:_react2["default"].PropTypes.string,readOnly:_react2["default"].PropTypes.bool},exports["default"]=(0,_FieldHolder2["default"])(TextField)},{"components/FieldHolder/FieldHolder":2,"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"components/Toolbar/Toolbar":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),Toolbar=function(_SilverStripeComponen){function Toolbar(props){_classCallCheck(this,Toolbar);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.handleBackButtonClick=_this.handleBackButtonClick.bind(_this),_this}return _inherits(Toolbar,_SilverStripeComponen),Toolbar.prototype.render=function(){var buttonClassNames=["btn","btn-secondary","action","font-icon-left-open-big","toolbar__back-button","btn--no-text"],backButtonProps={className:buttonClassNames.join(" "),onClick:this.handleBackButtonClick,href:"#",type:"button"};return _react2["default"].createElement("div",{className:"toolbar--north container-fluid"},_react2["default"].createElement("div",{className:"toolbar__navigation"},this.props.showBackButton&&_react2["default"].createElement("button",backButtonProps),this.props.children))},Toolbar.prototype.handleBackButtonClick=function(event){return"undefined"!=typeof this.props.handleBackButtonClick?void this.props.handleBackButtonClick(event):void event.preventDefault()},Toolbar}(_SilverStripeComponent2["default"]);Toolbar.propTypes={handleBackButtonClick:_react2["default"].PropTypes.func,showBackButton:_react2["default"].PropTypes.bool,breadcrumbs:_react2["default"].PropTypes.array},Toolbar.defaultProps={showBackButton:!1},exports["default"]=Toolbar},{"lib/SilverStripeComponent":"lib/SilverStripeComponent",react:"react"}],"deep-freeze-strict":[function(require,module,exports){module.exports=function deepFreeze(o){Object.freeze(o);var oIsFunction="function"==typeof o,hasOwnProp=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(o).forEach(function(prop){!hasOwnProp.call(o,prop)||(oIsFunction?"caller"===prop||"callee"===prop||"arguments"===prop:0)||null===o[prop]||"object"!=typeof o[prop]&&"function"!=typeof o[prop]||Object.isFrozen(o[prop])||deepFreeze(o[prop])}),o}},{}],i18n:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i18n=function(){function i18n(){_classCallCheck(this,i18n),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return i18n.prototype.setLocale=function(locale){this.currentLocale=locale},i18n.prototype.getLocale=function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale},i18n.prototype._t=function(entity,fallbackString,priority,context){var langName=this.getLocale().replace(/_[\w]+/i,""),defaultlangName=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][entity]?this.lang[this.getLocale()][entity]:this.lang&&this.lang[langName]&&this.lang[langName][entity]?this.lang[langName][entity]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][entity]?this.lang[this.defaultLocale][entity]:this.lang&&this.lang[defaultlangName]&&this.lang[defaultlangName][entity]?this.lang[defaultlangName][entity]:fallbackString?fallbackString:""},i18n.prototype.addDictionary=function(locale,dict){"undefined"==typeof this.lang[locale]&&(this.lang[locale]={});for(var entity in dict)this.lang[locale][entity]=dict[entity]},i18n.prototype.getDictionary=function(locale){return this.lang[locale]},i18n.prototype.stripStr=function(str){return str.replace(/^\s*/,"").replace(/\s*$/,"")},i18n.prototype.stripStrML=function(str){for(var parts=str.split("\n"),i=0;i<parts.length;i+=1)parts[i]=stripStr(parts[i]);return stripStr(parts.join(" "))},i18n.prototype.sprintf=function(s){for(var _len=arguments.length,params=Array(_len>1?_len-1:0),_key=1;_len>_key;_key++)params[_key-1]=arguments[_key];if(0===params.length)return s;var regx=new RegExp("(.?)(%s)","g"),i=0;return s.replace(regx,function(match,subMatch1,subMatch2,offset,string){return"%"===subMatch1?match:subMatch1+params[i++]})},i18n.prototype.inject=function(s,map){var regx=new RegExp("{([A-Za-z0-9_]*)}","g");return s.replace(regx,function(match,key,offset,string){return map[key]?map[key]:match})},i18n.prototype.detectLocale=function(){var rawLocale,detectedLocale;if(rawLocale=jQuery("body").attr("lang"),!rawLocale)for(var metas=document.getElementsByTagName("meta"),i=0;i<metas.length;i++)metas[i].attributes["http-equiv"]&&"content-language"==metas[i].attributes["http-equiv"].nodeValue.toLowerCase()&&(rawLocale=metas[i].attributes.content.nodeValue);rawLocale||(rawLocale=this.defaultLocale);var rawLocaleParts=rawLocale.match(/([^-|_]*)[-|_](.*)/);if(2==rawLocale.length){for(var compareLocale in i18n.lang)if(compareLocale.substr(0,2).toLowerCase()==rawLocale.toLowerCase()){detectedLocale=compareLocale;break}}else rawLocaleParts&&(detectedLocale=rawLocaleParts[1].toLowerCase()+"_"+rawLocaleParts[2].toUpperCase());return detectedLocale},i18n.prototype.addEvent=function(obj,evType,fn,useCapture){return obj.addEventListener?(obj.addEventListener(evType,fn,useCapture),!0):obj.attachEvent?obj.attachEvent("on"+evType,fn):void console.log("Handler could not be attached")},i18n}(),_i18n=new i18n;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=_i18n,exports["default"]=_i18n},{}],i18nx:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i18nx=function(){function i18nx(){_classCallCheck(this,i18nx),this.currentLocale="en_US",this.defaultLocale="en_US"}return i18nx.prototype._t=function(entity,fallbackString,priority,context){return fallbackString},i18nx.prototype.sprintf=function(s){for(var _len=arguments.length,params=Array(_len>1?_len-1:0),_key=1;_len>_key;_key++)params[_key-1]=arguments[_key];if(0===params.length)return s;var regx=new RegExp("(.?)(%s)","g"),i=0;return s.replace(regx,function(match,subMatch1,subMatch2,offset,string){return"%"===subMatch1?match:subMatch1+params[i+=1]})},i18nx.prototype.inject=function(s,map){var regx=new RegExp("{([A-Za-z0-9_]*)}","g");return s.replace(regx,function(match,key,offset,string){return map[key]?map[key]:match})},i18nx.prototype.addDictionary=function(){},i18nx.prototype.getDictionary=function(){},i18nx}(),_i18nx=new i18nx;exports["default"]=_i18nx},{}],jQuery:[function(require,module,exports){"use strict";var jQuery="undefined"!=typeof window.jQuery?window.jQuery:null;module.exports=jQuery},{}],"lib/Backend":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function checkStatus(response){var ret=void 0,error=void 0;if(!(response.status>=200&&response.status<300))throw error=new Error(response.statusText),error.response=response,error;return ret=response}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_isomorphicFetch=require("isomorphic-fetch"),_isomorphicFetch2=_interopRequireDefault(_isomorphicFetch),_es6Promise=require("es6-promise"),_es6Promise2=_interopRequireDefault(_es6Promise),_qs=require("qs"),_qs2=_interopRequireDefault(_qs),_merge=require("merge"),_merge2=_interopRequireDefault(_merge);_es6Promise2["default"].polyfill();var Backend=function(){function Backend(){_classCallCheck(this,Backend),this.fetch=_isomorphicFetch2["default"]}return Backend.prototype.createEndpointFetcher=function(endpointSpec){function encode(contentType,data){switch(contentType){case"application/x-www-form-urlencoded":return _qs2["default"].stringify(data);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(data);default:throw new Error("Can't encode format: "+contentType)}}function decode(contentType,text){switch(contentType){case"application/x-www-form-urlencoded":return _qs2["default"].parse(text);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(text);default:throw new Error("Can't decode format: "+contentType)}}function addQuerystring(url,querystring){return""===querystring?url:url.match(/\?/)?url+"&"+querystring:url+"?"+querystring}function parseResponse(response){return response.text().then(function(body){return decode(response.headers.get("Content-Type"),body)})}function applySchemaToData(payloadSchema,data){return Object.keys(data).reduce(function(prev,key){var schema=payloadSchema[key];return!schema||schema.remove!==!0&&schema.querystring!==!0?_extends(prev,_defineProperty({},key,data[key])):prev},{})}function applySchemaToUrl(payloadSchema,url,data){var opts=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],newUrl=url,queryData=Object.keys(data).reduce(function(prev,key){var schema=payloadSchema[key],includeThroughSetFromData=opts.setFromData===!0&&!(schema&&schema.remove===!0),includeThroughSpec=schema&&schema.querystring===!0&&schema.remove!==!0;return includeThroughSetFromData||includeThroughSpec?_extends(prev,_defineProperty({},key,data[key])):prev},{});return newUrl=addQuerystring(newUrl,encode("application/x-www-form-urlencoded",queryData)),newUrl=Object.keys(payloadSchema).reduce(function(prev,key){var replacement=payloadSchema[key].urlReplacement;return replacement?prev.replace(replacement,data[key]):prev},newUrl)}var _this=this,refinedSpec=_extends({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},endpointSpec),formatShortcuts={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(key){formatShortcuts[refinedSpec[key]]&&(refinedSpec[key]=formatShortcuts[refinedSpec[key]])}),function(){var data=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],headers=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],mergedHeaders=_extends({},headers,{Accept:refinedSpec.responseFormat,"Content-Type":refinedSpec.payloadFormat}),mergedData=_merge2["default"].recursive({},refinedSpec.defaultData,data),url=applySchemaToUrl(refinedSpec.payloadSchema,refinedSpec.url,mergedData,{setFromData:"get"===refinedSpec.method.toLowerCase()}),encodedData=encode(refinedSpec.payloadFormat,applySchemaToData(refinedSpec.payloadSchema,mergedData)),args="get"===refinedSpec.method.toLowerCase()?[url,mergedHeaders]:[url,encodedData,mergedHeaders];return _this[refinedSpec.method.toLowerCase()].apply(_this,args).then(parseResponse)}},Backend.prototype.get=function(url){var headers=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(url,{method:"get",credentials:"same-origin",headers:headers}).then(checkStatus)},Backend.prototype.post=function(url){var data=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],headers=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],defaultHeaders={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(url,{method:"post",headers:_extends({},defaultHeaders,headers),credentials:"same-origin",body:data}).then(checkStatus)},Backend.prototype.put=function(url){var data=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],headers=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(url,{method:"put",credentials:"same-origin",body:data,headers:headers}).then(checkStatus)},Backend.prototype["delete"]=function(url){var data=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],headers=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(url,{method:"delete",credentials:"same-origin",body:data,headers:headers}).then(checkStatus)},Backend}(),backend=new Backend;exports["default"]=backend},{"es6-promise":322,"isomorphic-fetch":341,merge:343,qs:345}],"lib/Config":[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var Config=function(){function Config(){_classCallCheck(this,Config)}return Config.get=function(key){return window.ss.config[key]},Config.getAll=function(){return window.ss.config},Config.getSection=function(key){return window.ss.config.sections[key]},Config}();exports["default"]=Config},{}],"lib/Injector":[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var Injector=function(){function Injector(){_classCallCheck(this,Injector),this.components={}}return Injector.prototype.getComponentByName=function(componentName){return this.components[componentName]},Injector.prototype.getComponentByDataType=function(dataType){switch(dataType){case"Text":case"DateTime":return this.components.TextField;case"Hidden":return this.components.HiddenField;case"SingleSelect":return this.components.SingleSelectField;case"Custom":return this.components.GridField;default:return null}},Injector.prototype.register=function(name,component){this.components[name]=component},Injector}();window.ss=window.ss||{},window.ss.injector=window.ss.injector||new Injector,exports["default"]=window.ss.injector},{}],"lib/ReactRouteRegister":[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},ReactRouteRegister=function(){function ReactRouteRegister(){_classCallCheck(this,ReactRouteRegister),this.reset()}return ReactRouteRegister.prototype.reset=function(){var _this=this;this.childRoutes=[],this.rootRoute={path:"/",getChildRoutes:function(location,cb){cb(null,_this.childRoutes)}}},ReactRouteRegister.prototype.updateRootRoute=function(route){this.rootRoute=_extends({},this.rootRoute,route)},ReactRouteRegister.prototype.add=function(route){var parentPaths=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],childRoutes=this.findChildRoute(parentPaths),newRoute=_extends({},{childRoutes:[]},route),splatRoute=newRoute.childRoutes[newRoute.childRoutes.length-1];splatRoute&&"**"===splatRoute.path||(splatRoute={path:"**"},newRoute.childRoutes.push(splatRoute));var newRouteIndex=childRoutes.findIndex(function(childRoute){return childRoute.path===route.path});newRouteIndex>=0?childRoutes[newRouteIndex]=newRoute:childRoutes.unshift(newRoute)},ReactRouteRegister.prototype.findChildRoute=function(parentPaths){var childRoutes=this.childRoutes;return parentPaths&&parentPaths.forEach(function(path){var nextParent=childRoutes.find(function(childRoute){return childRoute.path===path});if(!nextParent)throw new Error("Parent path "+path+" could not be found.");childRoutes=nextParent.childRoutes}),childRoutes},ReactRouteRegister.prototype.getRootRoute=function(){return this.rootRoute},ReactRouteRegister.prototype.getChildRoutes=function(){return this.childRoutes},ReactRouteRegister.prototype.remove=function(path){var parentPaths=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],childRoutes=this.findChildRoute(parentPaths),routeIndex=childRoutes.findIndex(function(childRoute){return childRoute.path===path});return 0>routeIndex?null:childRoutes.splice(routeIndex,1)[0]},ReactRouteRegister}();window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new ReactRouteRegister,exports["default"]=window.ss.routeRegister},{}],"lib/ReducerRegister":[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var register={},ReducerRegister=function(){function ReducerRegister(){_classCallCheck(this,ReducerRegister)}return ReducerRegister.prototype.add=function(key,reducer){if("undefined"!=typeof register[key])throw new Error("Reducer already exists at '"+key+"'");register[key]=reducer},ReducerRegister.prototype.getAll=function(){return register},ReducerRegister.prototype.getByKey=function(key){return register[key]},ReducerRegister.prototype.remove=function(key){delete register[key]},ReducerRegister}();window.ss=window.ss||{},window.ss.reducerRegister=window.ss.reducerRegister||new ReducerRegister,exports["default"]=window.ss.reducerRegister},{}],"lib/Router":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function resolveURLToBase(path){var absoluteBase=_page2["default"].getAbsoluteBase(),absolutePath=_url2["default"].resolve(absoluteBase,path);return 0!==absolutePath.indexOf(absoluteBase)?absolutePath:absolutePath.substring(absoluteBase.length-1)}function show(pageShow){return function(path,state,dispatch,push){return pageShow(_page2["default"].resolveURLToBase(path),state,dispatch,push)}}function routeAppliesToCurrentLocation(route){var r=new _page2["default"].Route(route);return r.match(_page2["default"].current,{})}function getAbsoluteBase(){return _page2["default"].absoluteBaseURL}function setAbsoluteBase(base){_page2["default"].absoluteBaseURL=base;var a=document.createElement("a");a.href=base;var basePath=a.pathname;basePath=basePath.replace(/\/$/,""),basePath.match(/^[^\/]/)&&(basePath="/"+basePath),_page2["default"].base(basePath)}Object.defineProperty(exports,"__esModule",{value:!0});var _page=require("page.js"),_page2=_interopRequireDefault(_page),_url=require("url"),_url2=_interopRequireDefault(_url);_page2["default"].oldshow||(_page2["default"].oldshow=_page2["default"].show),_page2["default"].setAbsoluteBase=setAbsoluteBase.bind(_page2["default"]),_page2["default"].getAbsoluteBase=getAbsoluteBase.bind(_page2["default"]),_page2["default"].resolveURLToBase=resolveURLToBase.bind(_page2["default"]),_page2["default"].show=show(_page2["default"].oldshow),_page2["default"].routeAppliesToCurrentLocation=routeAppliesToCurrentLocation,window.ss=window.ss||{},window.ss.router=window.ss.router||_page2["default"],exports["default"]=window.ss.router},{"page.js":"page.js",url:825}],"lib/SilverStripeComponent":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defaults(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj}function _classCallCheck(instance,Constructor){
if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):_defaults(subClass,superClass))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),SilverStripeComponent=function(_Component){function SilverStripeComponent(){return _classCallCheck(this,SilverStripeComponent),_possibleConstructorReturn(this,_Component.apply(this,arguments))}return _inherits(SilverStripeComponent,_Component),SilverStripeComponent.prototype.componentDidMount=function(){if("undefined"!=typeof this.props.cmsEvents){this.cmsEvents=this.props.cmsEvents;for(var cmsEvent in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,cmsEvent)&&(0,_jQuery2["default"])(document).on(cmsEvent,this.cmsEvents[cmsEvent].bind(this))}},SilverStripeComponent.prototype.componentWillUnmount=function(){for(var cmsEvent in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,cmsEvent)&&(0,_jQuery2["default"])(document).off(cmsEvent)},SilverStripeComponent.prototype.emitCmsEvent=function(componentEvent,data){(0,_jQuery2["default"])(document).trigger(componentEvent,data)},SilverStripeComponent}(_react.Component);SilverStripeComponent.propTypes={cmsEvents:_react2["default"].PropTypes.object},exports["default"]=SilverStripeComponent},{jQuery:"jQuery",react:"react"}],"page.js":[function(require,module,exports){(function(process){"use strict";function page(path,fn){if("function"==typeof path)return page("*",path);if("function"==typeof fn)for(var route=new Route(path),i=1;i<arguments.length;++i)page.callbacks.push(route.middleware(arguments[i]));else"string"==typeof path?page["string"==typeof fn?"redirect":"show"](path,fn):page.start(path)}function unhandled(ctx){if(!ctx.handled){var current;current=hashbang?base+location.hash.replace("#!",""):location.pathname+location.search,current!==ctx.canonicalPath&&(page.stop(),ctx.handled=!1,location.href=ctx.canonicalPath)}}function decodeURLEncodedURIComponent(val){return"string"!=typeof val?val:decodeURLComponents?decodeURIComponent(val.replace(/\+/g," ")):val}function Context(path,state){"/"===path[0]&&0!==path.indexOf(base)&&(path=base+(hashbang?"#!":"")+path);var i=path.indexOf("?");if(this.canonicalPath=path,this.path=path.replace(base,"")||"/",hashbang&&(this.path=this.path.replace("#!","")||"/"),this.title=document.title,this.state=state||{},this.state.path=path,this.querystring=~i?decodeURLEncodedURIComponent(path.slice(i+1)):"",this.pathname=decodeURLEncodedURIComponent(~i?path.slice(0,i):path),this.params={},this.hash="",!hashbang){if(!~this.path.indexOf("#"))return;var parts=this.path.split("#");this.path=parts[0],this.hash=decodeURLEncodedURIComponent(parts[1])||"",this.querystring=this.querystring.split("#")[0]}}function Route(path,options){options=options||{},this.path=path,this.method="GET",this.regexp=pathtoRegexp(this.path,this.keys=[],options.sensitive,options.strict)}function onclick(e){if(1===which(e)&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var el=e.target;el&&"A"!==el.nodeName;)el=el.parentNode;if(el&&"A"===el.nodeName&&!el.hasAttribute("download")&&"external"!==el.getAttribute("rel")){var link=el.getAttribute("href");if((hashbang||el.pathname!==location.pathname||!el.hash&&"#"!==link)&&!(link&&link.indexOf("mailto:")>-1)&&!el.target&&sameOrigin(el.href)){var path=el.pathname+el.search+(el.hash||"");"undefined"!=typeof process&&path.match(/^\/[a-zA-Z]:\//)&&(path=path.replace(/^\/[a-zA-Z]:\//,"/"));var orig=path;0===path.indexOf(base)&&(path=path.substr(base.length)),hashbang&&(path=path.replace("#!","")),base&&orig===path||(e.preventDefault(),page.show(orig))}}}}function which(e){return e=e||window.event,null===e.which?e.button:e.which}function sameOrigin(href){var origin=location.protocol+"//"+location.hostname;return location.port&&(origin+=":"+location.port),href&&0===href.indexOf(origin)}var pathtoRegexp=require("path-to-regexp");module.exports=page;var running,prevContext,clickEvent="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",location="undefined"!=typeof window&&(window.history.location||window.location),dispatch=!0,decodeURLComponents=!0,base="",hashbang=!1;page.callbacks=[],page.exits=[],page.current="",page.len=0,page.base=function(path){return 0===arguments.length?base:void(base=path)},page.start=function(options){if(options=options||{},!running&&(running=!0,!1===options.dispatch&&(dispatch=!1),!1===options.decodeURLComponents&&(decodeURLComponents=!1),!1!==options.popstate&&window.addEventListener("popstate",onpopstate,!1),!1!==options.click&&document.addEventListener(clickEvent,onclick,!1),!0===options.hashbang&&(hashbang=!0),dispatch)){var url=hashbang&&~location.hash.indexOf("#!")?location.hash.substr(2)+location.search:location.pathname+location.search+location.hash;page.replace(url,null,!0,dispatch)}},page.stop=function(){running&&(page.current="",page.len=0,running=!1,document.removeEventListener(clickEvent,onclick,!1),window.removeEventListener("popstate",onpopstate,!1))},page.show=function(path,state,dispatch,push){var ctx=new Context(path,state);return page.current=ctx.path,!1!==dispatch&&page.dispatch(ctx),!1!==ctx.handled&&!1!==push&&ctx.pushState(),ctx},page.back=function(path,state){page.len>0?(history.back(),page.len--):path?setTimeout(function(){page.show(path,state)}):setTimeout(function(){page.show(base,state)})},page.redirect=function(from,to){"string"==typeof from&&"string"==typeof to&&page(from,function(e){setTimeout(function(){page.replace(to)},0)}),"string"==typeof from&&"undefined"==typeof to&&setTimeout(function(){page.replace(from)},0)},page.replace=function(path,state,init,dispatch){var ctx=new Context(path,state);return page.current=ctx.path,ctx.init=init,ctx.save(),!1!==dispatch&&page.dispatch(ctx),ctx},page.dispatch=function(ctx){function nextExit(){var fn=page.exits[j++];return fn?void fn(prev,nextExit):nextEnter()}function nextEnter(){var fn=page.callbacks[i++];return ctx.path!==page.current?void(ctx.handled=!1):fn?void fn(ctx,nextEnter):unhandled(ctx)}var prev=prevContext,i=0,j=0;prevContext=ctx,prev?nextExit():nextEnter()},page.exit=function(path,fn){if("function"==typeof path)return page.exit("*",path);for(var route=new Route(path),i=1;i<arguments.length;++i)page.exits.push(route.middleware(arguments[i]))},page.Context=Context,Context.prototype.pushState=function(){page.len++,history.pushState(this.state,this.title,hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},Context.prototype.save=function(){history.replaceState(this.state,this.title,hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},page.Route=Route,Route.prototype.middleware=function(fn){var self=this;return function(ctx,next){return self.match(ctx.path,ctx.params)?fn(ctx,next):void next()}},Route.prototype.match=function(path,params){var keys=this.keys,qsIndex=path.indexOf("?"),pathname=~qsIndex?path.slice(0,qsIndex):path,m=this.regexp.exec(decodeURIComponent(pathname));if(!m)return!1;for(var i=1,len=m.length;len>i;++i){var key=keys[i-1];if(key){var val=decodeURLEncodedURIComponent(m[i]);void 0===val&&hasOwnProperty.call(params,key.name)||(params[key.name]=val)}}return!0};var onpopstate=function(){var loaded=!1;if("undefined"!=typeof window)return"complete"===document.readyState?loaded=!0:window.addEventListener("load",function(){setTimeout(function(){loaded=!0},0)}),function(e){if(loaded)if(e.state){var path=e.state.path;page.replace(path,e.state)}else page.show(location.pathname+location.hash,void 0,void 0,!1)}}();page.sameOrigin=sameOrigin}).call(this,require("_process"))},{_process:314,"path-to-regexp":344}],"react-addons-css-transition-group":[function(require,module,exports){module.exports=require("react/lib/ReactCSSTransitionGroup")},{"react/lib/ReactCSSTransitionGroup":681}],"react-addons-test-utils":[function(require,module,exports){module.exports=require("react/lib/ReactTestUtils")},{"react/lib/ReactTestUtils":738}],"react-bootstrap-4":[function(require,module,exports){"use strict";var _interopRequireDefault=require("babel-runtime/helpers/interop-require-default")["default"],_interopRequireWildcard=require("babel-runtime/helpers/interop-require-wildcard")["default"];exports.__esModule=!0;var _utilsChildrenValueInputValidation=require("./utils/childrenValueInputValidation"),_utilsChildrenValueInputValidation2=_interopRequireDefault(_utilsChildrenValueInputValidation),_utilsCreateChainedFunction=require("./utils/createChainedFunction"),_utilsCreateChainedFunction2=_interopRequireDefault(_utilsCreateChainedFunction),_utilsValidComponentChildren=require("./utils/ValidComponentChildren"),_utilsValidComponentChildren2=_interopRequireDefault(_utilsValidComponentChildren),_utilsBootstrapUtils=require("./utils/bootstrapUtils"),_utilsBootstrapUtils2=_interopRequireDefault(_utilsBootstrapUtils),_Accordion2=require("./Accordion"),_Accordion3=_interopRequireDefault(_Accordion2);exports.Accordion=_Accordion3["default"];var _Alert2=require("./Alert"),_Alert3=_interopRequireDefault(_Alert2);exports.Alert=_Alert3["default"];var _Badge2=require("./Badge"),_Badge3=_interopRequireDefault(_Badge2);exports.Badge=_Badge3["default"];var _Breadcrumb2=require("./Breadcrumb"),_Breadcrumb3=_interopRequireDefault(_Breadcrumb2);exports.Breadcrumb=_Breadcrumb3["default"];var _BreadcrumbItem2=require("./BreadcrumbItem"),_BreadcrumbItem3=_interopRequireDefault(_BreadcrumbItem2);exports.BreadcrumbItem=_BreadcrumbItem3["default"];var _Button2=require("./Button"),_Button3=_interopRequireDefault(_Button2);exports.Button=_Button3["default"];var _ButtonGroup2=require("./ButtonGroup"),_ButtonGroup3=_interopRequireDefault(_ButtonGroup2);exports.ButtonGroup=_ButtonGroup3["default"];var _ButtonInput2=require("./ButtonInput"),_ButtonInput3=_interopRequireDefault(_ButtonInput2);exports.ButtonInput=_ButtonInput3["default"];var _ButtonToolbar2=require("./ButtonToolbar"),_ButtonToolbar3=_interopRequireDefault(_ButtonToolbar2);exports.ButtonToolbar=_ButtonToolbar3["default"];var _Carousel2=require("./Carousel"),_Carousel3=_interopRequireDefault(_Carousel2);exports.Carousel=_Carousel3["default"];var _CarouselItem2=require("./CarouselItem"),_CarouselItem3=_interopRequireDefault(_CarouselItem2);exports.CarouselItem=_CarouselItem3["default"];var _Col2=require("./Col"),_Col3=_interopRequireDefault(_Col2);exports.Col=_Col3["default"];var _CollapsibleNav2=require("./CollapsibleNav"),_CollapsibleNav3=_interopRequireDefault(_CollapsibleNav2);exports.CollapsibleNav=_CollapsibleNav3["default"];var _Dropdown2=require("./Dropdown"),_Dropdown3=_interopRequireDefault(_Dropdown2);exports.Dropdown=_Dropdown3["default"];var _DropdownButton2=require("./DropdownButton"),_DropdownButton3=_interopRequireDefault(_DropdownButton2);exports.DropdownButton=_DropdownButton3["default"];var _Glyphicon2=require("./Glyphicon"),_Glyphicon3=_interopRequireDefault(_Glyphicon2);exports.Glyphicon=_Glyphicon3["default"];var _Grid2=require("./Grid"),_Grid3=_interopRequireDefault(_Grid2);exports.Grid=_Grid3["default"];var _Image2=require("./Image"),_Image3=_interopRequireDefault(_Image2);exports.Image=_Image3["default"];var _Input2=require("./Input"),_Input3=_interopRequireDefault(_Input2);exports.Input=_Input3["default"];var _Interpolate2=require("./Interpolate"),_Interpolate3=_interopRequireDefault(_Interpolate2);exports.Interpolate=_Interpolate3["default"];var _Jumbotron2=require("./Jumbotron"),_Jumbotron3=_interopRequireDefault(_Jumbotron2);exports.Jumbotron=_Jumbotron3["default"];var _Label2=require("./Label"),_Label3=_interopRequireDefault(_Label2);exports.Label=_Label3["default"];var _ListGroup2=require("./ListGroup"),_ListGroup3=_interopRequireDefault(_ListGroup2);exports.ListGroup=_ListGroup3["default"];var _ListGroupItem2=require("./ListGroupItem"),_ListGroupItem3=_interopRequireDefault(_ListGroupItem2);exports.ListGroupItem=_ListGroupItem3["default"];var _MenuItem2=require("./MenuItem"),_MenuItem3=_interopRequireDefault(_MenuItem2);exports.MenuItem=_MenuItem3["default"];var _Media2=require("./Media"),_Media3=_interopRequireDefault(_Media2);exports.Media=_Media3["default"];var _Modal2=require("./Modal"),_Modal3=_interopRequireDefault(_Modal2);exports.Modal=_Modal3["default"];var _ModalBody2=require("./ModalBody"),_ModalBody3=_interopRequireDefault(_ModalBody2);exports.ModalBody=_ModalBody3["default"];var _ModalFooter2=require("./ModalFooter"),_ModalFooter3=_interopRequireDefault(_ModalFooter2);exports.ModalFooter=_ModalFooter3["default"];var _ModalHeader2=require("./ModalHeader"),_ModalHeader3=_interopRequireDefault(_ModalHeader2);exports.ModalHeader=_ModalHeader3["default"];var _ModalTitle2=require("./ModalTitle"),_ModalTitle3=_interopRequireDefault(_ModalTitle2);exports.ModalTitle=_ModalTitle3["default"];var _Nav2=require("./Nav"),_Nav3=_interopRequireDefault(_Nav2);exports.Nav=_Nav3["default"];var _Navbar2=require("./Navbar"),_Navbar3=_interopRequireDefault(_Navbar2);exports.Navbar=_Navbar3["default"];var _NavBrand2=require("./NavBrand"),_NavBrand3=_interopRequireDefault(_NavBrand2);exports.NavBrand=_NavBrand3["default"];var _NavbarBrand2=require("./NavbarBrand"),_NavbarBrand3=_interopRequireDefault(_NavbarBrand2);exports.NavbarBrand=_NavbarBrand3["default"];var _NavDropdown2=require("./NavDropdown"),_NavDropdown3=_interopRequireDefault(_NavDropdown2);exports.NavDropdown=_NavDropdown3["default"];var _NavItem2=require("./NavItem"),_NavItem3=_interopRequireDefault(_NavItem2);exports.NavItem=_NavItem3["default"];var _Overlay2=require("./Overlay"),_Overlay3=_interopRequireDefault(_Overlay2);exports.Overlay=_Overlay3["default"];var _OverlayTrigger2=require("./OverlayTrigger"),_OverlayTrigger3=_interopRequireDefault(_OverlayTrigger2);exports.OverlayTrigger=_OverlayTrigger3["default"];var _PageHeader2=require("./PageHeader"),_PageHeader3=_interopRequireDefault(_PageHeader2);exports.PageHeader=_PageHeader3["default"];var _PageItem2=require("./PageItem"),_PageItem3=_interopRequireDefault(_PageItem2);exports.PageItem=_PageItem3["default"];var _Pager2=require("./Pager"),_Pager3=_interopRequireDefault(_Pager2);exports.Pager=_Pager3["default"];var _Pagination2=require("./Pagination"),_Pagination3=_interopRequireDefault(_Pagination2);exports.Pagination=_Pagination3["default"];var _Panel2=require("./Panel"),_Panel3=_interopRequireDefault(_Panel2);exports.Panel=_Panel3["default"];var _PanelGroup2=require("./PanelGroup"),_PanelGroup3=_interopRequireDefault(_PanelGroup2);exports.PanelGroup=_PanelGroup3["default"];var _Popover2=require("./Popover"),_Popover3=_interopRequireDefault(_Popover2);exports.Popover=_Popover3["default"];var _ProgressBar2=require("./ProgressBar"),_ProgressBar3=_interopRequireDefault(_ProgressBar2);exports.ProgressBar=_ProgressBar3["default"];var _ResponsiveEmbed2=require("./ResponsiveEmbed"),_ResponsiveEmbed3=_interopRequireDefault(_ResponsiveEmbed2);exports.ResponsiveEmbed=_ResponsiveEmbed3["default"];var _Row2=require("./Row"),_Row3=_interopRequireDefault(_Row2);exports.Row=_Row3["default"];var _SafeAnchor2=require("./SafeAnchor"),_SafeAnchor3=_interopRequireDefault(_SafeAnchor2);exports.SafeAnchor=_SafeAnchor3["default"];var _SplitButton2=require("./SplitButton"),_SplitButton3=_interopRequireDefault(_SplitButton2);exports.SplitButton=_SplitButton3["default"];var _Tab2=require("./Tab"),_Tab3=_interopRequireDefault(_Tab2);exports.Tab=_Tab3["default"];var _Table2=require("./Table"),_Table3=_interopRequireDefault(_Table2);exports.Table=_Table3["default"];var _Tabs2=require("./Tabs"),_Tabs3=_interopRequireDefault(_Tabs2);exports.Tabs=_Tabs3["default"];var _Thumbnail2=require("./Thumbnail"),_Thumbnail3=_interopRequireDefault(_Thumbnail2);exports.Thumbnail=_Thumbnail3["default"];var _Tooltip2=require("./Tooltip"),_Tooltip3=_interopRequireDefault(_Tooltip2);exports.Tooltip=_Tooltip3["default"];var _Well2=require("./Well"),_Well3=_interopRequireDefault(_Well2);exports.Well=_Well3["default"];var _Collapse2=require("./Collapse"),_Collapse3=_interopRequireDefault(_Collapse2);exports.Collapse=_Collapse3["default"];var _Fade2=require("./Fade"),_Fade3=_interopRequireDefault(_Fade2);exports.Fade=_Fade3["default"];var _FormControls2=require("./FormControls"),_FormControls=_interopRequireWildcard(_FormControls2);exports.FormControls=_FormControls;var utils={bootstrapUtils:_utilsBootstrapUtils2["default"],childrenValueInputValidation:_utilsChildrenValueInputValidation2["default"],createChainedFunction:_utilsCreateChainedFunction2["default"],ValidComponentChildren:_utilsValidComponentChildren2["default"]};exports.utils=utils},{"./Accordion":351,"./Alert":352,"./Badge":353,"./Breadcrumb":354,"./BreadcrumbItem":355,"./Button":356,"./ButtonGroup":357,"./ButtonInput":358,"./ButtonToolbar":359,"./Carousel":360,"./CarouselItem":361,"./Col":362,"./Collapse":363,"./CollapsibleNav":364,"./Dropdown":365,"./DropdownButton":366,"./Fade":369,"./FormControls":371,"./Glyphicon":373,"./Grid":374,"./Image":375,"./Input":376,"./Interpolate":378,"./Jumbotron":379,"./Label":380,"./ListGroup":381,"./ListGroupItem":382,"./Media":383,"./MenuItem":390,"./Modal":391,"./ModalBody":392,"./ModalFooter":394,"./ModalHeader":395,"./ModalTitle":396,"./Nav":397,"./NavBrand":398,"./NavDropdown":399,"./NavItem":400,"./Navbar":401,"./NavbarBrand":402,"./Overlay":406,"./OverlayTrigger":407,"./PageHeader":408,"./PageItem":409,"./Pager":410,"./Pagination":411,"./Panel":413,"./PanelGroup":414,"./Popover":415,"./ProgressBar":416,"./ResponsiveEmbed":417,"./Row":418,"./SafeAnchor":419,"./SplitButton":420,"./Tab":422,"./Table":423,"./Tabs":424,"./Thumbnail":425,"./Tooltip":426,"./Well":427,"./utils/ValidComponentChildren":432,"./utils/bootstrapUtils":433,"./utils/childrenValueInputValidation":435,"./utils/createChainedFunction":436,"babel-runtime/helpers/interop-require-default":446,"babel-runtime/helpers/interop-require-wildcard":447}],"react-dom":[function(require,module,exports){"use strict";module.exports=require("react/lib/ReactDOM")},{"react/lib/ReactDOM":691}],"react-redux":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.__esModule=!0,exports.connect=exports.Provider=void 0;var _Provider=require("./components/Provider"),_Provider2=_interopRequireDefault(_Provider),_connect=require("./components/connect"),_connect2=_interopRequireDefault(_connect);exports.Provider=_Provider2["default"],exports.connect=_connect2["default"]},{"./components/Provider":601,"./components/connect":602}],"react-router-redux":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.routerMiddleware=exports.routerActions=exports.goForward=exports.goBack=exports.go=exports.replace=exports.push=exports.CALL_HISTORY_METHOD=exports.routerReducer=exports.LOCATION_CHANGE=exports.syncHistoryWithStore=void 0;var _reducer=require("./reducer");Object.defineProperty(exports,"LOCATION_CHANGE",{enumerable:!0,get:function(){return _reducer.LOCATION_CHANGE}}),Object.defineProperty(exports,"routerReducer",{enumerable:!0,get:function(){return _reducer.routerReducer}});var _actions=require("./actions");Object.defineProperty(exports,"CALL_HISTORY_METHOD",{enumerable:!0,get:function(){return _actions.CALL_HISTORY_METHOD}}),Object.defineProperty(exports,"push",{enumerable:!0,get:function(){return _actions.push}}),Object.defineProperty(exports,"replace",{enumerable:!0,get:function(){return _actions.replace}}),Object.defineProperty(exports,"go",{enumerable:!0,get:function(){return _actions.go}}),Object.defineProperty(exports,"goBack",{enumerable:!0,get:function(){return _actions.goBack}}),Object.defineProperty(exports,"goForward",{enumerable:!0,get:function(){return _actions.goForward}}),Object.defineProperty(exports,"routerActions",{enumerable:!0,get:function(){return _actions.routerActions}});var _sync=require("./sync"),_sync2=_interopRequireDefault(_sync),_middleware=require("./middleware"),_middleware2=_interopRequireDefault(_middleware);exports.syncHistoryWithStore=_sync2["default"],exports.routerMiddleware=_middleware2["default"]},{"./actions":612,"./middleware":613,"./reducer":614,"./sync":615}],"react-router":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.__esModule=!0,exports.createMemoryHistory=exports.hashHistory=exports.browserHistory=exports.applyRouterMiddleware=exports.formatPattern=exports.useRouterHistory=exports.match=exports.routerShape=exports.locationShape=exports.PropTypes=exports.RoutingContext=exports.RouterContext=exports.createRoutes=exports.useRoutes=exports.RouteContext=exports.Lifecycle=exports.History=exports.Route=exports.Redirect=exports.IndexRoute=exports.IndexRedirect=exports.withRouter=exports.IndexLink=exports.Link=exports.Router=void 0;var _RouteUtils=require("./RouteUtils");Object.defineProperty(exports,"createRoutes",{enumerable:!0,get:function(){return _RouteUtils.createRoutes}});var _PropTypes2=require("./PropTypes");Object.defineProperty(exports,"locationShape",{enumerable:!0,get:function(){return _PropTypes2.locationShape}}),Object.defineProperty(exports,"routerShape",{enumerable:!0,get:function(){return _PropTypes2.routerShape}});var _PatternUtils=require("./PatternUtils");Object.defineProperty(exports,"formatPattern",{enumerable:!0,get:function(){return _PatternUtils.formatPattern}});var _Router2=require("./Router"),_Router3=_interopRequireDefault(_Router2),_Link2=require("./Link"),_Link3=_interopRequireDefault(_Link2),_IndexLink2=require("./IndexLink"),_IndexLink3=_interopRequireDefault(_IndexLink2),_withRouter2=require("./withRouter"),_withRouter3=_interopRequireDefault(_withRouter2),_IndexRedirect2=require("./IndexRedirect"),_IndexRedirect3=_interopRequireDefault(_IndexRedirect2),_IndexRoute2=require("./IndexRoute"),_IndexRoute3=_interopRequireDefault(_IndexRoute2),_Redirect2=require("./Redirect"),_Redirect3=_interopRequireDefault(_Redirect2),_Route2=require("./Route"),_Route3=_interopRequireDefault(_Route2),_History2=require("./History"),_History3=_interopRequireDefault(_History2),_Lifecycle2=require("./Lifecycle"),_Lifecycle3=_interopRequireDefault(_Lifecycle2),_RouteContext2=require("./RouteContext"),_RouteContext3=_interopRequireDefault(_RouteContext2),_useRoutes2=require("./useRoutes"),_useRoutes3=_interopRequireDefault(_useRoutes2),_RouterContext2=require("./RouterContext"),_RouterContext3=_interopRequireDefault(_RouterContext2),_RoutingContext2=require("./RoutingContext"),_RoutingContext3=_interopRequireDefault(_RoutingContext2),_PropTypes3=_interopRequireDefault(_PropTypes2),_match2=require("./match"),_match3=_interopRequireDefault(_match2),_useRouterHistory2=require("./useRouterHistory"),_useRouterHistory3=_interopRequireDefault(_useRouterHistory2),_applyRouterMiddleware2=require("./applyRouterMiddleware"),_applyRouterMiddleware3=_interopRequireDefault(_applyRouterMiddleware2),_browserHistory2=require("./browserHistory"),_browserHistory3=_interopRequireDefault(_browserHistory2),_hashHistory2=require("./hashHistory"),_hashHistory3=_interopRequireDefault(_hashHistory2),_createMemoryHistory2=require("./createMemoryHistory"),_createMemoryHistory3=_interopRequireDefault(_createMemoryHistory2);exports.Router=_Router3["default"],exports.Link=_Link3["default"],exports.IndexLink=_IndexLink3["default"],exports.withRouter=_withRouter3["default"],exports.IndexRedirect=_IndexRedirect3["default"],exports.IndexRoute=_IndexRoute3["default"],exports.Redirect=_Redirect3["default"],exports.Route=_Route3["default"],exports.History=_History3["default"],exports.Lifecycle=_Lifecycle3["default"],exports.RouteContext=_RouteContext3["default"],exports.useRoutes=_useRoutes3["default"],exports.RouterContext=_RouterContext3["default"],exports.RoutingContext=_RoutingContext3["default"],exports.PropTypes=_PropTypes3["default"],exports.match=_match3["default"],exports.useRouterHistory=_useRouterHistory3["default"],exports.applyRouterMiddleware=_applyRouterMiddleware3["default"],exports.browserHistory=_browserHistory3["default"],exports.hashHistory=_hashHistory3["default"],exports.createMemoryHistory=_createMemoryHistory3["default"]},{"./History":617,"./IndexLink":618,"./IndexRedirect":619,"./IndexRoute":620,"./Lifecycle":622,"./Link":623,"./PatternUtils":624,"./PropTypes":625,"./Redirect":626,"./Route":627,"./RouteContext":628,"./RouteUtils":629,"./Router":630,"./RouterContext":631,"./RoutingContext":633,"./applyRouterMiddleware":635,"./browserHistory":636,"./createMemoryHistory":638,"./hashHistory":644,"./match":646,"./useRouterHistory":649,"./useRoutes":650,"./withRouter":651}],react:[function(require,module,exports){"use strict";module.exports=require("./lib/React")},{"./lib/React":678}],"redux-thunk":[function(require,module,exports){"use strict";function createThunkMiddleware(extraArgument){return function(_ref){var dispatch=_ref.dispatch,getState=_ref.getState;return function(next){return function(action){return"function"==typeof action?action(dispatch,getState,extraArgument):next(action)}}}}exports.__esModule=!0;var thunk=createThunkMiddleware();thunk.withExtraArgument=createThunkMiddleware,exports["default"]=thunk},{}],redux:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.__esModule=!0;var _createStore=require("./createStore"),_createStore2=_interopRequireDefault(_createStore),_utilsCombineReducers=require("./utils/combineReducers"),_utilsCombineReducers2=_interopRequireDefault(_utilsCombineReducers),_utilsBindActionCreators=require("./utils/bindActionCreators"),_utilsBindActionCreators2=_interopRequireDefault(_utilsBindActionCreators),_utilsApplyMiddleware=require("./utils/applyMiddleware"),_utilsApplyMiddleware2=_interopRequireDefault(_utilsApplyMiddleware),_utilsCompose=require("./utils/compose"),_utilsCompose2=_interopRequireDefault(_utilsCompose);exports.createStore=_createStore2["default"],exports.combineReducers=_utilsCombineReducers2["default"],exports.bindActionCreators=_utilsBindActionCreators2["default"],exports.applyMiddleware=_utilsApplyMiddleware2["default"],exports.compose=_utilsCompose2["default"]},{"./createStore":817,"./utils/applyMiddleware":818,"./utils/bindActionCreators":819,"./utils/combineReducers":820,"./utils/compose":821}],"state/breadcrumbs/BreadcrumbsActions":[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function setBreadcrumbs(breadcrumbs){return{type:_BreadcrumbsActionTypes2["default"].SET_BREADCRUMBS,payload:{breadcrumbs:breadcrumbs}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.setBreadcrumbs=setBreadcrumbs;var _BreadcrumbsActionTypes=require("./BreadcrumbsActionTypes"),_BreadcrumbsActionTypes2=_interopRequireDefault(_BreadcrumbsActionTypes)},{"./BreadcrumbsActionTypes":6}],tether:[function(require,module,exports){!function(root,factory){"function"==typeof define&&define.amd?define(factory):"object"==typeof exports?module.exports=factory(require,exports,module):root.Tether=factory()}(this,function(require,exports,module){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function getScrollParents(el){var computedStyle=getComputedStyle(el)||{},position=computedStyle.position,parents=[];if("fixed"===position)return[el];for(var parent=el;(parent=parent.parentNode)&&parent&&1===parent.nodeType;){var style=void 0;try{style=getComputedStyle(parent)}catch(err){}if("undefined"==typeof style||null===style)return parents.push(parent),parents;var _style=style,overflow=_style.overflow,overflowX=_style.overflowX,overflowY=_style.overflowY;/(auto|scroll)/.test(overflow+overflowY+overflowX)&&("absolute"!==position||["relative","absolute","fixed"].indexOf(style.position)>=0)&&parents.push(parent)}return parents.push(document.body),parents}function removeUtilElements(){zeroElement&&document.body.removeChild(zeroElement),zeroElement=null}function getBounds(el){var doc=void 0;el===document?(doc=document,el=document.documentElement):doc=el.ownerDocument;var docEl=doc.documentElement,box={},rect=el.getBoundingClientRect();for(var k in rect)box[k]=rect[k];var origin=getOrigin();return box.top-=origin.top,box.left-=origin.left,"undefined"==typeof box.width&&(box.width=document.body.scrollWidth-box.left-box.right),"undefined"==typeof box.height&&(box.height=document.body.scrollHeight-box.top-box.bottom),box.top=box.top-docEl.clientTop,box.left=box.left-docEl.clientLeft,box.right=doc.body.clientWidth-box.width-box.left,box.bottom=doc.body.clientHeight-box.height-box.top,box}function getOffsetParent(el){return el.offsetParent||document.documentElement}function getScrollBarSize(){var inner=document.createElement("div");inner.style.width="100%",inner.style.height="200px";var outer=document.createElement("div");extend(outer.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),outer.appendChild(inner),document.body.appendChild(outer);var widthContained=inner.offsetWidth;outer.style.overflow="scroll";var widthScroll=inner.offsetWidth;widthContained===widthScroll&&(widthScroll=outer.clientWidth),document.body.removeChild(outer);var width=widthContained-widthScroll;return{width:width,height:width}}function extend(){var out=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],args=[];return Array.prototype.push.apply(args,arguments),args.slice(1).forEach(function(obj){if(obj)for(var key in obj)({}).hasOwnProperty.call(obj,key)&&(out[key]=obj[key])}),out}function removeClass(el,name){if("undefined"!=typeof el.classList)name.split(" ").forEach(function(cls){cls.trim()&&el.classList.remove(cls)});else{var regex=new RegExp("(^| )"+name.split(" ").join("|")+"( |$)","gi"),className=getClassName(el).replace(regex," ");setClassName(el,className)}}function addClass(el,name){if("undefined"!=typeof el.classList)name.split(" ").forEach(function(cls){cls.trim()&&el.classList.add(cls)});else{removeClass(el,name);var cls=getClassName(el)+(" "+name);setClassName(el,cls)}}function hasClass(el,name){if("undefined"!=typeof el.classList)return el.classList.contains(name);var className=getClassName(el);return new RegExp("(^| )"+name+"( |$)","gi").test(className)}function getClassName(el){return el.className instanceof SVGAnimatedString?el.className.baseVal:el.className}function setClassName(el,className){el.setAttribute("class",className)}function updateClasses(el,add,all){all.forEach(function(cls){-1===add.indexOf(cls)&&hasClass(el,cls)&&removeClass(el,cls)}),add.forEach(function(cls){hasClass(el,cls)||addClass(el,cls)})}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0

View File

@ -24,7 +24,9 @@ class Breadcrumb extends SilverStripeComponent {
</li>,
]),
this.props.crumbs.slice(-1).map((crumb, index) => {
const iconClassNames = ['breadcrumb__icon', crumb.icon.className].join(' ');
const iconClassNames = ['breadcrumb__icon', crumb.icon ? crumb.icon.className : '']
.join(' ');
return [
<li className="breadcrumb__item breadcrumb__item--last">
<h2 className="breadcrumb__item-title breadcrumb__item-title--last" key={index}>