text: /*
   * ssdConfirm jQuery plugin
   * Examples and documentation at: https://github.com/sebastiansulinski/ssd-confirm
   * Copyright (c) 2017 Sebastian Sulinski
   * Version: 1.0.3 (29-JAN-2017)
   * Licensed under the MIT.
   * Requires: jQuery v1.9 or later
   */
  !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";a.fn.ssdConfirm=function(b){var c=a.extend({dataType:"ssd-confirm-trigger",dataMessage:"ssd-confirm-message",dataUrl:"ssd-confirm-url",dataBehaviour:"ssd-confirm-behaviour",dataConfirmWrapper:"ssd-confirm",dataConfirmBlock:"ssd-confirm-block",dataConfirmContent:"ssd-confirm-content",dataButtonWrapper:"button-wrapper",dataButtonTrigger:"trigger",dataButtonProcessing:"processing",dataButtonYes:"ssd-confirm-yes",dataButtonNo:"ssd-confirm-no",dataRecordWrapper:"row",dataOverlay:"ssd-confirm-overlay",classActive:"active",classShow:"show",classHide:"hide",extendBlocks:{},extendBehaviours:{},actionProperties:function(a,b){return b}},b),d=a.extend({remove:function(b,d){g.showOverlay(),a("["+g.dataAttr(c.dataConfirmBlock)+'="remove"]').addClass(c.classShow).find("["+g.dataAttr(c.dataButtonYes)+"]").data("behaviour",d.behaviour).data("url",d.url).data("originator",b).addBack().find("["+g.dataAttr(c.dataConfirmContent)+"]").html(d.message),a("["+g.dataAttr(c.dataConfirmWrapper)+"]").addClass(c.classActive)}},c.extendBehaviours),e=a.extend({reload:function(a,b,c){window.location.reload(!0)},removeRow:function(b,d,e){g.hide(),e.originator.closest("["+g.dataAttr(c.dataRecordWrapper)+"]").fadeOut(200,function(){a(this).remove()})}},c.extendBehaviours),f={hasButtonSwap:function(a,b){return!g.isEmpty(a)&&!g.isEmpty(b)},showProcessing:function(a,b){this.hasButtonSwap(a,b)&&(a.addClass(c.classHide),b.removeClass(c.classHide))},hideProcessing:function(a,b){this.hasButtonSwap(a,b)&&(b.addClass(c.classHide),a.removeClass(c.classHide))},call:function(){a(document).on("click","["+g.dataAttr(c.dataButtonYes)+"]",function(b){g.prevent(b);var d=a(this),h=d.closest("["+g.dataAttr(c.dataButtonWrapper)+"]"),i={url:d.data("url"),behaviour:d.data("behaviour"),originator:d.data("originator"),processing:h.length>0?h.find("["+g.dataAttr(c.dataButtonProcessing)+"]"):null};i=c.actionProperties(d,i),f.showProcessing(d,i.processing),a.ajax({url:i.url,dataType:"json",success:function(a){e[i.behaviour](a,d,i)},error:function(a,b,c){throw f.hideProcessing(d,i.processing),new Error(c)}})})},init:function(){this.call()}},g={isEmpty:function(a){return"undefined"==typeof a||void 0===a||""===a||a===!1||null===a},prevent:function(a){a.preventDefault(),a.stopPropagation()},dataAttr:function(a){return"data-"+a},showOverlay:function(){a("["+g.dataAttr(c.dataOverlay)+"]").addClass(c.classShow)},hideOverlay:function(){a("["+g.dataAttr(c.dataOverlay)+"]").removeClass(c.classShow)},overlay:function(){a("["+g.dataAttr(c.dataOverlay)+"]").on("click",function(a){g.prevent(a),g.hide()})},hide:function(){a("[data-ssd-confirm]").removeClass(c.classActive).find("["+g.dataAttr(c.dataConfirmBlock)+"]").removeClass(c.classShow).find("["+g.dataAttr(c.dataButtonWrapper)+"] a, ["+g.dataAttr(c.dataButtonWrapper)+"] span").removeAttr("data-url").removeAttr("data-behaviour").removeAttr("data-originator").addBack().find("["+g.dataAttr(c.dataButtonProcessing)+"]").addClass(c.classHide).addBack().find("["+g.dataAttr(c.dataButtonTrigger)+"]").removeClass(c.classHide),this.hideOverlay()},buttonNo:function(){a("["+g.dataAttr(c.dataButtonNo)+"]").on("click",function(a){g.prevent(a),g.hide()})},hasMethod:function(a,b){return!g.isEmpty(a)&&b.hasOwnProperty(a)},trigger:function(b){b.each(function(){a(this).on("click",function(b){g.prevent(b);var e=a(this),f={type:e.data(c.dataType),url:e.data(c.dataUrl),message:e.data(c.dataMessage),behaviour:e.data(c.dataBehaviour)};g.hasMethod(f.type,d)&&d[f.type](e,f)})})},init:function(a){this.trigger(a),this.buttonNo(),this.overlay(),f.init()}};return g.init(this)}}()});