diff --git a/community_server/src/Template/StateUsers/search.ctp b/community_server/src/Template/StateUsers/search.ctp index 07a20210c..626cb7313 100644 --- a/community_server/src/Template/StateUsers/search.ctp +++ b/community_server/src/Template/StateUsers/search.ctp @@ -73,7 +73,7 @@ $stateOptions = [ csfr_token = ''; -Html->script('userSearch') ?> +Html->script('userSearch.min') ?> diff --git a/community_server/webroot/js/userSearch.js b/community_server/webroot/js/userSearch.js index 4ad04ec57..84f030ad0 100644 --- a/community_server/webroot/js/userSearch.js +++ b/community_server/webroot/js/userSearch.js @@ -185,7 +185,7 @@ process.chdir = function (dir) { process.umask = function() { return 0; }; },{}],2:[function(require,module,exports){ -(function (setImmediate,clearImmediate){ +(function (setImmediate,clearImmediate){(function (){ var nextTick = require('process/browser.js').nextTick; var apply = Function.prototype.apply; var slice = Array.prototype.slice; @@ -262,1170 +262,1170 @@ exports.setImmediate = typeof setImmediate === "function" ? setImmediate : funct exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { delete immediateIds[id]; }; -}).call(this,require("timers").setImmediate,require("timers").clearImmediate) +}).call(this)}).call(this,require("timers").setImmediate,require("timers").clearImmediate) },{"process/browser.js":1,"timers":2}],3:[function(require,module,exports){ -(function (global,setImmediate){ -new function() { - -function Vnode(tag, key, attrs0, children, text, dom) { - return {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} -} -Vnode.normalize = function(node) { - if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined) - if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined) - return node -} -Vnode.normalizeChildren = function normalizeChildren(children) { - for (var i = 0; i < children.length; i++) { - children[i] = Vnode.normalize(children[i]) - } - return children -} -var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g -var selectorCache = {} -function hyperscript(selector) { - if (selector == null || typeof selector !== "string" && typeof selector.view !== "function") { - throw Error("The selector must be either a string or a component."); - } - if (typeof selector === "string" && selectorCache[selector] === undefined) { - var match, tag, classes = [], attributes = {} - while (match = selectorParser.exec(selector)) { - var type = match[1], value = match[2] - if (type === "" && value !== "") tag = value - else if (type === "#") attributes.id = value - else if (type === ".") classes.push(value) - else if (match[3][0] === "[") { - var attrValue = match[6] - if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\") - if (match[4] === "class") classes.push(attrValue) - else attributes[match[4]] = attrValue || true - } - } - if (classes.length > 0) attributes.className = classes.join(" ") - selectorCache[selector] = function(attrs, children) { - var hasAttrs = false, childList, text - var className = attrs.className || attrs.class - for (var key in attributes) attrs[key] = attributes[key] - if (className !== undefined) { - if (attrs.class !== undefined) { - attrs.class = undefined - attrs.className = className - } - if (attributes.className !== undefined) attrs.className = attributes.className + " " + className - } - for (var key in attrs) { - if (key !== "key") { - hasAttrs = true - break - } - } - if (Array.isArray(children) && children.length == 1 && children[0] != null && children[0].tag === "#") text = children[0].children - else childList = children - return Vnode(tag || "div", attrs.key, hasAttrs ? attrs : undefined, childList, text, undefined) - } - } - var attrs, children, childrenIndex - if (arguments[1] == null || typeof arguments[1] === "object" && arguments[1].tag === undefined && !Array.isArray(arguments[1])) { - attrs = arguments[1] - childrenIndex = 2 - } - else childrenIndex = 1 - if (arguments.length === childrenIndex + 1) { - children = Array.isArray(arguments[childrenIndex]) ? arguments[childrenIndex] : [arguments[childrenIndex]] - } - else { - children = [] - for (var i = childrenIndex; i < arguments.length; i++) children.push(arguments[i]) - } - if (typeof selector === "string") return selectorCache[selector](attrs || {}, Vnode.normalizeChildren(children)) - return Vnode(selector, attrs && attrs.key, attrs || {}, Vnode.normalizeChildren(children), undefined, undefined) -} -hyperscript.trust = function(html) { - if (html == null) html = "" - return Vnode("<", undefined, undefined, html, undefined, undefined) -} -hyperscript.fragment = function(attrs1, children) { - return Vnode("[", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined) -} -var m = hyperscript -/** @constructor */ -var PromisePolyfill = function(executor) { - if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with `new`") - if (typeof executor !== "function") throw new TypeError("executor must be a function") - var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false) - var instance = self._instance = {resolvers: resolvers, rejectors: rejectors} - var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout - function handler(list, shouldAbsorb) { - return function execute(value) { - var then - try { - if (shouldAbsorb && value != null && (typeof value === "object" || typeof value === "function") && typeof (then = value.then) === "function") { - if (value === self) throw new TypeError("Promise can't be resolved w/ itself") - executeOnce(then.bind(value)) - } - else { - callAsync(function() { - if (!shouldAbsorb && list.length === 0) console.error("Possible unhandled promise rejection:", value) - for (var i = 0; i < list.length; i++) list[i](value) - resolvers.length = 0, rejectors.length = 0 - instance.state = shouldAbsorb - instance.retry = function() {execute(value)} - }) - } - } - catch (e) { - rejectCurrent(e) - } - } - } - function executeOnce(then) { - var runs = 0 - function run(fn) { - return function(value) { - if (runs++ > 0) return - fn(value) - } - } - var onerror = run(rejectCurrent) - try {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)} - } - executeOnce(executor) -} -PromisePolyfill.prototype.then = function(onFulfilled, onRejection) { - var self = this, instance = self._instance - function handle(callback, list, next, state) { - list.push(function(value) { - if (typeof callback !== "function") next(value) - else try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)} - }) - if (typeof instance.retry === "function" && state === instance.state) instance.retry() - } - var resolveNext, rejectNext - var promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject}) - handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false) - return promise -} -PromisePolyfill.prototype.catch = function(onRejection) { - return this.then(null, onRejection) -} -PromisePolyfill.resolve = function(value) { - if (value instanceof PromisePolyfill) return value - return new PromisePolyfill(function(resolve) {resolve(value)}) -} -PromisePolyfill.reject = function(value) { - return new PromisePolyfill(function(resolve, reject) {reject(value)}) -} -PromisePolyfill.all = function(list) { - return new PromisePolyfill(function(resolve, reject) { - var total = list.length, count = 0, values = [] - if (list.length === 0) resolve([]) - else for (var i = 0; i < list.length; i++) { - (function(i) { - function consume(value) { - count++ - values[i] = value - if (count === total) resolve(values) - } - if (list[i] != null && (typeof list[i] === "object" || typeof list[i] === "function") && typeof list[i].then === "function") { - list[i].then(consume, reject) - } - else consume(list[i]) - })(i) - } - }) -} -PromisePolyfill.race = function(list) { - return new PromisePolyfill(function(resolve, reject) { - for (var i = 0; i < list.length; i++) { - list[i].then(resolve, reject) - } - }) -} -if (typeof window !== "undefined") { - if (typeof window.Promise === "undefined") window.Promise = PromisePolyfill - var PromisePolyfill = window.Promise -} else if (typeof global !== "undefined") { - if (typeof global.Promise === "undefined") global.Promise = PromisePolyfill - var PromisePolyfill = global.Promise -} else { -} -var buildQueryString = function(object) { - if (Object.prototype.toString.call(object) !== "[object Object]") return "" - var args = [] - for (var key0 in object) { - destructure(key0, object[key0]) - } - return args.join("&") - function destructure(key0, value) { - if (Array.isArray(value)) { - for (var i = 0; i < value.length; i++) { - destructure(key0 + "[" + i + "]", value[i]) - } - } - else if (Object.prototype.toString.call(value) === "[object Object]") { - for (var i in value) { - destructure(key0 + "[" + i + "]", value[i]) - } - } - else args.push(encodeURIComponent(key0) + (value != null && value !== "" ? "=" + encodeURIComponent(value) : "")) - } -} -var _8 = function($window, Promise) { - var callbackCount = 0 - var oncompletion - function setCompletionCallback(callback) {oncompletion = callback} - function finalizer() { - var count = 0 - function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()} - return function finalize(promise0) { - var then0 = promise0.then - promise0.then = function() { - count++ - var next = then0.apply(promise0, arguments) - next.then(complete, function(e) { - complete() - if (count === 0) throw e - }) - return finalize(next) - } - return promise0 - } - } - function normalize(args, extra) { - if (typeof args === "string") { - var url = args - args = extra || {} - if (args.url == null) args.url = url - } - return args - } - function request(args, extra) { - var finalize = finalizer() - args = normalize(args, extra) - var promise0 = new Promise(function(resolve, reject) { - if (args.method == null) args.method = "GET" - args.method = args.method.toUpperCase() - var useBody = typeof args.useBody === "boolean" ? args.useBody : args.method !== "GET" && args.method !== "TRACE" - if (typeof args.serialize !== "function") args.serialize = typeof FormData !== "undefined" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify - if (typeof args.deserialize !== "function") args.deserialize = deserialize - if (typeof args.extract !== "function") args.extract = extract - args.url = interpolate(args.url, args.data) - if (useBody) args.data = args.serialize(args.data) - else args.url = assemble(args.url, args.data) - var xhr = new $window.XMLHttpRequest() - xhr.open(args.method, args.url, typeof args.async === "boolean" ? args.async : true, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined) - if (args.serialize === JSON.stringify && useBody) { - xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8") - } - if (args.deserialize === deserialize) { - xhr.setRequestHeader("Accept", "application/json, text/*") - } - if (args.withCredentials) xhr.withCredentials = args.withCredentials - for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) { - xhr.setRequestHeader(key, args.headers[key]) - } - if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr - xhr.onreadystatechange = function() { - // Don't throw errors on xhr.abort(). XMLHttpRequests ends up in a state of - // xhr.status == 0 and xhr.readyState == 4 if aborted after open, but before completion. - if (xhr.status && xhr.readyState === 4) { - try { - var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args)) - if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) { - resolve(cast(args.type, response)) - } - else { - var error = new Error(xhr.responseText) - for (var key in response) error[key] = response[key] - reject(error) - } - } - catch (e) { - reject(e) - } - } - } - if (useBody && (args.data != null)) xhr.send(args.data) - else xhr.send() - }) - return args.background === true ? promise0 : finalize(promise0) - } - function jsonp(args, extra) { - var finalize = finalizer() - args = normalize(args, extra) - var promise0 = new Promise(function(resolve, reject) { - var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++ - var script = $window.document.createElement("script") - $window[callbackName] = function(data) { - script.parentNode.removeChild(script) - resolve(cast(args.type, data)) - delete $window[callbackName] - } - script.onerror = function() { - script.parentNode.removeChild(script) - reject(new Error("JSONP request failed")) - delete $window[callbackName] - } - if (args.data == null) args.data = {} - args.url = interpolate(args.url, args.data) - args.data[args.callbackKey || "callback"] = callbackName - script.src = assemble(args.url, args.data) - $window.document.documentElement.appendChild(script) - }) - return args.background === true? promise0 : finalize(promise0) - } - function interpolate(url, data) { - if (data == null) return url - var tokens = url.match(/:[^\/]+/gi) || [] - for (var i = 0; i < tokens.length; i++) { - var key = tokens[i].slice(1) - if (data[key] != null) { - url = url.replace(tokens[i], data[key]) - } - } - return url - } - function assemble(url, data) { - var querystring = buildQueryString(data) - if (querystring !== "") { - var prefix = url.indexOf("?") < 0 ? "?" : "&" - url += prefix + querystring - } - return url - } - function deserialize(data) { - try {return data !== "" ? JSON.parse(data) : null} - catch (e) {throw new Error(data)} - } - function extract(xhr) {return xhr.responseText} - function cast(type0, data) { - if (typeof type0 === "function") { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - data[i] = new type0(data[i]) - } - } - else return new type0(data) - } - return data - } - return {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback} -} -var requestService = _8(window, PromisePolyfill) -var coreRenderer = function($window) { - var $doc = $window.document - var $emptyFragment = $doc.createDocumentFragment() - var onevent - function setEventCallback(callback) {return onevent = callback} - //create - function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) { - for (var i = start; i < end; i++) { - var vnode = vnodes[i] - if (vnode != null) { - insertNode(parent, createNode(vnode, hooks, ns), nextSibling) - } - } - } - function createNode(vnode, hooks, ns) { - var tag = vnode.tag - if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks) - if (typeof tag === "string") { - switch (tag) { - case "#": return createText(vnode) - case "<": return createHTML(vnode) - case "[": return createFragment(vnode, hooks, ns) - default: return createElement(vnode, hooks, ns) - } - } - else return createComponent(vnode, hooks, ns) - } - function createText(vnode) { - return vnode.dom = $doc.createTextNode(vnode.children) - } - function createHTML(vnode) { - var match1 = vnode.children.match(/^\s*?<(\w+)/im) || [] - var parent = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"}[match1[1]] || "div" - var temp = $doc.createElement(parent) - temp.innerHTML = vnode.children - vnode.dom = temp.firstChild - vnode.domSize = temp.childNodes.length - var fragment = $doc.createDocumentFragment() - var child - while (child = temp.firstChild) { - fragment.appendChild(child) - } - return fragment - } - function createFragment(vnode, hooks, ns) { - var fragment = $doc.createDocumentFragment() - if (vnode.children != null) { - var children = vnode.children - createNodes(fragment, children, 0, children.length, hooks, null, ns) - } - vnode.dom = fragment.firstChild - vnode.domSize = fragment.childNodes.length - return fragment - } - function createElement(vnode, hooks, ns) { - var tag = vnode.tag - switch (vnode.tag) { - case "svg": ns = "http://www.w3.org/2000/svg"; break - case "math": ns = "http://www.w3.org/1998/Math/MathML"; break - } - var attrs2 = vnode.attrs - var is = attrs2 && attrs2.is - var element = ns ? - is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) : - is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag) - vnode.dom = element - if (attrs2 != null) { - setAttrs(vnode, attrs2, ns) - } - if (vnode.attrs != null && vnode.attrs.contenteditable != null) { - setContentEditable(vnode) - } - else { - if (vnode.text != null) { - if (vnode.text !== "") element.textContent = vnode.text - else vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)] - } - if (vnode.children != null) { - var children = vnode.children - createNodes(element, children, 0, children.length, hooks, null, ns) - setLateAttrs(vnode) - } - } - return element - } - function createComponent(vnode, hooks, ns) { - vnode.state = Object.create(vnode.tag) - var view = vnode.tag.view - if (view.reentrantLock != null) return $emptyFragment - view.reentrantLock = true - initLifecycle(vnode.tag, vnode, hooks) - vnode.instance = Vnode.normalize(view.call(vnode.state, vnode)) - view.reentrantLock = null - if (vnode.instance != null) { - if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as arguments") - var element = createNode(vnode.instance, hooks, ns) - vnode.dom = vnode.instance.dom - vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0 - return element - } - else { - vnode.domSize = 0 - return $emptyFragment - } - } - //update - function updateNodes(parent, old, vnodes, hooks, nextSibling, ns) { - if (old === vnodes || old == null && vnodes == null) return - else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, undefined) - else if (vnodes == null) removeNodes(old, 0, old.length, vnodes) - else { - if (old.length === vnodes.length) { - var isUnkeyed = false - for (var i = 0; i < vnodes.length; i++) { - if (vnodes[i] != null && old[i] != null) { - isUnkeyed = vnodes[i].key == null && old[i].key == null - break - } - } - if (isUnkeyed) { - for (var i = 0; i < old.length; i++) { - if (old[i] === vnodes[i]) continue - else if (old[i] == null && vnodes[i] != null) insertNode(parent, createNode(vnodes[i], hooks, ns), getNextSibling(old, i + 1, nextSibling)) - else if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes) - else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), false, ns) - } - return - } - } - var recycling = isRecyclable(old, vnodes) - if (recycling) old = old.concat(old.pool) - var oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map - while (oldEnd >= oldStart && end >= start) { - var o = old[oldStart], v = vnodes[start] - if (o === v && !recycling) oldStart++, start++ - else if (o == null) oldStart++ - else if (v == null) start++ - else if (o.key === v.key) { - oldStart++, start++ - updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), recycling, ns) - if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling) - } - else { - var o = old[oldEnd] - if (o === v && !recycling) oldEnd--, start++ - else if (o == null) oldEnd-- - else if (v == null) start++ - else if (o.key === v.key) { - updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) - if (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling)) - oldEnd--, start++ - } - else break - } - } - while (oldEnd >= oldStart && end >= start) { - var o = old[oldEnd], v = vnodes[end] - if (o === v && !recycling) oldEnd--, end-- - else if (o == null) oldEnd-- - else if (v == null) end-- - else if (o.key === v.key) { - updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) - if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling) - if (o.dom != null) nextSibling = o.dom - oldEnd--, end-- - } - else { - if (!map) map = getKeyMap(old, oldEnd) - if (v != null) { - var oldIndex = map[v.key] - if (oldIndex != null) { - var movable = old[oldIndex] - updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) - insertNode(parent, toFragment(movable), nextSibling) - old[oldIndex].skip = true - if (movable.dom != null) nextSibling = movable.dom - } - else { - var dom = createNode(v, hooks, undefined) - insertNode(parent, dom, nextSibling) - nextSibling = dom - } - } - end-- - } - if (end < start) break - } - createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns) - removeNodes(old, oldStart, oldEnd + 1, vnodes) - } - } - function updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) { - var oldTag = old.tag, tag = vnode.tag - if (oldTag === tag) { - vnode.state = old.state - vnode.events = old.events - if (shouldUpdate(vnode, old)) return - if (vnode.attrs != null) { - updateLifecycle(vnode.attrs, vnode, hooks, recycling) - } - if (typeof oldTag === "string") { - switch (oldTag) { - case "#": updateText(old, vnode); break - case "<": updateHTML(parent, old, vnode, nextSibling); break - case "[": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break - default: updateElement(old, vnode, hooks, ns) - } - } - else updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) - } - else { - removeNode(old, null) - insertNode(parent, createNode(vnode, hooks, ns), nextSibling) - } - } - function updateText(old, vnode) { - if (old.children.toString() !== vnode.children.toString()) { - old.dom.nodeValue = vnode.children - } - vnode.dom = old.dom - } - function updateHTML(parent, old, vnode, nextSibling) { - if (old.children !== vnode.children) { - toFragment(old) - insertNode(parent, createHTML(vnode), nextSibling) - } - else vnode.dom = old.dom, vnode.domSize = old.domSize - } - function updateFragment(parent, old, vnode, hooks, nextSibling, ns) { - updateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns) - var domSize = 0, children = vnode.children - vnode.dom = null - if (children != null) { - for (var i = 0; i < children.length; i++) { - var child = children[i] - if (child != null && child.dom != null) { - if (vnode.dom == null) vnode.dom = child.dom - domSize += child.domSize || 1 - } - } - if (domSize !== 1) vnode.domSize = domSize - } - } - function updateElement(old, vnode, hooks, ns) { - var element = vnode.dom = old.dom - switch (vnode.tag) { - case "svg": ns = "http://www.w3.org/2000/svg"; break - case "math": ns = "http://www.w3.org/1998/Math/MathML"; break - } - if (vnode.tag === "textarea") { - if (vnode.attrs == null) vnode.attrs = {} - if (vnode.text != null) { - vnode.attrs.value = vnode.text //FIXME handle0 multiple children - vnode.text = undefined - } - } - updateAttrs(vnode, old.attrs, vnode.attrs, ns) - if (vnode.attrs != null && vnode.attrs.contenteditable != null) { - setContentEditable(vnode) - } - else if (old.text != null && vnode.text != null && vnode.text !== "") { - if (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text - } - else { - if (old.text != null) old.children = [Vnode("#", undefined, undefined, old.text, undefined, old.dom.firstChild)] - if (vnode.text != null) vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)] - updateNodes(element, old.children, vnode.children, hooks, null, ns) - } - } - function updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) { - vnode.instance = Vnode.normalize(vnode.tag.view.call(vnode.state, vnode)) - updateLifecycle(vnode.tag, vnode, hooks, recycling) - if (vnode.instance != null) { - if (old.instance == null) insertNode(parent, createNode(vnode.instance, hooks, ns), nextSibling) - else updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns) - vnode.dom = vnode.instance.dom - vnode.domSize = vnode.instance.domSize - } - else if (old.instance != null) { - removeNode(old.instance, null) - vnode.dom = undefined - vnode.domSize = 0 - } - else { - vnode.dom = old.dom - vnode.domSize = old.domSize - } - } - function isRecyclable(old, vnodes) { - if (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) { - var oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0 - var poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0 - var vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0 - if (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) { - return true - } - } - return false - } - function getKeyMap(vnodes, end) { - var map = {}, i = 0 - for (var i = 0; i < end; i++) { - var vnode = vnodes[i] - if (vnode != null) { - var key2 = vnode.key - if (key2 != null) map[key2] = i - } - } - return map - } - function toFragment(vnode) { - var count0 = vnode.domSize - if (count0 != null || vnode.dom == null) { - var fragment = $doc.createDocumentFragment() - if (count0 > 0) { - var dom = vnode.dom - while (--count0) fragment.appendChild(dom.nextSibling) - fragment.insertBefore(dom, fragment.firstChild) - } - return fragment - } - else return vnode.dom - } - function getNextSibling(vnodes, i, nextSibling) { - for (; i < vnodes.length; i++) { - if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom - } - return nextSibling - } - function insertNode(parent, dom, nextSibling) { - if (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling) - else parent.appendChild(dom) - } - function setContentEditable(vnode) { - var children = vnode.children - if (children != null && children.length === 1 && children[0].tag === "<") { - var content = children[0].children - if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content - } - else if (vnode.text != null || children != null && children.length !== 0) throw new Error("Child node of a contenteditable must be trusted") - } - //remove - function removeNodes(vnodes, start, end, context) { - for (var i = start; i < end; i++) { - var vnode = vnodes[i] - if (vnode != null) { - if (vnode.skip) vnode.skip = false - else removeNode(vnode, context) - } - } - } - function removeNode(vnode, context) { - var expected = 1, called = 0 - if (vnode.attrs && vnode.attrs.onbeforeremove) { - var result = vnode.attrs.onbeforeremove.call(vnode.state, vnode) - if (result != null && typeof result.then === "function") { - expected++ - result.then(continuation, continuation) - } - } - if (typeof vnode.tag !== "string" && vnode.tag.onbeforeremove) { - var result = vnode.tag.onbeforeremove.call(vnode.state, vnode) - if (result != null && typeof result.then === "function") { - expected++ - result.then(continuation, continuation) - } - } - continuation() - function continuation() { - if (++called === expected) { - onremove(vnode) - if (vnode.dom) { - var count0 = vnode.domSize || 1 - if (count0 > 1) { - var dom = vnode.dom - while (--count0) { - removeNodeFromDOM(dom.nextSibling) - } - } - removeNodeFromDOM(vnode.dom) - if (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === "string") { //TODO test custom elements - if (!context.pool) context.pool = [vnode] - else context.pool.push(vnode) - } - } - } - } - } - function removeNodeFromDOM(node) { - var parent = node.parentNode - if (parent != null) parent.removeChild(node) - } - function onremove(vnode) { - if (vnode.attrs && vnode.attrs.onremove) vnode.attrs.onremove.call(vnode.state, vnode) - if (typeof vnode.tag !== "string" && vnode.tag.onremove) vnode.tag.onremove.call(vnode.state, vnode) - if (vnode.instance != null) onremove(vnode.instance) - else { - var children = vnode.children - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - var child = children[i] - if (child != null) onremove(child) - } - } - } - } - //attrs2 - function setAttrs(vnode, attrs2, ns) { - for (var key2 in attrs2) { - setAttr(vnode, key2, null, attrs2[key2], ns) - } - } - function setAttr(vnode, key2, old, value, ns) { - var element = vnode.dom - if (key2 === "key" || key2 === "is" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== "object" || typeof value === "undefined" || isLifecycleMethod(key2)) return - var nsLastIndex = key2.indexOf(":") - if (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === "xlink") { - element.setAttributeNS("http://www.w3.org/1999/xlink", key2.slice(nsLastIndex + 1), value) - } - else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value) - else if (key2 === "style") updateStyle(element, old, value) - else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) { - //setting input[value] to same value by typing on focused element moves cursor to end in Chrome - if (vnode.tag === "input" && key2 === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return - //setting select[value] to same value while having select open blinks select dropdown in Chrome - if (vnode.tag === "select" && key2 === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return - //setting option[value] to same value while having select open blinks select dropdown in Chrome - if (vnode.tag === "option" && key2 === "value" && vnode.dom.value === value) return - element[key2] = value - } - else { - if (typeof value === "boolean") { - if (value) element.setAttribute(key2, "") - else element.removeAttribute(key2) - } - else element.setAttribute(key2 === "className" ? "class" : key2, value) - } - } - function setLateAttrs(vnode) { - var attrs2 = vnode.attrs - if (vnode.tag === "select" && attrs2 != null) { - if ("value" in attrs2) setAttr(vnode, "value", null, attrs2.value, undefined) - if ("selectedIndex" in attrs2) setAttr(vnode, "selectedIndex", null, attrs2.selectedIndex, undefined) - } - } - function updateAttrs(vnode, old, attrs2, ns) { - if (attrs2 != null) { - for (var key2 in attrs2) { - setAttr(vnode, key2, old && old[key2], attrs2[key2], ns) - } - } - if (old != null) { - for (var key2 in old) { - if (attrs2 == null || !(key2 in attrs2)) { - if (key2 === "className") key2 = "class" - if (key2[0] === "o" && key2[1] === "n" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined) - else if (key2 !== "key") vnode.dom.removeAttribute(key2) - } - } - } - } - function isFormAttribute(vnode, attr) { - return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement - } - function isLifecycleMethod(attr) { - return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate" - } - function isAttribute(attr) { - return attr === "href" || attr === "list" || attr === "form" || attr === "width" || attr === "height"// || attr === "type" - } - function isCustomElement(vnode){ - return vnode.attrs.is || vnode.tag.indexOf("-") > -1 - } - function hasIntegrationMethods(source) { - return source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove) - } - //style - function updateStyle(element, old, style) { - if (old === style) element.style.cssText = "", old = null - if (style == null) element.style.cssText = "" - else if (typeof style === "string") element.style.cssText = style - else { - if (typeof old === "string") element.style.cssText = "" - for (var key2 in style) { - element.style[key2] = style[key2] - } - if (old != null && typeof old !== "string") { - for (var key2 in old) { - if (!(key2 in style)) element.style[key2] = "" - } - } - } - } - //event - function updateEvent(vnode, key2, value) { - var element = vnode.dom - var callback = typeof onevent !== "function" ? value : function(e) { - var result = value.call(element, e) - onevent.call(element, e) - return result - } - if (key2 in element) element[key2] = typeof value === "function" ? callback : null - else { - var eventName = key2.slice(2) - if (vnode.events === undefined) vnode.events = {} - if (vnode.events[key2] === callback) return - if (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false) - if (typeof value === "function") { - vnode.events[key2] = callback - element.addEventListener(eventName, vnode.events[key2], false) - } - } - } - //lifecycle - function initLifecycle(source, vnode, hooks) { - if (typeof source.oninit === "function") source.oninit.call(vnode.state, vnode) - if (typeof source.oncreate === "function") hooks.push(source.oncreate.bind(vnode.state, vnode)) - } - function updateLifecycle(source, vnode, hooks, recycling) { - if (recycling) initLifecycle(source, vnode, hooks) - else if (typeof source.onupdate === "function") hooks.push(source.onupdate.bind(vnode.state, vnode)) - } - function shouldUpdate(vnode, old) { - var forceVnodeUpdate, forceComponentUpdate - if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === "function") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old) - if (typeof vnode.tag !== "string" && typeof vnode.tag.onbeforeupdate === "function") forceComponentUpdate = vnode.tag.onbeforeupdate.call(vnode.state, vnode, old) - if (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) { - vnode.dom = old.dom - vnode.domSize = old.domSize - vnode.instance = old.instance - return true - } - return false - } - function render(dom, vnodes) { - if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.") - var hooks = [] - var active = $doc.activeElement - // First time0 rendering into a node clears it out - if (dom.vnodes == null) dom.textContent = "" - if (!Array.isArray(vnodes)) vnodes = [vnodes] - updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), hooks, null, undefined) - dom.vnodes = vnodes - for (var i = 0; i < hooks.length; i++) hooks[i]() - if ($doc.activeElement !== active) active.focus() - } - return {render: render, setEventCallback: setEventCallback} -} -function throttle(callback) { - //60fps translates to 16.6ms, round it down since setTimeout requires int - var time = 16 - var last = 0, pending = null - var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame : setTimeout - return function() { - var now = Date.now() - if (last === 0 || now - last >= time) { - last = now - callback() - } - else if (pending === null) { - pending = timeout(function() { - pending = null - callback() - last = Date.now() - }, time - (now - last)) - } - } -} -var _11 = function($window) { - var renderService = coreRenderer($window) - renderService.setEventCallback(function(e) { - if (e.redraw !== false) redraw() - }) - - var callbacks = [] - function subscribe(key1, callback) { - unsubscribe(key1) - callbacks.push(key1, throttle(callback)) - } - function unsubscribe(key1) { - var index = callbacks.indexOf(key1) - if (index > -1) callbacks.splice(index, 2) - } - function redraw() { - for (var i = 1; i < callbacks.length; i += 2) { - callbacks[i]() - } - } - return {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render} -} -var redrawService = _11(window) -requestService.setCompletionCallback(redrawService.redraw) -var _16 = function(redrawService0) { - return function(root, component) { - if (component === null) { - redrawService0.render(root, []) - redrawService0.unsubscribe(root) - return - } - - if (component.view == null) throw new Error("m.mount(element, component) expects a component, not a vnode") - - var run0 = function() { - redrawService0.render(root, Vnode(component)) - } - redrawService0.subscribe(root, run0) - redrawService0.redraw() - } -} -m.mount = _16(redrawService) -var Promise = PromisePolyfill -var parseQueryString = function(string) { - if (string === "" || string == null) return {} - if (string.charAt(0) === "?") string = string.slice(1) - var entries = string.split("&"), data0 = {}, counters = {} - for (var i = 0; i < entries.length; i++) { - var entry = entries[i].split("=") - var key5 = decodeURIComponent(entry[0]) - var value = entry.length === 2 ? decodeURIComponent(entry[1]) : "" - if (value === "true") value = true - else if (value === "false") value = false - var levels = key5.split(/\]\[?|\[/) - var cursor = data0 - if (key5.indexOf("[") > -1) levels.pop() - for (var j = 0; j < levels.length; j++) { - var level = levels[j], nextLevel = levels[j + 1] - var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10)) - var isValue = j === levels.length - 1 - if (level === "") { - var key5 = levels.slice(0, j).join() - if (counters[key5] == null) counters[key5] = 0 - level = counters[key5]++ - } - if (cursor[level] == null) { - cursor[level] = isValue ? value : isNumber ? [] : {} - } - cursor = cursor[level] - } - } - return data0 -} -var coreRouter = function($window) { - var supportsPushState = typeof $window.history.pushState === "function" - var callAsync0 = typeof setImmediate === "function" ? setImmediate : setTimeout - function normalize1(fragment0) { - var data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent) - if (fragment0 === "pathname" && data[0] !== "/") data = "/" + data - return data - } - var asyncId - function debounceAsync(callback0) { - return function() { - if (asyncId != null) return - asyncId = callAsync0(function() { - asyncId = null - callback0() - }) - } - } - function parsePath(path, queryData, hashData) { - var queryIndex = path.indexOf("?") - var hashIndex = path.indexOf("#") - var pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length - if (queryIndex > -1) { - var queryEnd = hashIndex > -1 ? hashIndex : path.length - var queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd)) - for (var key4 in queryParams) queryData[key4] = queryParams[key4] - } - if (hashIndex > -1) { - var hashParams = parseQueryString(path.slice(hashIndex + 1)) - for (var key4 in hashParams) hashData[key4] = hashParams[key4] - } - return path.slice(0, pathEnd) - } - var router = {prefix: "#!"} - router.getPath = function() { - var type2 = router.prefix.charAt(0) - switch (type2) { - case "#": return normalize1("hash").slice(router.prefix.length) - case "?": return normalize1("search").slice(router.prefix.length) + normalize1("hash") - default: return normalize1("pathname").slice(router.prefix.length) + normalize1("search") + normalize1("hash") - } - } - router.setPath = function(path, data, options) { - var queryData = {}, hashData = {} - path = parsePath(path, queryData, hashData) - if (data != null) { - for (var key4 in data) queryData[key4] = data[key4] - path = path.replace(/:([^\/]+)/g, function(match2, token) { - delete queryData[token] - return data[token] - }) - } - var query = buildQueryString(queryData) - if (query) path += "?" + query - var hash = buildQueryString(hashData) - if (hash) path += "#" + hash - if (supportsPushState) { - var state = options ? options.state : null - var title = options ? options.title : null - $window.onpopstate() - if (options && options.replace) $window.history.replaceState(state, title, router.prefix + path) - else $window.history.pushState(state, title, router.prefix + path) - } - else $window.location.href = router.prefix + path - } - router.defineRoutes = function(routes, resolve, reject) { - function resolveRoute() { - var path = router.getPath() - var params = {} - var pathname = parsePath(path, params, params) - - var state = $window.history.state - if (state != null) { - for (var k in state) params[k] = state[k] - } - for (var route0 in routes) { - var matcher = new RegExp("^" + route0.replace(/:[^\/]+?\.{3}/g, "(.*?)").replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$") - if (matcher.test(pathname)) { - pathname.replace(matcher, function() { - var keys = route0.match(/:[^\/]+/g) || [] - var values = [].slice.call(arguments, 1, -2) - for (var i = 0; i < keys.length; i++) { - params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i]) - } - resolve(routes[route0], params, path, route0) - }) - return - } - } - reject(path, params) - } - - if (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute) - else if (router.prefix.charAt(0) === "#") $window.onhashchange = resolveRoute - resolveRoute() - } - - return router -} -var _20 = function($window, redrawService0) { - var routeService = coreRouter($window) - var identity = function(v) {return v} - var render1, component, attrs3, currentPath, lastUpdate - var route = function(root, defaultRoute, routes) { - if (root == null) throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined") - var run1 = function() { - if (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3))) - } - var bail = function() { - routeService.setPath(defaultRoute, null, {replace: true}) - } - routeService.defineRoutes(routes, function(payload, params, path) { - var update = lastUpdate = function(routeResolver, comp) { - if (update !== lastUpdate) return - component = comp != null && typeof comp.view === "function" ? comp : "div", attrs3 = params, currentPath = path, lastUpdate = null - render1 = (routeResolver.render || identity).bind(routeResolver) - run1() - } - if (payload.view) update({}, payload) - else { - if (payload.onmatch) { - Promise.resolve(payload.onmatch(params, path)).then(function(resolved) { - update(payload, resolved) - }, bail) - } - else update(payload, "div") - } - }, bail) - redrawService0.subscribe(root, run1) - } - route.set = function(path, data, options) { - if (lastUpdate != null) options = {replace: true} - lastUpdate = null - routeService.setPath(path, data, options) - } - route.get = function() {return currentPath} - route.prefix = function(prefix0) {routeService.prefix = prefix0} - route.link = function(vnode1) { - vnode1.dom.setAttribute("href", routeService.prefix + vnode1.attrs.href) - vnode1.dom.onclick = function(e) { - if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return - e.preventDefault() - e.redraw = false - var href = this.getAttribute("href") - if (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length) - route.set(href, undefined, undefined) - } - } - route.param = function(key3) { - if(typeof attrs3 !== "undefined" && typeof key3 !== "undefined") return attrs3[key3] - return attrs3 - } - return route -} -m.route = _20(window, redrawService) -m.withAttr = function(attrName, callback1, context) { - return function(e) { - callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName)) - } -} -var _28 = coreRenderer(window) -m.render = _28.render -m.redraw = redrawService.redraw -m.request = requestService.request -m.jsonp = requestService.jsonp -m.parseQueryString = parseQueryString -m.buildQueryString = buildQueryString -m.version = "1.0.0" -m.vnode = Vnode -if (typeof module !== "undefined") module["exports"] = m -else window.m = m +(function (global,setImmediate){(function (){ +new function() { + +function Vnode(tag, key, attrs0, children, text, dom) { + return {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} } -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) +Vnode.normalize = function(node) { + if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined) + if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined) + return node +} +Vnode.normalizeChildren = function normalizeChildren(children) { + for (var i = 0; i < children.length; i++) { + children[i] = Vnode.normalize(children[i]) + } + return children +} +var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g +var selectorCache = {} +function hyperscript(selector) { + if (selector == null || typeof selector !== "string" && typeof selector.view !== "function") { + throw Error("The selector must be either a string or a component."); + } + if (typeof selector === "string" && selectorCache[selector] === undefined) { + var match, tag, classes = [], attributes = {} + while (match = selectorParser.exec(selector)) { + var type = match[1], value = match[2] + if (type === "" && value !== "") tag = value + else if (type === "#") attributes.id = value + else if (type === ".") classes.push(value) + else if (match[3][0] === "[") { + var attrValue = match[6] + if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\") + if (match[4] === "class") classes.push(attrValue) + else attributes[match[4]] = attrValue || true + } + } + if (classes.length > 0) attributes.className = classes.join(" ") + selectorCache[selector] = function(attrs, children) { + var hasAttrs = false, childList, text + var className = attrs.className || attrs.class + for (var key in attributes) attrs[key] = attributes[key] + if (className !== undefined) { + if (attrs.class !== undefined) { + attrs.class = undefined + attrs.className = className + } + if (attributes.className !== undefined) attrs.className = attributes.className + " " + className + } + for (var key in attrs) { + if (key !== "key") { + hasAttrs = true + break + } + } + if (Array.isArray(children) && children.length == 1 && children[0] != null && children[0].tag === "#") text = children[0].children + else childList = children + return Vnode(tag || "div", attrs.key, hasAttrs ? attrs : undefined, childList, text, undefined) + } + } + var attrs, children, childrenIndex + if (arguments[1] == null || typeof arguments[1] === "object" && arguments[1].tag === undefined && !Array.isArray(arguments[1])) { + attrs = arguments[1] + childrenIndex = 2 + } + else childrenIndex = 1 + if (arguments.length === childrenIndex + 1) { + children = Array.isArray(arguments[childrenIndex]) ? arguments[childrenIndex] : [arguments[childrenIndex]] + } + else { + children = [] + for (var i = childrenIndex; i < arguments.length; i++) children.push(arguments[i]) + } + if (typeof selector === "string") return selectorCache[selector](attrs || {}, Vnode.normalizeChildren(children)) + return Vnode(selector, attrs && attrs.key, attrs || {}, Vnode.normalizeChildren(children), undefined, undefined) +} +hyperscript.trust = function(html) { + if (html == null) html = "" + return Vnode("<", undefined, undefined, html, undefined, undefined) +} +hyperscript.fragment = function(attrs1, children) { + return Vnode("[", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined) +} +var m = hyperscript +/** @constructor */ +var PromisePolyfill = function(executor) { + if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with `new`") + if (typeof executor !== "function") throw new TypeError("executor must be a function") + var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false) + var instance = self._instance = {resolvers: resolvers, rejectors: rejectors} + var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout + function handler(list, shouldAbsorb) { + return function execute(value) { + var then + try { + if (shouldAbsorb && value != null && (typeof value === "object" || typeof value === "function") && typeof (then = value.then) === "function") { + if (value === self) throw new TypeError("Promise can't be resolved w/ itself") + executeOnce(then.bind(value)) + } + else { + callAsync(function() { + if (!shouldAbsorb && list.length === 0) console.error("Possible unhandled promise rejection:", value) + for (var i = 0; i < list.length; i++) list[i](value) + resolvers.length = 0, rejectors.length = 0 + instance.state = shouldAbsorb + instance.retry = function() {execute(value)} + }) + } + } + catch (e) { + rejectCurrent(e) + } + } + } + function executeOnce(then) { + var runs = 0 + function run(fn) { + return function(value) { + if (runs++ > 0) return + fn(value) + } + } + var onerror = run(rejectCurrent) + try {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)} + } + executeOnce(executor) +} +PromisePolyfill.prototype.then = function(onFulfilled, onRejection) { + var self = this, instance = self._instance + function handle(callback, list, next, state) { + list.push(function(value) { + if (typeof callback !== "function") next(value) + else try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)} + }) + if (typeof instance.retry === "function" && state === instance.state) instance.retry() + } + var resolveNext, rejectNext + var promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject}) + handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false) + return promise +} +PromisePolyfill.prototype.catch = function(onRejection) { + return this.then(null, onRejection) +} +PromisePolyfill.resolve = function(value) { + if (value instanceof PromisePolyfill) return value + return new PromisePolyfill(function(resolve) {resolve(value)}) +} +PromisePolyfill.reject = function(value) { + return new PromisePolyfill(function(resolve, reject) {reject(value)}) +} +PromisePolyfill.all = function(list) { + return new PromisePolyfill(function(resolve, reject) { + var total = list.length, count = 0, values = [] + if (list.length === 0) resolve([]) + else for (var i = 0; i < list.length; i++) { + (function(i) { + function consume(value) { + count++ + values[i] = value + if (count === total) resolve(values) + } + if (list[i] != null && (typeof list[i] === "object" || typeof list[i] === "function") && typeof list[i].then === "function") { + list[i].then(consume, reject) + } + else consume(list[i]) + })(i) + } + }) +} +PromisePolyfill.race = function(list) { + return new PromisePolyfill(function(resolve, reject) { + for (var i = 0; i < list.length; i++) { + list[i].then(resolve, reject) + } + }) +} +if (typeof window !== "undefined") { + if (typeof window.Promise === "undefined") window.Promise = PromisePolyfill + var PromisePolyfill = window.Promise +} else if (typeof global !== "undefined") { + if (typeof global.Promise === "undefined") global.Promise = PromisePolyfill + var PromisePolyfill = global.Promise +} else { +} +var buildQueryString = function(object) { + if (Object.prototype.toString.call(object) !== "[object Object]") return "" + var args = [] + for (var key0 in object) { + destructure(key0, object[key0]) + } + return args.join("&") + function destructure(key0, value) { + if (Array.isArray(value)) { + for (var i = 0; i < value.length; i++) { + destructure(key0 + "[" + i + "]", value[i]) + } + } + else if (Object.prototype.toString.call(value) === "[object Object]") { + for (var i in value) { + destructure(key0 + "[" + i + "]", value[i]) + } + } + else args.push(encodeURIComponent(key0) + (value != null && value !== "" ? "=" + encodeURIComponent(value) : "")) + } +} +var _8 = function($window, Promise) { + var callbackCount = 0 + var oncompletion + function setCompletionCallback(callback) {oncompletion = callback} + function finalizer() { + var count = 0 + function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()} + return function finalize(promise0) { + var then0 = promise0.then + promise0.then = function() { + count++ + var next = then0.apply(promise0, arguments) + next.then(complete, function(e) { + complete() + if (count === 0) throw e + }) + return finalize(next) + } + return promise0 + } + } + function normalize(args, extra) { + if (typeof args === "string") { + var url = args + args = extra || {} + if (args.url == null) args.url = url + } + return args + } + function request(args, extra) { + var finalize = finalizer() + args = normalize(args, extra) + var promise0 = new Promise(function(resolve, reject) { + if (args.method == null) args.method = "GET" + args.method = args.method.toUpperCase() + var useBody = typeof args.useBody === "boolean" ? args.useBody : args.method !== "GET" && args.method !== "TRACE" + if (typeof args.serialize !== "function") args.serialize = typeof FormData !== "undefined" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify + if (typeof args.deserialize !== "function") args.deserialize = deserialize + if (typeof args.extract !== "function") args.extract = extract + args.url = interpolate(args.url, args.data) + if (useBody) args.data = args.serialize(args.data) + else args.url = assemble(args.url, args.data) + var xhr = new $window.XMLHttpRequest() + xhr.open(args.method, args.url, typeof args.async === "boolean" ? args.async : true, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined) + if (args.serialize === JSON.stringify && useBody) { + xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8") + } + if (args.deserialize === deserialize) { + xhr.setRequestHeader("Accept", "application/json, text/*") + } + if (args.withCredentials) xhr.withCredentials = args.withCredentials + for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) { + xhr.setRequestHeader(key, args.headers[key]) + } + if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr + xhr.onreadystatechange = function() { + // Don't throw errors on xhr.abort(). XMLHttpRequests ends up in a state of + // xhr.status == 0 and xhr.readyState == 4 if aborted after open, but before completion. + if (xhr.status && xhr.readyState === 4) { + try { + var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args)) + if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) { + resolve(cast(args.type, response)) + } + else { + var error = new Error(xhr.responseText) + for (var key in response) error[key] = response[key] + reject(error) + } + } + catch (e) { + reject(e) + } + } + } + if (useBody && (args.data != null)) xhr.send(args.data) + else xhr.send() + }) + return args.background === true ? promise0 : finalize(promise0) + } + function jsonp(args, extra) { + var finalize = finalizer() + args = normalize(args, extra) + var promise0 = new Promise(function(resolve, reject) { + var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++ + var script = $window.document.createElement("script") + $window[callbackName] = function(data) { + script.parentNode.removeChild(script) + resolve(cast(args.type, data)) + delete $window[callbackName] + } + script.onerror = function() { + script.parentNode.removeChild(script) + reject(new Error("JSONP request failed")) + delete $window[callbackName] + } + if (args.data == null) args.data = {} + args.url = interpolate(args.url, args.data) + args.data[args.callbackKey || "callback"] = callbackName + script.src = assemble(args.url, args.data) + $window.document.documentElement.appendChild(script) + }) + return args.background === true? promise0 : finalize(promise0) + } + function interpolate(url, data) { + if (data == null) return url + var tokens = url.match(/:[^\/]+/gi) || [] + for (var i = 0; i < tokens.length; i++) { + var key = tokens[i].slice(1) + if (data[key] != null) { + url = url.replace(tokens[i], data[key]) + } + } + return url + } + function assemble(url, data) { + var querystring = buildQueryString(data) + if (querystring !== "") { + var prefix = url.indexOf("?") < 0 ? "?" : "&" + url += prefix + querystring + } + return url + } + function deserialize(data) { + try {return data !== "" ? JSON.parse(data) : null} + catch (e) {throw new Error(data)} + } + function extract(xhr) {return xhr.responseText} + function cast(type0, data) { + if (typeof type0 === "function") { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + data[i] = new type0(data[i]) + } + } + else return new type0(data) + } + return data + } + return {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback} +} +var requestService = _8(window, PromisePolyfill) +var coreRenderer = function($window) { + var $doc = $window.document + var $emptyFragment = $doc.createDocumentFragment() + var onevent + function setEventCallback(callback) {return onevent = callback} + //create + function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) { + for (var i = start; i < end; i++) { + var vnode = vnodes[i] + if (vnode != null) { + insertNode(parent, createNode(vnode, hooks, ns), nextSibling) + } + } + } + function createNode(vnode, hooks, ns) { + var tag = vnode.tag + if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks) + if (typeof tag === "string") { + switch (tag) { + case "#": return createText(vnode) + case "<": return createHTML(vnode) + case "[": return createFragment(vnode, hooks, ns) + default: return createElement(vnode, hooks, ns) + } + } + else return createComponent(vnode, hooks, ns) + } + function createText(vnode) { + return vnode.dom = $doc.createTextNode(vnode.children) + } + function createHTML(vnode) { + var match1 = vnode.children.match(/^\s*?<(\w+)/im) || [] + var parent = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"}[match1[1]] || "div" + var temp = $doc.createElement(parent) + temp.innerHTML = vnode.children + vnode.dom = temp.firstChild + vnode.domSize = temp.childNodes.length + var fragment = $doc.createDocumentFragment() + var child + while (child = temp.firstChild) { + fragment.appendChild(child) + } + return fragment + } + function createFragment(vnode, hooks, ns) { + var fragment = $doc.createDocumentFragment() + if (vnode.children != null) { + var children = vnode.children + createNodes(fragment, children, 0, children.length, hooks, null, ns) + } + vnode.dom = fragment.firstChild + vnode.domSize = fragment.childNodes.length + return fragment + } + function createElement(vnode, hooks, ns) { + var tag = vnode.tag + switch (vnode.tag) { + case "svg": ns = "http://www.w3.org/2000/svg"; break + case "math": ns = "http://www.w3.org/1998/Math/MathML"; break + } + var attrs2 = vnode.attrs + var is = attrs2 && attrs2.is + var element = ns ? + is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) : + is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag) + vnode.dom = element + if (attrs2 != null) { + setAttrs(vnode, attrs2, ns) + } + if (vnode.attrs != null && vnode.attrs.contenteditable != null) { + setContentEditable(vnode) + } + else { + if (vnode.text != null) { + if (vnode.text !== "") element.textContent = vnode.text + else vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)] + } + if (vnode.children != null) { + var children = vnode.children + createNodes(element, children, 0, children.length, hooks, null, ns) + setLateAttrs(vnode) + } + } + return element + } + function createComponent(vnode, hooks, ns) { + vnode.state = Object.create(vnode.tag) + var view = vnode.tag.view + if (view.reentrantLock != null) return $emptyFragment + view.reentrantLock = true + initLifecycle(vnode.tag, vnode, hooks) + vnode.instance = Vnode.normalize(view.call(vnode.state, vnode)) + view.reentrantLock = null + if (vnode.instance != null) { + if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as arguments") + var element = createNode(vnode.instance, hooks, ns) + vnode.dom = vnode.instance.dom + vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0 + return element + } + else { + vnode.domSize = 0 + return $emptyFragment + } + } + //update + function updateNodes(parent, old, vnodes, hooks, nextSibling, ns) { + if (old === vnodes || old == null && vnodes == null) return + else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, undefined) + else if (vnodes == null) removeNodes(old, 0, old.length, vnodes) + else { + if (old.length === vnodes.length) { + var isUnkeyed = false + for (var i = 0; i < vnodes.length; i++) { + if (vnodes[i] != null && old[i] != null) { + isUnkeyed = vnodes[i].key == null && old[i].key == null + break + } + } + if (isUnkeyed) { + for (var i = 0; i < old.length; i++) { + if (old[i] === vnodes[i]) continue + else if (old[i] == null && vnodes[i] != null) insertNode(parent, createNode(vnodes[i], hooks, ns), getNextSibling(old, i + 1, nextSibling)) + else if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes) + else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), false, ns) + } + return + } + } + var recycling = isRecyclable(old, vnodes) + if (recycling) old = old.concat(old.pool) + var oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map + while (oldEnd >= oldStart && end >= start) { + var o = old[oldStart], v = vnodes[start] + if (o === v && !recycling) oldStart++, start++ + else if (o == null) oldStart++ + else if (v == null) start++ + else if (o.key === v.key) { + oldStart++, start++ + updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), recycling, ns) + if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling) + } + else { + var o = old[oldEnd] + if (o === v && !recycling) oldEnd--, start++ + else if (o == null) oldEnd-- + else if (v == null) start++ + else if (o.key === v.key) { + updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) + if (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling)) + oldEnd--, start++ + } + else break + } + } + while (oldEnd >= oldStart && end >= start) { + var o = old[oldEnd], v = vnodes[end] + if (o === v && !recycling) oldEnd--, end-- + else if (o == null) oldEnd-- + else if (v == null) end-- + else if (o.key === v.key) { + updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) + if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling) + if (o.dom != null) nextSibling = o.dom + oldEnd--, end-- + } + else { + if (!map) map = getKeyMap(old, oldEnd) + if (v != null) { + var oldIndex = map[v.key] + if (oldIndex != null) { + var movable = old[oldIndex] + updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns) + insertNode(parent, toFragment(movable), nextSibling) + old[oldIndex].skip = true + if (movable.dom != null) nextSibling = movable.dom + } + else { + var dom = createNode(v, hooks, undefined) + insertNode(parent, dom, nextSibling) + nextSibling = dom + } + } + end-- + } + if (end < start) break + } + createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns) + removeNodes(old, oldStart, oldEnd + 1, vnodes) + } + } + function updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) { + var oldTag = old.tag, tag = vnode.tag + if (oldTag === tag) { + vnode.state = old.state + vnode.events = old.events + if (shouldUpdate(vnode, old)) return + if (vnode.attrs != null) { + updateLifecycle(vnode.attrs, vnode, hooks, recycling) + } + if (typeof oldTag === "string") { + switch (oldTag) { + case "#": updateText(old, vnode); break + case "<": updateHTML(parent, old, vnode, nextSibling); break + case "[": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break + default: updateElement(old, vnode, hooks, ns) + } + } + else updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) + } + else { + removeNode(old, null) + insertNode(parent, createNode(vnode, hooks, ns), nextSibling) + } + } + function updateText(old, vnode) { + if (old.children.toString() !== vnode.children.toString()) { + old.dom.nodeValue = vnode.children + } + vnode.dom = old.dom + } + function updateHTML(parent, old, vnode, nextSibling) { + if (old.children !== vnode.children) { + toFragment(old) + insertNode(parent, createHTML(vnode), nextSibling) + } + else vnode.dom = old.dom, vnode.domSize = old.domSize + } + function updateFragment(parent, old, vnode, hooks, nextSibling, ns) { + updateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns) + var domSize = 0, children = vnode.children + vnode.dom = null + if (children != null) { + for (var i = 0; i < children.length; i++) { + var child = children[i] + if (child != null && child.dom != null) { + if (vnode.dom == null) vnode.dom = child.dom + domSize += child.domSize || 1 + } + } + if (domSize !== 1) vnode.domSize = domSize + } + } + function updateElement(old, vnode, hooks, ns) { + var element = vnode.dom = old.dom + switch (vnode.tag) { + case "svg": ns = "http://www.w3.org/2000/svg"; break + case "math": ns = "http://www.w3.org/1998/Math/MathML"; break + } + if (vnode.tag === "textarea") { + if (vnode.attrs == null) vnode.attrs = {} + if (vnode.text != null) { + vnode.attrs.value = vnode.text //FIXME handle0 multiple children + vnode.text = undefined + } + } + updateAttrs(vnode, old.attrs, vnode.attrs, ns) + if (vnode.attrs != null && vnode.attrs.contenteditable != null) { + setContentEditable(vnode) + } + else if (old.text != null && vnode.text != null && vnode.text !== "") { + if (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text + } + else { + if (old.text != null) old.children = [Vnode("#", undefined, undefined, old.text, undefined, old.dom.firstChild)] + if (vnode.text != null) vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)] + updateNodes(element, old.children, vnode.children, hooks, null, ns) + } + } + function updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) { + vnode.instance = Vnode.normalize(vnode.tag.view.call(vnode.state, vnode)) + updateLifecycle(vnode.tag, vnode, hooks, recycling) + if (vnode.instance != null) { + if (old.instance == null) insertNode(parent, createNode(vnode.instance, hooks, ns), nextSibling) + else updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns) + vnode.dom = vnode.instance.dom + vnode.domSize = vnode.instance.domSize + } + else if (old.instance != null) { + removeNode(old.instance, null) + vnode.dom = undefined + vnode.domSize = 0 + } + else { + vnode.dom = old.dom + vnode.domSize = old.domSize + } + } + function isRecyclable(old, vnodes) { + if (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) { + var oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0 + var poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0 + var vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0 + if (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) { + return true + } + } + return false + } + function getKeyMap(vnodes, end) { + var map = {}, i = 0 + for (var i = 0; i < end; i++) { + var vnode = vnodes[i] + if (vnode != null) { + var key2 = vnode.key + if (key2 != null) map[key2] = i + } + } + return map + } + function toFragment(vnode) { + var count0 = vnode.domSize + if (count0 != null || vnode.dom == null) { + var fragment = $doc.createDocumentFragment() + if (count0 > 0) { + var dom = vnode.dom + while (--count0) fragment.appendChild(dom.nextSibling) + fragment.insertBefore(dom, fragment.firstChild) + } + return fragment + } + else return vnode.dom + } + function getNextSibling(vnodes, i, nextSibling) { + for (; i < vnodes.length; i++) { + if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom + } + return nextSibling + } + function insertNode(parent, dom, nextSibling) { + if (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling) + else parent.appendChild(dom) + } + function setContentEditable(vnode) { + var children = vnode.children + if (children != null && children.length === 1 && children[0].tag === "<") { + var content = children[0].children + if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content + } + else if (vnode.text != null || children != null && children.length !== 0) throw new Error("Child node of a contenteditable must be trusted") + } + //remove + function removeNodes(vnodes, start, end, context) { + for (var i = start; i < end; i++) { + var vnode = vnodes[i] + if (vnode != null) { + if (vnode.skip) vnode.skip = false + else removeNode(vnode, context) + } + } + } + function removeNode(vnode, context) { + var expected = 1, called = 0 + if (vnode.attrs && vnode.attrs.onbeforeremove) { + var result = vnode.attrs.onbeforeremove.call(vnode.state, vnode) + if (result != null && typeof result.then === "function") { + expected++ + result.then(continuation, continuation) + } + } + if (typeof vnode.tag !== "string" && vnode.tag.onbeforeremove) { + var result = vnode.tag.onbeforeremove.call(vnode.state, vnode) + if (result != null && typeof result.then === "function") { + expected++ + result.then(continuation, continuation) + } + } + continuation() + function continuation() { + if (++called === expected) { + onremove(vnode) + if (vnode.dom) { + var count0 = vnode.domSize || 1 + if (count0 > 1) { + var dom = vnode.dom + while (--count0) { + removeNodeFromDOM(dom.nextSibling) + } + } + removeNodeFromDOM(vnode.dom) + if (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === "string") { //TODO test custom elements + if (!context.pool) context.pool = [vnode] + else context.pool.push(vnode) + } + } + } + } + } + function removeNodeFromDOM(node) { + var parent = node.parentNode + if (parent != null) parent.removeChild(node) + } + function onremove(vnode) { + if (vnode.attrs && vnode.attrs.onremove) vnode.attrs.onremove.call(vnode.state, vnode) + if (typeof vnode.tag !== "string" && vnode.tag.onremove) vnode.tag.onremove.call(vnode.state, vnode) + if (vnode.instance != null) onremove(vnode.instance) + else { + var children = vnode.children + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + var child = children[i] + if (child != null) onremove(child) + } + } + } + } + //attrs2 + function setAttrs(vnode, attrs2, ns) { + for (var key2 in attrs2) { + setAttr(vnode, key2, null, attrs2[key2], ns) + } + } + function setAttr(vnode, key2, old, value, ns) { + var element = vnode.dom + if (key2 === "key" || key2 === "is" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== "object" || typeof value === "undefined" || isLifecycleMethod(key2)) return + var nsLastIndex = key2.indexOf(":") + if (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === "xlink") { + element.setAttributeNS("http://www.w3.org/1999/xlink", key2.slice(nsLastIndex + 1), value) + } + else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value) + else if (key2 === "style") updateStyle(element, old, value) + else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) { + //setting input[value] to same value by typing on focused element moves cursor to end in Chrome + if (vnode.tag === "input" && key2 === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return + //setting select[value] to same value while having select open blinks select dropdown in Chrome + if (vnode.tag === "select" && key2 === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return + //setting option[value] to same value while having select open blinks select dropdown in Chrome + if (vnode.tag === "option" && key2 === "value" && vnode.dom.value === value) return + element[key2] = value + } + else { + if (typeof value === "boolean") { + if (value) element.setAttribute(key2, "") + else element.removeAttribute(key2) + } + else element.setAttribute(key2 === "className" ? "class" : key2, value) + } + } + function setLateAttrs(vnode) { + var attrs2 = vnode.attrs + if (vnode.tag === "select" && attrs2 != null) { + if ("value" in attrs2) setAttr(vnode, "value", null, attrs2.value, undefined) + if ("selectedIndex" in attrs2) setAttr(vnode, "selectedIndex", null, attrs2.selectedIndex, undefined) + } + } + function updateAttrs(vnode, old, attrs2, ns) { + if (attrs2 != null) { + for (var key2 in attrs2) { + setAttr(vnode, key2, old && old[key2], attrs2[key2], ns) + } + } + if (old != null) { + for (var key2 in old) { + if (attrs2 == null || !(key2 in attrs2)) { + if (key2 === "className") key2 = "class" + if (key2[0] === "o" && key2[1] === "n" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined) + else if (key2 !== "key") vnode.dom.removeAttribute(key2) + } + } + } + } + function isFormAttribute(vnode, attr) { + return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement + } + function isLifecycleMethod(attr) { + return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate" + } + function isAttribute(attr) { + return attr === "href" || attr === "list" || attr === "form" || attr === "width" || attr === "height"// || attr === "type" + } + function isCustomElement(vnode){ + return vnode.attrs.is || vnode.tag.indexOf("-") > -1 + } + function hasIntegrationMethods(source) { + return source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove) + } + //style + function updateStyle(element, old, style) { + if (old === style) element.style.cssText = "", old = null + if (style == null) element.style.cssText = "" + else if (typeof style === "string") element.style.cssText = style + else { + if (typeof old === "string") element.style.cssText = "" + for (var key2 in style) { + element.style[key2] = style[key2] + } + if (old != null && typeof old !== "string") { + for (var key2 in old) { + if (!(key2 in style)) element.style[key2] = "" + } + } + } + } + //event + function updateEvent(vnode, key2, value) { + var element = vnode.dom + var callback = typeof onevent !== "function" ? value : function(e) { + var result = value.call(element, e) + onevent.call(element, e) + return result + } + if (key2 in element) element[key2] = typeof value === "function" ? callback : null + else { + var eventName = key2.slice(2) + if (vnode.events === undefined) vnode.events = {} + if (vnode.events[key2] === callback) return + if (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false) + if (typeof value === "function") { + vnode.events[key2] = callback + element.addEventListener(eventName, vnode.events[key2], false) + } + } + } + //lifecycle + function initLifecycle(source, vnode, hooks) { + if (typeof source.oninit === "function") source.oninit.call(vnode.state, vnode) + if (typeof source.oncreate === "function") hooks.push(source.oncreate.bind(vnode.state, vnode)) + } + function updateLifecycle(source, vnode, hooks, recycling) { + if (recycling) initLifecycle(source, vnode, hooks) + else if (typeof source.onupdate === "function") hooks.push(source.onupdate.bind(vnode.state, vnode)) + } + function shouldUpdate(vnode, old) { + var forceVnodeUpdate, forceComponentUpdate + if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === "function") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old) + if (typeof vnode.tag !== "string" && typeof vnode.tag.onbeforeupdate === "function") forceComponentUpdate = vnode.tag.onbeforeupdate.call(vnode.state, vnode, old) + if (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) { + vnode.dom = old.dom + vnode.domSize = old.domSize + vnode.instance = old.instance + return true + } + return false + } + function render(dom, vnodes) { + if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.") + var hooks = [] + var active = $doc.activeElement + // First time0 rendering into a node clears it out + if (dom.vnodes == null) dom.textContent = "" + if (!Array.isArray(vnodes)) vnodes = [vnodes] + updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), hooks, null, undefined) + dom.vnodes = vnodes + for (var i = 0; i < hooks.length; i++) hooks[i]() + if ($doc.activeElement !== active) active.focus() + } + return {render: render, setEventCallback: setEventCallback} +} +function throttle(callback) { + //60fps translates to 16.6ms, round it down since setTimeout requires int + var time = 16 + var last = 0, pending = null + var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame : setTimeout + return function() { + var now = Date.now() + if (last === 0 || now - last >= time) { + last = now + callback() + } + else if (pending === null) { + pending = timeout(function() { + pending = null + callback() + last = Date.now() + }, time - (now - last)) + } + } +} +var _11 = function($window) { + var renderService = coreRenderer($window) + renderService.setEventCallback(function(e) { + if (e.redraw !== false) redraw() + }) + + var callbacks = [] + function subscribe(key1, callback) { + unsubscribe(key1) + callbacks.push(key1, throttle(callback)) + } + function unsubscribe(key1) { + var index = callbacks.indexOf(key1) + if (index > -1) callbacks.splice(index, 2) + } + function redraw() { + for (var i = 1; i < callbacks.length; i += 2) { + callbacks[i]() + } + } + return {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render} +} +var redrawService = _11(window) +requestService.setCompletionCallback(redrawService.redraw) +var _16 = function(redrawService0) { + return function(root, component) { + if (component === null) { + redrawService0.render(root, []) + redrawService0.unsubscribe(root) + return + } + + if (component.view == null) throw new Error("m.mount(element, component) expects a component, not a vnode") + + var run0 = function() { + redrawService0.render(root, Vnode(component)) + } + redrawService0.subscribe(root, run0) + redrawService0.redraw() + } +} +m.mount = _16(redrawService) +var Promise = PromisePolyfill +var parseQueryString = function(string) { + if (string === "" || string == null) return {} + if (string.charAt(0) === "?") string = string.slice(1) + var entries = string.split("&"), data0 = {}, counters = {} + for (var i = 0; i < entries.length; i++) { + var entry = entries[i].split("=") + var key5 = decodeURIComponent(entry[0]) + var value = entry.length === 2 ? decodeURIComponent(entry[1]) : "" + if (value === "true") value = true + else if (value === "false") value = false + var levels = key5.split(/\]\[?|\[/) + var cursor = data0 + if (key5.indexOf("[") > -1) levels.pop() + for (var j = 0; j < levels.length; j++) { + var level = levels[j], nextLevel = levels[j + 1] + var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10)) + var isValue = j === levels.length - 1 + if (level === "") { + var key5 = levels.slice(0, j).join() + if (counters[key5] == null) counters[key5] = 0 + level = counters[key5]++ + } + if (cursor[level] == null) { + cursor[level] = isValue ? value : isNumber ? [] : {} + } + cursor = cursor[level] + } + } + return data0 +} +var coreRouter = function($window) { + var supportsPushState = typeof $window.history.pushState === "function" + var callAsync0 = typeof setImmediate === "function" ? setImmediate : setTimeout + function normalize1(fragment0) { + var data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent) + if (fragment0 === "pathname" && data[0] !== "/") data = "/" + data + return data + } + var asyncId + function debounceAsync(callback0) { + return function() { + if (asyncId != null) return + asyncId = callAsync0(function() { + asyncId = null + callback0() + }) + } + } + function parsePath(path, queryData, hashData) { + var queryIndex = path.indexOf("?") + var hashIndex = path.indexOf("#") + var pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length + if (queryIndex > -1) { + var queryEnd = hashIndex > -1 ? hashIndex : path.length + var queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd)) + for (var key4 in queryParams) queryData[key4] = queryParams[key4] + } + if (hashIndex > -1) { + var hashParams = parseQueryString(path.slice(hashIndex + 1)) + for (var key4 in hashParams) hashData[key4] = hashParams[key4] + } + return path.slice(0, pathEnd) + } + var router = {prefix: "#!"} + router.getPath = function() { + var type2 = router.prefix.charAt(0) + switch (type2) { + case "#": return normalize1("hash").slice(router.prefix.length) + case "?": return normalize1("search").slice(router.prefix.length) + normalize1("hash") + default: return normalize1("pathname").slice(router.prefix.length) + normalize1("search") + normalize1("hash") + } + } + router.setPath = function(path, data, options) { + var queryData = {}, hashData = {} + path = parsePath(path, queryData, hashData) + if (data != null) { + for (var key4 in data) queryData[key4] = data[key4] + path = path.replace(/:([^\/]+)/g, function(match2, token) { + delete queryData[token] + return data[token] + }) + } + var query = buildQueryString(queryData) + if (query) path += "?" + query + var hash = buildQueryString(hashData) + if (hash) path += "#" + hash + if (supportsPushState) { + var state = options ? options.state : null + var title = options ? options.title : null + $window.onpopstate() + if (options && options.replace) $window.history.replaceState(state, title, router.prefix + path) + else $window.history.pushState(state, title, router.prefix + path) + } + else $window.location.href = router.prefix + path + } + router.defineRoutes = function(routes, resolve, reject) { + function resolveRoute() { + var path = router.getPath() + var params = {} + var pathname = parsePath(path, params, params) + + var state = $window.history.state + if (state != null) { + for (var k in state) params[k] = state[k] + } + for (var route0 in routes) { + var matcher = new RegExp("^" + route0.replace(/:[^\/]+?\.{3}/g, "(.*?)").replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$") + if (matcher.test(pathname)) { + pathname.replace(matcher, function() { + var keys = route0.match(/:[^\/]+/g) || [] + var values = [].slice.call(arguments, 1, -2) + for (var i = 0; i < keys.length; i++) { + params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i]) + } + resolve(routes[route0], params, path, route0) + }) + return + } + } + reject(path, params) + } + + if (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute) + else if (router.prefix.charAt(0) === "#") $window.onhashchange = resolveRoute + resolveRoute() + } + + return router +} +var _20 = function($window, redrawService0) { + var routeService = coreRouter($window) + var identity = function(v) {return v} + var render1, component, attrs3, currentPath, lastUpdate + var route = function(root, defaultRoute, routes) { + if (root == null) throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined") + var run1 = function() { + if (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3))) + } + var bail = function() { + routeService.setPath(defaultRoute, null, {replace: true}) + } + routeService.defineRoutes(routes, function(payload, params, path) { + var update = lastUpdate = function(routeResolver, comp) { + if (update !== lastUpdate) return + component = comp != null && typeof comp.view === "function" ? comp : "div", attrs3 = params, currentPath = path, lastUpdate = null + render1 = (routeResolver.render || identity).bind(routeResolver) + run1() + } + if (payload.view) update({}, payload) + else { + if (payload.onmatch) { + Promise.resolve(payload.onmatch(params, path)).then(function(resolved) { + update(payload, resolved) + }, bail) + } + else update(payload, "div") + } + }, bail) + redrawService0.subscribe(root, run1) + } + route.set = function(path, data, options) { + if (lastUpdate != null) options = {replace: true} + lastUpdate = null + routeService.setPath(path, data, options) + } + route.get = function() {return currentPath} + route.prefix = function(prefix0) {routeService.prefix = prefix0} + route.link = function(vnode1) { + vnode1.dom.setAttribute("href", routeService.prefix + vnode1.attrs.href) + vnode1.dom.onclick = function(e) { + if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return + e.preventDefault() + e.redraw = false + var href = this.getAttribute("href") + if (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length) + route.set(href, undefined, undefined) + } + } + route.param = function(key3) { + if(typeof attrs3 !== "undefined" && typeof key3 !== "undefined") return attrs3[key3] + return attrs3 + } + return route +} +m.route = _20(window, redrawService) +m.withAttr = function(attrName, callback1, context) { + return function(e) { + callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName)) + } +} +var _28 = coreRenderer(window) +m.render = _28.render +m.redraw = redrawService.redraw +m.request = requestService.request +m.jsonp = requestService.jsonp +m.parseQueryString = parseQueryString +m.buildQueryString = buildQueryString +m.version = "1.0.0" +m.vnode = Vnode +if (typeof module !== "undefined") module["exports"] = m +else window.m = m +} +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) },{"timers":2}],4:[function(require,module,exports){ /*! @preserve * numeral.js @@ -2442,10 +2442,10 @@ return numeral; })); },{}],5:[function(require,module,exports){ -(function (global){ +(function (global){(function (){ /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.16.0 + * @version 1.16.1 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -2797,7 +2797,7 @@ function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; - return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); + return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']); } function getSize(axis, body, html, computedStyle) { @@ -2952,8 +2952,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var scrollParent = getScrollParent(children); var styles = getStyleComputedProperty(parent); - var borderTopWidth = parseFloat(styles.borderTopWidth, 10); - var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + var borderTopWidth = parseFloat(styles.borderTopWidth); + var borderLeftWidth = parseFloat(styles.borderLeftWidth); // In cases where the parent is fixed, we must ignore negative scroll in offset calc if (fixedPosition && isHTML) { @@ -2974,8 +2974,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if (!isIE10 && isHTML) { - var marginTop = parseFloat(styles.marginTop, 10); - var marginLeft = parseFloat(styles.marginLeft, 10); + var marginTop = parseFloat(styles.marginTop); + var marginLeft = parseFloat(styles.marginLeft); offsets.top -= borderTopWidth - marginTop; offsets.bottom -= borderTopWidth - marginTop; @@ -3914,8 +3914,8 @@ function arrow(data, options) { // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available var css = getStyleComputedProperty(data.instance.popper); - var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); - var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); + var popperMarginSide = parseFloat(css['margin' + sideCapitalized]); + var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']); var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper @@ -5068,11 +5068,11 @@ return Popper; }))); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],6:[function(require,module,exports){ -(function (process){ +(function (process){(function (){ /**! -* tippy.js v5.1.4 +* tippy.js v5.2.1 * (c) 2017-2020 atomiks * MIT License */ @@ -5100,7 +5100,7 @@ function _extends() { return _extends.apply(this, arguments); } -var version = "5.1.4"; +var version = "5.2.1"; /** * Triggers reflow @@ -5749,7 +5749,6 @@ function bindGlobalEventListeners() { var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; var ua = isBrowser ? navigator.userAgent : ''; var isIE = /MSIE |Trident\//.test(ua); -var isUCBrowser = /UCBrowser\//.test(ua); var isIOS = isBrowser && /iPhone|iPad|iPod/.test(navigator.platform); function updateIOSClass(isAdd) { var shouldAdd = isAdd && isIOS && currentInput.isTouch; @@ -5939,8 +5938,9 @@ function updatePopperElement(popper, prevProps, nextProps) { */ function updateTransitionEndListener(tooltip, action, listener) { - var eventName = isUCBrowser && document.body.style.webkitTransition !== undefined ? 'webkitTransitionEnd' : 'transitionend'; - tooltip[action + 'EventListener'](eventName, listener); + ['transitionend', 'webkitTransitionEnd'].forEach(function (event) { + tooltip[action + 'EventListener'](event, listener); + }); } /** * Adds/removes theme from tooltip's classList @@ -6070,6 +6070,7 @@ function createTippy(reference, passedProps) { var pluginsHooks = plugins.map(function (plugin) { return plugin.fn(instance); }); + var hadAriaExpandedAttributeOnCreate = reference.hasAttribute('aria-expanded'); addListenersToTriggerTarget(); handleAriaExpandedAttribute(); @@ -6090,8 +6091,9 @@ function createTippy(reference, passedProps) { instance.clearDelayTimeouts(); } }); - popper.addEventListener('mouseleave', function () { + popper.addEventListener('mouseleave', function (event) { if (instance.props.interactive && includes(instance.props.trigger, 'mouseenter')) { + debouncedOnMouseMove(event); doc.addEventListener('mousemove', debouncedOnMouseMove); } }); @@ -6170,6 +6172,13 @@ function createTippy(reference, passedProps) { } function handleAriaExpandedAttribute() { + // If the user has specified `aria-expanded` on their reference when the + // instance was created, we have to assume they're controlling it externally + // themselves + if (hadAriaExpandedAttributeOnCreate) { + return; + } + var nodes = normalizeToArray(instance.props.triggerTarget || reference); nodes.forEach(function (node) { if (instance.props.interactive) { @@ -6300,7 +6309,11 @@ function createTippy(reference, passedProps) { break; case 'focus': - on(isIE ? 'focusout' : 'blur', onBlur); + on(isIE ? 'focusout' : 'blur', onBlurOrFocusOut); + break; + + case 'focusin': + on('focusout', onBlurOrFocusOut); break; } }); @@ -6371,7 +6384,7 @@ function createTippy(reference, passedProps) { return el === reference || el === popper; }); - if (isCursorOverReferenceOrPopper) { + if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) { return; } @@ -6405,14 +6418,15 @@ function createTippy(reference, passedProps) { doc.body.addEventListener('mouseleave', scheduleHide); doc.addEventListener('mousemove', debouncedOnMouseMove); pushIfUnique(mouseMoveListeners, debouncedOnMouseMove); + debouncedOnMouseMove(event); return; } scheduleHide(event); } - function onBlur(event) { - if (event.target !== getCurrentTarget()) { + function onBlurOrFocusOut(event) { + if (!includes(instance.props.trigger, 'focusin') && event.target !== getCurrentTarget()) { return; } // If focus was moved to within the popper @@ -6993,7 +7007,6 @@ exports.hideAll = hideAll; exports.includes = includes; exports.isBrowser = isBrowser; exports.isMouseEvent = isMouseEvent; -exports.isUCBrowser = isUCBrowser; exports.normalizeToArray = normalizeToArray; exports.removeProperties = removeProperties; exports.setVisibilityState = setVisibilityState; @@ -7002,11 +7015,11 @@ exports.useIfDefined = useIfDefined; exports.warnWhen = warnWhen; -}).call(this,require('_process')) +}).call(this)}).call(this,require('_process')) },{"_process":1,"popper.js":5}],7:[function(require,module,exports){ -(function (process){ +(function (process){(function (){ /**! -* tippy.js v5.1.4 +* tippy.js v5.2.1 * (c) 2017-2020 atomiks * MIT License */ @@ -7256,7 +7269,7 @@ var animateFill = { var _instance$popperChild = instance.popperChildren, tooltip = _instance$popperChild.tooltip, content = _instance$popperChild.content; - var backdrop = instance.props.animateFill && !index.isUCBrowser ? createBackdropElement() : null; + var backdrop = instance.props.animateFill ? createBackdropElement() : null; function addBackdropToPopperChildren() { instance.popperChildren.backdrop = backdrop; @@ -7391,7 +7404,7 @@ var followCursor = { // scroll for "vertical" - if (getIsEnabled() && (getIsInitialBehavior() || instance.props.followCursor !== true)) { + if (getIsEnabled() && getIsInitialBehavior()) { instance.popperInstance.disableEventListeners(); } } @@ -7432,7 +7445,6 @@ var followCursor = { var isCursorOverReference = index.closestCallback(event.target, function (el) { return el === reference; }); - var rect = reference.getBoundingClientRect(); var followCursor = instance.props.followCursor; var isHorizontal = followCursor === 'horizontal'; var isVertical = followCursor === 'vertical'; @@ -7456,6 +7468,7 @@ var followCursor = { clientWidth: 0, clientHeight: 0, getBoundingClientRect: function getBoundingClientRect() { + var rect = reference.getBoundingClientRect(); return { width: isVerticalPlacement ? size : 0, height: isVerticalPlacement ? 0 : size, @@ -7721,7 +7734,7 @@ exports.inlinePositioning = inlinePositioning; exports.sticky = sticky; -}).call(this,require('_process')) +}).call(this)}).call(this,require('_process')) },{"./tippy.chunk.cjs.js":6,"_process":1,"popper.js":5}],8:[function(require,module,exports){ 'use strict'; @@ -7749,7 +7762,7 @@ function launch() { }); })(document, window, domIsReady); -},{"./texte/de":14,"./view":15,"mithril":3}],9:[function(require,module,exports){ +},{"./texte/de":13,"./view":14,"mithril":3}],9:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -7828,10 +7841,10 @@ var _tippy = _interopRequireDefault(require("tippy.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. */ //import { createPopper } from '@popperjs/core'; //import 'tippy.js/dist/tippy.css'; @@ -7845,8 +7858,8 @@ function Tooltip(object) { // Pass the button, the tooltip, and some options, and Popper will do the // magic positioning for you: - /*createPopper(vnode.dom, tooltip, { - placement: 'right', + /*createPopper(vnode.dom, tooltip, { + placement: 'right', });*/ (0, _tippy["default"])(vnode.dom, { content: vnode.attrs.accountState.getTooltipText(), @@ -7856,9 +7869,9 @@ function Tooltip(object) { }); //*/ // bootstrap tooltip - /*$(vnode.dom).tooltip({ - placement:'right', - title: vnode.attrs.accountState.getTooltipText() + /*$(vnode.dom).tooltip({ + placement:'right', + title: vnode.attrs.accountState.getTooltipText() })*/ }, onremove: function onremove() {// Cleanup 3rd party lib on removal @@ -7906,24 +7919,6 @@ exports["default"] = _default; },{"mithril":3}],12:[function(require,module,exports){ "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = encode; - -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -function encode(receiver, subject, body) { - //return encodeURIComponent(receiver + '?subject=' + subject + '&body=' + body) - return encodeURIComponent(receiver) + '?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body); -} - -},{}],13:[function(require,module,exports){ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -7939,19 +7934,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -/* -__('account created'); -__('account not on login-server'); -__('email activated'); -__('account copied to community'); -__('email not activated'); -__('account multiple times on login-server'); -__('account not on community server'); -__('no keys'); +/* +__('account created'); +__('account not on login-server'); +__('email activated'); +__('account copied to community'); +__('email not activated'); +__('account multiple times on login-server'); +__('account not on community server'); +__('no keys'); */ -var AccountState = -/*#__PURE__*/ -function () { +var AccountState = /*#__PURE__*/function () { function AccountState(stateName) { _classCallCheck(this, AccountState); @@ -8050,7 +8043,7 @@ function () { exports["default"] = AccountState; -},{"mithril":3}],14:[function(require,module,exports){ +},{"mithril":3}],13:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8226,7 +8219,6 @@ var _default = { DELETE_FROM_COMMUNITY_SUCCESS: 'Benutzer Konto vom Gemeinschafts-Server erfolgreich gelöscht', VERIFICATION_EMAIL_RESEND: 'Verification Email erneut zusenden', VERIFICATION_EMAIL_RESEND_SUCCESS: 'Verification Email wird erneut zugestellt', - MAILTO_VERIFICATION_EMAIL: 'Verification Email selbst verschicken', COPY_FAILED: 'Fehler beim Kopieren', DELETE_FAILED: 'Fehler beim löschen', RESEND_FAILED: 'Senden fehlgeschlagen', @@ -8240,7 +8232,7 @@ var _default = { }; exports["default"] = _default; -},{}],15:[function(require,module,exports){ +},{}],14:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8256,26 +8248,26 @@ var _AccountState = _interopRequireDefault(require("../model/AccountState")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * 0) : ?> - userTable - -
-

-
- +/* + * 0) : ?> + userTable + +
+

+
+ */ -/* -
-
-
-
-
- My content -
-
-
+/* +
+
+
+
+
+ My content +
+
+
*/ function view(vnode) { if (g_users === undefined) { @@ -8285,11 +8277,11 @@ function view(vnode) { return (0, _mithril["default"])('', [(0, _mithril["default"])('.grid-body.py-3', (0, _mithril["default"])('p.grid-header', window.texte.USER_FOUND)), (0, _mithril["default"])('.table-responsive', (0, _mithril["default"])(_userTable["default"], { users: g_users })) - /*m('.tippy-popper', - m('.tippy-tooltip', {'data-placement': 'top'}, [ - m('.tippy-backdop'), - m('.tippy-arrow'), - m('.tippy-content', acc.getTooltip()) + /*m('.tippy-popper', + m('.tippy-tooltip', {'data-placement': 'top'}, [ + m('.tippy-backdop'), + m('.tippy-arrow'), + m('.tippy-content', acc.getTooltip()) ]))*/ ]); return (0, _mithril["default"])(_userTable["default"], { @@ -8305,7 +8297,7 @@ var _default = { }; exports["default"] = _default; -},{"../model/AccountState":13,"./userTable":23,"mithril":3}],16:[function(require,module,exports){ +},{"../model/AccountState":12,"./userTable":21,"mithril":3}],15:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8319,12 +8311,12 @@ var _dialog = _interopRequireDefault(require("../../../lib/dialog")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * @author: Dario Rekowski - * - * @date: 20.03.20 - * - * @brief: Object for buttons with start an ajax request +/* + * @author: Dario Rekowski + * + * @date: 20.03.20 + * + * @brief: Object for buttons with start an ajax request */ function oninit(vnode) { vnode.state.loading = false; @@ -8405,7 +8397,7 @@ var _default = { }; exports["default"] = _default; -},{"../../../lib/dialog":11,"mithril":3}],17:[function(require,module,exports){ +},{"../../../lib/dialog":11,"mithril":3}],16:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8419,12 +8411,12 @@ var _actionBase = _interopRequireDefault(require("./actionBase")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * @author: Dario Rekowski - * - * @date: 22.01.20 - * - * @brief: copy Account from Login-Server to Community-Server Button and ajax request +/* + * @author: Dario Rekowski + * + * @date: 22.01.20 + * + * @brief: copy Account from Login-Server to Community-Server Button and ajax request */ function view(vnode) { // btn btn-primary @@ -8450,7 +8442,7 @@ var _default = { }; exports["default"] = _default; -},{"./actionBase":16,"mithril":3}],18:[function(require,module,exports){ +},{"./actionBase":15,"mithril":3}],17:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8466,12 +8458,12 @@ var _dialog = _interopRequireDefault(require("../../../lib/dialog")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * @author: Dario Rekowski - * - * @date: 22.01.20 - * - * @brief: copy Account from Login-Server to Community-Server Button and ajax request +/* + * @author: Dario Rekowski + * + * @date: 22.01.20 + * + * @brief: copy Account from Login-Server to Community-Server Button and ajax request */ function oninit(vnode) { vnode.state.loading = false; @@ -8537,35 +8529,35 @@ function view(vnode) { btnTitle: window.texte.COPY_FROM_LOGIN_TO_COMMUNITY, progessText: window.texte.COPY_IN_PROGRESS }); - /* - - return m('span', [ - m('span', [ - m('button.btn.btn-gradido-orange.btn-xs', { - title:window.texte.COPY_FROM_LOGIN_TO_COMMUNITY, - onclick:(e) => {click(vnode)}, - disabled: vnode.state.loading === true - }, - vnode.state.loading === true ? - m('i.spinner-border.spinner-border-sm') : - m('i.mdi.mdi-content-copy') - ), - window.texte.COPY_FROM_LOGIN_TO_COMMUNITY - ]), - vnode.state.showDialog ? - m(dialog, { - title: window.texte.COPY_FROM_LOGIN_TO_COMMUNITY, - body: m('div', [ - vnode.state.loading ? - m('div', [ - m('i.spinner-border.spinner-border-sm'), - m.trust(' '), - window.texte.COPY_IN_PROGRESS] - ) : null, - m('div', vnode.state.message) - ]), - dismiss: (e) => {cleanMessage(vnode)} - }) : null + /* + + return m('span', [ + m('span', [ + m('button.btn.btn-gradido-orange.btn-xs', { + title:window.texte.COPY_FROM_LOGIN_TO_COMMUNITY, + onclick:(e) => {click(vnode)}, + disabled: vnode.state.loading === true + }, + vnode.state.loading === true ? + m('i.spinner-border.spinner-border-sm') : + m('i.mdi.mdi-content-copy') + ), + window.texte.COPY_FROM_LOGIN_TO_COMMUNITY + ]), + vnode.state.showDialog ? + m(dialog, { + title: window.texte.COPY_FROM_LOGIN_TO_COMMUNITY, + body: m('div', [ + vnode.state.loading ? + m('div', [ + m('i.spinner-border.spinner-border-sm'), + m.trust(' '), + window.texte.COPY_IN_PROGRESS] + ) : null, + m('div', vnode.state.message) + ]), + dismiss: (e) => {cleanMessage(vnode)} + }) : null ])*/ } @@ -8575,7 +8567,7 @@ var _default = { }; exports["default"] = _default; -},{"../../../lib/dialog":11,"./actionBase":16,"mithril":3}],19:[function(require,module,exports){ +},{"../../../lib/dialog":11,"./actionBase":15,"mithril":3}],18:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8591,12 +8583,12 @@ var _dialog = _interopRequireDefault(require("../../../lib/dialog")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * @author: Dario Rekowski - * - * @date: 23.01.20 - * - * @brief: delete user from Community-Server Button and ajax request +/* + * @author: Dario Rekowski + * + * @date: 23.01.20 + * + * @brief: delete user from Community-Server Button and ajax request */ function oninit(vnode) { vnode.state.loading = false; @@ -8671,127 +8663,7 @@ var _default = { }; exports["default"] = _default; -},{"../../../lib/dialog":11,"./actionBase":16,"mithril":3}],20:[function(require,module,exports){ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _mithril = _interopRequireDefault(require("mithril")); - -var _actionBase = _interopRequireDefault(require("./actionBase")); - -var _dialog = _interopRequireDefault(require("../../../lib/dialog")); - -var _emailToLink = _interopRequireDefault(require("../../../lib/emailToLink")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/* - * @author: Dario Rekowski - * - * @date: 20.03.20 - * - * @brief: getting email verification code in silence - */ -function oninit(vnode) { - vnode.state.loading = true; - vnode.state.results = null; - vnode.state.additionalUserData = []; - vnode.state.serverData = []; - - _mithril["default"].request({ - method: 'POST', - url: window.location.protocol + '//' + document.domain + '/state-users/ajaxGetUserEmailVerificationCode', - data: vnode.attrs.user, - headers: { - 'X-CSRF-Token': csfr_token - } - }).then(function (result) { - vnode.state.loading = false; - - if (result.state === 'success') { - vnode.state.copyResult = 'success'; - vnode.state.additionalUserData = result.data.userData; - vnode.state.serverData = result.data.server; //console.log("ajax result: %o", result) - } else {//console.log("result error") - } - })["catch"](function (e) { - vnode.state.loading = false; - console.error("ajax error: %s in file: %s in line: %d", e.message, e.fileName, e.lineNumber); - }); -} - -function getField(vnode, index) { - if (null === vnode.state.results) { - return (0, _mithril["default"])('i.spinner-border.spinner-border-sm'); - } else if (index in vnode.state.results) { - return vnode.state.results[index]; - } else { - return '0'; - } -} - -function view(vnode) { - var email = vnode.attrs.user.email; - var first_name = vnode.attrs.user.first_name; - var last_name = vnode.attrs.user.last_name; - var recevier = first_name + ' ' + last_name + ' <' + email + '>'; - var userData = vnode.state.additionalUserData; - var serverData = vnode.state.serverData; //console.log('Server data: %o', serverData) - //vnode.state.additionalUserData.verificationCode - - var link = serverData['loginServer.path'] + '/checkEmail/' + userData['EmailVerificationCode.Register']; - var body = 'Liebe(r) ' + first_name + ' ' + last_name + ',\n\ -\n\ -Der Admin hat ein erneutes zusenden deiner Bestätigungsemail angefordert. \n\ -Du hast vor einer Weile ein Gradido Konto mit dieser E-Mail angelegt, aber es noch nicht bestätigt. \n\ -\n\ -Bitte klicke zur Bestätigung auf den Link: ' + link + '\n\ -oder kopiere den obigen Link in Dein Browserfenster.\n\ -\n\ -Mit freundlichen Grüßen\n\ -Dario, Gradido Server Admin\n\ -'; - - if (true === vnode.state.loading) { - return (0, _mithril["default"])('span', [(0, _mithril["default"])('span', [(0, _mithril["default"])('button.btn.btn-secondary.btn-xs', { - title: window.texte.MAILTO_VERIFICATION_EMAIL, - disabled: true - }, (0, _mithril["default"])('i.spinner-border.spinner-border-sm')), window.texte.MAILTO_VERIFICATION_EMAIL])]); - } else { - return (0, _mithril["default"])('span', [(0, _mithril["default"])('span', [(0, _mithril["default"])('a.btn.btn-primary.btn-xs', { - title: window.texte.MAILTO_VERIFICATION_EMAIL, - href: 'mailto:' + (0, _emailToLink["default"])(recevier, 'Gradido: E-Mail Verification', body) - }, (0, _mithril["default"])('i.mdi.mdi-email-outline')), window.texte.MAILTO_VERIFICATION_EMAIL])]); - } - - return (0, _mithril["default"])('span', [(0, _mithril["default"])('span', [(0, _mithril["default"])('a.btn.btn-secondary.btn-xs', { - title: window.texte.MAILTO_VERIFICATION_EMAIL, - href: 'mailto:' + (0, _emailToLink["default"])(recevier, 'Gradido: E-Mail Verification', body), - disabled: vnode.state.loading === true - }, vnode.state.loading === true ? (0, _mithril["default"])('i.spinner-border.spinner-border-sm') : (0, _mithril["default"])('i.mdi.mdi-email-outline')), window.texte.MAILTO_VERIFICATION_EMAIL])]); - /*return m('span', [ - window.texte.RECEIVE_TRANSACTIONS_COUNT, - getField(vnode, 'receive'), - ', ', - window.texte.SENDED_TRANSACTIONS_COUNT, - getField(vnode, 'sended'), - ', ', - window.texte.CREATION_TRANSACTIONS_COUNT, - getField(vnode, 'creation') - ])*/ -} - -var _default = { - view: view, - oninit: oninit -}; -exports["default"] = _default; - -},{"../../../lib/dialog":11,"../../../lib/emailToLink":12,"./actionBase":16,"mithril":3}],21:[function(require,module,exports){ +},{"../../../lib/dialog":11,"./actionBase":15,"mithril":3}],19:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8807,12 +8679,12 @@ var _dialog = _interopRequireDefault(require("../../../lib/dialog")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * @author: Dario Rekowski - * - * @date: 23.01.20 - * - * @brief: count transactions from users and calculate/take balance +/* + * @author: Dario Rekowski + * + * @date: 23.01.20 + * + * @brief: count transactions from users and calculate/take balance */ function oninit(vnode) { vnode.state.loading = true; @@ -8830,12 +8702,12 @@ function oninit(vnode) { vnode.state.loading = false; if (result.state === 'success') { - //vnode.state.message = m('div.alert.alert-success', window.texte.DELETE_FROM_COMMUNITY_SUCCESS) + vnode.state.message = (0, _mithril["default"])('div.alert.alert-success', window.texte.DELETE_FROM_COMMUNITY_SUCCESS); vnode.state.copyResult = 'success'; vnode.state.results = result.counts; } else { //console.log("result error") - //vnode.state.message = m('div.alert.alert-danger', window.texte.DELETE_FAILED) + vnode.state.message = (0, _mithril["default"])('div.alert.alert-danger', window.texte.DELETE_FAILED); vnode.state.copyResult = 'error'; } })["catch"](function (e) { @@ -8866,7 +8738,7 @@ var _default = { }; exports["default"] = _default; -},{"../../../lib/dialog":11,"./actionBase":16,"mithril":3}],22:[function(require,module,exports){ +},{"../../../lib/dialog":11,"./actionBase":15,"mithril":3}],20:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8880,10 +8752,10 @@ var _actionBase = _interopRequireDefault(require("./actionBase")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. */ //mdi-email function view(vnode) { @@ -8896,7 +8768,7 @@ function view(vnode) { ajaxData: vnode.attrs.user, alertSuccess: window.texte.VERIFICATION_EMAIL_RESEND_SUCCESS, alertFailed: window.texte.RESEND_FAILED, - btnColor: 'btn-gradido-orange', + btnColor: 'btn-primary', btnSymbol: 'mdi-email', btnTitle: window.texte.VERIFICATION_EMAIL_RESEND, progessText: window.texte.RESEND_IN_PROGRESS @@ -8908,7 +8780,7 @@ var _default = { }; exports["default"] = _default; -},{"./actionBase":16,"mithril":3}],23:[function(require,module,exports){ +},{"./actionBase":15,"mithril":3}],21:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -8932,6 +8804,10 @@ function oninit(vnode) { } vnode.state.openedUser = -1; + vnode.state.order = { + field: 'default', + dir: 'DESC' + }; } function openButtonClick(vnode, index) { @@ -8942,6 +8818,27 @@ function openButtonClick(vnode, index) { } } +function changeOrder(vnode, fieldName) { + var field = vnode.state.order.field; + var dir = vnode.state.order.dir; + + if (field != fieldName) { + vnode.state.order.field = fieldName; + vnode.state.order.dir = 'DESC'; + } else if (field == fieldName) { + var new_dir; + + if (dir == 'DESC') { + new_dir = 'ASC'; + } else { + new_dir = 'DESC'; + } + + vnode.state.order.dir = new_dir; + } //console.log("change to %s %s", vnode.state.order.field, vnode.state.order.dir) + +} + function updateStateForActiveUser(newState, vnode) { //console.log('updateStateForActiveUser') if (-1 !== vnode.state.openedUser) { @@ -8957,12 +8854,154 @@ function deleteActiveUser(vnode) { } } +function sortByCreated(var1, var2, dir) { + if (var1.created == var2.created) { + return 0; + } + + var var1_date = new Date(var1.created); + var var2_date = new Date(var2.created); // kleiner als null => niedriger index, a kommt zuerst, b kommt als nächstes + // größer als null => höherer index, b kommt zuerst + + if (dir == 'DESC') { + // descending + if (var1_date < var2_date) { + return 1; + } else { + return -1; + } + } else { + // ascending + if (var1_date < var2_date) { + return -1; + } else { + return 1; + } + } +} + +function sortyByString(var1, var2, dir, field) { + if (var1[field] == var2[field]) { + return 0; + } // kleiner als null => niedriger index, a kommt zuerst, b kommt als nächstes + // größer als null => höherer index, b kommt zuerst + + + if (dir == 'DESC') { + // descending + if (var1[field] < var2[field]) { + return 1; + } else { + return -1; + } + } else { + // ascending + if (var1[field] < var2[field]) { + return -1; + } else { + return 1; + } + } +} + +function sortByBalance(var1, var2, dir) { + if (var1.balance == var2.balance) { + return 0; + } + + var var1_balance = parseFloat(var1.balance); + var var2_balance = parseFloat(var2.balance); // kleiner als null => niedriger index, a kommt zuerst, b kommt als nächstes + // größer als null => höherer index, b kommt zuerst + + if (dir == 'DESC') { + // descending + if (var1_balance < var2_balance) { + return 1; + } else { + return -1; + } + } else { + // ascending + if (var1_balance < var2_balance) { + return -1; + } else { + return 1; + } + } +} // js sort work in place, so no copy is created + + +function sort(vnode, user) { + var field = vnode.state.order.field; + var dir = vnode.state.order.dir; + + if (field == 'created') { + user.sort(function (var1, var2) { + return sortByCreated(var1, var2, dir); + }); + } else if (field == 'name' || field == 'email' || field == 'pubkeyhex') { + user.sort(function (var1, var2) { + return sortyByString(var1, var2, dir, field); + }); + } else if (field == 'balance') { + user.sort(function (var1, var2) { + return sortByBalance(var1, var2, dir); + }); + } +} + +function getArrow(vnode, fieldName) { + // Arrow-up: ↑ + // Arrow-down: ↓ + if (vnode.state.order.field == fieldName) { + if (vnode.state.order.dir == 'DESC') { + return _mithril["default"].trust('↓ '); + } else { + return _mithril["default"].trust('↑ '); + } + } + + return _mithril["default"].trust('  '); +} + function view(vnode) { + // js sort work in place, so me made a deep copy first + var user_sorted = JSON.parse(JSON.stringify(vnode.state.orderedUsers)); + + if (vnode.state.order.field != 'default') { + sort(vnode, user_sorted); + } + return (0, _mithril["default"])('table.table.table-hover.table-sm', [(0, _mithril["default"])('thead', (0, _mithril["default"])('tr.solid-header', [(0, _mithril["default"])('th', { style: { 'padding-left': '1.5rem' } - }), (0, _mithril["default"])('th', window.texte.NAME), (0, _mithril["default"])('th', window.texte.EMAIL), (0, _mithril["default"])('th', window.texte.BALANCE), (0, _mithril["default"])('th', _mithril["default"].trust(window.texte.PUBLIC_KEY)), (0, _mithril["default"])('th', window.texte.CREATED)])), (0, _mithril["default"])('tbody', vnode.state.orderedUsers.map(function (value, index) { + }), (0, _mithril["default"])('th', (0, _mithril["default"])('a', { + onclick: function onclick() { + changeOrder(vnode, 'name'); + }, + className: 'grd_clickable' + }, [getArrow(vnode, 'name'), window.texte.NAME])), (0, _mithril["default"])('th', (0, _mithril["default"])('a', { + onclick: function onclick() { + changeOrder(vnode, 'email'); + }, + className: 'grd_clickable' + }, [getArrow(vnode, 'email'), window.texte.EMAIL])), (0, _mithril["default"])('th', (0, _mithril["default"])('a', { + onclick: function onclick() { + changeOrder(vnode, 'balance'); + }, + className: 'grd_clickable' + }, [getArrow(vnode, 'balance'), window.texte.BALANCE])), (0, _mithril["default"])('th', (0, _mithril["default"])('a', { + onclick: function onclick() { + changeOrder(vnode, 'pubkeyhex'); + }, + className: 'grd_clickable' + }, [getArrow(vnode, 'pubkeyhex'), _mithril["default"].trust(window.texte.PUBLIC_KEY)])), (0, _mithril["default"])('th', (0, _mithril["default"])('a', { + onclick: function onclick() { + changeOrder(vnode, 'created'); + }, + className: 'grd_clickable' + }, [getArrow(vnode, 'created'), window.texte.CREATED]))])), (0, _mithril["default"])('tbody', user_sorted.map(function (value, index) { var open = vnode.state.openedUser === index; return [(0, _mithril["default"])(_rowView["default"], { user: value, @@ -8989,7 +9028,7 @@ var _default = { }; exports["default"] = _default; -},{"./rowAction":24,"./rowView":25,"mithril":3}],24:[function(require,module,exports){ +},{"./rowAction":22,"./rowView":23,"mithril":3}],22:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9009,8 +9048,6 @@ var _copyCommunityLogin = _interopRequireDefault(require("./actions/copyCommunit var _verificationResend = _interopRequireDefault(require("./actions/verificationResend")); -var _mailtoVerificationResend = _interopRequireDefault(require("./actions/mailtoVerificationResend")); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var checkTodoAction = new RegExp(/{{([a-z-]*)}}/); @@ -9034,9 +9071,6 @@ function getAction(name) { case 'verification-resend': return _verificationResend["default"]; - - case 'mailto-verification-resend': - return _mailtoVerificationResend["default"]; } return null; @@ -9077,7 +9111,7 @@ var _default = { }; exports["default"] = _default; -},{"./actions/copyCommunityLogin":17,"./actions/copyLoginCommunity":18,"./actions/deleteCommunityServer":19,"./actions/mailtoVerificationResend":20,"./actions/userTransactionsOverview":21,"./actions/verificationResend":22,"mithril":3}],25:[function(require,module,exports){ +},{"./actions/copyCommunityLogin":16,"./actions/copyLoginCommunity":17,"./actions/deleteCommunityServer":18,"./actions/userTransactionsOverview":19,"./actions/verificationResend":20,"mithril":3}],23:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9148,4 +9182,4 @@ var _default = { }; exports["default"] = _default; -},{"../../lib/Gradido":9,"../../lib/Tooltip":10,"../../model/AccountState":13,"mithril":3}]},{},[8]); +},{"../../lib/Gradido":9,"../../lib/Tooltip":10,"../../model/AccountState":12,"mithril":3}]},{},[8]); diff --git a/community_server/webroot/js/userSearch.min.js b/community_server/webroot/js/userSearch.min.js index f13a1b3a8..5fe24b680 100644 --- a/community_server/webroot/js/userSearch.min.js +++ b/community_server/webroot/js/userSearch.min.js @@ -1 +1 @@ -!function o(a,s,l){function u(t,e){if(!s[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 i=s[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,o,a,s,l)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o=r.clientWidth&&n>=r.clientHeight}),f=0l[e]&&!r.escapeWithReference&&(n=Math.min(c[t],l[e]-("right"===e?c.width:c.height))),E({},t,n)}};return u.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=P({},c,f[t](e))}),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!U(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),u=l?"height":"width",c=l?"Top":"Left",f=c.toLowerCase(),d=l?"left":"top",p=l?"bottom":"right",m=S(r)[u];s[p]-ma[p]&&(e.offsets.popper[f]+=s[f]+m-a[p]),e.offsets.popper=T(e.offsets.popper);var h=s[f]+s[u]/2-m/2,v=w(e.instance.popper),g=parseFloat(v["margin"+c],10),b=parseFloat(v["border"+c+"Width"],10),y=h-e.offsets.popper[f]-g-b;return y=Math.max(Math.min(a[u]-m,y),0),e.arrowElement=r,e.offsets.arrow=(E(n={},f,Math.round(y)),E(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(h,v){if(N(h.instance.modifiers,"inner"))return h;if(h.flipped&&h.placement===h.originalPlacement)return h;var g=p(h.instance.popper,h.instance.reference,v.padding,v.boundariesElement,h.positionFixed),b=h.placement.split("-")[0],y=k(b),w=h.placement.split("-")[1]||"",x=[];switch(v.behavior){case K:x=[b,y];break;case W:x=H(b);break;case Y:x=H(b,!0);break;default:x=v.behavior}return x.forEach(function(e,t){if(b!==e||x.length===t+1)return h;b=h.placement.split("-")[0],y=k(b);var n=h.offsets.popper,r=h.offsets.reference,i=Math.floor,o="left"===b&&i(n.right)>i(r.left)||"right"===b&&i(n.left)i(r.top)||"bottom"===b&&i(n.top)i(g.right),l=i(n.top)i(g.bottom),c="left"===b&&a||"right"===b&&s||"top"===b&&l||"bottom"===b&&u,f=-1!==["top","bottom"].indexOf(b),d=!!v.flipVariations&&(f&&"start"===w&&a||f&&"end"===w&&s||!f&&"start"===w&&l||!f&&"end"===w&&u),p=!!v.flipVariationsByContent&&(f&&"start"===w&&s||f&&"end"===w&&a||!f&&"start"===w&&u||!f&&"end"===w&&l),m=d||p;(o||c||m)&&(h.flipped=!0,(o||c)&&(b=x[t+1]),m&&(w="end"===w?"start":"start"===w?"end":w),h.placement=b+(w?"-"+w:""),h.offsets.popper=P({},h.offsets.popper,C(h.instance.popper,h.offsets.reference,h.placement)),h=A(h.instance.modifiers,h,"flip"))}),h},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=k(t),e.offsets.popper=T(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!U(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right or , not
","or ."].join(" ")),Ee("showOnInit"===t,"The `showOnInit` prop was renamed to `showOnCreate` in v5."),Ee("arrowType"===t,["The `arrowType` prop was removed in v5 in favor of overloading the `arrow`","prop.","\n\n",'"round" string was replaced with importing the string from the package.',"\n\n","* import {roundArrow} from 'tippy.js'; (ESM version)\n","* const {roundArrow} = tippy; (IIFE CDN version)","\n\n",'Before: {arrow: true, arrowType: "round"}\n',"After: {arrow: roundArrow}`"].join(" ")),Ee("touchHold"===t,["The `touchHold` prop was removed in v5 in favor of overloading the `touch`","prop.","\n\n","Before: {touchHold: true}\n",'After: {touch: "hold"}'].join(" ")),Ee("size"===t,["The `size` prop was removed in v5. Instead, use a theme that specifies","CSS padding and font-size properties."].join(" ")),Ee("theme"===t&&"google"===e,'The included theme "google" was renamed to "material" in v5.'),Ee(n,["Specifying placement in `popperOptions` is not supported. Use the base-level","`placement` prop instead.","\n\n",'Before: {popperOptions: {placement: "bottom"}}\n','After: {placement: "bottom"}'].join(" ")),Ee(r,["`"+t+"`","is not a valid prop. You may have spelled it incorrectly, or if it's a","plugin, forgot to pass it in an array as props.plugins.","\n\n","In v5, the following props were turned into plugins:","\n\n","* animateFill\n","* followCursor\n","* sticky","\n\n","All props: https://atomiks.github.io/tippyjs/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/plugins/"].join(" "))})}var Ce={passive:!0},l="tippy-iOS",Ae="tippy-popper",Ne="tippy-tooltip",Me="tippy-content",u="tippy-arrow",c="tippy-svg-arrow",Le="."+Ae,f="."+Ne,h="."+Me,v="."+u,g="."+c,De={isTouch:!1},b=0;function y(){De.isTouch||(De.isTouch=!0,window.performance&&document.addEventListener("mousemove",w))}function w(){var e=performance.now();e-b<20&&(De.isTouch=!1,document.removeEventListener("mousemove",w)),b=e}function x(){var e=document.activeElement;if(i(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var E="undefined"!=typeof window&&"undefined"!=typeof document,T=E?navigator.userAgent:"",Pe=/MSIE |Trident\//.test(T),_=/UCBrowser\//.test(T),O=E&&/iPhone|iPad|iPod/.test(navigator.platform);function Fe(e){var t=e&&O&&De.isTouch;document.body.classList[t?"add":"remove"](l)}function Ie(e){return e.split("-")[0]}function Be(e){e.setAttribute("data-inertia","")}function je(e){e.setAttribute("data-interactive","")}function ze(e,t){p(t.content)?(n(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(e[t.allowHTML?"innerHTML":"textContent"]=t.content)}function Ue(e){return{tooltip:e.querySelector(f),content:e.querySelector(h),arrow:e.querySelector(v)||e.querySelector(g)}}function Re(e){var t=ae();return!0===e?t.className=u:(t.className=c,p(e)?t.appendChild(e):n(t,e)),t}function Ve(e,t,n){var r,i=Ue(e),o=i.tooltip,a=i.content,s=i.arrow;e.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth="number"==typeof(r=n.maxWidth)?r+"px":r,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),t.content!==n.content&&ze(a,n),!t.arrow&&n.arrow?(o.appendChild(Re(n.arrow)),o.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(o.removeChild(s),o.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(Re(n.arrow))),!t.interactive&&n.interactive?je(o):t.interactive&&!n.interactive&&o.removeAttribute("data-interactive"),!t.inertia&&n.inertia?Be(o):t.inertia&&!n.inertia&&o.removeAttribute("data-inertia"),t.theme!==n.theme&&(Ke(o,"remove",t.theme),Ke(o,"add",n.theme))}function He(e,t,n){var r=_&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";e[t+"EventListener"](r,n)}function Ke(t,n,e){me(e).forEach(function(e){t.classList[n](e+"-theme")})}var We=1,Ye=[],Ge=[];function S(o,e){var a,n,r,t=Se(o,Q({},Te,{},Oe(e)));if(!t.multiple&&o._tippy)return null;var s,l,i,u,c,f=!1,d=!1,p=!1,m=0,h=[],v=ue(H,t.interactiveDebounce),g=ge(t.triggerTarget||o),b=We++,y=function(e,t){var n=ae();n.className=Ae,n.style.position="absolute",n.style.top="0",n.style.left="0";var r=ae();r.className=Ne,r.id="tippy-"+e,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1"),Ke(r,"add",t.theme);var i=ae();return i.className=Me,i.setAttribute("data-state","hidden"),t.interactive&&je(r),t.arrow&&(r.setAttribute("data-arrow",""),r.appendChild(Re(t.arrow))),t.inertia&&Be(r),ze(i,t),r.appendChild(i),n.appendChild(r),Ve(n,t,t),n}(b,t),w=Ue(y),x=(c=t.plugins).filter(function(e,t){return c.indexOf(e)===t}),E=w.tooltip,T=w.content,_=[E,T],O={id:b,reference:o,popper:y,popperChildren:w,popperInstance:null,props:t,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:x,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(n),cancelAnimationFrame(r)},setProps:function(n){if("production"!==J.env.NODE_ENV&&Ee(O.state.isDestroyed,xe("setProps")),!O.state.isDestroyed){"production"!==J.env.NODE_ENV&&(ke(n,x),Ee(!!n.plugins&&(n.plugins.length!==x.length||x.some(function(e,t){return!n.plugins||!n.plugins[t]||e!==n.plugins[t]})),"Cannot update plugins")),M("onBeforeUpdate",[O,n]),R();var t=O.props,e=Se(o,Q({},O.props,{},n,{ignoreAttributes:!0}));if(e.ignoreAttributes=he(n.ignoreAttributes,t.ignoreAttributes),O.props=e,U(),t.interactiveDebounce!==e.interactiveDebounce&&(P(),v=ue(H,e.interactiveDebounce)),Ve(y,t,e),O.popperChildren=Ue(y),t.triggerTarget&&!e.triggerTarget?ve(t.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):e.triggerTarget&&o.removeAttribute("aria-expanded"),D(),O.popperInstance)if(_e.some(function(e){return ee(n,e)&&n[e]!==t[e]})){var r=O.popperInstance.reference;O.popperInstance.destroy(),G(),O.popperInstance.reference=r,O.state.isVisible&&O.popperInstance.enableEventListeners()}else O.popperInstance.update();M("onAfterUpdate",[O,n])}},setContent:function(e){O.setProps({content:e})},show:function(e){void 0===e&&(e=te(O.props.duration,0,Te.duration)),"production"!==J.env.NODE_ENV&&Ee(O.state.isDestroyed,xe("show"));var t=O.state.isVisible,n=O.state.isDestroyed,r=!O.state.isEnabled,i=De.isTouch&&!O.props.touch;t||n||r||i||A().hasAttribute("disabled")||(O.popperInstance||G(),M("onShow",[O],!1),!1!==O.props.onShow(O)&&(I(),y.style.visibility="visible",O.state.isVisible=!0,O.state.isMounted||se(_.concat(y),0),l=function(){O.state.isVisible&&(se([y],O.props.updateDuration),se(_,e),le(_,"visible"),L(),D(),be(Ge,O),Fe(!0),O.state.isMounted=!0,M("onMount",[O]),j(e,function(){O.state.isShown=!0,M("onShown",[O])}))},function(){m=0;var e,t=O.props.appendTo,n=A();(e=O.props.interactive&&t===Te.appendTo||"parent"===t?n.parentNode:ie(t,[n])).contains(y)||e.appendChild(y),"production"!==J.env.NODE_ENV&&Ee(O.props.interactive&&t===Te.appendTo&&n.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard navigation","because it is not directly after the reference element in the DOM source","order.","\n\n","Using a wrapper
or tag around the reference element solves","this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle keyboard","navigation.","\n\n","See: https://atomiks.github.io/tippyjs/accessibility/#interactivity"].join(" ")),oe(O.popperInstance.modifiers,"flip","enabled",O.props.flip),O.popperInstance.enableEventListeners(),O.popperInstance.update()}()))},hide:function(e){void 0===e&&(e=te(O.props.duration,1,Te.duration)),"production"!==J.env.NODE_ENV&&Ee(O.state.isDestroyed,xe("hide"));var t=!O.state.isVisible&&!f,n=O.state.isDestroyed,r=!O.state.isEnabled&&!f;t||n||r||(M("onHide",[O],!1),!1===O.props.onHide(O)&&!f||(B(),y.style.visibility="hidden",O.state.isVisible=!1,O.state.isShown=!1,se(_,e),le(_,"hidden"),L(),D(),j(e,function(){!O.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&(O.popperInstance.disableEventListeners(),O.popperInstance.options.placement=O.props.placement,y.parentNode.removeChild(y),0===(Ge=Ge.filter(function(e){return e!==O})).length&&Fe(!1),O.state.isMounted=!1,M("onHidden",[O]))})))},enable:function(){O.state.isEnabled=!0},disable:function(){O.hide(),O.state.isEnabled=!1},destroy:function(){"production"!==J.env.NODE_ENV&&Ee(O.state.isDestroyed,xe("destroy")),O.state.isDestroyed||(f=!0,O.clearDelayTimeouts(),O.hide(0),R(),delete o._tippy,O.popperInstance&&O.popperInstance.destroy(),f=!1,O.state.isDestroyed=!0,M("onDestroy",[O]))}};o._tippy=O,y._tippy=O;var S=x.map(function(e){return e.fn(O)});return U(),D(),t.lazy||G(),M("onCreate",[O]),t.showOnCreate&&$(),y.addEventListener("mouseenter",function(){O.props.interactive&&O.state.isVisible&&O.clearDelayTimeouts()}),y.addEventListener("mouseleave",function(){O.props.interactive&&pe(O.props.trigger,"mouseenter")&&g.addEventListener("mousemove",v)}),O;function k(){var e=O.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===k()[0]}function A(){return u||o}function N(e){return O.state.isMounted&&!O.state.isVisible||De.isTouch||s&&"focus"===s.type?0:te(O.props.delay,e?0:1,Te.delay)}function M(t,n,e){var r;void 0===e&&(e=!0),S.forEach(function(e){ee(e,t)&&e[t].apply(e,n)}),e&&(r=O.props)[t].apply(r,n)}function L(){var e=O.props.aria;if(e){var r="aria-"+e,i=E.id;ve(O.props.triggerTarget||o).forEach(function(e){var t=e.getAttribute(r);if(O.state.isVisible)e.setAttribute(r,t?t+" "+i:i);else{var n=t&&t.replace(i,"").trim();n?e.setAttribute(r,n):e.removeAttribute(r)}})}}function D(){ve(O.props.triggerTarget||o).forEach(function(e){O.props.interactive?e.setAttribute("aria-expanded",O.state.isVisible&&e===A()?"true":"false"):e.removeAttribute("aria-expanded")})}function P(){g.body.removeEventListener("mouseleave",X),g.removeEventListener("mousemove",v),Ye=Ye.filter(function(e){return e!==v})}function F(e){if(!O.props.interactive||!y.contains(e.target)){if(A().contains(e.target)){if(De.isTouch)return;if(O.state.isVisible&&pe(O.props.trigger,"click"))return}!0===O.props.hideOnClick&&(d=!1,O.clearDelayTimeouts(),O.hide(),p=!0,setTimeout(function(){p=!1}),O.state.isMounted||B())}}function I(){g.addEventListener("mousedown",F,!0)}function B(){g.removeEventListener("mousedown",F,!0)}function j(e,t){function n(e){e.target===E&&(He(E,"remove",n),t())}if(0===e)return t();He(E,"remove",i),He(E,"add",n),i=n}function z(t,n,r){void 0===r&&(r=!1),ve(O.props.triggerTarget||o).forEach(function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})})}function U(){C()&&(z("touchstart",V,Ce),z("touchend",K,Ce)),me(O.props.trigger).forEach(function(e){if("manual"!==e)switch(z(e,V),e){case"mouseenter":z("mouseleave",K);break;case"focus":z(Pe?"focusout":"blur",W)}})}function R(){h.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),h=[]}function V(t){var e=!1;if(O.state.isEnabled&&!Y(t)&&!p){if(u=(s=t).currentTarget,D(),!O.state.isVisible&&re(t)&&Ye.forEach(function(e){return e(t)}),"click"!==t.type||pe(O.props.trigger,"mouseenter")&&!d||!1===O.props.hideOnClick||!O.state.isVisible){var n=k(),r=n[0],i=n[1];De.isTouch&&"hold"===r&&i?a=setTimeout(function(){$(t)},i):$(t)}else e=!0;"click"===t.type&&(d=!e),e&&X(t)}}function H(e){var t,l,u;de(e.target,function(e){return e===o||e===y})||(t=fe(y.querySelectorAll(Le)).concat(y).map(function(e){var t=e._tippy,n=t.popperChildren.tooltip,r=t.props.interactiveBorder;return{popperRect:e.getBoundingClientRect(),tooltipRect:n.getBoundingClientRect(),interactiveBorder:r}}),l=e.clientX,u=e.clientY,t.every(function(e){var t=e.popperRect,n=e.tooltipRect,r=e.interactiveBorder,i=Math.min(t.top,n.top),o=Math.max(t.right,n.right),a=Math.max(t.bottom,n.bottom),s=Math.min(t.left,n.left);return r element.cloneNode(true)"].join(" "))}var f=l.reduce(function(e,t){var n=t&&S(t,s);return n&&e.push(n),e},[]);return p(e)?f[0]:f}k.version="5.1.4",k.defaultProps=Te,k.setDefaultProps=o,k.currentInput=De,A.BACKDROP_CLASS="tippy-backdrop",A.ROUND_ARROW='',A._extends=Q,A.arrayFrom=fe,A.closestCallback=de,A.createTippyWithPlugins=function(r){"production"!==J.env.NODE_ENV&&Ee(!0,["createTippyWithPlugins([...]) has been deprecated.","\n\n","Use tippy.setDefaultProps({plugins: [...]}) instead."].join(" "));function e(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),n=t.plugins||n,k(e,Q({},t,{plugins:[].concat(r,n)}))}return e.version="5.1.4",e.defaultProps=Te,e.setDefaultProps=o,e.currentInput=De,e},A.currentInput=De,A.defaultProps=Te,A.div=ae,A.errorWhen=m,A.getBasePlacement=Ie,A.getOwnerDocument=ge,A.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,r=t.duration;Ge.forEach(function(e){var t=!1;n&&(t=i(n)?e.reference===n:e.popper===n.popper),t||e.hide(r)})},A.includes=pe,A.isBrowser=E,A.isMouseEvent=re,A.isUCBrowser=_,A.normalizeToArray=ve,A.removeProperties=a,A.setVisibilityState=le,A.tippy=k,A.useIfDefined=he,A.warnWhen=Ee}).call(this,C("_process"))},{_process:4,"popper.js":3}],7:[function(i,e,o){(function(d){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var E=i("./tippy.chunk.cjs.js");i("popper.js");var p={mouseover:"mouseenter",focusin:"focus",click:"click"},e={name:"animateFill",defaultValue:!1,fn:function(e){var t,n=e.popperChildren,r=n.tooltip,i=n.content,o=e.props.animateFill&&!E.isUCBrowser?((t=E.div()).className=E.BACKDROP_CLASS,E.setVisibilityState([t],"hidden"),t):null;function a(){e.popperChildren.backdrop=o}return{onCreate:function(){o&&(a(),r.insertBefore(o,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",e.setProps({animation:"shift-away",arrow:!1}))},onMount:function(){if(o){var e=r.style.transitionDuration,t=Number(e.replace("ms",""));i.style.transitionDelay=Math.round(t/10)+"ms",o.style.transitionDuration=e,E.setVisibilityState([o],"visible"),"production"!==d.env.NODE_ENV&&(E.warnWhen("absolute"!==getComputedStyle(o).position,"The `tippy.js/dist/backdrop.css` stylesheet has not been\n imported!\n \n The `animateFill` plugin requires this stylesheet to work."),E.warnWhen("none"===getComputedStyle(r).transform,"The `tippy.js/animations/shift-away.css` stylesheet has not\n been imported!\n \n The `animateFill` plugin requires this stylesheet to work."))}},onShow:function(){o&&(o.style.transitionDuration="0ms")},onHide:function(){o&&E.setVisibilityState([o],"hidden")},onAfterUpdate:function(){a()}}}},t={name:"followCursor",defaultValue:!1,fn:function(h){var v,g=h.reference,b=h.popper,y=null,e=E.getOwnerDocument(h.props.triggerTarget||g),n=null,r=!1,i=h.props;function t(){return"manual"===h.props.trigger.trim()}function o(){var e=!!t()||null!==n&&!(0===n.clientX&&0===n.clientY);return h.props.followCursor&&e}function w(){return E.currentInput.isTouch||"initial"===h.props.followCursor&&h.state.isVisible}function a(){h.popperInstance&&y&&(h.popperInstance.reference=y)}function s(){if(o()||h.props.placement!==i.placement){var e=i.placement,t=e.split("-")[1];r=!0,h.setProps({placement:o()&&t?e.replace(t,"start"===t?"end":"start"):e}),r=!1}}function l(){h.popperInstance&&o()&&(w()||!0!==h.props.followCursor)&&h.popperInstance.disableEventListeners()}function u(){o()?e.addEventListener("mousemove",f):a()}function c(){o()&&f(v)}function x(){e.removeEventListener("mousemove",f)}function f(e){var t,n=v=e,r=n.clientX,i=n.clientY;if(h.popperInstance&&h.state.currentPlacement){var o=E.closestCallback(e.target,function(e){return e===g}),a=g.getBoundingClientRect(),s=h.props.followCursor,l="horizontal"===s,u="vertical"===s,c=E.includes(["top","bottom"],E.getBasePlacement(h.state.currentPlacement)),f={size:t=c?b.offsetWidth:b.offsetHeight,x:c?t:0,y:c?0:t},d=f.size,p=f.x,m=f.y;!o&&h.props.interactive||(null===y&&(y=h.popperInstance.reference),h.popperInstance.reference={referenceNode:g,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:c?d:0,height:c?0:d,top:(l?a.top:i)-m,bottom:(l?a.bottom:i)+m,left:(u?a.left:r)-p,right:(u?a.right:r)+p}}},h.popperInstance.update()),w()&&x()}}return{onAfterUpdate:function(e,t){var n;r||(n=t,Object.keys(n).forEach(function(e){i[e]=E.useIfDefined(n[e],i[e])}),t.placement&&s()),t.placement&&l(),requestAnimationFrame(c)},onMount:function(){c(),l()},onShow:function(){t()&&(v=n={clientX:0,clientY:0},s(),u())},onTrigger:function(e,t){n||(E.isMouseEvent(t)&&(n={clientX:t.clientX,clientY:t.clientY},v=t),s(),u())},onUntrigger:function(){h.state.isVisible||(x(),n=null)},onHidden:function(){x(),a(),n=null}}}},n={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t=e.reference;function n(){return e.props.inlinePositioning}return{onHidden:function(){n()&&(e.popperInstance.reference=t)},onShow:function(){n()&&(e.popperInstance.reference={referenceNode:t,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return function(t,e,n){if(n.length<2||null===t)return e;switch(t){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===t,a=r.top,s=i.bottom,l=o?r.left:i.left,u=o?r.right:i.right;return{top:a,bottom:s,left:l,right:u,width:u-l,height:s-a};case"left":case"right":var c=Math.min.apply(Math,n.map(function(e){return e.left})),f=Math.max.apply(Math,n.map(function(e){return e.right})),d=n.filter(function(e){return"left"===t?e.left===c:e.right===f}),p=d[0].top,m=d[d.length-1].bottom;return{top:p,bottom:m,left:c,right:f,width:f-c,height:m-p};default:return e}}(e.state.currentPlacement&&E.getBasePlacement(e.state.currentPlacement),t.getBoundingClientRect(),E.arrayFrom(t.getClientRects()))}})}}}},r={name:"sticky",defaultValue:!1,fn:function(n){var r=n.reference,i=n.popper;function o(e){return!0===n.props.sticky||n.props.sticky===e}var a=null,s=null;function l(){var e=o("reference")?(n.popperInstance?n.popperInstance.reference:r).getBoundingClientRect():null,t=o("popper")?i.getBoundingClientRect():null;(e&&u(a,e)||t&&u(s,t))&&n.popperInstance.update(),a=e,s=t,n.state.isMounted&&requestAnimationFrame(l)}return{onMount:function(){n.props.sticky&&l()}}}};function u(e,t){return!e||!t||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}o.createTippyWithPlugins=E.createTippyWithPlugins,o.default=E.tippy,o.hideAll=E.hideAll,o.roundArrow=E.ROUND_ARROW,o.animateFill=e,o.createSingleton=function(a,e,t){void 0===e&&(e={}),void 0===t&&(t=[]),"production"!==d.env.NODE_ENV&&E.errorWhen(!Array.isArray(a),["The first argument passed to createSingleton() must be an array of tippy","instances. The passed value was",String(a)].join(" ")),t=e.plugins||t,a.forEach(function(e){e.disable()});var s,l,u=E._extends({},E.defaultProps,{},e).aria,r=!1,c=a.map(function(e){return e.reference}),n={fn:function(i){function o(e){if(s){var t="aria-"+s;e&&!i.props.interactive?l.setAttribute(t,i.popperChildren.tooltip.id):l.removeAttribute(t)}}return{onAfterUpdate:function(e,t){var n=t.aria;void 0!==n&&n!==u&&(r?(r=!0,i.setProps({aria:null}),r=!1):u=n)},onDestroy:function(){a.forEach(function(e){e.enable()})},onMount:function(){o(!0)},onUntrigger:function(){o(!1)},onTrigger:function(e,t){var n=t.currentTarget,r=c.indexOf(n);n!==l&&(l=n,s=u,i.state.isVisible&&o(!0),i.popperInstance.reference=n,i.setContent(a[r].props.content))}}}};return E.tippy(E.div(),E._extends({},e,{plugins:[n].concat(t),aria:null,triggerTarget:c}))},o.delegate=function(e,i,t){void 0===t&&(t=[]),"production"!==d.env.NODE_ENV&&E.errorWhen(!(i&&i.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" ")),t=i.plugins||t;var o=[],a=[],s=i.target,n=E.removeProperties(i,["target"]),r=E._extends({},n,{plugins:t,trigger:"manual"}),l=E._extends({},n,{plugins:t,showOnCreate:!0}),u=E.tippy(e,r);function c(e){if(e.target){var t=e.target.closest(s);if(t){var n=t.getAttribute("data-tippy-trigger")||i.trigger||E.defaultProps.trigger;if(E.includes(n,p[e.type])){var r=E.tippy(t,l);r&&(a=a.concat(r))}}}}function f(e,t,n,r){void 0===r&&(r=!1),e.addEventListener(t,n,r),o.push({node:e,eventType:t,handler:n,options:r})}return E.normalizeToArray(u).forEach(function(e){var t,n=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&a.forEach(function(e){e.destroy()}),a=[],o.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),o=[],n()},f(t=e.reference,"mouseover",c),f(t,"focusin",c),f(t,"click",c)}),u},o.followCursor=t,o.inlinePositioning=n,o.sticky=r}).call(this,i("_process"))},{"./tippy.chunk.cjs.js":6,_process:4,"popper.js":3}],8:[function(e,t,n){"use strict";var r=a(e("mithril")),i=a(e("./view")),o=a(e("./texte/de"));function a(e){return e&&e.__esModule?e:{default:e}}document,window,domIsReady(function(){window.texte=o.default,r.default.mount(window.document.getElementById("gradido-mithril-user-search"),i.default)})},{"./texte/de":13,"./view":14,mithril:1}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e("mithril")),i=o(e("numeral"));function o(e){return e&&e.__esModule?e:{default:e}}var a=!1,s={view:function(e){return(0,r.default)("span",(t=e.attrs.centAmount/1e4,i.default.locale("de"),(0,i.default)(t).format("0,0.00")+" GDD"));var t},oninit:function(e){a||(i.default.register("locale","de",{delimiters:{thousands:".",decimal:","},currency:{symbol:"€"}}),i.default.locale("de"),a=!0)}};n.default=s},{mithril:1,numeral:2}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return{oncreate:function(e){(0,r.default)(e.dom,{content:e.attrs.accountState.getTooltipText(),placement:"right-start",theme:"rippleUI-theme",arrow:!1})},onremove:function(){},view:function(){return e}}},i(e("mithril"));var r=i(e("tippy.js"));function i(e){return e&&e.__esModule?e:{default:e}}},{mithril:1,"tippy.js":7}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e("mithril"))&&r.__esModule?r:{default:r},o={view:function(e){return(0,i.default)("div.modal.visible-modal",{tabindex:"-1",role:"dialog"},(0,i.default)("div.modal-dialog",{role:"document"},(0,i.default)("div.modal-content",[(0,i.default)("p.grid-header",e.attrs.title),(0,i.default)("div.modal-body",e.attrs.body),(0,i.default)("div.modal-footer",[(0,i.default)("button.btn.btn-primary",{type:"button","data-dismiss":"modal",onclick:e.attrs.dismiss},"Ok")])])))},oninit:function(e){}};n.default=o},{mithril:1}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e("mithril"))&&r.__esModule?r:{default:r};function o(e,t){for(var n=0;n';if(t+='
'+e.description.title+"
",null!=e.description.lines){for(var n in t+="
    ",e.description.lines){var r=e.description.lines[n],i=window.texte.ACCOUNT_STATES.LINES[n],o="mdi ";if("+"===r)o+=" mdi-check color-primary";else if("-"===r)o+=" mdi-close color-danger";else{if("/"!==r)continue;o+=" mdi-alert-circle-outline color-warning"}t+="
  • ",t+='',t+=" ",t+=""+i.title+": "+i[r]+"",t+="
  • "}t+="
"}return t+"
"}}]),s);function s(e){!function(e){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this),this.stateName=e,this.texte=window.texte.ACCOUNT_STATES[e]}n.default=a},{mithril:1}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={ACCOUNT_STATES:{LINES:[{title:"Login-Server","+":"Das Benutzer-Konto liegt auf dem Login-Server!","-":"Das Benutzer-Konto existiert nicht auf dem Login-Server!"},{title:"Konto Aktivierung","+":"Der Benutzer hat sein Konto aktiviert!","-":"Der Benutzer hat noch nicht auf den Link in seiner E-Mail geklickt!"},{title:"Schlüsselpaar","+":"Es wurde bereits ein Schlüsselpaar für den Benutzer erzeugt und ihm eine Passphrase gezeigt!","-":"Es wurden noch keine Schlüssel und Passphrase für den Benutzer erzeugt!"},{title:"Gemeinschafts-Server","+":"Das Benutzer-Konto wurde auf auf den Gemeinschafts-Server kopiert!","-":"Das Benutzer-Konto wurde noch nicht auf den Gemeinschafts-Server kopiert!"},{title:"Gradidos","+":"Es können Gradidos an den Benutzer geschickt werden!","-":"Es können noch keine Gradidos an den Benutzer geschickt werden!","/":"Es können theoretisch Gradidos an den Benutzer geschickt werden, aber es ist nicht sicher ob er sie verwenden kann!"}],"account created":{title:"Konto angelegt",color:"secondary",description:{title:"Das Konto wurde auf dem Login-Server angelegt, vermutlich durch eine elopage-Anmeldung.",lines:["+","-","-","-","-"]},todo:{title:"Als nächstes müsste der Benutzer den Link in seiner E-Mail anklicken und den Anweisungen folgen. ",lines:["Stimmt die E-Mail Adresse? Hat der Benutzer in seinem Spam-Verzeichnis nachgesehen?","{{verification-resend}}","{{mailto-verification-resend}}"]}},"account not on login-server":{title:"Konto nicht auf Login-Server",color:"danger",description:{title:"Das Konto existiert nicht (mehr) auf dem Login-Server: ein Fehler oder es wurde nur teilweise gelöscht.",lines:["-","+","+","+","/"]},todo:{title:"Wenn der Benutzer seine Passphrase hat, kann er sein Konto auf dem Login-Server wiederherstellen, ansonsten bleibt eigentlich nur das Konto auf dem Gemeinschafts-Server zu löschen",lines:["Nachdem das Konto auf dem Login-Server kopiert wurde, bekommt der Benutzer automatisch eine E-Mail mit einem Link zur Kontoaktivierung zugeschickt.","{{copy-from-community-to-login-server}}","{{user-transactions-overview}}","Es wird nur der Benutzer gelöscht, nicht seine Transaktionen. Zu diesen hat er wieder Zugriff wenn er sein Konto mit Hilfe seiner Passphrase wiederherstellt.","{{delete-from-community-server}}"]}},"email activated":{title:"Konto aktiviert",color:"primary",description:{title:"Das Konto wurde vom Benutzer aktiviert und Schlüssel erzeugt, aber noch nicht auf diesen Gemeinschafts-Server kopiert.",lines:["+","+","+","-","-"]},todo:{title:"Das Benutzer Konto müsste vom Login-Server auf den Community-Server kopiert werden.",lines:["{{copy-from-login-to-community-server}}"]}},"account copied to community":{title:"Konto auf Gemeinschafts-Server",color:"success",description:{title:"Das Konto ist vollständig aktiviert und es können Gradidos überwiesen werden.",lines:["+","+","+","+","+"]}},"email not activated":{title:"Konto nicht aktiviert",color:"warning",description:{title:"Das Konto wurde auf dem Login-Server angelegt, vermutlich durch eine elopage-Anmeldung. Es wurde aber noch nicht aktiviert!",lines:["+","-","-","-","-"]},todo:{title:"Als nächstes müsste der Benutzer den Link in seiner E-Mail anklicken und den Anweisungen folgen. ",lines:["Stimmt die E-Mail Adresse? Hat der Benutzer in seinem Spam-Verzeichnis nachgesehen?","{{verification-resend}}","{{mailto-verification-resend}}"]}},"account multiple times on login-server":{title:"Konto mehrfach vorhanden",color:"danger",description:{title:"Das Konto ist auf dem Login-Server mehrfach vorhanden, das sollte nicht sein, auf dem Login-Server muss ein Fehler passiert sein!!"},todo:{title:"Du solltest mit dem Entwickler in Kontakt treten.",lines:["{{mailto-developer}}"]}},"account not on community server":{title:"Konto nicht auf Gemeinschafts-Server",color:"secondary",description:{title:"Das Konto wurde auf dem Login-Server angelegt, aber existiert noch nicht auf dem Gemeinschafts-Server!",lines:["+",null,"-","-","-"]},todo:{title:"Das sollte eigentlich nicht passieren, du solltest mit dem Entwickler sprechen.",lines:["{{mailto-developer}}"]}},"no keys":{title:"Keine Schlüssel generiert",color:"warning",description:{title:"Das Konto wurde auf dem Login-Server angelegt, aber es wurden noch keine Schlüssel generiert!",lines:["+","+","-","-","-"]},todo:{title:"Der Benutzer muss sich mit seinen Daten einloggen, dann müsste er automatisch durch die Schlüsselgenerierung/Konto-Wiederherstellung geführt werden",lines:["{{mailto-user-login}}","Wenn der Benutzer sein Passwort vergessen hat, kann er sich auch eine Passwort Reset E-Mail zuschicken lassen.","{{reset-password}}","{{mailto-reset-password}}"]}}},NO_USER_FOUND:"Keine Benutzer gefunden",USER_FOUND:"Benutzer gefunden",NAME:"Name",EMAIL:"E-Mail",BALANCE:"Kontostand",PUBLIC_KEY:"Öffentlicher
Schlüssel",CREATED:"Erstellt",COPY_FROM_LOGIN_TO_COMMUNITY:"Vom Login-Server zum Gemeinschafts-Server kopieren",COPY_FROM_LOGIN_TO_COMMUNITY_SUCCESS:"Kontodaten wurden erfolgreich vom Login-Server zu diesem Gemeinschafts-Server kopiert!",COPY_FAILED:"Fehler beim Kopieren",AJAX_CRITICAL:"Kritischer Fehler beim Ajax-Request",COPY_IN_PROGRESS:"Wird kopiert"}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(e("mithril")),i=a(e("./userTable")),o=a(e("../model/AccountState"));function a(e){return e&&e.__esModule?e:{default:e}}var s={view:function(e){return void 0===g_users?(0,r.default)(""):0"+s.toLocaleTimeString()}var l=!1;t.hasActions()&&(l=t.getRawColor());var u="down";return e.attrs.open&&(u="up"),(0,c.default)("tr",[(0,c.default)("td",!1!==l?(0,c.default)("i.mdi.mdi-menu-"+u+".btn.btn-xs.btn-"+l,{onclick:e.attrs.btnClick}):null),(0,c.default)("td.pr-0",[(0,c.default)("span.text-black.font-weight-medium.d-block",n.name),(0,c.default)((0,p.default)((0,c.default)("span",[(0,c.default)("span.status-indicator.rounded-indicator.small."+r),(0,c.default)("small",i)])),{accountState:t})]),(0,c.default)("td",n.email),(0,c.default)("td",(0,c.default)(d.default,{centAmount:n.balance})),(0,c.default)("td",{title:n.pubkeyhex},o),(0,c.default)("td",c.default.trust(a))])},oninit:function(e){}};n.default=i},{"../../lib/Gradido":9,"../../lib/Tooltip":10,"../../model/AccountState":12,mithril:1}]},{},[8])}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]); +!function r(i,o,a){function s(t,e){if(!o[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=o[t]={exports:{}},i[t][0].call(n.exports,function(e){return s(i[t][1][e]||e)},n,n.exports,r,i,o,a)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o=n.clientWidth&&e>=n.clientHeight}),t=(0l[e]&&!r.escapeWithReference&&(n=Math.min(u[t],l[e]-("right"===e?u.width:u.height))),y({},t,n)}};return s.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=E({},u,c[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),t=a?"right":"bottom",i=a?"left":"top",a=a?"width":"height";return n[t]o(r[t])&&(e.offsets.popper[i]=o(r[t])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!U(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,o=i.popper,a=i.reference,s=-1!==["left","right"].indexOf(r),l=s?"height":"width",u=s?"Top":"Left",c=u.toLowerCase(),t=s?"left":"top",i=s?"bottom":"right",r=A(n)[l];a[i]-ro[i]&&(e.offsets.popper[c]+=a[c]+r-o[i]),e.offsets.popper=x(e.offsets.popper);s=a[c]+a[l]/2-r/2,i=d(e.instance.popper),a=parseFloat(i["margin"+u]),u=parseFloat(i["border"+u+"Width"]),u=s-e.offsets.popper[c]-a-u,u=Math.max(Math.min(o[l]-r,u),0);return e.arrowElement=n,e.offsets.arrow=(y(n={},c,Math.round(u)),y(n,t,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,c){if(F(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var d=C(u.instance.popper,u.instance.reference,c.padding,c.boundariesElement,u.positionFixed),f=u.placement.split("-")[0],p=M(f),m=u.placement.split("-")[1]||"",h=[];switch(c.behavior){case K:h=[f,p];break;case G:h=Y(f);break;case W:h=Y(f,!0);break;default:h=c.behavior}return h.forEach(function(e,t){if(f!==e||h.length===t+1)return u;f=u.placement.split("-")[0],p=M(f);var n=u.offsets.popper,r=u.offsets.reference,i=Math.floor,o="left"===f&&i(n.right)>i(r.left)||"right"===f&&i(n.left)i(r.top)||"bottom"===f&&i(n.top)i(d.right),l=i(n.top)i(d.bottom),r="left"===f&&a||"right"===f&&s||"top"===f&&l||"bottom"===f&&e,n=-1!==["top","bottom"].indexOf(f),i=!!c.flipVariations&&(n&&"start"===m&&a||n&&"end"===m&&s||!n&&"start"===m&&l||!n&&"end"===m&&e),l=!!c.flipVariationsByContent&&(n&&"start"===m&&s||n&&"end"===m&&a||!n&&"start"===m&&e||!n&&"end"===m&&l),l=i||l;(o||r||l)&&(u.flipped=!0,(o||r)&&(f=h[t+1]),l&&(m="end"===m?"start":"start"===m?"end":m),u.placement=f+(m?"-"+m:""),u.offsets.popper=E({},u.offsets.popper,D(u.instance.popper,u.offsets.reference,u.placement)),u=I(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),r=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(r?i[a?"width":"height"]:0),e.placement=M(t),e.offsets.popper=x(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!U(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=L(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right or , not
","or ."].join(" ")),Ee("showOnInit"===t,"The `showOnInit` prop was renamed to `showOnCreate` in v5."),Ee("arrowType"===t,["The `arrowType` prop was removed in v5 in favor of overloading the `arrow`","prop.","\n\n",'"round" string was replaced with importing the string from the package.',"\n\n","* import {roundArrow} from 'tippy.js'; (ESM version)\n","* const {roundArrow} = tippy; (IIFE CDN version)","\n\n",'Before: {arrow: true, arrowType: "round"}\n',"After: {arrow: roundArrow}`"].join(" ")),Ee("touchHold"===t,["The `touchHold` prop was removed in v5 in favor of overloading the `touch`","prop.","\n\n","Before: {touchHold: true}\n",'After: {touch: "hold"}'].join(" ")),Ee("size"===t,["The `size` prop was removed in v5. Instead, use a theme that specifies","CSS padding and font-size properties."].join(" ")),Ee("theme"===t&&"google"===e,'The included theme "google" was renamed to "material" in v5.'),Ee(n,["Specifying placement in `popperOptions` is not supported. Use the base-level","`placement` prop instead.","\n\n",'Before: {popperOptions: {placement: "bottom"}}\n','After: {placement: "bottom"}'].join(" ")),Ee(r,["`"+t+"`","is not a valid prop. You may have spelled it incorrectly, or if it's a","plugin, forgot to pass it in an array as props.plugins.","\n\n","In v5, the following props were turned into plugins:","\n\n","* animateFill\n","* followCursor\n","* sticky","\n\n","All props: https://atomiks.github.io/tippyjs/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/plugins/"].join(" "))})}var Ce={passive:!0},d="tippy-iOS",Ne="tippy-popper",ke="tippy-tooltip",Ae="tippy-content",f="tippy-arrow",p="tippy-svg-arrow",Me="."+Ne,m="."+ke,h="."+Ae,v="."+f,g="."+p,De={isTouch:!1},b=0;function y(){De.isTouch||(De.isTouch=!0,window.performance&&document.addEventListener("mousemove",w))}function w(){var e=performance.now();e-b<20&&(De.isTouch=!1,document.removeEventListener("mousemove",w)),b=e}function E(){var e,t=document.activeElement;i(t)&&(e=t._tippy,t.blur&&!e.state.isVisible&&t.blur())}var e="undefined"!=typeof window&&"undefined"!=typeof document,T=e?navigator.userAgent:"",Le=/MSIE |Trident\//.test(T),x=e&&/iPhone|iPad|iPod/.test(navigator.platform);function Ie(e){e=e&&x&&De.isTouch;document.body.classList[e?"add":"remove"](d)}function Fe(e){return e.split("-")[0]}function Pe(e){e.setAttribute("data-inertia","")}function Re(e){e.setAttribute("data-interactive","")}function je(e,t){l(t.content)?(n(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(e[t.allowHTML?"innerHTML":"textContent"]=t.content)}function Be(e){return{tooltip:e.querySelector(m),content:e.querySelector(h),arrow:e.querySelector(v)||e.querySelector(g)}}function ze(e){var t=oe();return!0===e?t.className=f:(t.className=p,l(e)?t.appendChild(e):n(t,e)),t}function Ue(e,t,n){var r=Be(e),i=r.tooltip,o=r.content,r=r.arrow;e.style.zIndex=""+n.zIndex,i.setAttribute("data-animation",n.animation),i.style.maxWidth="number"==typeof(e=n.maxWidth)?e+"px":e,n.role?i.setAttribute("role",n.role):i.removeAttribute("role"),t.content!==n.content&&je(o,n),!t.arrow&&n.arrow?(i.appendChild(ze(n.arrow)),i.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(i.removeChild(r),i.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(i.removeChild(r),i.appendChild(ze(n.arrow))),!t.interactive&&n.interactive?Re(i):t.interactive&&!n.interactive&&i.removeAttribute("data-interactive"),!t.inertia&&n.inertia?Pe(i):t.inertia&&!n.inertia&&i.removeAttribute("data-inertia"),t.theme!==n.theme&&(He(i,"remove",t.theme),He(i,"add",n.theme))}function Ve(t,n,r){["transitionend","webkitTransitionEnd"].forEach(function(e){t[n+"EventListener"](e,r)})}function He(t,n,e){pe(e).forEach(function(e){t.classList[n](e+"-theme")})}var Ye=1,Ke=[],Ge=[];function _(l,e){var i,t,n,r=Se(l,Z({},Te,{},_e(e)));if(!r.multiple&&l._tippy)return null;var o,a,s,u,c,d=!1,f=!1,p=!1,m=0,h=[],v=le(H,r.interactiveDebounce),g=ve(r.triggerTarget||l),b=Ye++,y=function(e,t){var n=oe();n.className=Ne,n.style.position="absolute",n.style.top="0",n.style.left="0";var r=oe();return r.className=ke,r.id="tippy-"+e,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1"),He(r,"add",t.theme),(e=oe()).className=Ae,e.setAttribute("data-state","hidden"),t.interactive&&Re(r),t.arrow&&(r.setAttribute("data-arrow",""),r.appendChild(ze(t.arrow))),t.inertia&&Pe(r),je(e,t),r.appendChild(e),n.appendChild(r),Ue(n,t,t),n}(b,r),w=Be(y),E=(c=r.plugins).filter(function(e,t){return c.indexOf(e)===t}),T=w.tooltip,e=w.content,x=[T,e],_={id:b,reference:l,popper:y,popperChildren:w,popperInstance:null,props:r,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:E,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(t),cancelAnimationFrame(n)},setProps:function(n){var t,e;"production"!==We.env.NODE_ENV&&Ee(_.state.isDestroyed,we("setProps")),_.state.isDestroyed||("production"!==We.env.NODE_ENV&&(Oe(n,E),Ee(!!n.plugins&&(n.plugins.length!==E.length||E.some(function(e,t){return!n.plugins||!n.plugins[t]||e!==n.plugins[t]})),"Cannot update plugins")),M("onBeforeUpdate",[_,n]),U(),t=_.props,(e=Se(l,Z({},_.props,{},n,{ignoreAttributes:!0}))).ignoreAttributes=me(n.ignoreAttributes,t.ignoreAttributes),_.props=e,z(),t.interactiveDebounce!==e.interactiveDebounce&&(I(),v=le(H,e.interactiveDebounce)),Ue(y,t,e),_.popperChildren=Be(y),t.triggerTarget&&!e.triggerTarget?he(t.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):e.triggerTarget&&l.removeAttribute("aria-expanded"),L(),_.popperInstance&&(xe.some(function(e){return Q(n,e)&&n[e]!==t[e]})?(e=_.popperInstance.reference,_.popperInstance.destroy(),W(),_.popperInstance.reference=e,_.state.isVisible&&_.popperInstance.enableEventListeners()):_.popperInstance.update()),M("onAfterUpdate",[_,n]))},setContent:function(e){_.setProps({content:e})},show:function(e){void 0===e&&(e=ee(_.props.duration,0,Te.duration)),"production"!==We.env.NODE_ENV&&Ee(_.state.isDestroyed,we("show"));var t=_.state.isVisible,n=_.state.isDestroyed,r=!_.state.isEnabled,i=De.isTouch&&!_.props.touch;t||n||r||i||k().hasAttribute("disabled")||(_.popperInstance||W(),M("onShow",[_],!1),!1!==_.props.onShow(_)&&(P(),y.style.visibility="visible",_.state.isVisible=!0,_.state.isMounted||ae(x.concat(y),0),a=function(){_.state.isVisible&&(ae([y],_.props.updateDuration),ae(x,e),se(x,"visible"),D(),L(),ge(Ge,_),Ie(!0),_.state.isMounted=!0,M("onMount",[_]),j(e,function(){_.state.isShown=!0,M("onShown",[_])}))},function(){m=0;var e=_.props.appendTo,t=k(),n=_.props.interactive&&e===Te.appendTo||"parent"===e?t.parentNode:re(e,[t]);n.contains(y)||n.appendChild(y),"production"!==We.env.NODE_ENV&&Ee(_.props.interactive&&e===Te.appendTo&&t.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard navigation","because it is not directly after the reference element in the DOM source","order.","\n\n","Using a wrapper
or tag around the reference element solves","this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle keyboard","navigation.","\n\n","See: https://atomiks.github.io/tippyjs/accessibility/#interactivity"].join(" ")),ie(_.popperInstance.modifiers,"flip","enabled",_.props.flip),_.popperInstance.enableEventListeners(),_.popperInstance.update()}()))},hide:function(e){void 0===e&&(e=ee(_.props.duration,1,Te.duration)),"production"!==We.env.NODE_ENV&&Ee(_.state.isDestroyed,we("hide"));var t=!_.state.isVisible&&!d,n=_.state.isDestroyed,r=!_.state.isEnabled&&!d;t||n||r||(M("onHide",[_],!1),!1===_.props.onHide(_)&&!d||(R(),y.style.visibility="hidden",_.state.isVisible=!1,_.state.isShown=!1,ae(x,e),se(x,"hidden"),D(),L(),j(e,function(){!_.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&(_.popperInstance.disableEventListeners(),_.popperInstance.options.placement=_.props.placement,y.parentNode.removeChild(y),0===(Ge=Ge.filter(function(e){return e!==_})).length&&Ie(!1),_.state.isMounted=!1,M("onHidden",[_]))})))},enable:function(){_.state.isEnabled=!0},disable:function(){_.hide(),_.state.isEnabled=!1},destroy:function(){"production"!==We.env.NODE_ENV&&Ee(_.state.isDestroyed,we("destroy")),_.state.isDestroyed||(d=!0,_.clearDelayTimeouts(),_.hide(0),U(),delete l._tippy,_.popperInstance&&_.popperInstance.destroy(),d=!1,_.state.isDestroyed=!0,M("onDestroy",[_]))}};l._tippy=_,y._tippy=_;var S=E.map(function(e){return e.fn(_)}),O=l.hasAttribute("aria-expanded");return z(),L(),r.lazy||W(),M("onCreate",[_]),r.showOnCreate&&$(),y.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),y.addEventListener("mouseleave",function(e){_.props.interactive&&fe(_.props.trigger,"mouseenter")&&(v(e),g.addEventListener("mousemove",v))}),_;function C(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function N(){return"hold"===C()[0]}function k(){return u||l}function A(e){return _.state.isMounted&&!_.state.isVisible||De.isTouch||o&&"focus"===o.type?0:ee(_.props.delay,e?0:1,Te.delay)}function M(t,n,e){void 0===e&&(e=!0),S.forEach(function(e){Q(e,t)&&e[t].apply(e,n)}),e&&(e=_.props)[t].apply(e,n)}function D(){var n,r,e=_.props.aria;e&&(n="aria-"+e,r=T.id,he(_.props.triggerTarget||l).forEach(function(e){var t=e.getAttribute(n);_.state.isVisible?e.setAttribute(n,t?t+" "+r:r):(t=t&&t.replace(r,"").trim())?e.setAttribute(n,t):e.removeAttribute(n)}))}function L(){O||he(_.props.triggerTarget||l).forEach(function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")})}function I(){g.body.removeEventListener("mouseleave",X),g.removeEventListener("mousemove",v),Ke=Ke.filter(function(e){return e!==v})}function F(e){if(!_.props.interactive||!y.contains(e.target)){if(k().contains(e.target)){if(De.isTouch)return;if(_.state.isVisible&&fe(_.props.trigger,"click"))return}!0===_.props.hideOnClick&&(f=!1,_.clearDelayTimeouts(),_.hide(),p=!0,setTimeout(function(){p=!1}),_.state.isMounted||R())}}function P(){g.addEventListener("mousedown",F,!0)}function R(){g.removeEventListener("mousedown",F,!0)}function j(e,t){function n(e){e.target===T&&(Ve(T,"remove",n),t())}if(0===e)return t();Ve(T,"remove",s),Ve(T,"add",n),s=n}function B(t,n,r){void 0===r&&(r=!1),he(_.props.triggerTarget||l).forEach(function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})})}function z(){N()&&(B("touchstart",V,Ce),B("touchend",Y,Ce)),pe(_.props.trigger).forEach(function(e){if("manual"!==e)switch(B(e,V),e){case"mouseenter":B("mouseleave",Y);break;case"focus":B(Le?"focusout":"blur",K);break;case"focusin":B("focusout",K)}})}function U(){h.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,e=e.options;t.removeEventListener(n,r,e)}),h=[]}function V(t){var e,n,r=!1;!_.state.isEnabled||G(t)||p||(u=(o=t).currentTarget,L(),!_.state.isVisible&&ne(t)&&Ke.forEach(function(e){return e(t)}),"click"!==t.type||fe(_.props.trigger,"mouseenter")&&!f||!1===_.props.hideOnClick||!_.state.isVisible?(e=(n=C())[0],n=n[1],De.isTouch&&"hold"===e&&n?i=setTimeout(function(){$(t)},n):$(t)):r=!0,"click"===t.type&&(f=!r),r&&X(t))}function H(e){var a,s,t=de(e.target,function(e){return e===l||e===y});"mousemove"===e.type&&t||(t=ce(y.querySelectorAll(Me)).concat(y).map(function(e){var t=e._tippy,n=t.popperChildren.tooltip,t=t.props.interactiveBorder;return{popperRect:e.getBoundingClientRect(),tooltipRect:n.getBoundingClientRect(),interactiveBorder:t}}),a=e.clientX,s=e.clientY,t.every(function(e){var t=e.popperRect,n=e.tooltipRect,r=e.interactiveBorder,i=Math.min(t.top,n.top),o=Math.max(t.right,n.right),e=Math.max(t.bottom,n.bottom),n=Math.min(t.left,n.left);return r element.cloneNode(true)"].join(" ")));t=t.reduce(function(e,t){t=t&&_(t,a);return t&&e.push(t),e},[]);return l(e)?t[0]:t}S.version="5.2.1",S.defaultProps=Te,S.setDefaultProps=o,S.currentInput=De,C.BACKDROP_CLASS="tippy-backdrop",C.ROUND_ARROW='',C._extends=Z,C.arrayFrom=ce,C.closestCallback=de,C.createTippyWithPlugins=function(r){"production"!==We.env.NODE_ENV&&Ee(!0,["createTippyWithPlugins([...]) has been deprecated.","\n\n","Use tippy.setDefaultProps({plugins: [...]}) instead."].join(" "));function e(e,t,n){return void 0===n&&(n=[]),n=(t=void 0===t?{}:t).plugins||n,S(e,Z({},t,{plugins:[].concat(r,n)}))}return e.version="5.2.1",e.defaultProps=Te,e.setDefaultProps=o,e.currentInput=De,e},C.currentInput=De,C.defaultProps=Te,C.div=oe,C.errorWhen=u,C.getBasePlacement=Fe,C.getOwnerDocument=ve,C.hideAll=function(e){var e=void 0===e?{}:e,n=e.exclude,r=e.duration;Ge.forEach(function(e){var t=!1;(t=n?i(n)?e.reference===n:e.popper===n.popper:t)||e.hide(r)})},C.includes=fe,C.isBrowser=e,C.isMouseEvent=ne,C.normalizeToArray=he,C.removeProperties=a,C.setVisibilityState=se,C.tippy=S,C.useIfDefined=me,C.warnWhen=Ee}.call(this)}.call(this,O("_process"))},{_process:4,"popper.js":3}],7:[function(i,e,o){!function(f){!function(){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var y=i("./tippy.chunk.cjs.js");i("popper.js");var d={mouseover:"mouseenter",focusin:"focus",click:"click"},e={name:"animateFill",defaultValue:!1,fn:function(e){var t=e.popperChildren,n=t.tooltip,r=t.content,i=e.props.animateFill?((t=y.div()).className=y.BACKDROP_CLASS,y.setVisibilityState([t],"hidden"),t):null;function o(){e.popperChildren.backdrop=i}return{onCreate:function(){i&&(o(),n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",e.setProps({animation:"shift-away",arrow:!1}))},onMount:function(){var e,t;i&&(e=n.style.transitionDuration,t=Number(e.replace("ms","")),r.style.transitionDelay=Math.round(t/10)+"ms",i.style.transitionDuration=e,y.setVisibilityState([i],"visible"),"production"!==f.env.NODE_ENV&&(y.warnWhen("absolute"!==getComputedStyle(i).position,"The `tippy.js/dist/backdrop.css` stylesheet has not been\n imported!\n \n The `animateFill` plugin requires this stylesheet to work."),y.warnWhen("none"===getComputedStyle(n).transform,"The `tippy.js/animations/shift-away.css` stylesheet has not\n been imported!\n \n The `animateFill` plugin requires this stylesheet to work.")))},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&y.setVisibilityState([i],"hidden")},onAfterUpdate:function(){o()}}}},t={name:"followCursor",defaultValue:!1,fn:function(c){var d,f=c.reference,p=c.popper,m=null,e=y.getOwnerDocument(c.props.triggerTarget||f),n=null,r=!1,i=c.props;function t(){return"manual"===c.props.trigger.trim()}function o(){var e=!!t()||null!==n&&!(0===n.clientX&&0===n.clientY);return c.props.followCursor&&e}function h(){return y.currentInput.isTouch||"initial"===c.props.followCursor&&c.state.isVisible}function a(){c.popperInstance&&m&&(c.popperInstance.reference=m)}function s(){var e,t;!o()&&c.props.placement===i.placement||(t=(e=i.placement).split("-")[1],r=!0,c.setProps({placement:o()&&t?e.replace(t,"start"===t?"end":"start"):e}),r=!1)}function l(){c.popperInstance&&o()&&h()&&c.popperInstance.disableEventListeners()}function u(){o()?e.addEventListener("mousemove",b):a()}function v(){o()&&b(d)}function g(){e.removeEventListener("mousemove",b)}function b(e){var t,n,r,i,o,a,s=d=e,l=s.clientX,u=s.clientY;c.popperInstance&&c.state.currentPlacement&&(s=y.closestCallback(e.target,function(e){return e===f}),e=c.props.followCursor,t="horizontal"===e,n="vertical"===e,r=y.includes(["top","bottom"],y.getBasePlacement(c.state.currentPlacement)),e={size:e=r?p.offsetWidth:p.offsetHeight,x:r?e:0,y:r?0:e},i=e.size,o=e.x,a=e.y,!s&&c.props.interactive||(null===m&&(m=c.popperInstance.reference),c.popperInstance.reference={referenceNode:f,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){var e=f.getBoundingClientRect();return{width:r?i:0,height:r?0:i,top:(t?e.top:u)-a,bottom:(t?e.bottom:u)+a,left:(n?e.left:l)-o,right:(n?e.right:l)+o}}},c.popperInstance.update()),h()&&g())}return{onAfterUpdate:function(e,t){var n;r||(n=t,Object.keys(n).forEach(function(e){i[e]=y.useIfDefined(n[e],i[e])}),t.placement&&s()),t.placement&&l(),requestAnimationFrame(v)},onMount:function(){v(),l()},onShow:function(){t()&&(d=n={clientX:0,clientY:0},s(),u())},onTrigger:function(e,t){n||(y.isMouseEvent(t)&&(n={clientX:t.clientX,clientY:t.clientY},d=t),s(),u())},onUntrigger:function(){c.state.isVisible||(g(),n=null)},onHidden:function(){g(),a(),n=null}}}},n={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t=e.reference;function n(){return e.props.inlinePositioning}return{onHidden:function(){n()&&(e.popperInstance.reference=t)},onShow:function(){n()&&(e.popperInstance.reference={referenceNode:t,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return function(t,e,n){if(n.length<2||null===t)return e;switch(t){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===t,a=r.top,s=i.bottom,l=(o?r:i).left,i=(o?r:i).right;return{top:a,bottom:s,left:l,right:i,width:i-l,height:s-a};case"left":case"right":var u=Math.min.apply(Math,n.map(function(e){return e.left})),c=Math.max.apply(Math,n.map(function(e){return e.right})),s=n.filter(function(e){return"left"===t?e.left===u:e.right===c}),a=s[0].top,s=s[s.length-1].bottom;return{top:a,bottom:s,left:u,right:c,width:c-u,height:s-a};default:return e}}(e.state.currentPlacement&&y.getBasePlacement(e.state.currentPlacement),t.getBoundingClientRect(),y.arrayFrom(t.getClientRects()))}})}}}},r={name:"sticky",defaultValue:!1,fn:function(n){var r=n.reference,i=n.popper;function o(e){return!0===n.props.sticky||n.props.sticky===e}var a=null,s=null;function l(){var e=o("reference")?(n.popperInstance?n.popperInstance.reference:r).getBoundingClientRect():null,t=o("popper")?i.getBoundingClientRect():null;(e&&u(a,e)||t&&u(s,t))&&n.popperInstance.update(),a=e,s=t,n.state.isMounted&&requestAnimationFrame(l)}return{onMount:function(){n.props.sticky&&l()}}}};function u(e,t){return!e||!t||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}o.createTippyWithPlugins=y.createTippyWithPlugins,o.default=y.tippy,o.hideAll=y.hideAll,o.roundArrow=y.ROUND_ARROW,o.animateFill=e,o.createSingleton=function(o,e,t){void 0===e&&(e={}),void 0===t&&(t=[]),"production"!==f.env.NODE_ENV&&y.errorWhen(!Array.isArray(o),["The first argument passed to createSingleton() must be an array of tippy","instances. The passed value was",String(o)].join(" ")),t=e.plugins||t,o.forEach(function(e){e.disable()});var a,s,l=y._extends({},y.defaultProps,{},e).aria,n=!1,u=o.map(function(e){return e.reference}),r={fn:function(r){function i(e){var t;a&&(t="aria-"+a,e&&!r.props.interactive?s.setAttribute(t,r.popperChildren.tooltip.id):s.removeAttribute(t))}return{onAfterUpdate:function(e,t){t=t.aria;void 0!==t&&t!==l&&(n?(n=!0,r.setProps({aria:null}),n=!1):l=t)},onDestroy:function(){o.forEach(function(e){e.enable()})},onMount:function(){i(!0)},onUntrigger:function(){i(!1)},onTrigger:function(e,t){var n=t.currentTarget,t=u.indexOf(n);n!==s&&(s=n,a=l,r.state.isVisible&&i(!0),r.popperInstance.reference=n,r.setContent(o[t].props.content))}}}};return y.tippy(y.div(),y._extends({},e,{plugins:[r].concat(t),aria:null,triggerTarget:u}))},o.delegate=function(e,r,t){void 0===t&&(t=[]),"production"!==f.env.NODE_ENV&&y.errorWhen(!(r&&r.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" ")),t=r.plugins||t;var i=[],o=[],a=r.target,n=y.removeProperties(r,["target"]),s=y._extends({},n,{plugins:t,trigger:"manual"}),l=y._extends({},n,{plugins:t,showOnCreate:!0}),s=y.tippy(e,s);function u(e){var t,n;!e.target||(n=e.target.closest(a))&&(t=n.getAttribute("data-tippy-trigger")||r.trigger||y.defaultProps.trigger,!y.includes(t,d[e.type])||(n=y.tippy(n,l))&&(o=o.concat(n)))}function c(e,t,n,r){e.addEventListener(t,n,r=void 0===r?!1:r),i.push({node:e,eventType:t,handler:n,options:r})}return y.normalizeToArray(s).forEach(function(e){var t=e.destroy;e.destroy=function(e){(e=void 0===e?!0:e)&&o.forEach(function(e){e.destroy()}),o=[],i.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,e=e.options;t.removeEventListener(n,r,e)}),i=[],t()},c(e=e.reference,"mouseover",u),c(e,"focusin",u),c(e,"click",u)}),s},o.followCursor=t,o.inlinePositioning=n,o.sticky=r}.call(this)}.call(this,i("_process"))},{"./tippy.chunk.cjs.js":6,_process:4,"popper.js":3}],8:[function(e,t,n){"use strict";var r=a(e("mithril")),i=a(e("./view")),o=a(e("./texte/de"));function a(e){return e&&e.__esModule?e:{default:e}}document,window,domIsReady(function(){window.texte=o.default,r.default.mount(window.document.getElementById("gradido-mithril-user-search"),i.default)})},{"./texte/de":13,"./view":14,mithril:1}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e("mithril")),i=o(e("numeral"));function o(e){return e&&e.__esModule?e:{default:e}}var a=!1;n.default={view:function(e){return(0,r.default)("span",(e=e.attrs.centAmount/1e4,i.default.locale("de"),(0,i.default)(e).format("0,0.00")+" GDD"))},oninit:function(e){a||(i.default.register("locale","de",{delimiters:{thousands:".",decimal:","},currency:{symbol:"€"}}),i.default.locale("de"),a=!0)}}},{mithril:1,numeral:2}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return{oncreate:function(e){(0,r.default)(e.dom,{content:e.attrs.accountState.getTooltipText(),placement:"right-start",theme:"rippleUI-theme",arrow:!1})},onremove:function(){},view:function(){return e}}},i(e("mithril"));var r=i(e("tippy.js"));function i(e){return e&&e.__esModule?e:{default:e}}},{mithril:1,"tippy.js":7}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(e=e("mithril"))&&e.__esModule?e:{default:e};n.default={view:function(e){return(0,r.default)("div.modal.visible-modal",{tabindex:"-1",role:"dialog"},(0,r.default)("div.modal-dialog",{role:"document"},(0,r.default)("div.modal-content",[(0,r.default)("p.grid-header",e.attrs.title),(0,r.default)("div.modal-body",e.attrs.body),(0,r.default)("div.modal-footer",[(0,r.default)("button.btn.btn-primary",{type:"button",disabled:e.attrs.btnDisabled,"data-dismiss":"modal",onclick:e.attrs.dismiss},"Ok")])])))},oninit:function(e){}}},{mithril:1}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(e=e("mithril"))&&e.__esModule?e:{default:e};function i(e,t){for(var n=0;n';if(t+='
'+e.description.title+"
",null!=e.description.lines){for(var n in t+="
    ",e.description.lines){var r=e.description.lines[n],i=window.texte.ACCOUNT_STATES.LINES[n],n="mdi ";if("+"===r)n+=" mdi-check color-primary";else if("-"===r)n+=" mdi-close color-danger";else{if("/"!==r)continue;n+=" mdi-alert-circle-outline color-warning"}t+="
  • ",t+='',t+=" ",t+=""+i.title+": "+i[r]+"",t+="
  • "}t+="
"}return t+"
"}}]),e=o;function o(e){!function(e){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this),this.stateName=e,this.texte=window.texte.ACCOUNT_STATES[e]}n.default=e},{mithril:1}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={ACCOUNT_STATES:{LINES:[{title:"Login-Server","+":"Das Benutzer-Konto liegt auf dem Login-Server!","-":"Das Benutzer-Konto existiert nicht auf dem Login-Server!"},{title:"Konto Aktivierung","+":"Der Benutzer hat sein Konto aktiviert!","-":"Der Benutzer hat noch nicht auf den Link in seiner E-Mail geklickt!"},{title:"Schlüsselpaar","+":"Es wurde bereits ein Schlüsselpaar für den Benutzer erzeugt und ihm eine Passphrase gezeigt!","-":"Es wurden noch keine Schlüssel und Passphrase für den Benutzer erzeugt!"},{title:"Gemeinschafts-Server","+":"Das Benutzer-Konto wurde auf auf den Gemeinschafts-Server kopiert!","-":"Das Benutzer-Konto wurde noch nicht auf den Gemeinschafts-Server kopiert!"},{title:"Gradidos","+":"Es können Gradidos an den Benutzer geschickt werden!","-":"Es können noch keine Gradidos an den Benutzer geschickt werden!","/":"Es können theoretisch Gradidos an den Benutzer geschickt werden, aber es ist nicht sicher ob er sie verwenden kann!"}],"account created":{title:"Konto angelegt",color:"secondary",description:{title:"Das Konto wurde auf dem Login-Server angelegt, vermutlich durch eine elopage-Anmeldung.",lines:["+","-","-","-","-"]},todo:{title:"Als nächstes müsste der Benutzer den Link in seiner E-Mail anklicken und den Anweisungen folgen. ",lines:["Stimmt die E-Mail Adresse? Hat der Benutzer in seinem Spam-Verzeichnis nachgesehen?","{{verification-resend}}","{{mailto-verification-resend}}"]}},"account not on login-server":{title:"Konto nicht auf Login-Server",color:"danger",description:{title:"Das Konto existiert nicht (mehr) auf dem Login-Server: ein Fehler oder es wurde nur teilweise gelöscht.",lines:["-","+","+","+","/"]},todo:{title:"Wenn der Benutzer seine Passphrase hat, kann er sein Konto auf dem Login-Server wiederherstellen, ansonsten bleibt eigentlich nur das Konto auf dem Gemeinschafts-Server zu löschen",lines:["Nachdem das Konto auf dem Login-Server kopiert wurde, bekommt der Benutzer automatisch eine E-Mail mit einem Link zur Kontoaktivierung zugeschickt.","{{copy-from-community-to-login-server}}","
","Es wird nur der Benutzer gelöscht, nicht seine Transaktionen. Zu diesen hat er wieder Zugriff wenn er sein Konto mit Hilfe seiner Passphrase wiederhergestellt hat.","{{user-transactions-overview}}","{{delete-from-community-server}}"]}},"email activated":{title:"Konto aktiviert",color:"primary",description:{title:"Das Konto wurde vom Benutzer aktiviert und Schlüssel erzeugt, aber noch nicht auf diesen Gemeinschafts-Server kopiert.",lines:["+","+","+","-","-"]},todo:{title:"Das Benutzer Konto müsste vom Login-Server auf den Gemeinschafts-Server kopiert werden.",lines:["{{copy-from-login-to-community-server}}"]}},"account copied to community":{title:"Konto auf Gemeinschafts-Server",color:"success",description:{title:"Das Konto ist vollständig aktiviert und es können Gradidos überwiesen werden.",lines:["+","+","+","+","+"]}},"email not activated":{title:"Konto nicht aktiviert",color:"warning",description:{title:"Das Konto wurde auf dem Login-Server angelegt, vermutlich durch eine elopage-Anmeldung. Es wurde aber noch nicht aktiviert!",lines:["+","-","-","-","-"]},todo:{title:"Als nächstes müsste der Benutzer den Link in seiner E-Mail anklicken und den Anweisungen folgen. ",lines:["Stimmt die E-Mail Adresse? Hat der Benutzer in seinem Spam-Verzeichnis nachgesehen?","{{verification-resend}}","{{mailto-verification-resend}}"]}},"account multiple times on login-server":{title:"Konto mehrfach vorhanden",color:"danger",description:{title:"Das Konto ist auf dem Login-Server mehrfach vorhanden, das sollte nicht sein, auf dem Login-Server muss ein Fehler passiert sein!!"},todo:{title:"Du solltest mit dem Entwickler in Kontakt treten.",lines:["{{mailto-developer}}"]}},"account not on community server":{title:"Konto nicht auf Gemeinschafts-Server",color:"secondary",description:{title:"Das Konto wurde auf dem Login-Server angelegt, aber existiert noch nicht auf dem Gemeinschafts-Server!",lines:["+",null,"-","-","-"]},todo:{title:"Das sollte eigentlich nicht passieren, du solltest mit dem Entwickler sprechen.",lines:["{{mailto-developer}}"]}},"no keys":{title:"Keine Schlüssel generiert",color:"warning",description:{title:"Das Konto wurde auf dem Login-Server angelegt, aber es wurden noch keine Schlüssel generiert!",lines:["+","+","-","-","-"]},todo:{title:"Der Benutzer muss sich mit seinen Daten einloggen, dann müsste er automatisch durch die Schlüsselgenerierung/Konto-Wiederherstellung geführt werden",lines:["{{mailto-user-login}}","Wenn der Benutzer sein Passwort vergessen hat, kann er sich auch eine Passwort Reset E-Mail zuschicken lassen.","{{reset-password}}","{{mailto-reset-password}}"]}}},NO_USER_FOUND:"Keine Benutzer gefunden",USER_FOUND:"Benutzer gefunden",NAME:"Name",EMAIL:"E-Mail",BALANCE:"Kontostand",PUBLIC_KEY:"Öffentlicher
Schlüssel",CREATED:"Erstellt",COPY_FROM_LOGIN_TO_COMMUNITY:"Vom Login-Server zum Gemeinschafts-Server kopieren",COPY_FROM_LOGIN_TO_COMMUNITY_SUCCESS:"Kontodaten wurden erfolgreich vom Login-Server zu diesem Gemeinschafts-Server kopiert!",COPY_FROM_COMMUNITY_TO_LOGIN:"Vom Gemeinschafts-Server zum Login-Server kopieren",COPY_FROM_COMMUNITY_TO_LOGIN_SUCCESS:"Kontodaten wurden erfolgreich vom Gemeinschafts-Server zum Login-Server kopiert!",DELETE_FROM_COMMUNITY:"Benutzer Konto vom Gemeinschafts-Server löschen",DELETE_FROM_COMMUNITY_SUCCESS:"Benutzer Konto vom Gemeinschafts-Server erfolgreich gelöscht",VERIFICATION_EMAIL_RESEND:"Verification Email erneut zusenden",VERIFICATION_EMAIL_RESEND_SUCCESS:"Verification Email wird erneut zugestellt",COPY_FAILED:"Fehler beim Kopieren",DELETE_FAILED:"Fehler beim löschen",RESEND_FAILED:"Senden fehlgeschlagen",AJAX_CRITICAL:"Kritischer Fehler beim Ajax-Request",COPY_IN_PROGRESS:"Wird kopiert",DELETE_IN_PROGRESS:"Wird gelöscht",RESEND_IN_PROGRESS:"Wird gesendet",RECEIVE_TRANSACTIONS_COUNT:"Erhaltene Transaktionen: ",SENDED_TRANSACTIONS_COUNT:"gesendete Transaktionen: ",CREATION_TRANSACTIONS_COUNT:"erhaltende Schöpfungs-Transaktionen: "}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(e("mithril")),i=a(e("./userTable")),o=a(e("../model/AccountState"));function a(e){return e&&e.__esModule?e:{default:e}}n.default={view:function(e){return void 0===g_users?(0,r.default)(""):0"===e)return i.default.trust("
    ");if(t){var n=function(){switch(t[1]){case"copy-from-login-to-community-server":return o.default;case"user-transactions-overview":return a.default;case"copy-from-community-to-login-server":return s.default;case"verification-resend":return l.default}return null}();return n?(0,i.default)("li",(0,i.default)(n,{user:r.attrs.user,updateState:r.attrs.updateState,deleteUser:r.attrs.deleteUser})):(0,i.default)("li",e)}return(0,i.default)("li",e)})]):null]))},oninit:function(e){e.state.accountStateTexte=window.texte.ACCOUNT_STATES[e.attrs.user.indicator.name]}}},{"./actions/copyCommunityLogin":16,"./actions/copyLoginCommunity":17,"./actions/deleteCommunityServer":18,"./actions/userTransactionsOverview":19,"./actions/verificationResend":20,mithril:1}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=r(e("mithril")),c=r(e("../../model/AccountState")),d=r(e("../../lib/Gradido")),f=r(e("../../lib/Tooltip"));function r(e){return e&&e.__esModule?e:{default:e}}n.default={view:function(e){var t=new c.default(e.attrs.user.indicator.name),n=e.attrs.user,r=t.getColor(),i=t.getTitle(),o=n.pubkeyhex;""!==o&&(o=n.pubkeyhex.substring(0,10)+"...");var a=n.created;a&&(a=(l=new Date(a)).toLocaleDateString()+"
    "+l.toLocaleTimeString());var s=!1;t.hasActions()&&(s=t.getRawColor(),s="primary");var l="down";return e.attrs.open&&(l="up"),(0,u.default)("tr",[(0,u.default)("td",!1!==s?(0,u.default)("i.mdi.mdi-menu-"+l+".btn.btn-xs.btn-"+s,{onclick:e.attrs.btnClick}):null),(0,u.default)("td.pr-0",[(0,u.default)("span.text-black.font-weight-medium.d-block",n.name),(0,u.default)((0,f.default)((0,u.default)("span",[(0,u.default)("span.status-indicator.rounded-indicator.small."+r),(0,u.default)("small",i)])),{accountState:t})]),(0,u.default)("td",n.email),(0,u.default)("td",(0,u.default)(d.default,{centAmount:n.balance})),(0,u.default)("td",{title:n.pubkeyhex},o),(0,u.default)("td",u.default.trust(a))])},oninit:function(e){}}},{"../../lib/Gradido":9,"../../lib/Tooltip":10,"../../model/AccountState":12,mithril:1}]},{},[8])}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);