var yl=yl||{};yl.functions=yl.functions||{},yl.registerFunction=function(e,t){if(this.functions.hasOwnProperty(e))console.error('The DAL function "'+e+'" has already been registered.');else{if("function"!=typeof t)throw new Error("The custom DAL function must be a function.");this.functions[e]=t;t=new CustomEvent("dal-function-registered."+e,{detail:{name:e,func:t}});window.dispatchEvent(t)}},window.addEventListener("load",function(){window.django=window.django||{},django.hasOwnProperty("jQuery")||"undefined"===jQuery||(django.jQuery=jQuery),function($){$.fn.getFormPrefix=function(){var e,t=$(this).attr("name").split("-");for(e in t){var n=t.slice(0,-e).join("-");if(n.length)if($(":input[name^="+(n+="-")+"]").length)return n}return""},$.fn.getFormPrefixes=function(){var e=$(this).attr("name").split("-").slice(0,-1),t=[];for(i=0;ie?n[e]:null;return null!==e?r(e):null};return"multiple"===t?n.map(r):"exists"===t?0