/*! DataTables Editor v2.1.3 * * ©2012-2023 SpryMedia Ltd, all rights reserved. * License: editor.datatables.net/license */ !function(i){var n,s;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return i(t,window,document)}):"object"==typeof exports?(n=require("jquery"),s=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||n(t),s(t,e),i(e,t,t.document)}:(s(window,n),module.exports=i(n,window,window.document))):i(jQuery,window,document)}(function(w,c,y,E){"use strict";var r=w.fn.dataTable,t={buttons:!0,drawType:!1,focus:0,message:!0,nest:!1,onBackground:"blur",onBlur:"close",onComplete:"close",onEsc:"close",onFieldError:"focus",onReturn:"submit",scope:"row",submit:"all",submitHtml:"▶",submitTrigger:null,title:!0},N={actionName:"action",ajax:null,display:"lightbox",events:{},fields:[],formOptions:{bubble:w.extend({},t,{buttons:"_basic",message:!1,submit:"changed",title:!1}),inline:w.extend({},t,{buttons:!1,submit:"changed"}),main:w.extend({},t)},i18n:{close:"Close",create:{button:"New",submit:"Create",title:"Create new entry"},datetime:{amPm:["am","pm"],hours:"Hour",minutes:"Minute",months:["January","February","March","April","May","June","July","August","September","October","November","December"],next:"Next",previous:"Previous",seconds:"Second",unknown:"-",weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},edit:{button:"Edit",submit:"Update",title:"Edit entry"},error:{system:'A system error has occurred (More information).'},multi:{info:"The selected items contain different values for this input. To edit and set all items for this input to the same value, click or tap here, otherwise they will retain their individual values.",noMulti:"This input can be edited individually, but not part of a group.",restore:"Undo changes",title:"Multiple values"},remove:{button:"Delete",confirm:{1:"Are you sure you wish to delete 1 row?",_:"Are you sure you wish to delete %d rows?"},submit:"Delete",title:"Delete"}},idSrc:"DT_RowId",table:null},B={action:null,actionName:"action",ajax:null,bubbleNodes:[],bubbleBottom:!1,closeCb:null,closeIcb:null,dataSource:null,displayController:null,displayed:!1,editCount:0,editData:{},editFields:{},editOpts:{},fields:{},formOptions:{bubble:w.extend({},t),inline:w.extend({},t),main:w.extend({},t)},globalError:"",id:-1,idSrc:null,includeFields:[],mode:null,modifier:null,opts:null,order:[],processing:!1,setFocus:null,table:null,template:null,unique:0},e=w.fn.dataTable.ext.oApi;function L(t){var e,i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e);return i}function a(t,e){return w('*[data-dte-e="'+t+'"]',e=e===E?y:e)}function f(t,e){return void 0===e&&(e="#"),"string"==typeof t?e+t.replace(/(:|\.|\[|\]|,)/g,"\\$1"):e+t}function u(t){return e._fnGetObjectDataFn(t)}function _(t){return e._fnSetObjectDataFn(t)}var d=e._fnExtend;function p(t,i){var n=[];return w.each(t,function(t,e){n.push(e[i])}),n}function M(t,e){if("object"!=typeof t||"object"!=typeof e)return t==e;var i=L(t),n=L(e);if(i.length!==n.length)return!1;for(var s=0,o=i.length;s'),n=[],s=[],o={},r=e.table(E).body(),a=0,l=e.columns(":visible").count();a").appendTo(i),c=W(e,this.s.fields,d,!0),d=e.settings()[0].aoColumns[d].sClass;d&&u.addClass(d),Object.keys(c).length&&(n.push(Object.keys(c)),s.push(u[0]),w.extend(o,c))}function f(){0===e.page.info().recordsDisplay&&w(r).empty(),i["end"===t?"appendTo":"prependTo"](r)}return this.__dtFakeRow=i,f(),e.on("draw.dte-createInline",function(){f()}),{0:{attach:s,attachFields:n,displayFields:o,fields:this.s.fields,type:"row"}}},fakeRowEnd:function(){var t=h(this.s.table);t.off("draw.dte-createInline"),this.__dtFakeRow.remove(),this.__dtFakeRow=null,0===t.page.info().recordsDisplay&&t.draw(!1)},fields:function(t){var e,i,n,s,o,r=u(this.s.idSrc),a=h(this.s.table),l=this.s.fields,d={};return!w.isPlainObject(t)||t.rows===E&&t.columns===E&&t.cells===E?q(d,a,t,l,r):(t.rows!==E&&q(d,a,t.rows,l,r),t.columns!==E&&(e=d,i=a,n=t.columns,s=l,o=r,i.cells(null,n).indexes().each(function(t){H(e,i,t,s,o)})),t.cells!==E&&H(d,a,t.cells,l,r)),d},id:function(t){return u(this.s.idSrc)(t)},individual:function(t,e){var i,n=u(this.s.idSrc),s=h(this.s.table),o=this.s.fields,r={};return e&&(Array.isArray(e)||(e=[e]),i={},w.each(e,function(t,e){i[e]=o[e]})),H(r,s,t,o,n,i),r},prep:function(t,e,i,n,s){var o,r=this;"create"===t&&(s.rowIds=w.map(n.data,function(t){return m.id.call(r,t)})),"edit"===t?(o=n.cancelled||[],s.rowIds=w.map(i.data,function(t,e){return w.isEmptyObject(i.data[e])||-1!==w.inArray(e,o)?E:e})):"remove"===t&&(s.cancelled=n.cancelled||[])},refresh:function(){h(this.s.table).ajax.reload(null,!1)},remove:function(t,e,i){var n,s=this,o=h(this.s.table),r=i.cancelled;(0===r.length?o.rows(t):(n=[],o.rows(t).every(function(){var t=m.id.call(s,this.data());-1===w.inArray(t,r)&&n.push(this.index())}),o.rows(n))).remove()}};function z(t){if("keyless"===t)return w(y);var e=w('[data-editor-id="'+t+'"]');if(0===(e=0===e.length?w("string"==typeof t?f(t):t):e).length)throw new Error("Could not find an element with `data-editor-id` or `id` of: "+t);return e}function G(t,e){t=z(t);return w('[data-editor-field="'+e+'"]',t)}function J(n,t,s){w.each(t,function(t,e){var i=e.valFromData(s);i!==E&&((e=G(n,e.dataSrc())).filter("[data-editor-value]").length?e.attr("data-editor-value",i):e.each(function(){for(;this.childNodes.length;)this.removeChild(this.firstChild)}).html(i))})}var l={create:function(t,e){if(e){var i=l.id.call(this,e);try{z(i).length&&J(i,t,e)}catch(t){}}},edit:function(t,e,i){J(l.id.call(this,i)||"keyless",e,i)},fields:function(s){var t={};if(Array.isArray(s))for(var e=0,i=s.length;e
')[0],close:w('
')[0],content:null,wrapper:w('
')[0]};function Q(t){var e=w("div.DTE_Header",b.wrapper).outerHeight(),i=w("div.DTE_Footer",b.wrapper).outerHeight(),e=w(c).height()-2*g.conf.windowPadding-e-i;return w("div.DTE_Body_Content",b.wrapper).css("maxHeight",e),w(t.dom.wrapper).outerHeight()}function Z(t,e){e=e||function(){},v&&(w(b.content).animate({top:-(b.content.offsetHeight+50)},600,function(){w([b.wrapper,b.background]).fadeOut("normal",function(){w(this).detach(),e()})}),v=!1)}function K(e,t){var i,n,s,o,r;t=t||function(){},w("body").append(b.background).append(b.wrapper),b.content.style.height="auto",v||((i=b.wrapper.style).opacity="0",i.display="block",n=Q(e),s=e,o=g.conf.attach,r=new w.fn.dataTable.Api(s.s.table),r=(o="head"===o||"create"===s.s.action?r.table(E).header():r.row(s.s.modifier).node()).offsetWidth,i.display="none",i.opacity="1",b.wrapper.style.width=r+"px",b.wrapper.style.marginLeft=-r/2+"px",b.wrapper.style.top=w(o).offset().top+o.offsetHeight+"px",b.content.style.top=-1*n-20+"px",b.background.style.opacity="0",b.background.style.display="block",w(b.background).animate({opacity:$},"normal"),w(b.wrapper).fadeIn(),w(b.content).animate({top:0},600,t)),w(b.close).attr("title",e.i18n.close).off("click.DTED_Envelope").on("click.DTED_Envelope",function(t){e.close()}),w(b.background).off("click.DTED_Envelope").on("click.DTED_Envelope",function(t){e.background()}),w("div.DTED_Lightbox_Content_Wrapper",b.wrapper).off("click.DTED_Envelope").on("click.DTED_Envelope",function(t){w(t.target).hasClass("DTED_Envelope_Content_Wrapper")&&e.background()}),w(c).off("resize.DTED_Envelope").on("resize.DTED_Envelope",function(){Q(e)}),v=!0}var g={close:function(t,e){Z(0,e)},conf:{attach:"row",windowPadding:50},destroy:function(t){Z()},init:function(t){return b.content=w("div.DTED_Envelope_Container",b.wrapper)[0],$=w(b.background).css("opacity"),g},node:function(t){return b.wrapper[0]},open:function(t,e,i){w(b.content).children().detach(),b.content.appendChild(e),b.content.appendChild(b.close),K(t,i)}};function Y(){return void 0!==c.orientation&&c.outerWidth<=576}var o=!1,tt=!1,et=0,T={background:w('
'),close:w('
'),content:null,wrapper:w('
')};function it(){var t=w("div.DTE_Header",T.wrapper).outerHeight()+w("div.DTE_Footer",T.wrapper).outerHeight();Y()?w("div.DTE_Body_Content",T.wrapper).css("maxHeight","calc(100vh - "+t+"px)"):(t=w(c).height()-2*D.conf.windowPadding-t,w("div.DTE_Body_Content",T.wrapper).css("maxHeight",t))}function nt(t,e){e=e||function(){},w("body").scrollTop(et),t._animate(T.wrapper,{opacity:0,top:D.conf.offsetAni},function(){w(this).detach(),e()}),t._animate(T.background,{opacity:0},function(){w(this).detach()}),o=!1,w(c).off("resize.DTED_Lightbox")}var D={close:function(t,e){nt(t,e)},conf:{offsetAni:25,windowPadding:25},destroy:function(t){o&&nt(t)},init:function(t){return tt||(T.content=w("div.DTED_Lightbox_Content",T.wrapper),T.wrapper.css("opacity",0),T.background.css("opacity",0),tt=!0),D},node:function(t){return T.wrapper[0]},open:function(t,e,i){var n,s=T.content;s.children().detach(),s.append(e).append(T.close),n=t,s=i,Y()&&w("body").addClass("DTED_Lightbox_Mobile"),w("body").append(T.background).append(T.wrapper),it(),o||(o=!0,T.content.css("height","auto"),T.wrapper.css({top:-D.conf.offsetAni}),n._animate(T.wrapper,{opacity:1,top:0},s),n._animate(T.background,{opacity:1}),w(c).on("resize.DTED_Lightbox",function(){it()}),et=w("body").scrollTop()),T.close.attr("title",n.i18n.close).off("click.DTED_Lightbox").on("click.DTED_Lightbox",function(t){n.close()}),T.background.off("click.DTED_Lightbox").on("click.DTED_Lightbox",function(t){t.stopImmediatePropagation(),n.background()}),w("div.DTED_Lightbox_Content_Wrapper",T.wrapper).off("click.DTED_Lightbox").on("click.DTED_Lightbox",function(t){w(t.target).hasClass("DTED_Lightbox_Content_Wrapper")&&(t.stopImmediatePropagation(),n.background())})}},st=w.fn.dataTable;function ot(t,e,i){if(void 0===i&&(i=!0),Array.isArray(t)){e!==E&&t.reverse();for(var n=0,s=t;n
'),n=w('
'),t=(a&&(n.appendTo("body"),i.appendTo("body")),n.children().eq(0)),s=t.children(),o=s.children(),r=(t.append(u.dom.formError),s.prepend(u.dom.form),l.message&&t.prepend(u.dom.formInfo),l.title&&t.prepend(u.dom.header),l.buttons&&s.append(u.dom.buttons),w().add(n).add(i));u._closeReg(function(t){u._animate(r,{opacity:0},function(){this===n[0]&&(r.detach(),w(c).off("resize."+e+" scroll."+e),u._clearDynamicInfo(),u._event("closed",["bubble"]))})}),i.on("click",function(){u.blur()}),o.on("click",function(){u._close()}),u.bubblePosition(),u._postopen("bubble",!1);u._animate(r,{opacity:1},function(){this===n[0]&&(u._focus(u.s.includeFields,l.focus),u._event("opened",["bubble",u.s.action]))})})),this}function ut(){var t=w("div.DTE_Bubble"),e=w("div.DTE_Bubble_Liner"),i=this.s.bubbleNodes,n={bottom:0,left:0,right:0,top:0},i=(w.each(i,function(t,e){var i=w(e).offset();e=w(e).get(0),n.top+=i.top,n.left+=i.left,n.right+=i.left+e.offsetWidth,n.bottom+=i.top+e.offsetHeight}),n.top/=i.length,n.left/=i.length,n.right/=i.length,n.bottom/=i.length,n.top),s=(n.left+n.right)/2,o=e.outerWidth(),r=e.outerHeight(),a=s-o/2,o=a+o,l=w(c).width(),d=w(c).scrollTop(),s=(t.css({left:s,top:this.s.bubbleBottom?n.bottom:i}),this.s.bubbleBottom&&t.addClass("below"),t.position());return e.length&&s.top+r>d+c.innerHeight?(t.css("top",i).removeClass("below"),this.s.bubbleBottom=!1):e.length&&s.top-r",{class:o.classes.form.button+(e.className?" "+e.className:"")}).html("function"==typeof i?i(o):i||"").attr("tabindex",e.tabIndex!==E?e.tabIndex:0).attr(s).on("keyup",function(t){13===t.which&&n&&n.call(o)}).on("keypress",function(t){13===t.which&&t.preventDefault()}).on("click",function(t){t.preventDefault(),n&&n.call(o,t)}).appendTo(o.dom.buttons)}),this}function ft(t){var i=this,e=this.s.fields;return"string"==typeof t?(i.field(t).destroy(),delete e[t],e=w.inArray(t,this.s.order),this.s.order.splice(e,1),-1!==(e=w.inArray(t,this.s.includeFields))&&this.s.includeFields.splice(e,1)):w.each(this._fieldNames(t),function(t,e){i.clear(e)}),this}function pt(){return this._close(!1),this}function ht(t,e,i,n){var s=this,o=this,r=this.s.fields,a=1;if(!this._tidy(function(){o.create(t,e,i,n)})){"number"==typeof t&&(a=t,t=e,e=i),this.s.editFields={};for(var l=0;lUploading file"),u.onload=function(t){var e,i=new FormData;if(i.append("action","upload"),i.append("uploadField",r.name),i.append("upload",a[c]),r.ajaxData&&r.ajaxData(i,a[c],c),r.ajax?e=r.ajax:w.isPlainObject(o.s.ajax)?e=o.s.ajax.upload||o.s.ajax:"string"==typeof o.s.ajax&&(e=o.s.ajax),!e)throw new Error("No Ajax option specified for upload plug-in");if("function"==typeof(e="string"==typeof e?{url:e}:e).data){var n={},s=e.data(n);w.each(n=s!==E&&"string"!=typeof s?s:n,function(t,e){i.append(t,e)})}else if(w.isPlainObject(e.data))throw new Error("Upload feature cannot use `ajax.data` with an object. Please use it as a function instead.");o._event("preUpload",[r.name,a[c],i],function(t){var s;!1===t?c
')),m.find("div."+o.liner.replace(/ /g,".")).append(h.field.node()).append(this.dom.formError),n=h.field.node(),e.buttons&&m.find("div."+o.buttons.replace(/ /g,".")).append(this.dom.buttons)}var b=this._inputTrigger("submit",e,n),_=this._inputTrigger("cancel",e,n);this._closeReg(function(t,e){return s=!0,w(y).off("click"+c),t&&"edit"===e||l.forEach(function(t){t.node.contents().detach(),t.node.append(t.children)}),b(),_(),a._clearDynamicInfo(),i&&i(),"inline"}),setTimeout(function(){var o,r;s||(o=w.fn.addBack?"addBack":"andSelf",w(y).on("mousedown"+c,function(t){r=t.target}).on("keydown"+c,function(t){r=t.target}).on("click"+c,function(t){for(var e=!1,i=0,n=l;i")),this._event("submitUnsuccessful",[t]),l&&l.call(this,t)}else{var m={};if(!t.data||"create"!==s&&"edit"!==s)"remove"===s&&(this._dataSource("prep",s,p,n,t,m),this._event("preRemove",[t,this.ids()]),this._dataSource("remove",p,c,m),this._event(["remove","postRemove"],[t,this.ids()]),this._dataSource("commit",s,p,t.data,m));else{this._dataSource("prep",s,p,n,t,m);for(var v=0,b=t.data;v
');return e._input=r,e._enabled=!0,e.id&&r.find("input[type=file]").attr("id",P.safeId(e.id)),e.attr&&r.find("input[type=file]").attr(e.attr),He(e),c.FileReader&&!1!==e.dragDrop?(r.find("div.drop span").text(e.dragDropText||"Drag and drop a file here to upload"),(s=r.find("div.drop")).on("drop",function(t){return e._enabled&&(P.upload(i,e,t.originalEvent.dataTransfer.files,He,n),s.removeClass("over")),!1}).on("dragleave dragexit",function(t){return e._enabled&&s.removeClass("over"),!1}).on("dragover",function(t){return e._enabled&&s.addClass("over"),!1}),i.on("open",function(){w("body").on("dragover.DTE_Upload drop.DTE_Upload",function(t){return!1})}).on("close",function(){w("body").off("dragover.DTE_Upload drop.DTE_Upload")})):(r.addClass("noDrop"),r.append(r.find("div.rendered"))),r.find("div.clearValue button").on("click",function(t){t.preventDefault(),e._enabled&&Qe.set.call(i,e,"")}),r.find("input[type=file]").on("input",function(){P.upload(i,e,this.files,He,function(t,e){e||n.call(i,t),r.find("input[type=file]")[0].value=""})}),r}function C(t){setTimeout(function(){t.trigger("change",{editor:!0,editorSet:!0})},0)}var i=w.extend(!0,{},Ve,{canReturnSubmit:function(t,e){return!0},disable:function(t){t._input.prop("disabled",!0)},enable:function(t){t._input.prop("disabled",!1)},get:function(t){return t._input.val()},set:function(t,e){t._input.val(e),C(t._input)}}),We={create:function(t){return t._input=w(""),t._val=t.value,null},get:function(t){return t._val},set:function(t,e){var i=t._val;t._val=e,t._input.val(e),i!==e&&C(t._input)}},ze=w.extend(!0,{},i,{create:function(t){return t._input=w("").attr(w.extend({id:P.safeId(t.id),readonly:"readonly",type:"text"},t.attr||{})),t._input[0]}}),Ge=w.extend(!0,{},i,{create:function(t){return t._input=w("").attr(w.extend({id:P.safeId(t.id),type:"text"},t.attr||{})),t._input[0]}}),Je=w.extend(!0,{},i,{create:function(t){return t._input=w("").attr(w.extend({id:P.safeId(t.id),type:"password"},t.attr||{})),t._input[0]}}),Xe=w.extend(!0,{},i,{canReturnSubmit:function(t,e){return!1},create:function(t){return t._input=w("").attr(w.extend({id:P.safeId(t.id)},t.attr||{})),t._input[0]}}),n=w.extend(!0,{},i,{_addOptions:function(t,e,i){var n,s=t._input[0].options,o=0;(i=void 0===i?!1:i)?o=s.length:(s.length=0,t.placeholder!==E&&(i=t.placeholderValue!==E?t.placeholderValue:"",o+=1,s[0]=new Option(t.placeholder,i),n=t.placeholderDisabled===E||t.placeholderDisabled,s[0].hidden=n,s[0].disabled=n,s[0]._editor_val=i)),e&&P.pairs(e,t.optionsPair,function(t,e,i,n){e=new Option(e,t);e._editor_val=t,n&&w(e).attr(n),s[i+o]=e})},create:function(i){return i._input=w("").attr(w.extend({id:P.safeId(i.id),multiple:!0===i.multiple},i.attr||{})).on("change.dte",function(t,e){e&&e.editor||(i._lastSet=n.get(i))}),n._addOptions(i,i.options||i.ipOpts),i._input[0]},destroy:function(t){t._input.off("change.dte")},get:function(t){var e=t._input.find("option:selected").map(function(){return this._editor_val}).toArray();return t.multiple?t.separator?e.join(t.separator):e:e.length?e[0]:null},set:function(t,e,i){i||(t._lastSet=e),t.multiple&&t.separator&&!Array.isArray(e)?e="string"==typeof e?e.split(t.separator):[]:Array.isArray(e)||(e=[e]);var n,s,o=e.length,r=!1,a=t._input.find("option");return t._input.find("option").each(function(){for(s=!1,n=0;n"),w("input:last",o).attr("value",t)[0]._editor_val=t,n&&w("input:last",o).attr(n)})},create:function(t){return t._input=w("
"),s._addOptions(t,t.options||t.ipOpts),t._input[0]},disable:function(t){t._input.find("input").prop("disabled",!0)},enable:function(t){t._input.find("input").prop("disabled",!1)},get:function(t){var e=[],i=t._input.find("input:checked");return i.length?i.each(function(){e.push(this._editor_val)}):t.unselectedValue!==E&&e.push(t.unselectedValue),t.separator===E||null===t.separator?e:e.join(t.separator)},set:function(t,e){var i,n,s=t._input.find("input"),o=(Array.isArray(e)||"string"!=typeof e?Array.isArray(e)||(e=[e]):e=e.split(t.separator||"|"),e.length);s.each(function(){for(n=!1,i=0;i"),w("input:last",o).attr("value",t)[0]._editor_val=t,n&&w("input:last",o).attr(n)})},create:function(t){return t._input=w("
"),k._addOptions(t,t.options||t.ipOpts),this.on("open",function(){t._input.find("input").each(function(){this._preChecked&&(this.checked=!0)})}),t._input[0]},disable:function(t){t._input.find("input").prop("disabled",!0)},enable:function(t){t._input.find("input").prop("disabled",!1)},get:function(t){var e=t._input.find("input:checked");return e.length?e[0]._editor_val:t.unselectedValue!==E?t.unselectedValue:E},set:function(t,e){t._input.find("input").each(function(){this._preChecked=!1,this._editor_val==e?(this.checked=!0,this._preChecked=!0):(this.checked=!1,this._preChecked=!1)}),C(t._input.find("input:checked"))},update:function(t,e,i){var n=k.get(t),e=(k._addOptions(t,e,i),t._input.find("input"));k.set(t,e.filter('[value="'+n+'"]').length?n:e.eq(0).attr("value"))}}),$e=w.extend(!0,{},i,{create:function(t){return t._input=w("").attr(w.extend(!0,{id:P.safeId(t.id),type:"text"},t.attr)),x.DateTime||P.error("DateTime library is required",15),t.momentLocale&&!t.opts.locale&&(t.opts.locale=t.momentLocale),t.momentStrict&&!t.opts.strict&&(t.opts.strict=t.momentStrict),t._picker=new x.DateTime(t._input,w.extend({format:t.displayFormat||t.format,i18n:this.i18n.datetime},t.opts)),!(t._closeFn=function(){t._picker.hide()})===t.keyInput&&t._input.on("keydown",function(t){t.preventDefault()}),this.on("close",t._closeFn),t._input[0]},destroy:function(t){this.off("close",t._closeFn),t._input.off("keydown"),t._picker.destroy()},errorMessage:function(t,e){t._picker.errorMsg(e)},get:function(t){return t.wireFormat?t._picker.valFormat(t.wireFormat):t._input.val()},maxDate:function(t,e){t._picker.max(e)},minDate:function(t,e){t._picker.min(e)},owns:function(t,e){return t._picker.owns(e)},set:function(t,e){"string"==typeof e&&e&&0!==e.indexOf("--")&&t.wireFormat?t._picker.valFormat(t.wireFormat,e):t._picker.val(e),C(t._input)}}),Qe=w.extend(!0,{},i,{canReturnSubmit:function(t,e){return!1},create:function(e){var i=this;return qe(i,e,function(t){Qe.set.call(i,e,t[0]),i._event("postUpload",[e.name,t[0]])})},disable:function(t){t._input.find("input").prop("disabled",!0),t._enabled=!1},enable:function(t){t._input.find("input").prop("disabled",!1),t._enabled=!0},get:function(t){return t._val},set:function(t,e){t._val=e,t._input.val("");var i=t._input,n=(t.display&&(n=i.find("div.rendered"),t._val?n.html(t.display(t._val)):n.empty().append(""+(t.noFileText||"No file")+"")),i.find("div.clearValue button"));e&&t.clearText?(n.html(t.clearText),i.removeClass("noClear")):i.addClass("noClear"),t._input.find("input").triggerHandler("upload.editor",[t._val])}}),F=w.extend(!0,{},i,{_showHide:function(t){t.limit&&(t._container.find("div.limitHide").css("display",t._val.length>=t.limit?"none":"block"),t._limitLeft=t.limit-t._val.length)},canReturnSubmit:function(t,e){return!1},create:function(e){var i=this,t=qe(i,e,function(t){e._val=e._val.concat(t),F.set.call(i,e,e._val),i._event("postUpload",[e.name,e._val])},!0);return t.addClass("multi").on("click","button.remove",function(t){t.stopPropagation(),e._enabled&&(t=w(this).data("idx"),e._val.splice(t,1),F.set.call(i,e,e._val))}),e._container=t},disable:function(t){t._input.find("input").prop("disabled",!0),t._enabled=!1},enable:function(t){t._input.find("input").prop("disabled",!1),t._enabled=!0},get:function(t){return t._val},set:function(i,t){if(t=t||[],!Array.isArray(t))throw new Error("Upload collections must have an array as a value");i._val=t,i._input.val("");var n,s=this,e=i._input;i.display&&(e=e.find("div.rendered").empty(),t.length?(n=w("
    ").appendTo(e),w.each(t,function(t,e){e=i.display(e,t);null!==e&&n.append("
  • "+e+'
  • ')})):e.append(""+(i.noFileText||"No files")+"")),F._showHide(i),i._input.find("input").triggerHandler("upload.editor",[i._val])}}),A=w.extend(!0,{},i,{_addOptions:function(t,e,i){t=t.dt;(i=void 0===i?!1:i)||t.clear(),t.rows.add(e).draw()},_jumpToFirst:function(t,e){function i(){var t=s.row({order:"applied",selected:!0}).node();t&&r.height()-10<(t=w(t).position().top)&&r.scrollTop(t)}var n,s=t.dt,t=s.row({order:"applied",selected:!0}).index(),o=0,r=("number"==typeof t&&(n=s.page.info().length,t=s.rows({order:"applied"}).indexes().indexOf(t),o=0")),t=w("
    ").append(n),s=w('
    '),l=(r.footer&&w("").append(Array.isArray(r.footer)?w("").append(w.map(r.footer,function(t){return w("").html(t)})):r.footer).appendTo(n),n.addClass(A.tableClass).width("100%").on("init.dt",function(t,e){var i;e.nTable===n[0]&&(e=new x.Api(e),i=w(e.table(E).container()),x.select.init(e),s.append(i.find("div.dataTables_filter")).append(i.find("div.dt-buttons")).append(i.find("div.dataTables_info")))}).DataTable(w.extend({buttons:[],columns:[{data:r.optionsPair.label,title:"Label"}],deferRender:!0,dom:"fiBtp",language:{paginate:{next:">",previous:"<"},search:"",searchPlaceholder:"Search"},lengthChange:!1,select:{style:r.multiple?"os":"single"}},r.config)));return this.on("open",function(){l.search()&&l.search("").draw(),l.columns.adjust()}),l.on("user-select",function(){C(w(r.dt.table().container()))}),r.editor&&(r.editor.table(l),r.editor.on("submitComplete",function(t,e,i,n){if("create"===n)for(var s=0,o=e.data;s").replace(/</g,"<").replace(/&/g,"&").replace(/"/g,'"').replace(/£/g,"£").replace(/�?39;/g,"'").replace(/�?10;/g,"\n")}this.s.multiValue=!1;var n=this.s.opts.entityDecode;if(n===E||!0===n)if(Array.isArray(t))for(var s=0,o=t.length;s
    '+s.title+''+s.info+'
    '+s.restore+'
    '+o.message+'
    '+o.fieldInfo+'
    '),t=this._typeFn("create",o),i=null;t&&t.side&&(i=t.side,t=t.input),null!==t?a("input-control",r).prepend(t):r.css("display","none"),this.dom={container:r,fieldError:a("msg-error",r),fieldInfo:a("msg-info",r),fieldMessage:a("msg-message",r),inputControl:a("input-control",r),label:a("label",r).append(i),labelInfo:a("msg-label",r),multi:a("multi-value",r),multiInfo:a("multi-info",r),multiReturn:a("msg-multi",r),processing:a("field-processing",r)},this.dom.multi.on("click",function(){n.s.opts.multiEditable&&!r.hasClass(e.disabled)&&"readonly"!==o.type&&(n.val(""),n.focus())}),this.dom.multiReturn.on("click",function(){n.multiRestore()}),w.each(this.s.type,function(e,t){"function"==typeof t&&n[e]===E&&(n[e]=function(){var t=Array.prototype.slice.call(arguments),t=(t.unshift(e),n._typeFn.apply(n,t));return t===E?n:t})})}var Ke={action:null,className:null,tabIndex:0,text:null},Ye={close:function(){},init:function(){},node:function(){},open:function(){}},S=w.fn.dataTable.Api.register;function I(t){t=t.context[0];return t.oInit.editor||t._editor}function j(t,e,i,n){return(e=e||{}).buttons===E&&(e.buttons="_basic"),e.title===E&&(e.title=t.i18n[i].title),e.message===E&&("remove"===i?(t=t.i18n[i].confirm,e.message=1!==n?t._.replace(/%d/,n):t[1]):e.message=""),e}S("editor()",function(){return I(this)}),S("row.create()",function(t){var e=I(this);return e.create(j(e,t,"create")),this}),S("row().edit()",function(t){var e=I(this);return e.edit(this[0][0],j(e,t,"edit")),this}),S("rows().edit()",function(t){var e=I(this);return e.edit(this[0],j(e,t,"edit")),this}),S("row().delete()",function(t){var e=I(this);return e.remove(this[0][0],j(e,t,"remove",1)),this}),S("rows().delete()",function(t){var e=I(this);return e.remove(this[0],j(e,t,"remove",this[0].length)),this}),S("cell().edit()",function(t,e){return t?w.isPlainObject(t)&&(e=t,t="inline"):t="inline",I(this)[t](this[0][0],e),this}),S("cells().edit()",function(t){return I(this).bubble(this[0],t),this}),S("file()",kt),S("files()",Ft),w(y).on("xhr.dt",function(t,e,i){"dt"===t.namespace&&i&&i.files&&w.each(i.files,function(t,e){P.files[t]||(P.files[t]={}),w.extend(P.files[t],e)})});var P,S=w.fn.dataTable.ext.buttons;if(w.extend(S,{create:{action:function(t,e,i,n){var s=this,o=n.editor;this.processing(!0),o.one("preOpen",function(){s.processing(!1)}).create(w.extend({buttons:n.formButtons,message:n.formMessage||o.i18n.create.message,nest:!0,title:n.formTitle||o.i18n.create.title},n.formOptions))},className:"buttons-create",editor:null,formButtons:{action:function(t){this.submit()},text:function(t){return t.i18n.create.submit}},formMessage:null,formOptions:{},formTitle:null,text:function(t,e,i){return t.i18n("buttons.create",i.editor.i18n.create.button)}},createInline:{action:function(t,e,i,n){n.editor.inlineCreate(n.position,n.formOptions)},className:"buttons-create",editor:null,formButtons:{action:function(t){this.submit()},text:function(t){return t.i18n.create.submit}},formOptions:{},position:"start",text:function(t,e,i){return t.i18n("buttons.create",i.editor.i18n.create.button)}},edit:{action:function(t,e,i,n){var s=this,o=n.editor,r=e.rows({selected:!0}).indexes(),a=e.columns({selected:!0}).indexes(),e=e.cells({selected:!0}).indexes(),e=a.length||e.length?{cells:e,columns:a,rows:r}:r;this.processing(!0),o.one("preOpen",function(){s.processing(!1)}).edit(e,w.extend({buttons:n.formButtons,message:n.formMessage||o.i18n.edit.message,nest:!0,title:n.formTitle||o.i18n.edit.title},n.formOptions))},className:"buttons-edit",editor:null,extend:"selected",formButtons:{action:function(t){this.submit()},text:function(t){return t.i18n.edit.submit}},formMessage:null,formOptions:{},formTitle:null,text:function(t,e,i){return t.i18n("buttons.edit",i.editor.i18n.edit.button)}},remove:{action:function(t,e,i,n){var s=this,o=n.editor;this.processing(!0),o.one("preOpen",function(){s.processing(!1)}).remove(e.rows({selected:!0}).indexes(),w.extend({buttons:n.formButtons,message:n.formMessage,nest:!0,title:n.formTitle||o.i18n.remove.title},n.formOptions))},className:"buttons-remove",editor:null,extend:"selected",formButtons:{action:function(t){this.submit()},text:function(t){return t.i18n.remove.submit}},formMessage:function(t,e){e=e.rows({selected:!0}).indexes(),t=t.i18n.remove;return("string"==typeof t.confirm?t.confirm:t.confirm[e.length]||t.confirm._).replace(/%d/g,e.length)},formOptions:{},formTitle:null,limitTo:["rows"],text:function(t,e,i){return t.i18n("buttons.remove",i.editor.i18n.remove.button)}}}),S.editSingle=w.extend({},S.edit),S.editSingle.extend="selectedSingle",S.removeSingle=w.extend({},S.remove),S.removeSingle.extend="selectedSingle",r&&r.versionCheck&&r.versionCheck("1.10.20"))return R.prototype.internalEvent=function(t,e){this._event(t,e)},R.prototype.internalI18n=function(){return this.i18n},R.prototype.internalMultiInfo=function(){return this._multiInfo()},R.prototype.internalSettings=function(){return this.s},R.fieldTypes={checkbox:s,datatable:A,datetime:$e,hidden:We,password:Je,radio:k,readonly:ze,select:n,text:Ge,textarea:Xe,upload:Qe,uploadMany:F},R.files={},R.version="2.1.3",R.classes=X,R.Field=i,R.DateTime=null,R.error=te,R.pairs=ee,R.factory=ne,R.upload=ie,R.defaults=N,R.models={button:Ke,displayController:Ye,fieldType:Ve,formOptions:t,settings:B},R.dataSources={dataTable:m,html:l},R.display={envelope:g,lightbox:D},R.safeId=function(t){return void 0===(e="")&&(e="#"),"string"==typeof(t=t)?e+t.replace(/\./g,"-"):e+t;var e},P=R,r.Editor=P,w.fn.DataTable.Editor=P,r.DateTime&&(P.DateTime=r.DateTime),r.ext.editorFields&&w.extend(P.fieldTypes,r.ext.editorFields),r.ext.editorFields=P.fieldTypes,P;throw new Error("Editor requires DataTables 1.10.20 or newer");function R(t,e){var s=this;if(this.add=ot,this.ajax=rt,this.background=at,this.blur=lt,this.bubble=dt,this.bubblePosition=ut,this.buttons=ct,this.clear=ft,this.close=pt,this.create=ht,this.undependent=mt,this.dependent=vt,this.destroy=bt,this.disable=_t,this.display=yt,this.displayed=gt,this.displayNode=wt,this.edit=Et,this.enable=Tt,this.error=Dt,this.field=xt,this.fields=Ct,this.file=kt,this.files=Ft,this.get=At,this.hide=Ot,this.ids=St,this.inError=It,this.inline=jt,this.inlineCreate=Pt,this.message=Rt,this.mode=Nt,this.modifier=Bt,this.multiGet=Lt,this.multiSet=Mt,this.node=Ut,this.off=Vt,this.on=Ht,this.one=qt,this.open=Wt,this.order=zt,this.remove=Gt,this.set=Jt,this.show=Xt,this.submit=$t,this.table=Qt,this.template=Zt,this.title=Kt,this.val=Yt,this._actionClass=re,this._ajax=ae,this._animate=le,this._assembleMain=de,this._blur=ue,this._clearDynamicInfo=ce,this._close=fe,this._closeReg=pe,this._crudArgs=he,this._dataSource=me,this._displayReorder=ve,this._edit=be,this._event=_e,this._eventName=ye,this._fieldFromNode=ge,this._fieldNames=we,this._focus=Ee,this._formOptions=Te,this._inline=De,this._inputTrigger=xe,this._optionsUpdate=Ce,this._message=ke,this._multiInfo=Fe,this._nestedClose=Ae,this._nestedOpen=Oe,this._postopen=Se,this._preopen=Ie,this._processing=je,this._noProcessing=Pe,this._submit=Re,this._submitTable=Ne,this._submitSuccess=Be,this._submitError=Le,this._tidy=Me,this._weakInArray=Ue,R.factory(t,e))return R;this instanceof R||alert("DataTables Editor must be initialised as a 'new' instance"),t=w.extend(!0,{},R.defaults,t),this.c=t,this.s=w.extend(!0,{},R.models.settings,{actionName:t.actionName,ajax:t.ajax,formOptions:t.formOptions,idSrc:t.idSrc,table:t.domTable||t.table,template:t.template?w(t.template).detach():null}),this.classes=w.extend(!0,{},R.classes),this.i18n=t.i18n,R.models.settings.unique++;var n=this,e=this.classes,i=w('
    '),o=w('
    ');if(this.dom={body:a("body",i)[0],bodyContent:a("body_content",i)[0],buttons:w('
    ')[0],footer:a("foot",i)[0],form:o[0],formContent:a("form_content",o)[0],formError:w('
    ')[0],formInfo:w('
    ')[0],header:w('
    ')[0],processing:a("processing",i)[0],wrapper:i[0]},w.each(t.events,function(t,i){n.on(t,function(){for(var t=[],e=0;e