@atlassian/aui
Version:
Atlassian User Interface library
12 lines • 487 kB
JavaScript
/*!!
* @atlassian/aui - Atlassian User Interface library
* @version v9.5.1
* @link https://aui.atlassian.com
* @license Apache-2.0
* @author Atlassian Pty Ltd.
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define("@atlassian/aui",["jquery"],e):"object"==typeof exports?exports["@atlassian/aui"]=e(require("jquery")):t.AJS=e(t.jQuery)}(window,(function(t){return(()=>{var e={42:()=>{!function(t){function e(t){this.num=0,this.timer=t>0&&t}function i(i){if(t.isPlainObject(i.data)||t.isArray(i.data)||"string"==typeof i.data){var s,r=i.handler,a={timer:700,combo:[]};"string"==typeof(s=i.data)?a.combo=[s]:t.isArray(s)?a.combo=s:t.extend(a,s),a.combo=t.map(a.combo,(function(t){return t.toLowerCase()})),i.index=new e(a.timer),i.handler=function(e){if(this===e.target||!/textarea|select|input/i.test(e.target.nodeName)&&"true"!==t(e.target).prop("contenteditable")){var s="keypress"!==e.type?t.hotkeys.specialKeys[e.which]:null,o=String.fromCharCode(e.which).toLowerCase(),l="",c={};e.altKey&&"alt"!==s&&(l+="alt+"),e.ctrlKey&&"ctrl"!==s&&(l+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==s&&(l+="meta+"),e.shiftKey&&"shift"!==s&&(l+="shift+"),e.metaKey&&"["===o&&(o=null),s&&(c[l+s]=!0),o&&(c[l+o]=!0),/shift+/.test(l)&&(c[l.replace("shift+","")+t.hotkeys.shiftNums[s||o]]=!0);var u=i.index,d=a.combo;if(n(d[u.val()],c)){if(u.val()===d.length-1)return u.reset(),r.apply(this,arguments);u.inc()}else u.reset(),n(d[0],c)&&u.inc()}}}}function n(t,e){for(var i=t.split(" "),n=0,s=i.length;n<s;n++)if(e[i[n]])return!0;return!1}t.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",188:",",190:".",191:"/",224:"meta",219:"[",221:"]"},keypressKeys:["<",">","?"],shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"}},t.each(t.hotkeys.keypressKeys,(function(e,i){t.hotkeys.shiftNums[i]=i})),e.prototype.val=function(){return this.num},e.prototype.inc=function(){this.timer&&(clearTimeout(this.timeout),this.timeout=setTimeout(t.proxy(e.prototype.reset,this),this.timer)),this.num++},e.prototype.reset=function(){this.timer&&clearTimeout(this.timeout),this.num=0},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:i}}))}(jQuery)},529:()=>{jQuery.fn.moveTo=function(t){var e,i=jQuery.extend({transition:!1,scrollOffset:35},t),n=this,s=n.offset().top;if((jQuery(window).scrollTop()+jQuery(window).height()-this.outerHeight()<s||jQuery(window).scrollTop()+i.scrollOffset>s)&&jQuery(window).height()>i.scrollOffset){if(e=jQuery(window).scrollTop()+i.scrollOffset>s?s-(jQuery(window).height()-this.outerHeight())+i.scrollOffset:s-i.scrollOffset,!jQuery.fn.moveTo.animating&&i.transition)return jQuery(document).trigger("moveToStarted",this),jQuery.fn.moveTo.animating=!0,jQuery("html,body").animate({scrollTop:e},1e3,(function(){jQuery(document).trigger("moveToFinished",n),delete jQuery.fn.moveTo.animating})),this;var r=jQuery("html, body");return r.is(":animated")&&(r.stop(),delete jQuery.fn.moveTo.animating),jQuery(document).trigger("moveToStarted"),jQuery(window).scrollTop(e),setTimeout((function(){jQuery(document).trigger("moveToFinished",n)}),100),this}return jQuery(document).trigger("moveToFinished",this),this}},823:(t,e,i)=>{var n,s,r;r="object"==typeof self&&self.self===self&&self||"object"==typeof i.g&&i.g.global===i.g&&i.g,n=[i(303),i(472),e],void 0===(s=function(t,e,i){r.Backbone=function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION="1.4.1",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a,o=e.Events={},l=/\s+/,c=function(t,e,n,s,r){var a,o=0;if(n&&"object"==typeof n){void 0!==s&&"context"in r&&void 0===r.context&&(r.context=s);for(a=i.keys(n);o<a.length;o++)e=c(t,e,a[o],n[a[o]],r)}else if(n&&l.test(n))for(a=n.split(l);o<a.length;o++)e=t(e,a[o],s,r);else e=t(e,n,s,r);return e};o.on=function(t,e,i){return this._events=c(u,this._events||{},t,e,{context:i,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},o.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),r=this._listeningTo||(this._listeningTo={}),o=a=r[s];o||(this._listenId||(this._listenId=i.uniqueId("l")),o=a=r[s]=new m(this,t));var l=d(t,e,n,this);if(a=void 0,l)throw l;return o.interop&&o.on(e,n),this};var u=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),r=n.context,a=n.ctx,o=n.listening;o&&o.count++,s.push({callback:i,context:r,ctx:r||a,listening:o})}return t},d=function(t,e,i,n){try{t.on(e,i,n)}catch(t){return t}};o.off=function(t,e,i){return this._events?(this._events=c(h,this._events,t,e,{context:i,listeners:this._listeners}),this):this},o.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var r=t?[t._listenId]:i.keys(s),a=0;a<r.length;a++){var o=s[r[a]];if(!o)break;o.obj.off(e,n,this),o.interop&&o.off(e,n)}return i.isEmpty(s)&&(this._listeningTo=void 0),this};var h=function(t,e,n,s){if(t){var r,a=s.context,o=s.listeners,l=0;if(e||a||n){for(r=e?[e]:i.keys(t);l<r.length;l++){var c=t[e=r[l]];if(!c)break;for(var u=[],d=0;d<c.length;d++){var h=c[d];if(n&&n!==h.callback&&n!==h.callback._callback||a&&a!==h.context)u.push(h);else{var p=h.listening;p&&p.off(e,n)}}u.length?t[e]=u:delete t[e]}return t}for(r=i.keys(o);l<r.length;l++)o[r[l]].cleanup()}};o.once=function(t,e,i){var n=c(p,{},t,e,this.off.bind(this));return"string"==typeof t&&null==i&&(e=void 0),this.on(n,e,i)},o.listenToOnce=function(t,e,i){var n=c(p,{},e,i,this.stopListening.bind(this,t));return this.listenTo(t,n)};var p=function(t,e,n,s){if(n){var r=t[e]=i.once((function(){s(e,r),n.apply(this,arguments)}));r._callback=n}return t};o.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return c(f,this._events,t,void 0,i),this};var f=function(t,e,i,n){if(t){var s=t[e],r=t.all;s&&r&&(r=r.slice()),s&&g(s,n),r&&g(r,[e].concat(n))}return t},g=function(t,e){var i,n=-1,s=t.length,r=e[0],a=e[1],o=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a,o);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},m=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=o.on,m.prototype.off=function(t,e){var i;this.interop?(this._events=c(h,this._events,t,e,{context:void 0,listeners:void 0}),i=!this._events):(this.count--,i=0===this.count),i&&this.cleanup()},m.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},o.bind=o.on,o.unbind=o.off,i.extend(e,o);var v=e.Model=function(t,e){var n=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(v.prototype,o,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"==typeof t?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var r=n.unset,a=n.silent,o=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,d=this._previousAttributes;for(var h in s)e=s[h],i.isEqual(c[h],e)||o.push(h),i.isEqual(d[h],e)?delete u[h]:u[h]=e,r?delete c[h]:c[h]=e;if(this.idAttribute in s){var p=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,p,n)}if(!a){o.length&&(this._pending=n);for(var f=0;f<o.length;f++)this.trigger("change:"+o[f],this,c[o[f]],n)}if(l)return this;if(!a)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e,n=this._changing?this._previousAttributes:this.attributes,s={};for(var r in t){var a=t[r];i.isEqual(n[r],a)||(s[r]=a,e=!0)}return!!e&&s},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;if(!e.set(s,t))return!1;n&&n.call(t.context,e,i,t),e.trigger("sync",e,i,t)},K(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e;var r=(n=i.extend({validate:!0,parse:!0},n)).wait;if(s&&!r){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var a=this,o=n.success,l=this.attributes;n.success=function(t){a.attributes=l;var e=n.parse?a.parse(t,n):t;if(r&&(e=i.extend({},s,e)),e&&!a.set(e,n))return!1;o&&o.call(n.context,a,t,n),a.trigger("sync",a,t,n)},K(this,n),s&&r&&(this.attributes=i.extend({},l,s));var c=this.isNew()?"create":n.patch?"patch":"update";"patch"!==c||n.attrs||(n.attrs=s);var u=this.sync(c,this,n);return this.attributes=l,u},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,r=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&r(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var a=!1;return this.isNew()?i.defer(t.success):(K(this,t),a=this.sync("delete",this,t)),s||r(),a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||q();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var b=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},y={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},_=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),r=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<r;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+r+i]=s[n]};i.extend(b.prototype,o,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,w))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){(e=i.extend({},y,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var r,a,o=[],l=[],c=[],u=[],d={},h=e.add,p=e.merge,f=e.remove,g=!1,m=this.comparator&&null==s&&!1!==e.sort,v=i.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){r=t[a];var b=this.get(r);if(b){if(p&&r!==b){var w=this._isModel(r)?r.attributes:r;e.parse&&(w=b.parse(w,e)),b.set(w,e),c.push(b),m&&!g&&(g=b.hasChanged(v))}d[b.cid]||(d[b.cid]=!0,o.push(b)),t[a]=b}else h&&(r=t[a]=this._prepareModel(r,e))&&(l.push(r),this._addReference(r,e),d[r.cid]=!0,o.push(r))}if(f){for(a=0;a<this.length;a++)d[(r=this.models[a]).cid]||u.push(r);u.length&&this._removeModels(u,e)}var x=!1,C=!m&&h&&f;if(o.length&&C?(x=this.length!==o.length||i.some(this.models,(function(t,e){return t!==o[e]})),this.models.length=0,_(this.models,o,0),this.length=this.models.length):l.length&&(m&&(g=!0),_(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=s&&(e.index=s+a),(r=l[a]).trigger("add",r,this,e);(g||x)&&this.trigger("sort",this,e),(l.length||u.length||c.length)&&(e.changes={added:l,removed:u,merged:c},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return r.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=e.bind(this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=i.extend({parse:!0},t)).success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},K(this,t),this.sync("read",this,t)},create:function(t,e){var n=(e=e?i.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&s.add(t,i),r&&r.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new C(this,k)},keys:function(){return new C(this,T)},entries:function(){return new C(this,E)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?i.clone(e):{}).collection=this,(n=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,n.validationError,e),!1):n);var n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var r=this.indexOf(s);this.models.splice(r,1),this.length--,delete this._byId[s.cid];var a=this.modelId(s.attributes,s.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=r,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes,t.idAttribute);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"changeId"===t){var s=this.modelId(e.previousAttributes(),e.idAttribute),r=this.modelId(e.attributes,e.idAttribute);null!=s&&delete this._byId[s],null!=r&&(this._byId[r]=e)}}this.trigger.apply(this,arguments)}});var x="function"==typeof Symbol&&Symbol.iterator;x&&(b.prototype[x]=b.prototype.values);var C=function(t,e){this._collection=t,this._kind=e,this._index=0},k=1,T=2,E=3;x&&(C.prototype[x]=function(){return this}),C.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===k)t=e;else{var i=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===T?i:[i,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=e.View=function(t){this.cid=i.uniqueId("view"),this.preinitialize.apply(this,arguments),i.extend(this,i.pick(t,S)),this._ensureElement(),this.initialize.apply(this,arguments)},D=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];i.extend(A.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(D);this.delegate(s[1],s[2],n.bind(this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t.class=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var M=function(t,e,i,n){switch(e){case 1:return function(){return t[i](this[n])};case 2:return function(e){return t[i](this[n],e)};case 3:return function(e,s){return t[i](this[n],I(e,this),s)};case 4:return function(e,s,r){return t[i](this[n],I(e,this),s,r)};default:return function(){var e=r.call(arguments);return e.unshift(this[n]),t[i].apply(t,e)}}},N=function(t,e,n,s){i.each(n,(function(i,n){e[n]&&(t.prototype[n]=M(e,i,n,s))}))},I=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?O(t):i.isString(t)?function(e){return e.get(t)}:t},O=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},P={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},L={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};i.each([[b,P,"models"],[v,L,"attributes"]],(function(t){var e=t[0],n=t[1],s=t[2];e.mixin=function(t){var n=i.reduce(i.functions(t),(function(t,e){return t[e]=0,t}),{});N(e,t,n,s)},N(e,i,n,s)})),e.sync=function(t,n,s){var r=R[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:r,dataType:"json"};if(s.url||(a.url=i.result(n,"url")||q()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),s.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){a.type="POST",s.emulateJSON&&(a.data._method=r);var o=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",r),o)return o.apply(this,arguments)}}"GET"===a.type||s.emulateJSON||(a.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var c=s.xhr=e.ajax(i.extend(a,s));return n.trigger("request",n,c,s),c};var R={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var j=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},$=/\((.*?)\)/g,z=/(\(\?)?:\w+/g,F=/\*\w+/g,H=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(j.prototype,o,{preinitialize:function(){},initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var r=this;return e.history.route(t,(function(i){var a=r._extractParameters(t,i);!1!==r.execute(s,a,n)&&(r.trigger.apply(r,["route:"+n].concat(a)),r.trigger("route",n,a),e.history.trigger("route",r,n,a))})),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(H,"\\$&").replace($,"(?:$1)?").replace(z,(function(t,e){return e?t:"([^/?]+)"})).replace(F,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,(function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null}))}});var B=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},U=/^[#\/]|\s+$/g,W=/^\/+|\/+$/g,V=/#.*$/;B.started=!1,i.extend(B.prototype,o,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(U,"")},start:function(t){if(B.started)throw new Error("Backbone.history has already been started");if(B.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(W,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),B.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!B.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;t=t.replace(V,"");var s=this.decodeFragment(t);if(this.fragment!==s){if(this.fragment=s,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new B;var Y=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};v.extend=b.extend=j.extend=A.extend=B.extend=Y;var q=function(){throw new Error('A "url" property or function must be specified')},K=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}(r,i,t,e)}.apply(e,n))||(t.exports=s)},951:function(t){
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,i){return(e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,i)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(t,s,r){return(n=i()?Reflect.construct:function(t,i,n){var s=[null];s.push.apply(s,i);var r=new(Function.bind.apply(t,s));return n&&e(r,n.prototype),r}).apply(null,arguments)}function s(t){return r(t)||a(t)||o(t)||c()}function r(t){if(Array.isArray(t))return l(t)}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t,e){if(t){if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,d=Object.setPrototypeOf,h=Object.isFrozen,p=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,g=Object.freeze,m=Object.seal,v=Object.create,b="undefined"!=typeof Reflect&&Reflect,y=b.apply,w=b.construct;y||(y=function(t,e,i){return t.apply(e,i)}),g||(g=function(t){return t}),m||(m=function(t){return t}),w||(w=function(t,e){return n(t,s(e))});var _=N(Array.prototype.forEach),x=N(Array.prototype.pop),C=N(Array.prototype.push),k=N(String.prototype.toLowerCase),T=N(String.prototype.match),E=N(String.prototype.replace),A=N(String.prototype.indexOf),D=N(String.prototype.trim),S=N(RegExp.prototype.test),M=I(TypeError);function N(t){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return y(t,e,n)}}function I(t){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return w(t,i)}}function O(t,e,i){i=i||k,d&&d(t,null);for(var n=e.length;n--;){var s=e[n];if("string"==typeof s){var r=i(s);r!==s&&(h(e)||(e[n]=r),s=r)}t[s]=!0}return t}function P(t){var e,i=v(null);for(e in t)y(u,t,[e])&&(i[e]=t[e]);return i}function L(t,e){for(;null!==t;){var i=f(t,e);if(i){if(i.get)return N(i.get);if("function"==typeof i.value)return N(i.value)}t=p(t)}function n(t){return console.warn("fallback value for",t),null}return n}var R=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=g(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=g(["#text"]),U=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=g(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),q=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=m(/<%[\w\W]*|[\w\W]*%>/gm),Q=m(/^data-[\-\w.\u00B7-\uFFFF]/),G=m(/^aria-[\-\w]+$/),J=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=m(/^(?:\w+script|data):/i),X=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tt=m(/^html$/i),et=function(){return"undefined"==typeof window?null:window},it=function(e,i){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var n=null,s="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(s)&&(n=i.currentScript.getAttribute(s));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et(),i=function(t){return nt(t)};if(i.version="2.4.0",i.removed=[],!e||!e.document||9!==e.document.nodeType)return i.isSupported=!1,i;var n=e.document,r=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,d=e.NamedNodeMap,h=void 0===d?e.NamedNodeMap||e.MozNamedAttrMap:d,p=e.HTMLFormElement,f=e.DOMParser,m=e.trustedTypes,v=c.prototype,b=L(v,"cloneNode"),y=L(v,"nextSibling"),w=L(v,"childNodes"),N=L(v,"parentNode");if("function"==typeof o){var I=r.createElement("template");I.content&&I.content.ownerDocument&&(r=I.content.ownerDocument)}var st=it(m,n),rt=st?st.createHTML(""):"",at=r,ot=at.implementation,lt=at.createNodeIterator,ct=at.createDocumentFragment,ut=at.getElementsByTagName,dt=n.importNode,ht={};try{ht=P(r).documentMode?r.documentMode:{}}catch(t){}var pt={};i.isSupported="function"==typeof N&&ot&&void 0!==ot.createHTMLDocument&&9!==ht;var ft,gt,mt=q,vt=K,bt=Q,yt=G,wt=Z,_t=X,xt=J,Ct=null,kt=O({},[].concat(s(R),s(j),s($),s(F),s(B))),Tt=null,Et=O({},[].concat(s(U),s(W),s(V),s(Y))),At=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,St=null,Mt=!0,Nt=!0,It=!1,Ot=!1,Pt=!1,Lt=!1,Rt=!1,jt=!1,$t=!1,zt=!1,Ft=!0,Ht=!1,Bt="user-content-",Ut=!0,Wt=!1,Vt={},Yt=null,qt=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Kt=null,Qt=O({},["audio","video","img","source","image","track"]),Gt=null,Jt=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml",ee=te,ie=!1,ne=["application/xhtml+xml","text/html"],se="text/html",re=null,ae=r.createElement("form"),oe=function(t){return t instanceof RegExp||t instanceof Function},le=function(e){re&&re===e||(e&&"object"===t(e)||(e={}),e=P(e),ft=ft=-1===ne.indexOf(e.PARSER_MEDIA_TYPE)?se:e.PARSER_MEDIA_TYPE,gt="application/xhtml+xml"===ft?function(t){return t}:k,Ct="ALLOWED_TAGS"in e?O({},e.ALLOWED_TAGS,gt):kt,Tt="ALLOWED_ATTR"in e?O({},e.ALLOWED_ATTR,gt):Et,Gt="ADD_URI_SAFE_ATTR"in e?O(P(Jt),e.ADD_URI_SAFE_ATTR,gt):Jt,Kt="ADD_DATA_URI_TAGS"in e?O(P(Qt),e.ADD_DATA_URI_TAGS,gt):Qt,Yt="FORBID_CONTENTS"in e?O({},e.FORBID_CONTENTS,gt):qt,Dt="FORBID_TAGS"in e?O({},e.FORBID_TAGS,gt):{},St="FORBID_ATTR"in e?O({},e.FORBID_ATTR,gt):{},Vt="USE_PROFILES"in e&&e.USE_PROFILES,Mt=!1!==e.ALLOW_ARIA_ATTR,Nt=!1!==e.ALLOW_DATA_ATTR,It=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=e.SAFE_FOR_TEMPLATES||!1,Pt=e.WHOLE_DOCUMENT||!1,jt=e.RETURN_DOM||!1,$t=e.RETURN_DOM_FRAGMENT||!1,zt=e.RETURN_TRUSTED_TYPE||!1,Rt=e.FORCE_BODY||!1,Ft=!1!==e.SANITIZE_DOM,Ht=e.SANITIZE_NAMED_PROPS||!1,Ut=!1!==e.KEEP_CONTENT,Wt=e.IN_PLACE||!1,xt=e.ALLOWED_URI_REGEXP||xt,ee=e.NAMESPACE||te,e.CUSTOM_ELEMENT_HANDLING&&oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(At.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(At.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(At.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(Nt=!1),$t&&(jt=!0),Vt&&(Ct=O({},s(B)),Tt=[],!0===Vt.html&&(O(Ct,R),O(Tt,U)),!0===Vt.svg&&(O(Ct,j),O(Tt,W),O(Tt,Y)),!0===Vt.svgFilters&&(O(Ct,$),O(Tt,W),O(Tt,Y)),!0===Vt.mathMl&&(O(Ct,F),O(Tt,V),O(Tt,Y))),e.ADD_TAGS&&(Ct===kt&&(Ct=P(Ct)),O(Ct,e.ADD_TAGS,gt)),e.ADD_ATTR&&(Tt===Et&&(Tt=P(Tt)),O(Tt,e.ADD_ATTR,gt)),e.ADD_URI_SAFE_ATTR&&O(Gt,e.ADD_URI_SAFE_ATTR,gt),e.FORBID_CONTENTS&&(Yt===qt&&(Yt=P(Yt)),O(Yt,e.FORBID_CONTENTS,gt)),Ut&&(Ct["#text"]=!0),Pt&&O(Ct,["html","head","body"]),Ct.table&&(O(Ct,["tbody"]),delete Dt.tbody),g&&g(e),re=e)},ce=O({},["mi","mo","mn","ms","mtext"]),ue=O({},["foreignobject","desc","title","annotation-xml"]),de=O({},["title","style","font","a","script"]),he=O({},j);O(he,$),O(he,z);var pe=O({},F);O(pe,H);var fe=function(t){var e=N(t);e&&e.tagName||(e={namespaceURI:te,tagName:"template"});var i=k(t.tagName),n=k(e.tagName);return t.namespaceURI===Xt?e.namespaceURI===te?"svg"===i:e.namespaceURI===Zt?"svg"===i&&("annotation-xml"===n||ce[n]):Boolean(he[i]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===i:e.namespaceURI===Xt?"math"===i&&ue[n]:Boolean(pe[i]):t.namespaceURI===te&&!(e.namespaceURI===Xt&&!ue[n])&&!(e.namespaceURI===Zt&&!ce[n])&&!pe[i]&&(de[i]||!he[i])},ge=function(t){C(i.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=rt}catch(e){t.remove()}}},me=function(t,e){try{C(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){C(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Tt[t])if(jt||$t)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ve=function(t){var e,i;if(Rt)t="<remove></remove>"+t;else{var n=T(t,/^[\r\n\t ]+/);i=n&&n[0]}"application/xhtml+xml"===ft&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var s=st?st.createHTML(t):t;if(ee===te)try{e=(new f).parseFromString(s,ft)}catch(t){}if(!e||!e.documentElement){e=ot.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ie?"":s}catch(t){}}var a=e.body||e.documentElement;return t&&i&&a.insertBefore(r.createTextNode(i),a.childNodes[0]||null),ee===te?ut.call(e,Pt?"html":"body")[0]:Pt?e.documentElement:a},be=function(t){return lt.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ye=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},we=function(e){return"object"===t(l)?e instanceof l:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},_e=function(t,e,n){pt[t]&&_(pt[t],(function(t){t.call(i,e,n,re)}))},xe=function(t){var e;if(_e("beforeSanitizeElements",t,null),ye(t))return ge(t),!0;if(S(/[\u0080-\uFFFF]/,t.nodeName))return ge(t),!0;var n=gt(t.nodeName);if(_e("uponSanitizeElement",t,{tagName:n,allowedTags:Ct}),t.hasChildNodes()&&!we(t.firstElementChild)&&(!we(t.content)||!we(t.content.firstElementChild))&&S(/<[/\w]/g,t.innerHTML)&&S(/<[/\w]/g,t.textContent))return ge(t),!0;if("select"===n&&S(/<template/i,t.innerHTML))return ge(t),!0;if(!Ct[n]||Dt[n]){if(!Dt[n]&&ke(n)){if(At.tagNameCheck instanceof RegExp&&S(At.tagNameCheck,n))return!1;if(At.tagNameCheck instanceof Function&&At.tagNameCheck(n))return!1}if(Ut&&!Yt[n]){var s=N(t)||t.parentNode,r=w(t)||t.childNodes;if(r&&s)for(var a=r.length-1;a>=0;--a)s.insertBefore(b(r[a],!0),y(t))}return ge(t),!0}return t instanceof c&&!fe(t)?(ge(t),!0):"noscript"!==n&&"noembed"!==n||!S(/<\/no(script|embed)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,e=E(e,mt," "),e=E(e,vt," "),t.textContent!==e&&(C(i.removed,{element:t.cloneNode()}),t.textContent=e)),_e("afterSanitizeElements",t,null),!1):(ge(t),!0)},Ce=function(t,e,i){if(Ft&&("id"===e||"name"===e)&&(i in r||i in ae))return!1;if(Nt&&!St[e]&&S(bt,e));else if(Mt&&S(yt,e));else if(!Tt[e]||St[e]){if(!(ke(t)&&(At.tagNameCheck instanceof RegExp&&S(At.tagNameCheck,t)||At.tagNameCheck instanceof Function&&At.tagNameCheck(t))&&(At.attributeNameCheck instanceof RegExp&&S(At.attributeNameCheck,e)||At.attributeNameCheck instanceof Function&&At.attributeNameCheck(e))||"is"===e&&At.allowCustomizedBuiltInElements&&(At.tagNameCheck instanceof RegExp&&S(At.tagNameCheck,i)||At.tagNameCheck instanceof Function&&At.tagNameCheck(i))))return!1}else if(Gt[e]);else if(S(xt,E(i,_t,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==A(i,"data:")||!Kt[t])if(It&&!S(wt,E(i,_t,"")));else if(i)return!1;return!0},ke=function(t){return t.indexOf("-")>0},Te=function(e){var n,s,r,a;_e("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt};for(a=o.length;a--;){var c=n=o[a],u=c.name,d=c.namespaceURI;if(s="value"===u?n.value:D(n.value),r=gt(u),l.attrName=r,l.attrValue=s,l.keepAttr=!0,l.forceKeepAttr=void 0,_e("uponSanitizeAttribute",e,l),s=l.attrValue,!l.forceKeepAttr&&(me(u,e),l.keepAttr))if(S(/\/>/i,s))me(u,e);else{Ot&&(s=E(s,mt," "),s=E(s,vt," "));var h=gt(e.nodeName);if(Ce(h,r,s)){if(!Ht||"id"!==r&&"name"!==r||(me(u,e),s=Bt+s),st&&"object"===t(m)&&"function"==typeof m.getAttributeType)if(d);else switch(m.getAttributeType(h,r)){case"TrustedHTML":s=st.createHTML(s);break;case"TrustedScriptURL":s=st.createScriptURL(s)}try{d?e.setAttributeNS(d,u,s):e.setAttribute(u,s),x(i.removed)}catch(t){}}}}_e("afterSanitizeAttributes",e,null)}},Ee=function t(e){var i,n=be(e);for(_e("beforeSanitizeShadowDOM",e,null);i=n.nextNode();)_e("uponSanitizeShadowNode",i,null),xe(i)||(i.content instanceof a&&t(i.content),Te(i));_e("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(s){var r,o,c,u,d,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ie=!s)&&(s="\x3c!--\x3e"),"string"!=typeof s&&!we(s)){if("function"!=typeof s.toString)throw M("toString is not a function");if("string"!=typeof(s=s.toString()))throw M("dirty is not a string, aborting")}if(!i.isSupported){if("object"===t(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof s)return e.toStaticHTML(s);if(we(s))return e.toStaticHTML(s.outerHTML)}return s}if(Lt||le(h),i.removed=[],"string"==typeof s&&(Wt=!1),Wt){if(s.nodeName){var p=gt(s.nodeName);if(!Ct[p]||Dt[p])throw M("root node is forbidden and cannot be sanitized in-place")}}else if(s instanceof l)1===(o=(r=ve("\x3c!----\x3e")).ownerDocument.importNode(s,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!jt&&!Ot&&!Pt&&-1===s.indexOf("<"))return st&&zt?st.createHTML(s):s;if(!(r=ve(s)))return jt?null:zt?rt:""}r&&Rt&&ge(r.firstChild);for(var f=be(Wt?s:r);c=f.nextNode();)3===c.nodeType&&c===u||xe(c)||(c.content instanceof a&&Ee(c.content),Te(c),u=c);if(u=null,Wt)return s;if(jt){if($t)for(d=ct.call(r.ownerDocument);r.firstChild;)d.appendChild(r.firstChild);else d=r;return Tt.shadowroot&&(d=dt.call(n,d,!0)),d}var g=Pt?r.outerHTML:r.innerHTML;return Pt&&Ct["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&S(tt,r.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+g),Ot&&(g=E(g,mt," "),g=E(g,vt," ")),st&&zt?st.createHTML(g):g},i.setConfig=function(t){le(t),Lt=!0},i.clearConfig=function(){re=null,Lt=!1},i.isValidAttribute=function(t,e,i){re||le({});var n=gt(t),s=gt(e);return Ce(n,s,i)},i.addHook=function(t,e){"function"==typeof e&&(pt[t]=pt[t]||[],C(pt[t],e))},i.removeHook=function(t){if(pt[t])return x(pt[t])},i.removeHooks=function(t){pt[t]&&(pt[t]=[])},i.removeAllHooks=function(){pt={}},i}return nt()}()},726:function(t,e,i){var n,s,r;
/*! jQuery Fancy File Input plugin - v2.0.4 - 2018-11-23
* Copyright (c) 2018 Atlassian Pty Ltd; Licensed Apache-2.0 */void 0===(r=this)&&void 0!==window&&(r=window),n=[i(472)],void 0===(s=function(t){return r.FancyFileInput=function(t){"use strict";var e=/^.*[\\\/]/,i=/\{0\}/gi,n=function(){var t=3,e=document.createElement("div"),i=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(i[0]);return t>4?t:document.documentMode}();function s(e,i){var n=t(e).data("FancyFileInput");if(n)return n;i=t.extend({},s.defaults,i),this.el=e,this.$el=t(e),this.$label=this.createLabel(i.buttonText),this._addLabelText(),this.$clearButton=t("<button>",{text:this.$label.attr("data-ffi-clearButtonText")||i.clearButtonText,class:"ff