mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-19 20:52:32 -04:00
38 lines
210 KiB
JavaScript
38 lines
210 KiB
JavaScript
|
|
var Hogan={};!function(t){function l(t,n,e){var i;return n&&"object"==typeof n&&(void 0!==n[t]?i=n[t]:e&&n.get&&"function"==typeof n.get&&(i=n.get(t))),i}t.Template=function(t,n,e,i){this.r=(t=t||{}).code||this.r,this.c=e,this.options=i||{},this.text=n||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,n,e){return""},v:function(t){return t=o(t),a.test(t)?t.replace(n,"&").replace(e,"<").replace(i,">").replace(r,"'").replace(s,"""):t},t:o,render:function(t,n,e){return this.ri([t],n||{},e)},ri:function(t,n,e){return this.r(t,n,e)},ep:function(t,n){var e=this.partials[t],i=n[e.name];if(e.instance&&e.base==i)return e.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[t].base=i,e.subs){for(key in n.stackText||(n.stackText={}),e.subs)n.stackText[key]||(n.stackText[key]=void 0!==this.activeSub&&n.stackText[this.activeSub]?n.stackText[this.activeSub]:this.text);i=function(t,n,e,i,r,s){function a(){}function o(){}o.prototype=(a.prototype=t).subs;var u,c=new a;for(u in c.subs=new o,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=s,n)i[u]||(i[u]=n[u]);for(u in i)c.subs[u]=i[u];for(u in r=r||{},c.stackPartials=r,e)r[u]||(r[u]=e[u]);for(u in r)c.partials[u]=r[u];return c}(i,e.subs,e.partials,this.stackSubs,this.stackPartials,n.stackText)}return this.partials[t].instance=i},rp:function(t,n,e,i){t=this.ep(t,e);return t?t.ri(n,e,i):""},rs:function(t,n,e){var i=t[t.length-1];if(f(i))for(var r=0;r<i.length;r++)t.push(i[r]),e(t,n,this),t.pop();else e(t,n,this)},s:function(t,n,e,i,r,s,a){return(!f(t)||0!==t.length)&&(e=!!(t="function"==typeof t?this.ms(t,n,e,i,r,s,a):t),!i&&e&&n&&n.push("object"==typeof t?t:n[n.length-1]),e)},d:function(t,n,e,i){var r,s=t.split("."),a=this.f(s[0],n,e,i),o=this.options.modelGet,u=null;if("."===t&&f(n[n.length-2]))a=n[n.length-1];else for(var c=1;c<s.length;c++)a=void 0!==(r=l(s[c],a,o))?(u=a,r):"";return!(i&&!a)&&(i||"function"!=typeof a||(n.push(u),a=this.mv(a,n,e),n.pop()),a)},f:function(t,n,e,i){for(var r=!1,s=!1,a=this.options.modelGet,o=n.length-1;0<=o;o--)if(void 0!==(r=l(t,n[o],a))){s=!0;break}return s?i||"function"!=typeof r?r:this.mv(r,n,e):!i&&""},ls:function(t,n,e,i,r){var s=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(o(t.call(n,i)),n,e)),this.options.delimiters=s,!1},ct:function(t,n,e){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(n,e)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,n,e,i,r,s,a){n=n[n.length-1],t=t.call(n);return"function"==typeof t?!!i||(i=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(t,n,e,i.substring(r,s),a)):t},mv:function(t,n,e){n=n[n.length-1],t=t.call(n);return"function"==typeof t?this.ct(o(t.call(n)),n,e):t},sub:function(t,n,e,i){var r=this.subs[t];r&&(this.activeSub=t,r(n,e,this,i),this.activeSub=!1)}};var n=/&/g,e=/</g,i=/>/g,r=/\'/g,s=/\"/g,a=/[&<>\"\']/;function o(t){return String(null==t?"":t)}var f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}("undefined"!=typeof exports?exports:Hogan),function(x){var w=/\S/,n=/\"/g,e=/\n/g,i=/\r/g,r=/\\/g,s=/\u2028/,a=/\u2029/;function k(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function y(t,n,e){if(n.charAt(e)==t.charAt(0)){for(var i=1,r=t.length;i<r;i++)if(n.charAt(e+i)!=t.charAt(i))return;return 1}}x.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},x.scan=function(t,n){var e,i,r,s,a,o=t.length,u=0,c=null,l="",f=[],h=!1,p=0,g=0,b="{{",d="}}";function v(){0<l.length&&(f.push({tag:"_t",text:new String(l)}),l="")}function m(t,n){if(v(),t&&function(){for(var t=!0,n=g;n<f.length;n++)if(!(t=x.tags[f[n].tag]<x.tags._v||"_t"==f[n].tag&&null===f[n].text.match(w)))return;return t}())for(var e,i=g;i<f.length;i++)f[i].text&&((e=f[i+1])&&">"==e.tag&&(e.indent=f[i].text.toString()
|
|||
|
|
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,R){"use strict";function v(e){return"function"==typeof e&&"number"!=typeof e.nodeType}function g(e){return null!=e&&e===e.window}var t=[],M=Object.getPrototypeOf,s=t.slice,I=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},W=t.push,F=t.indexOf,B={},$=B.toString,_=B.hasOwnProperty,z=_.toString,U=z.call(Object),y={},C=T.document,X={type:!0,src:!0,nonce:!0,noModule:!0};function V(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in X)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function h(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?B[$.call(e)]||"object":typeof e}var e="3.5.0",E=function(e,t){return new E.fn.init(e,t)};function G(e){var t=!!e&&"length"in e&&e.length,n=h(e);return!v(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}E.fn=E.prototype={jquery:e,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){e=E.merge(this.constructor(),e);return e.prevObject=this,e},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:W,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o=arguments[0]||{},a=1,s=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[a]||{},a++),"object"==typeof o||v(o)||(o={}),a===s&&(o=this,a--);a<s;a++)if(null!=(e=arguments[a]))for(t in e)n=e[t],"__proto__"!==t&&o!==n&&(u&&n&&(E.isPlainObject(n)||(r=Array.isArray(n)))?(i=o[t],i=r&&!Array.isArray(i)?[]:r||E.isPlainObject(i)?i:{},r=!1,o[t]=E.extend(u,i,n)):void 0!==n&&(o[t]=n));return o},E.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==$.call(e)||(e=M(e))&&("function"!=typeof(e=_.call(e,"constructor")&&e.constructor)||z.call(e)!==U))},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){V(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(G(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){t=t||[];return null!=e&&(G(Object(e))?E.merge(t,"string"==typeof e?[e]:e):W.call(t,e)),t},inArray:function(e,t,n){return null==t?-1:F.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(G(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return I(a)},guid:1,support:y}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){B["[object "+t+"]"]=t.toLowerCase()});function r(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r}function Y(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var e=function(R){function f(e,t){return e="0x"+e.slice(1)-65536,t||(e<0?String.from
|
|||
|
|
!function r(n,s,t){function a(o,e){if(!s[o]){if(!n[o]){var i="function"==typeof require&&require;if(!e&&i)return i(o,!0);if(d)return d(o,!0);e=new Error("Cannot find module '"+o+"'");throw e.code="MODULE_NOT_FOUND",e}i=s[o]={exports:{}};n[o][0].call(i.exports,function(e){var i=n[o][1][e];return a(i||e)},i,i.exports,r,n,s,t)}return s[o].exports}for(var d="function"==typeof require&&require,e=0;e<t.length;e++)a(t[e]);return a}({1:[function(e,i,o){!function(e){void 0!==i&&i.exports?i.exports=e():"function"==typeof define&&define.amd?define(e):this.bowser=e()}(function(){function e(i){function e(e){e=i.match(e);return e&&1<e.length&&e[1]||""}var o,r=e(/(ipod|iphone|ipad)/i).toLowerCase(),n=!/like android/i.test(i)&&/android/i.test(i),s=/CrOS/.test(i),t=e(/edge\/(\d+(\.\d+)?)/i),a=e(/version\/(\d+(\.\d+)?)/i),d=/tablet/i.test(i),m=!d&&/[^-]mobi/i.test(i),t=(/opera|opr/i.test(i)?o={name:"Opera",opera:f,version:a||e(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(i)?o={name:"Yandex Browser",yandexbrowser:f,version:a||e(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(i)?(o={name:"Windows Phone",windowsphone:f},t?(o.msedge=f,o.version=t):(o.msie=f,o.version=e(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(i)?o={name:"Internet Explorer",msie:f,version:e(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:s?o={name:"Chrome",chromeBook:f,chrome:f,version:e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(i)?o={name:"Microsoft Edge",msedge:f,version:t}:/chrome|crios|crmo/i.test(i)?o={name:"Chrome",chrome:f,version:e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:r?(o={name:"iphone"==r?"iPhone":"ipad"==r?"iPad":"iPod"},a&&(o.version=a)):/sailfish/i.test(i)?o={name:"Sailfish",sailfish:f,version:e(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(i)?o={name:"SeaMonkey",seamonkey:f,version:e(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(i)?(o={name:"Firefox",firefox:f,version:e(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(i)&&(o.firefoxos=f)):/silk/i.test(i)?o={name:"Amazon Silk",silk:f,version:e(/silk\/(\d+(\.\d+)?)/i)}:n?o={name:"Android",version:a}:/phantom/i.test(i)?o={name:"PhantomJS",phantom:f,version:e(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(i)||/rim\stablet/i.test(i)?o={name:"BlackBerry",blackberry:f,version:a||e(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(i)?(o={name:"WebOS",webos:f,version:a||e(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(i)&&(o.touchpad=f)):o=/bada/i.test(i)?{name:"Bada",bada:f,version:e(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(i)?{name:"Tizen",tizen:f,version:e(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||a}:/safari/i.test(i)?{name:"Safari",safari:f,version:a}:{name:e(/^(.*)\/(.*) /),version:(s=/^(.*)\/(.*) /,(s=i.match(s))&&1<s.length&&s[2]||"")},!o.msedge&&/(apple)?webkit/i.test(i)?(o.name=o.name||"Webkit",o.webkit=f,!o.version&&a&&(o.version=a)):!o.opera&&/gecko\//i.test(i)&&(o.name=o.name||"Gecko",o.gecko=f,o.version=o.version||e(/gecko\/(\d+(\.\d+)?)/i)),o.msedge||!n&&!o.silk?r&&(o[r]=f,o.ios=f):o.android=f,""),s=(o.windowsphone?t=e(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):r?t=(t=e(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):n?t=e(/android[ \/-](\d+(\.\d+)*)/i):o.webos?t=e(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?t=e(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?t=e(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(t=e(/tizen[\/\s](\d+(\.\d+)*)/i)),t&&(o.osversion=t),t.split(".")[0]);return d||"ipad"==r||n&&(3==s||4==s&&!m)||o.silk?o.tablet=f:(m||"iphone"==r||"ipod"==r||n||o.blackberry||o.webos||o.bada)&&(o.mobile=f),o.msedge||o.msie&&10<=o.version||o.yandexbrowser&&15<=o.version||o.chrome&&20<=o.version||o.firefox&&20<=o.version||o.safari&&6<=o.version||o.opera&&10<=o.version||o.ios&&o.osversion&&6<=o.osversion.split(".")[0]||o.blackberry&&10.1<=o.version?o.a=f:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6?o.c=f:o.x=f,o}var f=!0,r=e("undefined"!=typeof navigator?naviga
|
|||
|
|
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?t(require("jquery")):t(jQuery)}(function(l){l.timeago=function(t){return t instanceof Date?o(t):o("string"==typeof t?l.timeago.parse(t):"number"==typeof t?new Date(t):l.timeago.datetime(t))};var i=l.timeago,a=(l.extend(l.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,autoDispose:!0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(i){if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var a=this.settings.strings,t=a.prefixAgo,e=a.suffixAgo;if(this.settings.allowFuture&&i<0&&(t=a.prefixFromNow,e=a.suffixFromNow),!this.settings.allowPast&&0<=i)return this.settings.strings.inPast;var n=Math.abs(i)/1e3,o=n/60,r=o/60,s=r/24,u=s/365;function m(t,e){t=l.isFunction(t)?t(e,i):t,e=a.numbers&&a.numbers[e]||e;return t.replace(/%d/i,e)}n=n<45&&m(a.seconds,Math.round(n))||n<90&&m(a.minute,1)||o<45&&m(a.minutes,Math.round(o))||o<90&&m(a.hour,1)||r<24&&m(a.hours,Math.round(r))||r<42&&m(a.day,1)||s<30&&m(a.days,Math.round(s))||s<45&&m(a.month,1)||s<365&&m(a.months,Math.round(s/30))||u<1.5&&m(a.year,1)||m(a.years,Math.round(u)),o=a.wordSeparator||"";return void 0===a.wordSeparator&&(o=" "),l.trim([t,n,e].join(o))},parse:function(t){t=l.trim(t);return t=(t=(t=(t=(t=t.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2")).replace(/([\+\-]\d\d)$/," $100"),new Date(t)},datetime:function(t){t=i.isTime(t)?l(t).attr("datetime"):l(t).attr("title");return i.parse(t)},isTime:function(t){return"time"===l(t).get(0).tagName.toLowerCase()}}),{init:function(){a.dispose.call(this);var t=l.proxy(n,this),e=(t(),i.settings);0<e.refreshMillis&&(this._timeagoInterval=setInterval(t,e.refreshMillis))},update:function(t){t=t instanceof Date?t:i.parse(t);l(this).data("timeago",{datetime:t}),i.settings.localeTitle&&l(this).attr("title",t.toLocaleString()),n.apply(this)},updateFromDOM:function(){l(this).data("timeago",{datetime:i.parse(i.isTime(this)?l(this).attr("datetime"):l(this).attr("title"))}),n.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}});function n(){var t=i.settings;if(t.autoDispose&&!l.contains(document.documentElement,this))return l(this).timeago("dispose"),this;var e=function(t){{var e;(t=l(t)).data("timeago")||(t.data("timeago",{datetime:i.datetime(t)}),e=l.trim(t.text()),i.settings.localeTitle?t.attr("title",t.data("timeago").datetime.toLocaleString()):!(0<e.length)||i.isTime(t)&&t.attr("title")||t.attr("title",e))}return t.data("timeago")}(this);return isNaN(e.datetime)||(0===t.cutoff||Math.abs(r(e.datetime))<t.cutoff?l(this).text(o(e.datetime)):0<l(this).attr("title").length&&l(this).text(l(this).attr("title"))),this}function o(t){return i.inWords(r(t))}function r(t){return(new Date).getTime()-t.getTime()}l.fn.timeago=function(t,e){var i=t?a[t]:a.init;if(i)return this.each(function(){i.call(this,e)}),this;throw new Error("Unknown function name '"+t+"' for timeago")},document.createElement("abbr"),document.createElement("time")});
|
|||
|
|
!function(){var l=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],p="undefined"!=typeof window,h=p&&null!=window.mozInnerScreenX;function e(e,t,o){if(!p)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var o=o&&o.debug||!1,n=(!o||(n=document.querySelector("#input-textarea-caret-position-mirror-div"))&&n.parentNode.removeChild(n),document.createElement("div")),i=(n.id="input-textarea-caret-position-mirror-div",document.body.appendChild(n),n.style),r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,d="INPUT"===e.nodeName,a=(i.whiteSpace="pre-wrap",d||(i.wordWrap="break-word"),i.position="absolute",o||(i.visibility="hidden"),l.forEach(function(e){d&&"lineHeight"===e?i.lineHeight=r.height:i[e]=r[e]}),h?e.scrollHeight>parseInt(r.height)&&(i.overflowY="scroll"):i.overflow="hidden",n.textContent=e.value.substring(0,t),d&&(n.textContent=n.textContent.replace(/\s/g," ")),document.createElement("span")),e=(a.textContent=e.value.substring(t)||".",n.appendChild(a),{top:a.offsetTop+parseInt(r.borderTopWidth),left:a.offsetLeft+parseInt(r.borderLeftWidth),height:parseInt(r.lineHeight)});return o?a.style.backgroundColor="#aaa":document.body.removeChild(n),e}"undefined"!=typeof module&&void 0!==module.exports?module.exports=e:p&&(window.getCaretCoordinates=e)}();
|
|||
|
|
!function(e,M){"use strict";var I=Math.pow(2,-24),i=Math.pow(2,32),w=Math.pow(2,53);var r={encode:function(e){var f,a=new ArrayBuffer(256),o=new DataView(a),s=0;function c(e){for(var r=a.byteLength,t=s+e;r<t;)r*=2;if(r!==a.byteLength)for(var n=o,i=(a=new ArrayBuffer(r),o=new DataView(a),s+3>>2),u=0;u<i;++u)o.setUint32(4*u,n.getUint32(4*u));return f=e,o}function h(){s+=f}function l(e){h(c(1).setUint8(s,e))}function g(e){for(var r=c(e.length),t=0;t<e.length;++t)r.setUint8(s+t,e[t]);h()}function v(e,r){var t,n;r<24?l(e<<5|r):r<256?(l(e<<5|24),l(r)):r<65536?(l(e<<5|25),n=r,h(c(2).setUint16(s,n))):r<4294967296?(l(e<<5|26),n=r,h(c(4).setUint32(s,n))):(l(e<<5|27),e=((e=r)-(r=r%i))/i,(t=c(8)).setUint32(s,e),t.setUint32(s+4,r),h())}if(!function e(r){var t;if(!1===r)return l(244);if(!0===r)return l(245);if(null===r)return l(246);if(r===M)return l(247);switch(typeof r){case"number":if(Math.floor(r)===r){if(0<=r&&r<=w)return v(0,r);if(-w<=r&&r<0)return v(1,-(r+1))}return l(251),t=r,h(c(8).setFloat64(s,t));case"string":for(var n=[],i=0;i<r.length;++i){var u=r.charCodeAt(i);u<128?n.push(u):(u<2048?n.push(192|u>>6):(u<55296?n.push(224|u>>12):(u=65536+((u=(1023&u)<<10)|1023&r.charCodeAt(++i)),n.push(240|u>>18),n.push(128|u>>12&63)),n.push(128|u>>6&63)),n.push(128|63&u))}return v(3,n.length),g(n);default:if(Array.isArray(r))for(v(4,f=r.length),i=0;i<f;++i)e(r[i]);else if(r instanceof Uint8Array)v(2,r.length),g(r);else{var f,a=Object.keys(r);for(v(5,f=a.length),i=0;i<f;++i){var o=a[i];e(o),e(r[o])}}}}(e),"slice"in a)return a.slice(0,s);for(var e=new ArrayBuffer(s),r=new DataView(e),t=0;t<s;++t)r.setUint8(t,o.getUint8(t));return e},decode:function(r,p,d){var y=new DataView(r),U=0;function A(e,r){return U+=r,e}function b(e){return A(new Uint8Array(r,U,e),e)}function m(){return A(y.getUint8(U),1)}function B(){return A(y.getUint16(U),2)}function t(){return A(y.getUint32(U),4)}function C(){return 255===y.getUint8(U)&&(U+=1,1)}function D(e){if(e<24)return e;if(24===e)return m();if(25===e)return B();if(26===e)return t();if(27===e)return t()*i+t();if(31===e)return-1;throw"Invalid length encoding"}function V(e){var r=m();if(255===r)return-1;var t=D(31&r);if(t<0||r>>5!==e)throw"Invalid indefinite length element";return t}function F(e,r){for(var t=0;t<r;++t){var n=m();128&n&&(n<224?(n=(31&n)<<6|63&m(),--r):n<240?(n=(15&n)<<12|(63&m())<<6|63&m(),r-=2):(n=(15&n)<<18|(63&m())<<12|(63&m())<<6|63&m(),r-=3)),n<65536?e.push(n):(n-=65536,e.push(55296|n>>10),e.push(56320|1023&n))}}"function"!=typeof p&&(p=function(e){return e}),"function"!=typeof d&&(d=function(){return M});var e=function e(){var r,t,n=m(),i=n>>5,n=31&n;if(7==i)switch(n){case 25:var u=new ArrayBuffer(4),u=new DataView(u),f=B(),a=31744&f,o=1023&f;if(31744===a)a=261120;else if(0!==a)a+=114688;else if(0!=o)return o*I;return u.setUint32(0,(32768&f)<<16|a<<13|o<<13),u.getFloat32(0);case 26:return A(y.getFloat32(U),4);case 27:return A(y.getFloat64(U),8)}if((r=D(n))<0&&(i<2||6<i))throw"Invalid length";switch(i){case 0:return r;case 1:return-1-r;case 2:if(r<0){for(var s=[],c=0;0<=(r=V(i));)c+=r,s.push(b(r));for(var h=new Uint8Array(c),l=0,g=0;g<s.length;++g)h.set(s[g],l),l+=s[g].length;return h}return b(r);case 3:var v=[];if(r<0)for(;0<=(r=V(i));)F(v,r);else F(v,r);return String.fromCharCode.apply(null,v);case 4:if(r<0)for(t=[];!C();)t.push(e());else for(t=new Array(r),g=0;g<r;++g)t[g]=e();return t;case 5:var w={};for(g=0;g<r||r<0&&!C();++g)w[e()]=e();return w;case 6:return p(e(),r);case 7:switch(r){case 20:return!1;case 21:return!0;case 22:return null;case 23:return M;default:return d(r)}}}();if(U!==r.byteLength)throw"Remaining bytes";return e}};"function"==typeof define&&define.amd?define("cbor/cbor",r):"undefined"!=typeof module&&module.exports?module.exports=r:e.CBOR||(e.CBOR=r)}(this);
|
|||
|
|
var GOVUK=function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var o,n=t(function(e,t){function n(e){this.$module=e}e.exports=(function(e){var c,a,l,u;"defineProperty"in Object&&function(){try{return Object.defineProperty({},"test",{value:42}),!0}catch(e){return!1}}()||(c=Object.defineProperty,a=Object.prototype.hasOwnProperty("__defineGetter__"),l="Getters & setters cannot be defined on this javascript engine",u="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(e,t,n){if(c&&(e===window||e===document||e===Element.prototype||e instanceof Element))return c(e,t,n);if(null===e||!(e instanceof Object||"object"==typeof e))throw new TypeError("Object.defineProperty called on non-object");if(!(n instanceof Object))throw new TypeError("Property description must be an object");var t=String(t),o="value"in n||"writable"in n,r="get"in n&&typeof n.get,i="set"in n&&typeof n.set;if(r){if("function"!==r)throw new TypeError("Getter must be a function");if(!a)throw new TypeError(l);if(o)throw new TypeError(u);Object.__defineGetter__.call(e,t,n.get)}else e[t]=n.value;if(i){if("function"!==i)throw new TypeError("Setter must be a function");if(!a)throw new TypeError(l);if(o)throw new TypeError(u);Object.__defineSetter__.call(e,t,n.set)}return"value"in n&&(e[t]=n.value),e})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r&&r||{}),function(e){"bind"in Function.prototype||Object.defineProperty(Function.prototype,"bind",{value:function(t){function e(){}var n=Array,o=Object,r=o.prototype,n=n.prototype,i=r.toString,c="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,a=Function.prototype.toString,l=n.slice,u=n.concat,s=n.push,r=Math.max,d=this;if(!function(e){if("function"!=typeof e)return!1;{if(!c)return"[object Function]"===(t=i.call(e))||"[object GeneratorFunction]"===t;var t=e;try{return a.call(t),!0}catch(e){return!1}}}(d))throw new TypeError("Function.prototype.bind called on incompatible "+d);for(var p,f=l.call(arguments,1),m=r(0,d.length-f.length),y=[],b=0;b<m;b++)s.call(y,"$"+b);return p=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this, arguments); }")(function(){var e;return this instanceof p?(e=d.apply(this,u.call(f,l.call(arguments))),o(e)===e?e:this):d.apply(t,u.call(f,l.call(arguments)))}),d.prototype&&(e.prototype=d.prototype,p.prototype=new e,e.prototype=null),p}})}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r&&r||{}),function(e){"Window"in this||"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&!function(e){e.constructor?e.Window=e.constructor:(e.Window=e.constructor=new Function("return function Window() {}")()).prototype=this}(this)}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r&&r||{}),function(e){"Document"in this||"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&(this.HTMLDocument?this.Document=this.HTMLDocument:(this.Document=this.HTMLDocument=document.constructor=new Function("return function Document() {}")(),this.Document.prototype=document))}.call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r&&r||{}),function(e){var t,n,a,l,u,s,o,r,i;function c(){return i--||clearTimeout(r),!(!document.body||document.body.prototype||!/(complete|interactive)/.test(document.readyState))&&(u(document,!0),r&&document.body.prototype&&clearTimeout(r),!!document.body.prototype)}"Element"in this&&"HTMLElement"in this||(window.Element&&!window.HTMLElement?window.HTMLElement=window.Element:(window.Element=window.HTMLElement=new Function("return function Element() {}")(),n=(t=document.appendChild(document.createElement("body"))).appendChild(document.createElement("iframe")).contentWindow.document,a=Element.prototype=n.appendChild(n.createElement("*")),l={},u=function(e,t){var n,o
|
|||
|
|
"use strict";!function(t){var u=t.jQuery,s=t.GOVUK||{};s.Modules=s.Modules||{},s.modules={find:function(t){var e="[data-module]",n=(t=t||u("body")).find(e);return n=t.is(e)?n.add(t):n},start:function(t){for(var e=this.find(t),n=0,r=e.length;n<r;n++){var a=u(e[n]),d=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(function(t){return t.replace(/-([a-z])/g,function(t){return t.charAt(1).toUpperCase()})}(a.data("module"))),o=a.data("module-started");"function"!=typeof s.Modules[d]||o||((new s.Modules[d]).start(a),a.data("module-started",!0))}}},t.GOVUK=s}(window);
|
|||
|
|
"use strict";!function(t){var u=t.jQuery,a=t.GOVUK||{};function n(){var t=this,o="ShowHideContent",i='[data-target] > input[type="radio"]',a='[data-target] > input[type="checkbox"]';function r(){var t=u(this),a=d(t);a.length&&(t.attr("aria-controls",a.attr("id")),t.attr("aria-expanded","false"),a.attr("aria-hidden","true"))}function d(t){var a=(a=t.attr("aria-controls"))||t.closest("[data-target]").data("target");return u("#"+a)}function s(t,a){a.hasClass("js-hidden")&&(a.removeClass("js-hidden"),a.attr("aria-hidden","false"),t.attr("aria-controls")&&t.attr("aria-expanded","true"))}function c(t,a){(a=a||d(t)).hasClass("js-hidden")||(a.addClass("js-hidden"),a.attr("aria-hidden","true"),t.attr("aria-controls")&&t.attr("aria-expanded","false"))}function n(t,a){var n=i+'[name="'+t.attr("name")+'"][aria-controls]',e=t.closest("form");(e.length?e.find(n):u(n)).each(function(){c(u(this))}),t.is("[aria-controls]")&&s(t,a)}function e(t,a){(t.is(":checked")?s:c)(t,a)}function h(n,t,a,e){function i(){var t=u(this);e(t,d(t))}n=n||u(document.body);t=u(t);t.each(r),u.each(a,function(t,a){n.on("click."+o,a,i)}),t.is(":checked")&&t.filter(":checked").each(i)}t.showHideRadioToggledContent=function(t){var a;h(t,i,(a=[],u(i).map(function(){var t=u(this).attr("name");return-1===u.inArray(t,a)?(a.push(t),'input[type="radio"][name="'+u(this).attr("name")+'"]'):null})),n)},t.showHideCheckboxToggledContent=function(t){h(t,a,[a],e)},t.destroy=function(t){(t=t||u(document.body)).off("."+o)}}n.prototype.init=function(t){this.showHideRadioToggledContent(t),this.showHideCheckboxToggledContent(t)},a.ShowHideContent=n,t.GOVUK=a}(window);
|
|||
|
|
"use strict";function _typeof(o){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(){window.GOVUK=window.GOVUK||{};var i={analytics:!1},r={_ga:"analytics",_gid:"analytics"};window.GOVUK.cookie=function(o,n,e){return void 0!==n?!1===n||null===n?window.GOVUK.setCookie(o,"",{days:-1}):(void 0===e&&(e={days:30}),window.GOVUK.setCookie(o,n,e)):window.GOVUK.getCookie(o)},window.GOVUK.getConsentCookie=function(){var o,n=window.GOVUK.cookie("cookies_policy");if(!n)return null;try{o=JSON.parse(n)}catch(o){return null}return o="object"!==_typeof(o)&&null!==o?JSON.parse(o):o},window.GOVUK.setConsentCookie=function(o){var n,e=(e=window.GOVUK.getConsentCookie())||JSON.parse(JSON.stringify(i));for(n in o)if(e[n]=o[n],!o[n])for(var t in r)r[t]===n&&(window.GOVUK.cookie(t,null),window.GOVUK.cookie(t)&&(document.cookie=t+"=;expires="+new Date+";domain="+window.location.hostname.replace(/^www\./,".")+";path=/"));window.GOVUK.setCookie("cookies_policy",JSON.stringify(e),{days:365})},window.GOVUK.checkConsentCookieCategory=function(o,n){if(!window.GOVUK.getConsentCookie()&&r[o])return!0;o=window.GOVUK.getConsentCookie();try{return o[n]}catch(o){return console.error(o),!1}},window.GOVUK.checkConsentCookie=function(o,n){return"cookies_policy"===o||null===n||!1===n||!!r[o]&&window.GOVUK.checkConsentCookieCategory(o,r[o])},window.GOVUK.setCookie=function(o,n,e){window.GOVUK.checkConsentCookie(o,n)&&(o=o+"="+n+"; path=/",(e=void 0===e?{}:e).days&&((n=new Date).setTime(n.getTime()+24*e.days*60*60*1e3),o=o+"; expires="+n.toGMTString()),"https:"===document.location.protocol&&(o+="; Secure"),document.cookie=o)},window.GOVUK.getCookie=function(o){for(var n=o+"=",e=document.cookie.split(";"),t=0,i=e.length;t<i;t++){for(var r=e[t];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(n))return decodeURIComponent(r.substring(n.length))}return null}}(window);
|
|||
|
|
"use strict";!function(t){t.GOVUK.hasConsentFor=function(n,o){return null!==(o=void 0===o?t.GOVUK.getConsentCookie():o)&&(n in o&&o[n])}}(window);
|
|||
|
|
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n){n.GOVUK=n.GOVUK||{};function e(e){n.ga("create",{trackingId:e.trackingId,cookieDomain:e.cookieDomain,cookieExpires:24*e.expires*60*60}),n.ga("set","anonymizeIp",e.anonymizeIp),n.ga("set","allowAdFeatures",e.allowAdFeatures),n.ga("set","transport",e.transport),n.ga("set","title","US Notify")}e.load=function(){var e,t,o,a;e=n,a=document,t="script",o="ga",e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=+new Date,o=a.createElement(t),a=a.getElementsByTagName(t)[0],o.async=1,o.src="//www.google-analytics.com/analytics.js",a.parentNode.insertBefore(o,a)},e.prototype.trackPageview=function(e,t,o){var a=(n.location.pathname+n.location.search).replace(/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/g,"…");n.ga("send","pageview",a)},e.prototype.trackEvent=function(e,t,o){e={eventCategory:e,eventAction:t};(o=o||{}).label&&(e.eventLabel=o.label,delete o.label),"object"===_typeof(o)&&$.extend(e,o),n.ga("send","event",e)},n.GOVUK.Analytics=e}(window);
|
|||
|
|
"use strict";!function(a){a.GOVUK=a.GOVUK||{};var n="UA-75215134-1";a["ga-disable-".concat(n)]=!0;a.GOVUK.initAnalytics=function(){"analytics"in a.GOVUK||(a["ga-disable-".concat(n)]=!1,a.GOVUK.Analytics.load(),a.GOVUK.analytics=new GOVUK.Analytics({trackingId:n,cookieDomain:"auto",anonymizeIp:!0,allowAdFeatures:!1,transport:"beacon",expires:365}),a.GOVUK.analytics.trackPageview())}}(window);
|
|||
|
|
"use strict";window.GOVUK=window.GOVUK||{},window.GOVUK.Modules=window.GOVUK.Modules||{},function(e){function o(){}o.clearOldCookies=function(e){var o=["_ga","_gid"];if(window.GOVUK.cookie("seen_cookie_message")&&(document.cookie="seen_cookie_message=;expires="+(new Date).toGMTString()+";path=/"),null===e)for(var i,t=0;t<o.length;t++)window.GOVUK.cookie(o[t])&&(i=o[t]+"=;expires="+(new Date).toGMTString()+";domain="+window.location.hostname.replace(/^www\./,".")+";path=/",document.cookie=i)},o.prototype.start=function(e){this.$module=e[0],this.$module.hideCookieMessage=this.hideCookieMessage.bind(this),this.$module.showConfirmationMessage=this.showConfirmationMessage.bind(this),this.$module.setCookieConsent=this.setCookieConsent.bind(this),this.$module.cookieBanner=document.querySelector(".notify-cookie-banner"),this.$module.cookieBannerConfirmationMessage=this.$module.querySelector(".notify-cookie-banner__confirmation"),this.setupCookieMessage()},o.prototype.setupCookieMessage=function(){var e=this;this.$hideLink=this.$module.querySelector("button[data-hide-cookie-banner]"),this.$hideLink&&this.$hideLink.addEventListener("click",this.$module.hideCookieMessage),this.$acceptCookiesLink=this.$module.querySelector("button[data-accept-cookies=true]"),this.$acceptCookiesLink&&this.$acceptCookiesLink.addEventListener("click",function(){return e.$module.setCookieConsent(!0)}),this.$rejectCookiesLink=this.$module.querySelector("button[data-accept-cookies=false]"),this.$rejectCookiesLink&&this.$rejectCookiesLink.addEventListener("click",function(){return e.$module.setCookieConsent(!1)}),this.showCookieMessage()},o.prototype.showCookieMessage=function(){var e;this.isInCookiesPage()||(e=window.GOVUK.cookie("cookies_policy"),this.$module&&!e&&(this.$module.style.display="block"))},o.prototype.hideCookieMessage=function(e){this.$module&&(this.$module.style.display="none"),e.target&&e.preventDefault()},o.prototype.setCookieConsent=function(e){window.GOVUK.setConsentCookie({analytics:e}),this.$module.showConfirmationMessage(e),this.$module.cookieBannerConfirmationMessage.focus(),e&&window.GOVUK.initAnalytics()},o.prototype.showConfirmationMessage=function(e){e=e?"You’ve accepted analytics cookies.":"You told us not to use analytics cookies.";this.$cookieBannerMainContent=document.querySelector(".notify-cookie-banner__wrapper"),this.$cookieBannerConfirmationMessage=document.querySelector(".notify-cookie-banner__confirmation-message"),this.$cookieBannerConfirmationMessage.insertAdjacentText("afterbegin",e),this.$cookieBannerMainContent.style.display="none",this.$module.cookieBannerConfirmationMessage.style.display="block"},o.prototype.isInCookiesPage=function(){return"/cookies"===window.location.pathname},e.CookieBanner=o}(window.GOVUK.Modules);
|
|||
|
|
"use strict";window.GOVUK=window.GOVUK||{},window.GOVUK.Modules=window.GOVUK.Modules||{},function(e){function n(){}n.prototype.start=function(e){this.$module=e[0],this.$module.submitSettingsForm=this.submitSettingsForm.bind(this),document.querySelector("form[data-module=cookie-settings]").addEventListener("submit",this.$module.submitSettingsForm),this.setInitialFormValues()},n.prototype.setInitialFormValues=function(){var e=window.GOVUK.getConsentCookie("consent");e&&((e.analytics?document.querySelector("input[name=cookies-analytics][value=on]"):document.querySelector("input[name=cookies-analytics][value=off]")).checked=!0)},n.prototype.submitSettingsForm=function(e){e.preventDefault();for(var t=e.target.querySelectorAll("input[name=cookies-analytics]"),o={},n=0;n<t.length;n++){var i=t[n];if(i.checked){i="on"===i.value;o.analytics=i;break}}return window.GOVUK.setConsentCookie(o),this.showConfirmationMessage(),window.GOVUK.hasConsentFor("analytics")&&window.GOVUK.initAnalytics(),!1},n.prototype.showConfirmationMessage=function(){var e=document.querySelector("div[data-cookie-confirmation]"),t=document.querySelector(".cookie-settings__prev-page"),o=n.prototype.getReferrerLink();document.body.scrollTop=document.documentElement.scrollTop=0,o&&o!==document.location.pathname?(t.href=o,t.style.display="block"):t.style.display="none",e.style.display="block"},n.prototype.getReferrerLink=function(){return!!document.referrer&&new URL(document.referrer).pathname},e.CookieSettings=n}(window.GOVUK.Modules);
|
|||
|
|
"use strict";!function(l){function s(t,e,i){var o=t.$fixedEl,s=o.closest(".sticky-scroll-area");0===s.length&&(s=o.parent()).addClass("sticky-scroll-area"),this._els=[t],this.edge=e,this.selector=i,this.node=s.get(0),this.setEvents()}function h(t,e){this._sticky=e,this.$fixedEl=t,this._initialFixedClass="content-fixed-onload",this._fixedClass="content-fixed",this._appliedClass=null,this._$shim=null,this._stopped=!1,this._hasLoaded=!1,this._canBeStuck=!0,this.verticalMargins={top:parseInt(this.$fixedEl.css("margin-top"),10),bottom:parseInt(this.$fixedEl.css("margin-bottom"),10)}}function t(t){this._hasScrolled=!1,this._scrollTimeout=!1,this._windowHasResized=!1,this._resizeTimeout=!1,this._elsLoaded=!1,this._initialPositionsSet=!1,this._els=[],this.CSS_SELECTOR=t,this.STOP_PADDING=10}var c=l.jQuery,e=l.GOVUK||{},n="default",a=(s.prototype.addEl=function(t){this._els.push(t)},s.prototype.hasEl=function(t){return-1!==c.inArray(t,this._els)},s.prototype.updateEls=function(t){this._els=t},s.prototype.setEvents=function(){this.node.addEventListener("focus",this.focusHandler.bind(this),!0),c(this.node).on("keyup","textarea",this.focusHandler.bind(this))},s.prototype.removeEvents=function(){this.node.removeEventListener("focus",this.focusHandler.bind(this)),c(this.node).find("textarea").off("keyup","textarea",this.focusHandler.bind(this))},s.prototype.getFocusedDetails={forElement:function(t){t={top:t.offset().top,height:t.outerHeight(),type:"element"};return t.bottom=t.top+t.height,t},forCaret:function(t){var e=t.get(0),e=window.getCaretCoordinates(e,e.selectionEnd),t={top:t.offset().top+e.top,height:e.height,type:"caret"};return t.bottom=t.top+t.height,t}},s.prototype.focusHandler=function(t){this.scrollToRevealElement(c(document.activeElement))},s.prototype.scrollToRevealElement=function(t){var e,i=t.get(0).nodeName.toLowerCase(),o=r.endOfFurthestEl(this._els,this.edge),s=function(){return 0<t.closest(this.selector).length}.bind(this);if("textarea"===i)e=this.getFocusedDetails.forCaret(t);else{if(s())return;e=this.getFocusedDetails.forElement(t)}0<(i=r.getOverlap(e,this.edge,o))&&r.adjustForOverlap(e,this.edge,i)},s.prototype.destroy=function(){this.removeEvents()},{_scrollAreas:[],getAreaForEl:function(t){for(var e=this._scrollAreas.length;e--;)if(this._scrollAreas[e].hasEl(t))return this._scrollAreas[e];return!1},getAreaByEl:function(e){return c.grep(this._scrollAreas,function(t){return-1!==c.inArray(e,t.els)})[0]||!1},addEl:function(t,e,i){var o=this.getAreaForEl(t);o?o.addEl(t):this._scrollAreas.push(new s(t,e,i))},syncEls:function(n){var i=this,r=[];c.each(this._scrollAreas,function(t,e){i=e,o=[],c.each(n,function(t,e){i.hasEl(e)&&o.push(e)});var i,o,s=o;s.length||r.push(t),e.updateEls(s)}),c.each(r,function(t,e){i._scrollAreas[e].destroy(),i._scrollAreas.splice(e,1)})}}),r={getOverlap:function(t,e,i){return i?"top"===e?i-t.top:t.bottom-i:0},endOfFurthestEl:function(t,e){var t=c.grep(t,function(t){return t.isStuck()}),i="bottom"===e?function(t){return t.$fixedEl.offset().top}:function(t){return t.$fixedEl.offset().top+t.height};return!!t.length&&c.map(t,function(t){return i(t)}).reduce(function(t,e){return t<e?e:t})},adjustForOverlap:function(t,e,i){var o=c(window).scrollTop();"top"===e?c(window).scrollTop(o-i):c(window).scrollTop(o+i)}},d={_classes:{top:"content-fixed__top",bottom:"content-fixed__bottom"},_getClassForEdge:function(t){return this._classes[t]},mark:function(t){var i=this._getClassForEdge(t.edge),t="dialog"===n?[u.getElementAtOppositeEnd(t)]:t._els;t=c.grep(t,function(t){return t.isStuck()}),c.each(t,function(t,e){e.$fixedEl.addClass(i)})},unmark:function(t){var i=this._getClassForEdge(t.edge);c.each(t._els,function(t,e){e.$fixedEl.removeClass(i)})}},u=(h.prototype._getShimCSS=function(){return{width:this.horizontalSpace+"px",height:this.height+"px","margin-top":this.verticalMargins.top+"px","margin-bottom":this.verticalMargins.bottom+"px"}},h.prototype.stickyClass=function(){return this._sticky._initialPositionsSet?this._fixedClass:this._initialFixedClass},h.prototype.appliedClass=function(){return this.
|
|||
|
|
"use strict";!function(o){document.queryCommandSupported("copy")&&(o.CopyToClipboard=function(){var c=function(o){return'\n <span class="copy-to-clipboard__value">'.concat(o.valueLabel?'<span class="govuk-visually-hidden">'+o.thing+": </span>":"").concat(o.value,'</span>\n <span class="copy-to-clipboard__notice govuk-visually-hidden" aria-live="assertive">\n ').concat(o.onload?"":o.thing+" returned to page, press button to copy to clipboard",'\n </span>\n <button class="govuk-button govuk-button--secondary copy-to-clipboard__button--copy">\n Copy ').concat(o.thing," to clipboard").concat(o.name?'<span class="govuk-visually-hidden"> for '+o.name+"</span>":"","\n </button>\n ")},i=function(o){return'\n <span class="copy-to-clipboard__notice" aria-live="assertive">\n <span class="govuk-visually-hidden">'.concat(o.thing,' </span>Copied to clipboard<span class="govuk-visually-hidden">, press button to show in page</span>\n </span>\n <button class="govuk-button govuk-button--secondary copy-to-clipboard__button--show">\n Show ').concat(o.thing).concat(o.name?'<span class="govuk-visually-hidden"> for '+o.name+"</span>":"","\n </button>\n ")};this.getRangeFromElement=function(o){var n=document.createRange(),t=Array.prototype.slice.call(o.childNodes),a=-1;return t.forEach(function(o,n){1===o.nodeType&&o.classList.contains("govuk-visually-hidden")&&(a=n)}),n.selectNodeContents(o),-1!==a&&n.setStart(o,a+1),n},this.copyValueToClipboard=function(o,n){var t=window.getSelection?window.getSelection():document.selection,o=this.getRangeFromElement(o);t.removeAllRanges(),t.addRange(o),document.execCommand("copy"),t.removeAllRanges(),n()},this.start=function(o){var n=this,t=$(o),a={value:t.data("value"),thing:t.data("thing")},e=t.data("name");e!==a.thing&&(a.name=e,a.valueLabel=!0),t.addClass("copy-to-clipboard").css("min-height",t.height()).html(c($.extend({onload:!0},a))).on("click",".copy-to-clipboard__button--copy",function(){return n.copyValueToClipboard($(".copy-to-clipboard__value",o)[0],function(){return t.html(i(a)).find(".govuk-button").focus()})}).on("click",".copy-to-clipboard__button--show",function(){return t.html(c(a)).find(".govuk-button").focus()}),"stickAtBottomWhenScrolling"in GOVUK&&GOVUK.stickAtBottomWhenScrolling.recalculate()}})}(window.GOVUK.Modules);
|
|||
|
|
"use strict";window.GOVUK.Modules.Autofocus=function(){this.start=function(t){var t=$(t),e=t.data("forceFocus");0<$(window).scrollTop()&&!e||(e=0===(e=t.filter("input, textarea, select")).length?$("input, textarea, select",t):e).eq(0).trigger("focus")}};
|
|||
|
|
"use strict";!function(t){var i;"oninput"in document.createElement("input")&&(i=/\(\(([^\)\((\?)]+)(\?\?)?([^\)\(]*)\)\)/g,t.EnhancedTextbox=function(){var t=this;this.start=function(t){this.highlightPlaceholders=void 0===t.data("highlightPlaceholders")||!!t.data("highlightPlaceholders"),this.$textbox=$(t).wrap("\n <div class='textbox-highlight-wrapper' />\n ").after(this.$background=$('\n <div class="textbox-highlight-background" aria-hidden="true" />\n ')).on("input",this.update),$(window).on("resize",this.resize),t=this.$textbox.clone().appendTo("body").css({position:"absolute",visibility:"hidden",display:"block"}),this.initialHeight=t.height(),this.$background.css({"border-width":this.$textbox.css("border-width")}),t.remove(),this.$textbox.trigger("input")},this.resize=function(){t.$background.width(t.$textbox.width()),t.$textbox.height(Math.max(t.initialHeight,t.$background.outerHeight())),"stickAtBottomWhenScrolling"in GOVUK&&GOVUK.stickAtBottomWhenScrolling.recalculate()},this.contentEscaped=function(){return $("<div/>").text(t.$textbox.val()).html()},this.contentReplaced=function(){return t.contentEscaped().replace(i,function(t,i,e,n){return n&&e?"<span class='placeholder-conditional'>((".concat(i,"??</span>").concat(n,"))"):"<span class='placeholder'>((".concat(i).concat(n,"))</span>")})},this.update=function(){t.$background.html(t.highlightPlaceholders?t.contentReplaced():t.contentEscaped()),t.resize()}})}(window.GOVUK.Modules);
|
|||
|
|
"use strict";window.GOVUK.Modules.FileUpload=function(){var t=this;this.submit=function(){return t.$form.trigger("submit")},this.showCancelButton=function(){return $(".file-upload-button",t.$form).replaceWith("\n <a href=\"\" class='govuk-button govuk-button--warning govuk-!-margin-right-1'>Cancel upload</a>\n ")},this.start=function(t){var n=this;this.$form=$(t),this.$form.find("label.file-upload-button").addClass("govuk-button govuk-!-margin-right-1"),$(window).on("pageshow",function(){return n.$form[0].reset()}),this.$form.on("change",".file-upload-field",function(){return n.submit()&&n.showCancelButton()})}};
|
|||
|
|
"use strict";!function(e){function r(e,o){"default"===e&&$("[type=radio]",o).eq(0).focus(),"option"===e&&$("[type=radio]",o).eq(1).focus()}var o=e.GOVUK.Modules,e=e.Hogan,v={initial:e.compile('\n {{#showNowAsDefault}}\n <div class="radio-select__column">\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" checked="checked" id="{{name}}-0" name="{{name}}" type="radio" value="">\n <label class="govuk-label govuk-radios__label" for="{{name}}-0">Now</label>\n </div>\n </div>\n {{/showNowAsDefault}}\n <div class="radio-select__column">\n {{#categories}}\n <input type=\'button\' class=\'govuk-button govuk-button--secondary radio-select__button--category\' aria-expanded="false" value=\'{{.}}\' />\n {{/categories}}\n </div>\n '),choose:e.compile('\n {{#showNowAsDefault}}\n <div class="radio-select__column">\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" checked="checked" id="{{name}}-0" name="{{name}}" type="radio" value="">\n <label class="govuk-label govuk-radios__label" for="{{name}}-0">Now</label>\n </div>\n </div>\n {{/showNowAsDefault}}\n <div class="radio-select__column">\n {{#choices}}\n <div class="govuk-radios__item js-option">\n <input class="govuk-radios__input" type="radio" value="{{value}}" id="{{id}}" name="{{name}}" />\n <label class="govuk-label govuk-radios__label" for="{{id}}">{{label}}</label>\n </div>\n {{/choices}}\n <input type=\'button\' class=\'govuk-button govuk-button--secondary radio-select__button--done\' aria-expanded=\'true\' value=\'Done\' />\n </div>\n '),chosen:e.compile('\n {{#showNowAsDefault}}\n <div class="radio-select__column">\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" id="{{name}}-0" name="{{name}}" type="radio" value="">\n <label class="govuk-label govuk-radios__label" for="{{name}}-0">Now</label>\n </div>\n </div>\n {{/showNowAsDefault}}\n <div class="radio-select__column">\n {{#choices}}\n <div class="govuk-radios__item">\n <input class="govuk-radios__input" checked="checked" type="radio" value="{{value}}" id="{{id}}" name="{{name}}" />\n <label class="govuk-label govuk-radios__label" for="{{id}}">{{label}}</label>\n </div>\n {{/choices}}\n </div>\n <div class="radio-select__column">\n <input type=\'button\' class=\'govuk-button govuk-button--secondary radio-select__button--reset\' aria-expanded=\'false\' value=\'Choose a different time\' />\n </div>\n ')};o.RadioSelect=function(){this.start=function(n){function a(){l("initial",{categories:e,name:u,showNowAsDefault:d}),r("default",n)}function o(o){l("chosen",{choices:s.filter(function(e){return e.value==o}),name:u,showNowAsDefault:d}),r("option",n)}function t(e){(e=e.target.parentNode)===c&&(e=$("input",e).attr("value"),o(e),c=null,$(document).off("mouseup",t))}var i=$(n),l=function(e,o){i.html(v[e].render(o))},s=$("label",i).toArray().map(function(e){e=$(e);return{id:e.attr("for"),label:$.trim(e.text()),value:e.prev("input").attr("value")}}),e=i.data("categories").split(","),u=i.find("input").eq(0).attr("name"),c=null,d="true"===i.data("show-now-as-default").toString()&&{name:u};i.on("click",".radio-select__button--category",function(e){e.preventDefault();var e=$(this).attr("value").split(" "),o=e[e.length-1].toLowerCase();l("choose",{choices:s.filter(function(e){return-1<e.label.toLowerCase().indexOf(o)}),name:u,showNowAsDefault:d}),r("option",n)}).on("mousedown",".js-option",function(e){c=this,$(document).on("mouseup",t)}).on("keydown","input[type=radio]",function(e){if(13!==e.which&&32!==e.which)return!0;e.preventDefault();e=$(this).attr("value");o(e)}).on("click",".radio-select__button--done",function(e){e.preventDefault();var o=$("input[type=radio]:checked",this.parentNode);o.l
|
|||
|
|
"use strict";!function(a){function i(t){return parseInt(Math.max(250*Math.sqrt(t)-1e3,1e3))}function s(t){this._$contents=t,this._classNames=[],this._classesTo$ElsMap={}}var l={},u=a.GOVUK.vendor.morphdom,c=0,d=(s.prototype.addClassName=function(t){-1===this._classNames.indexOf(t)&&this._classNames.push(t)},s.prototype.remove=function(){var e=this;this._classNames.forEach(function(t){var s=$("."+t,e._$contents).removeClass(t);0<s.length&&(e._classesTo$ElsMap[t]=s)})},s.prototype.replace=function(){function t(t,s){a.document.body.contains(s)&&$(s).addClass(e)}for(var e in this._classesTo$ElsMap)this._classesTo$ElsMap[e].each(t);this._classesTo$ElsMap={}},function(t,s,a,e){var n=arguments,o=Date.now();"hidden"!==document.visibilityState&&1===a.push(t)&&$.ajax(s,{method:e?"post":"get",data:e?$("#"+e).serialize():{}}).done(function(t){for(var s=a,e=t;s.length;)s.shift()(e);1===t.stop&&(d=function(){}),c=i(Date.now()-o)}).fail(function(){return d=function(){}}),setTimeout(function(){return d.apply(window,n)},c)});a.GOVUK.Modules.UpdateContent=function(){this.start=function(t){var t=$(t),n=t.children().eq(0),o=t.data("key"),i=t.data("resource"),c=t.data("form"),r=new s(n);t.replaceWith(n),void 0!==n.data("classesToPersist")&&n.data("classesToPersist").split(" ").forEach(function(t){return r.addClassName(t)}),setTimeout(function(){return d((s=n,e=o,a=r,function(t){a.remove(),u(s.get(0),$(t[e]).get(0)),a.replace()}),i,l[i]=l[i]||[],c);var s,e,a},2e3)}},a.GOVUK.Modules.UpdateContent.calculateBackoff=i}(window);
|
|||
|
|
"use strict";!function(t){var e=[],n=function(t){var t=$(t),e=t.prop("id");if(!e)return!1;this.idPattern=e,this.elementSelector=".list-entry, .input-list__button--remove, .input-list__button--add",this.entries=[],this.$wrapper=t,this.minEntries=2,this.listItemName=this.$wrapper.data("listItemName"),this.getSharedAttributes(),this.getValues(),this.maxEntries=this.entries.length,this.trimEntries(),this.render(),this.bindEvents()};n.optionalAttributes=["aria-describedby"],n.prototype.entryTemplate=Hogan.compile('<div class="list-entry"><label for="{{{id}}}" class="govuk-input--numbered__label"><span class="govuk-visually-hidden">{{listItemName}} number </span>{{number}}.</label><input name="{{name}}" id="{{id}}" {{#value}}value="{{value}}{{/value}}" {{{sharedAttributes}}}/>{{#button}}<button type="button" class="govuk-button govuk-button--secondary input-list__button--remove">Remove<span class="govuk-visually-hidden"> {{listItemName}} number {{number}}</span></button>{{/button}}</div>'),n.prototype.addButtonTemplate=Hogan.compile('<button type="button" class="govuk-button govuk-button--secondary input-list__button--add">Add another {{listItemName}} ({{entriesLeft}} remaining)</button>'),n.prototype.getSharedAttributes=function(){var n,i,t=this.$wrapper.find("input"),a=Hogan.compile(' {{name}}="{{value}}"'),s=["id","name","value"],r=[],e=function(t){for(var e,n,i="",s=t.length,r=[];s--;)for(n=(e=t[s]).length;n--;)-1===$.inArray(e[n].name,r)&&(i+=a.render({name:e[n].name,value:e[n].value}),r.push(e[n].name));return i};t.each(function(t,e){for(n=e.attributes.length,i=[];n--;)-1===$.inArray(e.attributes[n].name,s)&&i.push({name:e.attributes[n].name,value:e.attributes[n].value});i.length&&r.push(i)}),this.sharedAttributes=r.length?e(r):""},n.prototype.getValues=function(){this.entries=[],this.$wrapper.find("input").each(function(t,e){e=$(e).val();this.entries.push(e)}.bind(this))},n.prototype.trimEntries=function(){for(var t=this.entries.length,e=[];t--;)""!==this.entries[t]?e.push(this.entries[t]):t<this.minEntries&&e.push("");this.entries=e.reverse()},n.prototype.getId=function(t){var e=this.idPattern.replace("list-entry-","");return void 0===t?e:e+"-"+t},n.prototype.bindEvents=function(){this.$wrapper.on("click",".input-list__button--remove",function(t){this.removeEntry($(t.target))}.bind(this)),this.$wrapper.on("click",".input-list__button--add",function(t){this.addEntry()}.bind(this))},n.prototype.shiftFocus=function(t){t="remove"===t.action?1<t.entryNumberFocused?t.entryNumberFocused-1:1:t.entryNumberFocused+1;this.$wrapper.find(".list-entry").eq(t-1).find("input").focus()},n.prototype.removeEntryFromEntries=function(t){for(var e=[],n=0,i=this.entries.length;n<i;n++)t-1!==n&&e.push(this.entries[n]);this.entries=e},n.prototype.addEntry=function(t){var e=this.entries.length;this.getValues(),this.entries.push(""),this.render(),this.shiftFocus({action:"add",entryNumberFocused:e})},n.prototype.removeEntry=function(t){t=parseInt(t.find("span").text().match(/\d+/)[0],10);this.getValues(),this.removeEntryFromEntries(t),this.render(),this.shiftFocus({action:"remove",entryNumberFocused:t})},n.prototype.render=function(){this.$wrapper.find(this.elementSelector).remove(),$.each(this.entries,function(t,e){var n=t+1,t={id:this.getId(n),number:n,index:t,name:this.getId(n),value:e,listItemName:this.listItemName,sharedAttributes:this.sharedAttributes};1<n&&(t.button=!0),this.$wrapper.append(this.entryTemplate.render(t))}.bind(this)),this.entries.length<this.maxEntries&&this.$wrapper.append(this.addButtonTemplate.render({listItemName:this.listItemName,entriesLeft:this.maxEntries-this.entries.length}))},t.ListEntry=function(){this.start=function(t){return e.push(new n($(t)))}}}(window.GOVUK.Modules);
|
|||
|
|
"use strict";!function(t){function l(t){return t.toLowerCase().replace(/ /g,"")}function c(t){return 0===t?"no results":t+(1===t?" result":" results")}var u;t.LiveSearch=function(){this.start=function(t){var a,r,n,s,t=$(t),e=$("input",t),i=$("label",t),o=$(".live-search__status",t),i=(a=e,r=i,n=o,s=$(t.data("targets")),function(){var e=l(a.val()),i=0;s.each(function(){var t=$(".live-search-relevant",this).text()||$(this).text(),t=-1<l(t).indexOf(l(e));return $(this).has(":checked").length?($(this).show(),void i++):""==e?($(this).css("display",""),void i++):($(this).toggle(t),void(t&&i++))}),"loaded"===u?(""!==e&&a.attr("aria-label",r.text().trim()+", "+c(i)),u="active"):(a.removeAttr("aria-label"),n.text(c(i))),"stickAtBottomWhenScrolling"in GOVUK&&GOVUK.stickAtBottomWhenScrolling.recalculate()});u="loaded",e.on("keyup input",i),i()}}}(window.GOVUK.Modules);
|
|||
|
|
"use strict";!function(t){t.GOVUK.Modules.TrackError=function(){this.start=function(r){"analytics"in t.GOVUK&&t.GOVUK.analytics.trackEvent("Error",$(r).data("error-type"),{label:$(r).data("error-label")})}}}(window);
|
|||
|
|
"use strict";!function(){function e(t){return function(){t.data("clicked","")}}$("form").on("submit",function(t){var i=$(this).find(":submit");"true"==i.data("clicked")?t.preventDefault():(i.data("clicked","true"),setTimeout(e(i),1500))})}();
|
|||
|
|
"use strict";window.GOVUK.Modules.FullscreenTable=function(){var t=this;this.start=function(e){var t=this;this.$component=$(e),this.$table=this.$component.find("table"),this.nativeHeight=this.$component.innerHeight()+20,this.topOffset=this.$component.offset().top,this.insertShims(),this.maintainWidth(),this.maintainHeight(),this.toggleShadows(),$(window).on("scroll resize",this.maintainHeight).on("resize",this.maintainWidth),this.$scrollableTable.on("scroll",this.toggleShadows).on("scroll",this.maintainHeight).on("focus blur",function(){return t.$component.toggleClass("js-focus-style")}),window.GOVUK.stickAtBottomWhenScrolling&&window.GOVUK.stickAtBottomWhenScrolling.recalculate&&window.GOVUK.stickAtBottomWhenScrolling.recalculate(),this.maintainWidth()},this.insertShims=function(){var e=t.$table.find("caption").text().toLowerCase().replace(/[^A-Za-z]+/g,"");t.$table.find("caption").attr("id",e),t.$table.wrap('<div class="fullscreen-scrollable-table" role="region" aria-labelledby="'.concat(e,'" tabindex="0"/>')),t.$component.append(t.$component.find(".fullscreen-scrollable-table").clone().addClass("fullscreen-fixed-table").removeClass("fullscreen-scrollable-table").removeAttr("role aria-labelledby tabindex").attr("aria-hidden",!0).find("caption").removeAttr("id").closest(".fullscreen-fixed-table")).append('<div class="fullscreen-right-shadow" />').after($("<div class='fullscreen-shim'/>").css({height:t.nativeHeight,top:t.topOffset})).css("position","absolute"),t.$scrollableTable=t.$component.find(".fullscreen-scrollable-table"),t.$fixedTable=t.$component.find(".fullscreen-fixed-table")},this.maintainHeight=function(){var e=Math.min($(window).height()-t.topOffset+$(window).scrollTop(),t.nativeHeight);t.$scrollableTable.outerHeight(e),t.$fixedTable.outerHeight(e)},this.maintainWidth=function(){var e=t.$fixedTable.find(".table-field-index").outerWidth();t.$scrollableTable.css({width:t.$component.parent("main").width()-e,"margin-left":e}),t.$fixedTable.width(e+4)},this.toggleShadows=function(){t.$fixedTable.toggleClass("fullscreen-scrolled-table",0<t.$scrollableTable.scrollLeft()),t.$component.find(".fullscreen-right-shadow").toggleClass("visible",t.$scrollableTable.scrollLeft()<t.$table.width()-t.$scrollableTable.width()),setTimeout(function(){return t.$component.find(".fullscreen-right-shadow").addClass("with-transition")},3e3)}};
|
|||
|
|
"use strict";!function(n){var e,t,a,i=($=n.jQuery)('.govuk-radios__item input[name="branding_style"]:checked');function r(){return $.map(arguments,function(n,e){return encodeURI(n[0])+"="+encodeURI(n[1])}).join("&")}i.length&&(i=i.val(),n=$('<div class="govuk-grid-column-full"></div>'),e=$("form"),t=e.data("previewType"),a=$('<iframe src="/_'.concat(t,"?").concat(r(["branding_style",i]),'" class="branding-preview" scrolling="no"></iframe>')),n.append(a),e.find(".govuk-grid-row").eq(0).prepend(n),e.attr("action",location.pathname.replace(new RegExp("set-".concat(t,"-branding$")),"preview-".concat(t,"-branding"))),e.find('button[type="submit"]').text("Save"),$("fieldset").on("change",'input[name="branding_style"]',function(n){"branding_style"==(n=$(n.target)).attr("name")&&(i=n.val()),a.attr("src","/_".concat(t,"?").concat(r(["branding_style",i])))}))}(window);
|
|||
|
|
"use strict";!function(t){t.ColourPreview=function(){var i=this;this.start=function(t){i.$input=$(t),i.$input.closest(".govuk-form-group").append(i.$preview=$('<span class="textbox-colour-preview"></span>')),i.$input.on("input",i.update).trigger("input")},this.update=function(){return i.$preview.css("background",(t=i.$input.val()).match(/^#[0-9A-F]{6}$/i)?t:"#FFFFFF");var t}}}(window.GOVUK.Modules);
|
|||
|
|
"use strict";window.GOVUK.Modules.TemplateFolderForm=function(){var e=this;this.start=function(t){var e=this;this.$form=$(t),this.$form.find("button[value=unknown]").remove(),this.$liveRegionCounter=this.$form.find(".selection-counter"),this.$liveRegionCounter.before(this.nothingSelectedButtons),this.$liveRegionCounter.before(this.itemsSelectedButtons),this.states=[{key:"nothing-selected-buttons",$el:this.$form.find("#nothing_selected"),cancellable:!1},{key:"items-selected-buttons",$el:this.$form.find("#items_selected"),cancellable:!1},{key:"move-to-existing-folder",$el:this.$form.find("#move_to_folder_radios"),cancellable:!0,setFocus:function(){return $("#move_to_folder_radios").focus()},action:"move to folder",description:"Press move to confirm or cancel to close"},{key:"move-to-new-folder",$el:this.$form.find("#move_to_new_folder_form"),cancellable:!0,setFocus:function(){return $("#move_to_new_folder_form").focus()},action:"move to new folder",description:"Press add to new folder to confirm name or cancel to close"},{key:"add-new-folder",$el:this.$form.find("#add_new_folder_form"),cancellable:!0,setFocus:function(){return $("#add_new_folder_form").focus()},action:"new folder",description:"Press add new folder to confirm name or cancel to close"},{key:"add-new-template",$el:this.$form.find("#add_new_template_form"),cancellable:!0,setFocus:function(){return $("#add_new_template_form").focus()},action:"new template",description:"Press continue to confirm selection or cancel to close"}],this.states.filter(function(t){return t.cancellable}).forEach(function(t){return e.addCancelButton(t)}),this.states.filter(function(t){return"items-selected-buttons"===t.key}).forEach(function(t){return e.addClearButton(t)}),this.states.filter(function(t){return t.setFocus}).forEach(function(t){return t.$el.attr("tabindex","0")}),this.addDescriptionsToStates(),this.activateStickyElements(),this._lastState=this.$form.data("prev-state"),void 0===this._lastState?this.selectActionButtons():(this.currentState=this._lastState,this.render()),this.$form.on("click","button.govuk-button--secondary",function(t){return e.actionButtonClicked(t)}),this.$form.on("change","input[type=checkbox]",function(){return e.templateFolderCheckboxChanged()})},this.addDescriptionsToStates=function(){var n,o;$.each(this.states.filter(function(t){return"description"in t}),function(t,e){n="".concat(e.key,"__description"),o='<p class="govuk-visually-hidden" id="'.concat(n,'">').concat(e.description,"</p>"),e.$el.prepend(o).attr("aria-describedby",n)})},this.activateStickyElements=function(){var e="js-will-stick-at-bottom-when-scrolling";this.states.forEach(function(t){t.$el.find("."+e).removeClass(e).addClass("js-stick-at-bottom-when-scrolling")})},this.addCancelButton=function(t){var e=this,n="[value=".concat(t.key,"]"),o=this.makeButton("Cancel",{onclick:function(){t.$el.find("input:radio").prop("checked",!1),t.$el.find("input:text").val(""),e.selectActionButtons(n)},cancelSelector:n,nonvisualText:t.action});t.$el.find("[type=submit]").after(o)},this.addClearButton=function(t){var e=this,n=this.makeButton("Clear",{onclick:function(){e.$form.find("input:checkbox").prop("checked",!1),e.selectActionButtons("button[value=add-new-template]")},nonvisualText:"selection"});t.$el.find(".template-list-selected-counter").append(n)},this.makeButton=function(t,e){t=$('<a href=""></a>').html(t).addClass("govuk-link govuk-link--no-visited-state js-cancel").data("target",e.cancelSelector||void 0).attr("tabindex","0").on("click keydown",function(t){-1<[13,32,void 0].indexOf(t.keyCode)&&(t.preventDefault(),e.hasOwnProperty("onclick")&&e.onclick())});return e.hasOwnProperty("nonvisualText")&&t.append('<span class="govuk-visually-hidden"> '.concat(e.nonvisualText,"</span>")),t},this.selectActionButtons=function(t){this.currentState="nothing-selected-buttons",this.templateFolderCheckboxChanged(),t&&$(t).focus()},this.stateChanged=function(){var t=this.currentState!==this._lastState;return this._lastState=this.currentState,t},this.$singleNotificationChannel=document.querySelector("div[id=a
|
|||
|
|
"use strict";!function(){var e=window.GOVUK;function i(t){this.module=t,this.$el=t.$formGroup.find(".selection-summary").first(),this.fieldLabel=t.fieldLabel,this.total=t.total,this.addContent(),this.update(t.getSelection())}function o(t){this.module=t,this.fieldLabel=t.fieldLabel,this.fieldsetId=t.$fieldset.attr("id"),this.$el=this.getEl(this.module.expanded),this.module.$formGroup.append(this.$el)}function t(){}i.prototype.templates={all:function(t,e,i){return"All ".concat(i,"s")},some:function(t,e,i){return"".concat(t," of ").concat(e," ").concat(i,"s")},none:function(t,e,i){return{folder:"No folders (only templates outside a folder)","team member":"No team members (only you)"}[i]||"No ".concat(i,"s")}},i.prototype.addContent=function(){var t=this.module.$formGroup.find(".govuk-hint");this.$text=$('<p class="selection-summary__text" />'),"folder"===this.fieldLabel&&this.$text.addClass("selection-summary__text--folders"),this.$el.attr("id",t.attr("id")),this.$el.append(this.$text),t.remove()},i.prototype.update=function(t){var e=t===this.total?"all":0<t?"some":"none";this.$text.html(this.templates[e](t,this.total,this.fieldLabel))},i.prototype.bindEvents=function(){var e=this;this.$el.on("blur",function(t){return $(e).attr("tabindex","-1")})},o.prototype.buttonContent={change:function(t){return"Choose ".concat(t,"s")},done:function(t){return'Done<span class="govuk-visually-hidden"> choosing '.concat(t,"s</span>")}},o.prototype.getEl=function(t){var e=this.buttonContent[t?"done":"change"](this.fieldLabel);return $('<div class="selection-footer'.concat(t?" js-stick-at-bottom-when-scrolling":"",'">\n <button\n class="govuk-button govuk-button--secondary selection-footer__button"\n aria-expanded="').concat(t?"true":"false",'"\n aria-controls="').concat(this.fieldsetId,'">\n ').concat(e,"\n </button>\n </div>"))},o.prototype.update=function(t){this.$el.remove(),this.$el=this.getEl(t),this.module.$formGroup.append(this.$el),e.stickAtBottomWhenScrolling.recalculate()},t.prototype._focusTextElement=function(t){t.attr("tabindex","-1").focus()},t.prototype.start=function(t){this.$component=$(t),this.$formGroup=this.$component.find(".govuk-form-group").first(),this.$fieldset=this.$formGroup.find("fieldset").first(),this.$checkboxes=this.$fieldset.find("input[type=checkbox]"),this.fieldLabel=this.$component.data("fieldLabel"),this.total=this.$checkboxes.length,this.legendText=this.$fieldset.find("legend").first().text().trim(),this.expanded=!1,this.addHeadingHideLegend(),this.footer=new o(this),this.summary=new i(this),this.$fieldset.before(this.summary.$el),this.$formGroup.addClass("selection-wrapper"),this.$fieldset.addClass("selection-content"),this.$fieldset.hide(),this.bindEvents()},t.prototype.getSelection=function(){return this.$checkboxes.filter(":checked").length},t.prototype.addHeadingHideLegend=function(){var t=this.$component.data("heading-level")||"2";this.$heading=$("<h".concat(t,' class="heading-small">').concat(this.legendText,"</h").concat(t,">")),this.$fieldset.before(this.$heading),this.$fieldset.find("legend").addClass("govuk-visually-hidden")},t.prototype.expand=function(t){void 0!==t&&t.preventDefault(),this.expanded||(this.$fieldset.show(),this.expanded=!0,this.summary.update(this.getSelection()),this.footer.update(this.expanded)),this._focusTextElement(this.$fieldset)},t.prototype.collapse=function(t){void 0!==t&&t.preventDefault(),this.expanded&&(this.$fieldset.hide(),this.expanded=!1,this.summary.update(this.getSelection()),this.footer.update(this.expanded)),this._focusTextElement(this.summary.$text)},t.prototype.handleClick=function(t){this.expanded?this.collapse(t):this.expand(t)},t.prototype.handleSelection=function(t){this.summary.update(this.getSelection(),this.total,this.fieldLabel)},t.prototype.bindEvents=function(){this.$formGroup.on("click",".govuk-button",this.handleClick.bind(this)),this.$checkboxes.on("click",this.handleSelection.bind(this)),this.summary.bindEvents(this)},e.Modules.CollapsibleCheckb
|
|||
|
|
"use strict";window.GOVUK.Modules.RadioSlider=function(){this.start=function(e){$(e).on("click",function(){2===(valuesInLabel=$(this).find(":checked").next("label").text().split("/")).length&&(leftValue=valuesInLabel[0],rightValue=valuesInLabel[1],$(this).find(".radio-slider-left-value").html(leftValue),$(this).find(".radio-slider-right-value").html(rightValue))}).trigger("click")}};
|
|||
|
|
"use strict";!function(r){r.GOVUK.Modules.RegisterSecurityKey=function(){this.start=function(n){$(n).on("click",function(t){t.preventDefault(),r.GOVUK.ErrorBanner.hideBanner(),fetch("/webauthn/register").then(function(t){if(t.ok)return t.arrayBuffer();throw Error(t.statusText)}).then(function(t){t=r.CBOR.decode(t);return r.navigator.credentials.create(t)}).then(function(t){return t=t.response,e=n.data("csrfToken"),fetch("/webauthn/register",{method:"POST",headers:{"X-CSRFToken":e},body:r.CBOR.encode({attestationObject:new Uint8Array(t.attestationObject),clientDataJSON:new Uint8Array(t.clientDataJSON)})});var e}).then(function(t){if(!t.ok)throw Error(t.statusText);r.location.reload()}).catch(function(t){console.error(t),r.GOVUK.ErrorBanner.showBanner()})})}}}(window);
|
|||
|
|
"use strict";!function(a){a.GOVUK.Modules.AuthenticateSecurityKey=function(){this.start=function(r){$(r).on("click",function(e){e.preventDefault(),a.GOVUK.ErrorBanner.hideBanner(),fetch("/webauthn/authenticate").then(function(e){if(e.ok)return e.arrayBuffer();throw Error(e.statusText)}).then(function(e){e=a.CBOR.decode(e);return a.navigator.credentials.get(e)}).then(function(e){var t=new URL(a.location.href),n=new URL("/webauthn/authenticate",a.location.href),t=t.searchParams.get("next");return t&&n.searchParams.set("next",t),fetch(n,{method:"POST",headers:{"X-CSRFToken":r.data("csrfToken")},body:a.CBOR.encode({credentialId:new Uint8Array(e.rawId),authenticatorData:new Uint8Array(e.response.authenticatorData),signature:new Uint8Array(e.response.signature),clientDataJSON:new Uint8Array(e.response.clientDataJSON)})})}).then(function(e){if(e.ok)return e.arrayBuffer();throw Error(e.statusText)}).then(function(e){return Promise.resolve(a.CBOR.decode(e))}).then(function(e){a.location.assign(e.redirect_url)}).catch(function(e){console.error(e),a.GOVUK.ErrorBanner.showBanner()})})}}}(window);
|
|||
|
|
"use strict";window.GOVUK.Modules.UpdateStatus=function(){var u=this;this.start=function(t){var e,n,o,i,r,a="update-status";u.$component=$(t),u.$textbox=$("#"+u.$component.data("target")),u.$component.attr("id",a),u.$textbox.attr("aria-describedby",(u.$textbox.attr("aria-describedby")||"")+(u.$textbox.attr("aria-describedby")?" ":"")+a).on("input",(e=u.update,r=i=!(n=150),function(){var t=arguments,a=this;i?r=!0:(e.apply(a,t),i=!0),clearTimeout(o),o=setTimeout(function(){i=!1,r&&e.apply(a,t),r=!1},n)})).trigger("input")},this.update=function(){var a;$.ajax(u.$component.data("updates-url"),{method:"post",data:u.$textbox.parents("form").serialize()}).done((a=u.$component,function(t){return a.html(t.html)})).fail(function(){})}};
|
|||
|
|
"use strict";window.GOVUK.ErrorBanner={hideBanner:function(){return $(".banner-dangerous").addClass("govuk-!-display-none")},showBanner:function(){return $(".banner-dangerous").removeClass("govuk-!-display-none").trigger("focus")}};
|
|||
|
|
"use strict";window.GOVUK.Modules.Homepage=function(){this.start=function(t){var e=$(t),n=0,o=null;e.on("click",function(){5==++n&&e.toggleClass("product-page-intro-wrapper--alternative"),clearTimeout(o),o=setTimeout(function(){return n=0},1500)})}};
|
|||
|
|
"use strict";window.GOVUK.Frontend.initAll();var consentData=window.GOVUK.getConsentCookie(),showHideContent=(window.GOVUK.Modules.CookieBanner.clearOldCookies(consentData),window.GOVUK.hasConsentFor("analytics",consentData)&&window.GOVUK.initAnalytics(),$(function(){return $("time.timeago").timeago()}),$(function(){return GOVUK.stickAtTopWhenScrolling.init()}),$(function(){return GOVUK.stickAtBottomWhenScrolling.init()}),new GOVUK.ShowHideContent);showHideContent.init(),$(function(){return GOVUK.modules.start()}),$(function(){return $(".error-message, .govuk-error-message").eq(0).parent("label").next("input").trigger("focus")}),$(function(){return $(".banner-dangerous").eq(0).trigger("focus")}),$(function(){return $(".govuk-header__container").on("click",function(){$(this).css("border-color","#005ea5")})}),$(".js-mark-focus-on-parent").on("focus blur","*",function(n){$target=$(n.target),"focusin"===n.type?$target.parent().addClass("js-child-has-focus"):$target.parent().removeClass("js-child-has-focus")});
|