// autosave.js.coffee
(function(){jQuery.fn.extend({autosave:function(){var t,a,e,r,n;if(r=this.slot(),!this.attr("no-autosave")){if((e=this.closest(".form-group"))[0]){if(!(a=e.data("cardId")))return;": "+e.data("cardName")}else a=r.data("cardId"),"";if(a)return n=decko.path("update/~"+a),t=$("#edit_card_"+a).serializeArray().reduce(function(t,a){return t[a.name]=a.value,t},{draft:"true","success[view]":"blank"}),$.ajax(n,{data:t,type:"POST"})}}}),$(window).ready(function(){return $("body").on("change",".autosave .d0-card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)})})}).call(this);
// board.js.coffee
(function(){decko.slot.ready(function(e,t){var r;if(e.updateBoard(!1,t),1===(r=e.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(r[0]).click()}),jQuery.fn.extend({updateBoard:function(e,t){if(null==e&&(e=!1),this.closest(".board").length>0)return this.data("breadcrumb")?this.updateBreadcrumb():t&&$(t).data("breadcrumb")&&$(t).updateBreadcrumb(),e?$(".board-pills > .nav-item > .nav-link.active").removeClass("active"):void 0},updateBreadcrumb:function(){var e;return(e=$(".modal-header ._board-breadcrumb li:last-child")).text(this.data("breadcrumb")),e.attr("class","breadcrumb-item active "+this.data("breadcrumb-class"))}}),$(window).ready(function(){return $("body").on("select2:select","._close-rule-overlay-on-select",function(){return $(".overlay-container > ._overlay.card-slot.overlay_rule-view.RULE").removeOverlay()}),$("body").on("click","._update-history-pills",function(){return $(this).closest(".slotter").data("update-foreign-slot",".card-slot.history_tab-view")})})}).call(this);
// components.js.coffee
(function(){var t;t=null,$(window).ready(function(){return $("body").on("change","._submit-on-change",function(t){return $(t.target).closest("form").submit(),!1}),$("body").on("input","._submit-after-typing",function(e){return $(e.target).closest("form").slot().find(".autosubmit-success-notification").remove(),t&&clearTimeout(t),t=setTimeout(function(){return $(e.target).closest("form").submit(),t=null},1e3)}),$("body").on("keydown","._submit-after-typing",function(e){if(13===e.which)return t&&clearTimeout(t),t=null,$(e.target).closest("form").submit(),!1}),$("body").on("change","._edit-item",function(t){var e;return(e=$(t.target)).attr("name",e.is(":checked")?"add_item":"drop_item"),$(t.target).closest("form").submit(),!1})})}).call(this);
// doubleclick.js.coffee
(function(){var t,n,i,r;$(window).ready(function(){var n;if(n={off:!1,on:!0,signed_in:decko.currentUserId},function(){return n[decko.doubleClick]}())return $("body").on("dblclick","div",function(){return t($(this))&&r($(this)),!1})}),t=function(t){return![".nodblclick",".d0-card-header",".card-editor"].some(function(n){return t.closest(n)[0]})&&null==t.slot().find(".card-editor")[0]},r=function(t){var r,e,d,o;return d=t.slot(),(r=n(d))?r.click():(e=i(d),o=decko.path("~"+d.data("cardId")+"?view="+e),d.slotReload(o))},n=function(t){var n;return!!(n=t.find(".edit-link").filter(function(n,i){return $(i).slot().data("slotId")===t.data("slotId")}))[0]&&$(n[0])},i=function(t){switch(t.data("slot").edit){case"inline":return"edit_inline";case"full":return"board";default:return"edit"}}}).call(this);
// editor.js.coffee
(function(){decko.editors.init.textarea=function(){return $(this).autosize()},$.extend(decko,{contentLoaded:function(t,n){var e;return decko.initializeEditors(t),null!=(e=n.attr("notify-success"))&&t.notify(e,"success"),t.triggerSlotReady(n)},initializeEditors:function(t,n){return null==n&&(n=decko.editors.init),$.each(n,function(n,e){return $.each(t.find(n),function(){return e.call($(this))})})}}),jQuery.fn.extend({contentField:function(){return this.closest(".card-editor").find(".d0-card-content")},setContentFieldsFromMap:function(t){var n;return null==t&&(t=decko.editors.content),n=$(this),$.each(t,function(t,e){return n.setContentFields(t,e)})},setContentFields:function(t,n){return $.each(this.find(t),function(){return $(this).setContentField(n)})},setContentField:function(t){var n,e,i;if(e=(n=this.contentField()).val(),i=t.call(this),n.val(i),e!==i)return n.change()}}),$(window).ready(function(){return setTimeout(function(){return decko.initializeEditors($("body > :not(.modal)"))},10),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".d0-card-content").attr("no-autosave","true"),!0})}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4)}).call(this);
// name_editor.js.coffee
(function(){var n,e;e=null,$(window).ready(function(){return $("body").on("keyup",".name-editor input",function(a){var t;return e&&clearTimeout(e),t=$(this),13===a.which?(n(t),e=null):e=setTimeout(function(){return n(t),e=null},400)})}),decko.pingName=function(n,e){return $.getJSON(decko.path(""),{format:"json",view:"status","card[name]":n},e)},n=function(n){var e;return e=n.val(),decko.pingName(e,function(a){var t,r,l,u,i,s,o;return n.val()!==e?null:(o=a.status)?(t=n.parent(),(u=(l=n.closest("fieldset").find("legend")).find(".name-messages"))[0]||(u=$(''),l.append(null!=u)),t.removeClass("real-name virtual-name known-name"),s=n.slot().data("cardId"),"unknown"===o||s&&parseInt(s)===a.id?u.html(""):(t.addClass(o+"-name known-name"),i="virtual"===o?"in virtual":"already in",r=decko.path(a.url_key),u.html("\""+e+'" '+i+" use"))):void 0})}}).call(this);
// type_editor.js.coffee
(function(){var t;$(window).ready(function(){return $("body").on("change","._live-type-field",function(){var a;return a=$(this),t(a),a.data("params",a.closest("form").serialize()),a.data("url",a.attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()})}),t=function(t,a){var e;if(null==a&&(a=null),(e=t.closest(".slotter")).length&&(e.attr("data-slotter-mode")&&(e.attr("data-original-slotter-mode",e.attr("data-slotter-mode")),e.attr("data-slotter-mode",a)),e.attr("data-slot-selector")))return e.attr("data-original-slot-selector",e.attr("data-slot-selector")),e.removeAttr("data-slot-selector")}}).call(this);