mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
git-subtree-dir: community_server git-subtree-mainline: ff11f6efe35bba180260fe84077bcd94298895c1 git-subtree-split: b6544b9e69fb85d4da100934675323c3e8c8ef67
2 lines
32 KiB
JavaScript
2 lines
32 KiB
JavaScript
!function i(a,l,u){function s(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=l[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,l,u)}return l[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(d,e,t){(function(n){!function i(a,l,u){function s(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof d&&d;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=l[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,l,u)}return l[t].exports}for(var c="function"==typeof d&&d,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,U,t){(function(q,F){new function(){function D(e,t,n,r,o,i){return{tag:e,key:t,attrs:n,children:r,text:o,dom:i,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}D.normalize=function(e){return Array.isArray(e)?D("[",void 0,void 0,D.normalizeChildren(e),void 0,void 0):null!=e&&"object"!=typeof e?D("#",void 0,void 0,!1===e?"":e,void 0,void 0):e},D.normalizeChildren=function(e){for(var t=0;t<e.length;t++)e[t]=D.normalize(e[t]);return e};var f=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,v={};function e(e){if(null==e||"string"!=typeof e&&"function"!=typeof e.view)throw Error("The selector must be either a string or a component.");if("string"==typeof e&&void 0===v[e]){for(var t,l,n=[],u={};t=f.exec(e);){var r=t[1],o=t[2];if(""===r&&""!==o)l=o;else if("#"===r)u.id=o;else if("."===r)n.push(o);else if("["===t[3][0]){var i=t[6];i=i&&i.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\"),"class"===t[4]?n.push(i):u[t[4]]=i||!0}}0<n.length&&(u.className=n.join(" ")),v[e]=function(e,t){var n,r,o=!1,i=e.className||e.class;for(var a in u)e[a]=u[a];for(var a in void 0!==i&&(void 0!==e.class&&(e.class=void 0,e.className=i),void 0!==u.className&&(e.className=u.className+" "+i)),e)if("key"!==a){o=!0;break}return Array.isArray(t)&&1==t.length&&null!=t[0]&&"#"===t[0].tag?r=t[0].children:n=t,D(l||"div",e.key,o?e:void 0,n,r,void 0)}}var a,s,c;if(c=null==arguments[1]||"object"==typeof arguments[1]&&void 0===arguments[1].tag&&!Array.isArray(arguments[1])?(a=arguments[1],2):1,arguments.length===c+1)s=Array.isArray(arguments[c])?arguments[c]:[arguments[c]];else{s=[];for(var d=c;d<arguments.length;d++)s.push(arguments[d])}return"string"==typeof e?v[e](a||{},D.normalizeChildren(s)):D(e,a&&a.key,a||{},D.normalizeChildren(s),void 0,void 0)}e.trust=function(e){return null==e&&(e=""),D("<",void 0,void 0,e,void 0,void 0)},e.fragment=function(e,t){return D("[",e.key,e,D.normalizeChildren(t),void 0,void 0)};var t=e;if((h=function(e){if(!(this instanceof h))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var i=this,a=[],l=[],o=t(a,!0),u=t(l,!1),s=i._instance={resolvers:a,rejectors:l},c="function"==typeof F?F:setTimeout;function t(r,o){return function t(n){var e;try{if(!o||null==n||"object"!=typeof n&&"function"!=typeof n||"function"!=typeof(e=n.then))c(function(){o||0!==r.length||console.error("Possible unhandled promise rejection:",n);for(var e=0;e<r.length;e++)r[e](n);a.length=0,l.length=0,s.state=o,s.retry=function(){t(n)}});else{if(n===i)throw new TypeError("Promise can't be resolved w/ itself");d(e.bind(n))}}catch(e){u(e)}}}function d(e){var n=0;function t(t){return function(e){0<n++||t(e)}}var r=t(u);try{e(t(o),r)}catch(e){r(e)}}d(e)}).prototype.then=function(e,t){var o,i,a=this._instance;function n(t,e,n,r){e.push(function(e){if("function"!=typeof t)n(e);else try{o(t(e))}catch(e){i&&i(e)}}),"function"==typeof a.retry&&r===a.state&&a.retry()}var r=new h(function(e,t){o=e,i=t});return n(e,a.resolvers,o,!0),n(t,a.rejectors,i,!1),r},h.prototype.catch=function(e){return this.then(null,e)},h.resolve=function(t){return t instanceof h?t:new h(function(e){e(t)})},h.reject=function(n){return new h(function(e,t){t(n)})},h.all=function(l){return new h(function(n,r){var o=l.length,i=0,a=[];if(0===l.length)n([]);else for(var e=0;e<l.length;e++)!function(t){function e(e){i++,a[t]=e,i===o&&n(a)}null==l[t]||"object"!=typeof l[t]&&"function"!=typeof l[t]||"function"!=typeof l[t].then?e(l[t]):l[t].then(e,r)}(e)})},h.race=function(r){return new h(function(e,t){for(var n=0;n<r.length;n++)r[n].then(e,t)})},"undefined"!=typeof window){void 0===window.Promise&&(window.Promise=h);var h=window.Promise}else void 0!==q&&(void 0===q.Promise&&(q.Promise=h),h=q.Promise);function c(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var r=[];for(var t in e)o(t,e[t]);return r.join("&");function o(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)o(e+"["+n+"]",t[n]);else if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)o(e+"["+n+"]",t[n]);else r.push(encodeURIComponent(e)+(null!=t&&""!==t?"="+encodeURIComponent(t):""))}}function r(e){var a,c=e.document,i=c.createDocumentFragment();function w(e,t,n,r,o,i,a){for(var l=n;l<r;l++){var u=t[l];null!=u&&O(e,A(u,o,a),i)}}function A(e,t,n){var r=e.tag;if(null!=e.attrs&&u(e.attrs,e,t),"string"!=typeof r)return function(e,t,n){e.state=Object.create(e.tag);var r=e.tag.view;if(null!=r.reentrantLock)return i;if(r.reentrantLock=!0,u(e.tag,e,t),e.instance=D.normalize(r.call(e.state,e)),(r.reentrantLock=null)==e.instance)return e.domSize=0,i;if(e.instance===e)throw Error("A view cannot return the vnode it received as arguments");var o=A(e.instance,t,n);return e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0,o}(e,t,n);switch(r){case"#":return e.dom=c.createTextNode(e.children);case"<":return _(e);case"[":return function(e,t,n){var r=c.createDocumentFragment();if(null!=e.children){var o=e.children;w(r,o,0,o.length,t,null,n)}return e.dom=r.firstChild,e.domSize=r.childNodes.length,r}(e,t,n);default:return function(e,t,n){var r=e.tag;switch(e.tag){case"svg":n="http://www.w3.org/2000/svg";break;case"math":n="http://www.w3.org/1998/Math/MathML"}var o,i,a=e.attrs,l=a&&a.is,u=n?l?c.createElementNS(n,r,{is:l}):c.createElementNS(n,r):l?c.createElement(r,{is:l}):c.createElement(r);if(e.dom=u,null!=a&&function(e,t,n){for(var r in t)M(e,r,null,t[r],n)}(e,a,n),null!=e.attrs&&null!=e.attrs.contenteditable)I(e);else if(null!=e.text&&(""!==e.text?u.textContent=e.text:e.children=[D("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children){var s=e.children;w(u,s,0,s.length,t,null,n),i=(o=e).attrs,"select"===o.tag&&null!=i&&("value"in i&&M(o,"value",null,i.value,void 0),"selectedIndex"in i&&M(o,"selectedIndex",null,i.selectedIndex,void 0))}return u}(e,t,n)}}function _(e){var t={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"}[(e.children.match(/^\s*?<(\w+)/im)||[])[1]]||"div",n=c.createElement(t);n.innerHTML=e.children,e.dom=n.firstChild,e.domSize=n.childNodes.length;for(var r,o=c.createDocumentFragment();r=n.firstChild;)o.appendChild(r);return o}function k(e,t,n,r,o,i){if(t!==n&&(null!=t||null!=n))if(null==t)w(e,n,0,n.length,r,o,void 0);else if(null==n)S(t,0,t.length,n);else{if(t.length===n.length){for(var a=!1,l=0;l<n.length;l++)if(null!=n[l]&&null!=t[l]){a=null==n[l].key&&null==t[l].key;break}if(a){for(l=0;l<t.length;l++)t[l]!==n[l]&&(null==t[l]&&null!=n[l]?O(e,A(n[l],r,i),x(t,l+1,o)):null==n[l]?S(t,l,l+1,n):C(e,t[l],n[l],r,x(t,l+1,o),!1,i));return}}var u=function(e,t){if(null!=e.pool&&Math.abs(e.pool.length-t.length)<=Math.abs(e.length-t.length)){var n=e[0]&&e[0].children&&e[0].children.length||0,r=e.pool[0]&&e.pool[0].children&&e.pool[0].children.length||0,o=t[0]&&t[0].children&&t[0].children.length||0;if(Math.abs(r-o)<=Math.abs(n-o))return!0}return!1}(t,n);u&&(t=t.concat(t.pool));for(var s,c=0,d=0,f=t.length-1,v=n.length-1;c<=f&&d<=v;)if((h=t[c])!==(m=n[d])||u)if(null==h)c++;else if(null==m)d++;else if(h.key===m.key)d++,C(e,h,m,r,x(t,++c,o),u,i),u&&h.tag===m.tag&&O(e,P(h),o);else if((h=t[f])!==m||u)if(null==h)f--;else if(null==m)d++;else{if(h.key!==m.key)break;C(e,h,m,r,x(t,f+1,o),u,i),(u||d<v)&&O(e,P(h),x(t,c,o)),f--,d++}else f--,d++;else c++,d++;for(;c<=f&&d<=v;){var h,m;if((h=t[f])!==(m=n[v])||u)if(null==h)f--;else if(null==m)v--;else if(h.key===m.key)C(e,h,m,r,x(t,f+1,o),u,i),u&&h.tag===m.tag&&O(e,P(h),o),null!=h.dom&&(o=h.dom),f--,v--;else{if(s=s||b(t,f),null!=m){var p=s[m.key];if(null!=p){var g=t[p];C(e,g,m,r,x(t,f+1,o),u,i),O(e,P(g),o),t[p].skip=!0,null!=g.dom&&(o=g.dom)}else{var y=A(m,r,void 0);O(e,y,o),o=y}}v--}else f--,v--;if(v<d)break}w(e,n,d,v+1,r,o,i),S(t,c,f+1,n)}}function C(u,s,e,t,n,r,o){var i,a,l,c,d,f,v,h,m,p,g,y,w,b,x,S,T,E=s.tag;if(E===e.tag){if(e.state=s.state,e.events=s.events,x=s,null!=(b=e).attrs&&"function"==typeof b.attrs.onbeforeupdate&&(S=b.attrs.onbeforeupdate.call(b.state,b,x)),"string"!=typeof b.tag&&"function"==typeof b.tag.onbeforeupdate&&(T=b.tag.onbeforeupdate.call(b.state,b,x)),!(void 0===S&&void 0===T||S||T)&&(b.dom=x.dom,b.domSize=x.domSize,b.instance=x.instance,1))return;if(null!=e.attrs&&j(e.attrs,e,t,r),"string"==typeof E)switch(E){case"#":w=e,(y=s).children.toString()!==w.children.toString()&&(y.dom.nodeValue=w.children),w.dom=y.dom;break;case"<":h=u,p=e,g=n,(m=s).children!==p.children?(P(m),O(h,_(p),g)):(p.dom=m.dom,p.domSize=m.domSize);break;case"[":!function(e,t,n,r){k(u,s.children,e.children,t,n,r);var o=0,i=e.children;if((e.dom=null)!=i){for(var a=0;a<i.length;a++){var l=i[a];null!=l&&null!=l.dom&&(null==e.dom&&(e.dom=l.dom),o+=l.domSize||1)}1!==o&&(e.domSize=o)}}(e,t,n,o);break;default:!function(e,t,n,r){var o=t.dom=e.dom;switch(t.tag){case"svg":r="http://www.w3.org/2000/svg";break;case"math":r="http://www.w3.org/1998/Math/MathML"}"textarea"===t.tag&&(null==t.attrs&&(t.attrs={}),null!=t.text&&(t.attrs.value=t.text,t.text=void 0)),function(e,t,n,r){if(null!=n)for(var o in n)M(e,o,t&&t[o],n[o],r);if(null!=t)for(var o in t)null!=n&&o in n||("className"===o&&(o="class"),"o"!==o[0]||"n"!==o[1]||N(o)?"key"!==o&&e.dom.removeAttribute(o):L(e,o,void 0))}(t,e.attrs,t.attrs,r),null!=t.attrs&&null!=t.attrs.contenteditable?I(t):null!=e.text&&null!=t.text&&""!==t.text?e.text.toString()!==t.text.toString()&&(e.dom.firstChild.nodeValue=t.text):(null!=e.text&&(e.children=[D("#",void 0,void 0,e.text,void 0,e.dom.firstChild)]),null!=t.text&&(t.children=[D("#",void 0,void 0,t.text,void 0,void 0)]),k(o,e.children,t.children,n,null,r))}(s,e,t,o)}else i=u,a=s,c=t,d=n,f=r,v=o,(l=e).instance=D.normalize(l.tag.view.call(l.state,l)),j(l.tag,l,c,f),null!=l.instance?(null==a.instance?O(i,A(l.instance,c,v),d):C(i,a.instance,l.instance,c,d,f,v),l.dom=l.instance.dom,l.domSize=l.instance.domSize):null!=a.instance?(z(a.instance,null),l.dom=void 0,l.domSize=0):(l.dom=a.dom,l.domSize=a.domSize)}else z(s,null),O(u,A(e,t,o),n)}function b(e,t){var n={},r=0;for(r=0;r<t;r++){var o=e[r];if(null!=o){var i=o.key;null!=i&&(n[i]=r)}}return n}function P(e){var t=e.domSize;if(null==t&&null!=e.dom)return e.dom;var n=c.createDocumentFragment();if(0<t){for(var r=e.dom;--t;)n.appendChild(r.nextSibling);n.insertBefore(r,n.firstChild)}return n}function x(e,t,n){for(;t<e.length;t++)if(null!=e[t]&&null!=e[t].dom)return e[t].dom;return n}function O(e,t,n){n&&n.parentNode?e.insertBefore(t,n):e.appendChild(t)}function I(e){var t=e.children;if(null!=t&&1===t.length&&"<"===t[0].tag){var n=t[0].children;e.dom.innerHTML!==n&&(e.dom.innerHTML=n)}else if(null!=e.text||null!=t&&0!==t.length)throw new Error("Child node of a contenteditable must be trusted")}function S(e,t,n,r){for(var o=t;o<n;o++){var i=e[o];null!=i&&(i.skip?i.skip=!1:z(i,r))}}function z(r,o){var e,i=1,a=0;function t(){if(++a===i&&(function e(t){if(t.attrs&&t.attrs.onremove&&t.attrs.onremove.call(t.state,t),"string"!=typeof t.tag&&t.tag.onremove&&t.tag.onremove.call(t.state,t),null!=t.instance)e(t.instance);else{var n=t.children;if(Array.isArray(n))for(var r=0;r<n.length;r++){var o=n[r];null!=o&&e(o)}}}(r),r.dom)){var e=r.domSize||1;if(1<e)for(var t=r.dom;--e;)l(t.nextSibling);l(r.dom),null==o||null!=r.domSize||null!=(n=r.attrs)&&(n.oncreate||n.onupdate||n.onbeforeremove||n.onremove)||"string"!=typeof r.tag||(o.pool?o.pool.push(r):o.pool=[r])}var n}r.attrs&&r.attrs.onbeforeremove&&null!=(e=r.attrs.onbeforeremove.call(r.state,r))&&"function"==typeof e.then&&(i++,e.then(t,t)),"string"!=typeof r.tag&&r.tag.onbeforeremove&&null!=(e=r.tag.onbeforeremove.call(r.state,r))&&"function"==typeof e.then&&(i++,e.then(t,t)),t()}function l(e){var t=e.parentNode;null!=t&&t.removeChild(e)}function M(e,t,n,r,o){var i=e.dom;if("key"!==t&&"is"!==t&&(n!==r||"value"===t||"checked"===t||"selectedIndex"===t||"selected"===t&&e.dom===c.activeElement||"object"==typeof r)&&void 0!==r&&!N(t)){var a=t.indexOf(":");if(-1<a&&"xlink"===t.substr(0,a))i.setAttributeNS("http://www.w3.org/1999/xlink",t.slice(a+1),r);else if("o"===t[0]&&"n"===t[1]&&"function"==typeof r)L(e,t,r);else if("style"===t)!function(e,t,n){if(t===n&&(e.style.cssText="",t=null),null==n)e.style.cssText="";else if("string"==typeof n)e.style.cssText=n;else{for(var r in"string"==typeof t&&(e.style.cssText=""),n)e.style[r]=n[r];if(null!=t&&"string"!=typeof t)for(var r in t)r in n||(e.style[r]="")}}(i,n,r);else if(t in i&&"href"!==t&&"list"!==t&&"form"!==t&&"width"!==t&&"height"!==t&&void 0===o&&!(e.attrs.is||-1<e.tag.indexOf("-"))){if("input"===e.tag&&"value"===t&&e.dom.value===r&&e.dom===c.activeElement)return;if("select"===e.tag&&"value"===t&&e.dom.value===r&&e.dom===c.activeElement)return;if("option"===e.tag&&"value"===t&&e.dom.value===r)return;i[t]=r}else"boolean"==typeof r?r?i.setAttribute(t,""):i.removeAttribute(t):i.setAttribute("className"===t?"class":t,r)}}function N(e){return"oninit"===e||"oncreate"===e||"onupdate"===e||"onremove"===e||"onbeforeremove"===e||"onbeforeupdate"===e}function L(e,t,n){var r=e.dom,o="function"!=typeof a?n:function(e){var t=n.call(r,e);return a.call(r,e),t};if(t in r)r[t]="function"==typeof n?o:null;else{var i=t.slice(2);if(void 0===e.events&&(e.events={}),e.events[t]===o)return;null!=e.events[t]&&r.removeEventListener(i,e.events[t],!1),"function"==typeof n&&(e.events[t]=o,r.addEventListener(i,e.events[t],!1))}}function u(e,t,n){"function"==typeof e.oninit&&e.oninit.call(t.state,t),"function"==typeof e.oncreate&&n.push(e.oncreate.bind(t.state,t))}function j(e,t,n,r){r?u(e,t,n):"function"==typeof e.onupdate&&n.push(e.onupdate.bind(t.state,t))}return{render:function(e,t){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var n=[],r=c.activeElement;null==e.vnodes&&(e.textContent=""),Array.isArray(t)||(t=[t]),k(e,e.vnodes,D.normalizeChildren(t),n,null,void 0),e.vnodes=t;for(var o=0;o<n.length;o++)n[o]();c.activeElement!==r&&r.focus()},setEventCallback:function(e){return a=e}}}var l,i,n,a,o=(l=window,i=h,a=0,{request:function(a,e){var t=u();a=s(a,e);var n=new i(function(r,o){null==a.method&&(a.method="GET"),a.method=a.method.toUpperCase();var e="boolean"==typeof a.useBody?a.useBody:"GET"!==a.method&&"TRACE"!==a.method;"function"!=typeof a.serialize&&(a.serialize="undefined"!=typeof FormData&&a.data instanceof FormData?function(e){return e}:JSON.stringify),"function"!=typeof a.deserialize&&(a.deserialize=p),"function"!=typeof a.extract&&(a.extract=g),a.url=d(a.url,a.data),e?a.data=a.serialize(a.data):a.url=m(a.url,a.data);var i=new l.XMLHttpRequest;for(var t in i.open(a.method,a.url,"boolean"!=typeof a.async||a.async,"string"==typeof a.user?a.user:void 0,"string"==typeof a.password?a.password:void 0),a.serialize===JSON.stringify&&e&&i.setRequestHeader("Content-Type","application/json; charset=utf-8"),a.deserialize===p&&i.setRequestHeader("Accept","application/json, text/*"),a.withCredentials&&(i.withCredentials=a.withCredentials),a.headers)!{}.hasOwnProperty.call(a.headers,t)||i.setRequestHeader(t,a.headers[t]);"function"==typeof a.config&&(i=a.config(i,a)||i),i.onreadystatechange=function(){if(i.status&&4===i.readyState)try{var e=a.extract!==g?a.extract(i,a):a.deserialize(a.extract(i,a));if(200<=i.status&&i.status<300||304===i.status)r(y(a.type,e));else{var t=new Error(i.responseText);for(var n in e)t[n]=e[n];o(t)}}catch(e){o(e)}},e&&null!=a.data?i.send(a.data):i.send()});return!0===a.background?n:t(n)},jsonp:function(o,e){var t=u();o=s(o,e);var n=new i(function(t,e){var n=o.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+a++,r=l.document.createElement("script");l[n]=function(e){r.parentNode.removeChild(r),t(y(o.type,e)),delete l[n]},r.onerror=function(){r.parentNode.removeChild(r),e(new Error("JSONP request failed")),delete l[n]},null==o.data&&(o.data={}),o.url=d(o.url,o.data),o.data[o.callbackKey||"callback"]=n,r.src=m(o.url,o.data),l.document.documentElement.appendChild(r)});return!0===o.background?n:t(n)},setCompletionCallback:function(e){n=e}});function u(){var o=0;function i(){0==--o&&"function"==typeof n&&n()}return function t(n){var r=n.then;return n.then=function(){o++;var e=r.apply(n,arguments);return e.then(i,function(e){if(i(),0===o)throw e}),t(e)},n}}function s(e,t){if("string"==typeof e){var n=e;null==(e=t||{}).url&&(e.url=n)}return e}function d(e,t){if(null==t)return e;for(var n=e.match(/:[^\/]+/gi)||[],r=0;r<n.length;r++){var o=n[r].slice(1);null!=t[o]&&(e=e.replace(n[r],t[o]))}return e}function m(e,t){var n=c(t);if(""!==n){var r=e.indexOf("?")<0?"?":"&";e+=r+n}return e}function p(t){try{return""!==t?JSON.parse(t):null}catch(e){throw new Error(t)}}function g(e){return e.responseText}function y(e,t){if("function"==typeof e){if(!Array.isArray(t))return new e(t);for(var n=0;n<t.length;n++)t[n]=new e(t[n])}return t}var w,b=function(e){var t=r(e);t.setEventCallback(function(e){!1!==e.redraw&&n()});var a=[];function l(e){var t=a.indexOf(e);-1<t&&a.splice(t,2)}function n(){for(var e=1;e<a.length;e+=2)a[e]()}return{subscribe:function(e,t){var n,r,o,i;l(e),a.push(e,(n=t,r=0,o=null,i="function"==typeof requestAnimationFrame?requestAnimationFrame:setTimeout,function(){var e=Date.now();0===r||16<=e-r?(r=e,n()):null===o&&(o=i(function(){o=null,n(),r=Date.now()},16-(e-r)))}))},unsubscribe:l,redraw:n,render:t.render}}(window);o.setCompletionCallback(b.redraw),t.mount=(w=b,function(e,t){if(null===t)return w.render(e,[]),void w.unsubscribe(e);if(null==t.view)throw new Error("m.mount(element, component) expects a component, not a vnode");w.subscribe(e,function(){w.render(e,D(t))}),w.redraw()});function x(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t=e.split("&"),n={},r={},o=0;o<t.length;o++){var i=t[o].split("="),a=decodeURIComponent(i[0]),l=2===i.length?decodeURIComponent(i[1]):"";"true"===l?l=!0:"false"===l&&(l=!1);var u=a.split(/\]\[?|\[/),s=n;-1<a.indexOf("[")&&u.pop();for(var c=0;c<u.length;c++){var d=u[c],f=u[c+1],v=""==f||!isNaN(parseInt(f,10)),h=c===u.length-1;""===d&&(null==r[a=u.slice(0,c).join()]&&(r[a]=0),d=r[a]++),null==s[d]&&(s[d]=h?l:v?[]:{}),s=s[d]}}return n}var S,T,E,A,_,k,C,P,O,I,z,M,N,L=h;function j(e,t,n){if(null==e)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");function i(){null!=E&&T.render(e,E(D(A,_.key,_)))}function a(){N.setPath(t,null,{replace:!0})}N.defineRoutes(n,function(t,n,r){var o=C=function(e,t){o===C&&(A=null!=t&&"function"==typeof t.view?t:"div",_=n,k=r,C=null,E=(e.render||function(e){return e}).bind(e),i())};t.view?o({},t):t.onmatch?L.resolve(t.onmatch(n,r)).then(function(e){o(t,e)},a):o(t,"div")},a),T.subscribe(e,i)}function H(e){var t=P.location[e].replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent);return"pathname"===e&&"/"!==t[0]&&(t="/"+t),t}function R(e,t,n){var r=e.indexOf("?"),o=e.indexOf("#"),i=-1<r?r:-1<o?o:e.length;if(-1<r){var a=-1<o?o:e.length,l=x(e.slice(r+1,a));for(var u in l)t[u]=l[u]}if(-1<o){var s=x(e.slice(o+1));for(var u in s)n[u]=s[u]}return e.slice(0,i)}t.route=(S=window,T=b,I="function"==typeof(P=S).history.pushState,z="function"==typeof F?F:setTimeout,N=M={prefix:"#!",getPath:function(){switch(M.prefix.charAt(0)){case"#":return H("hash").slice(M.prefix.length);case"?":return H("search").slice(M.prefix.length)+H("hash");default:return H("pathname").slice(M.prefix.length)+H("search")+H("hash")}},setPath:function(e,n,t){var r={},o={};if(e=R(e,r,o),null!=n){for(var i in n)r[i]=n[i];e=e.replace(/:([^\/]+)/g,function(e,t){return delete r[t],n[t]})}var a=c(r);a&&(e+="?"+a);var l=c(o);if(l&&(e+="#"+l),I){var u=t?t.state:null,s=t?t.title:null;P.onpopstate(),t&&t.replace?P.history.replaceState(u,s,M.prefix+e):P.history.pushState(u,s,M.prefix+e)}else P.location.href=M.prefix+e},defineRoutes:function(l,u,s){function e(){var r=M.getPath(),o={},e=R(r,o,o),t=P.history.state;if(null!=t)for(var n in t)o[n]=t[n];for(var i in l){var a=new RegExp("^"+i.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(a.test(e))return void e.replace(a,function(){for(var e=i.match(/:[^\/]+/g)||[],t=[].slice.call(arguments,1,-2),n=0;n<e.length;n++)o[e[n].replace(/:|\./g,"")]=decodeURIComponent(t[n]);u(l[i],o,r,i)})}s(r,o)}var t;I?P.onpopstate=(t=e,function(){null==O&&(O=z(function(){O=null,t()}))}):"#"===M.prefix.charAt(0)&&(P.onhashchange=e),e()}},j.set=function(e,t,n){null!=C&&(n={replace:!0}),C=null,N.setPath(e,t,n)},j.get=function(){return k},j.prefix=function(e){N.prefix=e},j.link=function(e){e.dom.setAttribute("href",N.prefix+e.attrs.href),e.dom.onclick=function(e){if(!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault(),e.redraw=!1;var t=this.getAttribute("href");0===t.indexOf(N.prefix)&&(t=t.slice(N.prefix.length)),j.set(t,void 0,void 0)}}},j.param=function(e){return void 0!==_&&void 0!==e?_[e]:_},j),t.withAttr=function(t,n,r){return function(e){n.call(r||this,t in e.currentTarget?e.currentTarget[t]:e.currentTarget.getAttribute(t))}};var W=r(window);t.render=W.render,t.redraw=b.redraw,t.request=o.request,t.jsonp=o.jsonp,t.parseQueryString=x,t.buildQueryString=c,t.version="1.0.0",t.vnode=D,void 0!==U?U.exports=t:window.m=t}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:3}],2:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:l}catch(e){o=l}}();var s,c=[],d=!1,f=-1;function v(){d&&s&&(d=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!d){var e=u(v);d=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,d=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||d||u(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],3:[function(u,e,s){(function(e,t){var r=u("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function l(e,t){this._id=e,this._clearFn=t}s.setTimeout=function(){return new l(n.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new l(n.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},s.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},s._unrefActive=s.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},s.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),s.clearImmediate(t))}),t},s.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,u("timers").setImmediate,u("timers").clearImmediate)},{"process/browser.js":2,timers:3}],4:[function(e,t,n){"use strict";var r=l(e("mithril")),o=l(e("./view")),i=l(e("./texte/de")),a=l(e("./texte/en"));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){e&&"function"==typeof e?"ie"!=(document.attachEvent&&void 0!==document.attachEvent?"ie":"not-ie")?document.addEventListener("DOMContentLoaded",function(){return e()}):document.attachEvent("onreadystatechange",function(){if("complete"===document.readyState)return e()}):console.error("The callback is not a function!")}document,window,u(function(){"en"===window.language?window.texte=a.default:window.texte=i.default,r.default.mount(window.document.getElementById("gradido-mithril-passphrase"),o.default)})},{"./texte/de":7,"./texte/en":8,"./view":10,mithril:1}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=e("mithril"))&&r.__esModule?r:{default:r},i={view:function(e){return(0,o.default)("div.modal.visible-modal",{tabindex:"-1",role:"dialog"},(0,o.default)("div.modal-dialog",{role:"document"},(0,o.default)("div.modal-content",[(0,o.default)("p.grid-header",e.attrs.title),(0,o.default)("div.modal-body",e.attrs.body),(0,o.default)("div.modal-footer",[(0,o.default)("button.btn.btn-primary",{type:"button","data-dismiss":"modal",onclick:e.attrs.dismiss},"Ok")])])))},oninit:function(e){}};n.default=i},{mithril:1}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={decodeHTMLEntities:function(e){for(var t=[["auml","ä"],["ouml","ö"],["uuml","ü"],["Auml","Ä"],["Ouml","Ö"],["Uuml","Ü"],["szlig","ß"]],n=0,r=t.length;n<r;++n)e=e.replace(new RegExp("&"+t[n][0]+";","g"),t[n][1]);return e},encodeHTMLEntities:function(e){for(var t=[["auml","ä"],["ouml","ö"],["uuml","ü"],["Auml","Ä"],["Ouml","Ö"],["Uuml","Ü"],["szlig","ß"]],n=0,r=t.length;n<r;++n)e=e.replace(new RegExp(t[n][1],"g"),"&"+t[n][0]+";");return e}};n.default=r},{}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={INVALID_PASSPHRASE:"Das ist nicht deine Passphrase, Möchtest du nochmal schauen wie sie hieß?",SHOW_PASSPHRASE:"Passphrase nochmal anzeigen",DIALOG_SHOW_PASSPHRASE_TITLE:"Passphrase",YES:"Ja",NEXT:"Weiter"}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={INVALID_PASSPHRASE:"This is not the correct passphrase. This is not your passphrase, would you like to see what its name was again?",SHOW_PASSPHRASE:"Show Passphrase again",DIALOG_SHOW_PASSPHRASE_TITLE:"Passphrase",YES:"Yes",NEXT:"Next"}},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=e("mithril"))&&r.__esModule?r:{default:r},i={view:function(t){var e=".btn.btn-sm";return t.attrs.disabled?(e+=".disabled",(0,o.default)("span")):(void 0!==t.attrs.btnColor&&(e+="."+t.attrs.btnColor),(0,o.default)("button"+e,{type:"button",disabled:t.attrs.disabled,onclick:function(e){t.attrs.addWordCallback(t.attrs.word)}},t.attrs.word))},oninit:function(e){}};n.default=i},{mithril:1}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(e("mithril")),i=r(e("./button")),a=r(e("../lib/dialog")),u=r(e("../lib/htmlEntities")),l=r(e("./passphrase"));function r(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e.state.textboxContent=t.replace(/[^\S ]+/g,""),""===t?e.state.valid=!0:c(e)}function c(e){var t=e.state.textboxContent.split(" "),n=0;for(var r in e.state.valid=!0,e.state.btnDisableArray)e.state.btnDisableArray[r]=!1;for(var o in t){var i=u.default.encodeHTMLEntities(t[o]);if(""!==i){var a=mnemonicWords.indexOf(i);if(-1!==a){if(e.state.passphraseIndices[n]!==a){e.state.valid=!1;break}n++;var l=e.state.passphraseIndicesSorted.indexOf(a);-1!==l&&(e.state.btnDisableArray[l]=!0)}}}n===e.state.passphraseIndices.length?e.state.complete=!0:e.state.complete=!1,e.state.countValidWords=n}var d={view:function(r){var e=".form-control";!1===r.state.valid?e+=".is-invalid":r.state.complete&&(e+=".is-valid");for(var t=[],n=0;n<r.state.countValidWords;n++)t.push(r.state.passphraseIndices[n]);return(0,o.default)("div",[(0,o.default)("div.col-md-12.showcase_content_area.mb-0",[r.state.passphraseIndicesSorted.map(function(e,t){return(0,o.default)(i.default,{btnColor:"btn-outline-warning",word:u.default.decodeHTMLEntities(mnemonicWords[e]),addWordCallback:function(e){var t,n;n=e,1<(t=r).state.textboxContent.length&&" "!=t.state.textboxContent.slice(-1)&&(t.state.textboxContent+=" "),t.state.textboxContent+=n,c(t)},disabled:r.state.btnDisableArray[t]})}),t.map(function(e){return(0,o.default)("button.btn.btn-sm.btn-outline-success.disabled",{disabled:!0},u.default.decodeHTMLEntities(mnemonicWords[e]))})]),(0,o.default)("div.form-group.row-showcase_row_area",(0,o.default)("div.col-lg-8.col-md-9.mx-auto",[(0,o.default)("textarea"+e+"#inputPassphrase",{name:"inputPassphrase",cols:10,rows:5,value:r.state.textboxContent,onchange:function(e){s(r,e.target.value)},onkeyup:function(e){s(r,e.target.value)},onpaste:function(e){s(r,e.target.value)}}),!1===r.state.valid?(0,o.default)(".invalid-feedback",[window.texte.INVALID_PASSPHRASE,(0,o.default)("button.btn.btn-primary",{onclick:function(){return!(r.state.showPassphrase=!0)}},[(0,o.default)("i.mdi.mdi-eye"),(0,o.default)("span",o.default.trust(" ")),(0,o.default)("span",window.texte.SHOW_PASSPHRASE)])]):null])),r.state.complete?(0,o.default)("input.btn.btn-sm.btn-success.pull-right",{name:"btnChecked",type:"submit",value:window.texte.NEXT}):null],!0===r.state.showPassphrase?(0,o.default)(a.default,{title:window.texte.DIALOG_SHOW_PASSPHRASE_TITLE,body:(0,o.default)(l.default),dismiss:function(){r.state.showPassphrase=!1}}):null)},oninit:function(e){e.state.passphraseIndices=[],e.state.passphraseIndicesSorted=[],e.state.textboxContent="",e.state.btnDisableArray=[],e.state.countValidWords=0;var t=passphrase.split(" ");for(var n in t){var r=t[n],o=mnemonicWords.indexOf(r);-1===o?65533!==r.charCodeAt(0)&&console.error("invalid index: %o for word: %o",o,r):e.state.passphraseIndices[n]=o}for(var i in t.sort(),t){var a=t[i],l=mnemonicWords.indexOf(a);-1===l?65533!==a.charCodeAt(0)&&console.error("invalid index: %o for word: %o",l,a):(e.state.passphraseIndicesSorted[i]=l,e.state.btnDisableArray[i]=!1)}e.state.valid=!0,e.state.complete=!1,e.state.showPassphrase=!1}};n.default=d},{"../lib/dialog":5,"../lib/htmlEntities":6,"./button":9,"./passphrase":11,mithril:1}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("mithril")),o=i(e("../lib/htmlEntities"));function i(e){return e&&e.__esModule?e:{default:e}}var a={view:function(e){var t=passphrase;return 65533===passphrase.slice(-1).charCodeAt(0)&&(t=passphrase.substring(0,passphrase.length-1)),(0,r.default)(".col-lg-8.col-md-10.mx-auto.alert.alert-primary",{style:{"text-align":"center"}},o.default.decodeHTMLEntities(t))},oninit:function(e){}};n.default=a},{"../lib/htmlEntities":6,mithril:1}]},{},[4])}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|