Skip to content

Instantly share code, notes, and snippets.

@cogniflow-admin
Last active November 27, 2023 19:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cogniflow-admin/36ea5792b3d0d5ae81d41b270cc8c3d3 to your computer and use it in GitHub Desktop.
Save cogniflow-admin/36ea5792b3d0d5ae81d41b270cc8c3d3 to your computer and use it in GitHub Desktop.
name: Cogniflow-Excel-AddIn-v2
description: ''
host: EXCEL
api_set: {}
script:
content: "var wt = Object.defineProperty; var It = (e, t, n) => t in e ? wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var pe = (e, t, n) => (It(e, typeof t != \"symbol\" ? t + \"\" : t, n), n); (function () { const t = document.createElement(\"link\").relList; if (t && t.supports && t.supports(\"modulepreload\")) return; for (const i of document.querySelectorAll('link[rel=\"modulepreload\"]')) o(i); new MutationObserver(i => { for (const r of i) if (r.type === \"childList\") for (const l of r.addedNodes) l.tagName === \"LINK\" && l.rel === \"modulepreload\" && o(l) }).observe(document, { childList: !0, subtree: !0 }); function n(i) { const r = {}; return i.integrity && (r.integrity = i.integrity), i.referrerPolicy && (r.referrerPolicy = i.referrerPolicy), i.crossOrigin === \"use-credentials\" ? r.credentials = \"include\" : i.crossOrigin === \"anonymous\" ? r.credentials = \"omit\" : r.credentials = \"same-origin\", r } function o(i) { if (i.ep) return; i.ep = !0; const r = n(i); fetch(i.href, r) } })(); var Q, p, Ye, U, Se, et, ye, tt, V = {}, nt = [], kt = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ue = Array.isArray; function D(e, t) { for (var n in t) e[n] = t[n]; return e } function ot(e) { var t = e.parentNode; t && t.removeChild(e) } function ie(e, t, n) { var o, i, r, l = {}; for (r in t) r == \"key\" ? o = t[r] : r == \"ref\" ? i = t[r] : l[r] = t[r]; if (arguments.length > 2 && (l.children = arguments.length > 3 ? Q.call(arguments, 2) : n), typeof e == \"function\" && e.defaultProps != null) for (r in e.defaultProps) l[r] === void 0 && (l[r] = e.defaultProps[r]); return Z(e, l, o, i, null) } function Z(e, t, n, o, i) { var r = { type: e, props: t, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: i ?? ++Ye}; return i == null && p.vnode != null && p.vnode(r), r } function q(e) { return e.children } function L(e, t) { this.props = e, this.context = t } function J(e, t) { if (t == null) return e.__ ? J(e.__, e.__.__k.indexOf(e) + 1) : null; for (var n; t < e.__k.length; t++)if ((n = e.__k[t]) != null && n.__e != null) return n.__e; return typeof e.type == \"function\" ? J(e) : null } function rt(e) { var t, n; if ((e = e.__) != null && e.__c != null) { for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)if ((n = e.__k[t]) != null && n.__e != null) { e.__e = e.__c.base = n.__e; break } return rt(e) } } function Te(e) { (!e.__d && (e.__d = !0) && U.push(e) && !se.__r++ || Se !== p.debounceRendering) && ((Se = p.debounceRendering) || et)(se) } function se() { var e, t, n, o, i, r, l, a, _; for (U.sort(ye); e = U.shift();)e.__d && (t = U.length, o = void 0, i = void 0, r = void 0, a = (l = (n = e).__v).__e, (_ = n.__P) && (o = [], i = [], (r = D({}, l)).__v = l.__v + 1, Ee(_, l, r, n.__n, _.ownerSVGElement !== void 0, l.__h != null ? [a] : null, o, a ?? J(l), l.__h, i), at(o, l, i), l.__e != a && rt(l)), U.length > t && U.sort(ye)); se.__r = 0 } function it(e, t, n, o, i, r, l, a, _, h, d) { var s, g, f, u, m, E, y, T, I, w = 0, C = o && o.__k || nt, b = C.length, k = b, $ = t.length; for (n.__k = [], s = 0; s < $; s++)(u = n.__k[s] = (u = t[s]) == null || typeof u == \"boolean\" || typeof u == \"function\" ? null : typeof u == \"string\" || typeof u == \"number\" || typeof u == \"bigint\" ? Z(null, u, null, null, u) : ue(u) ? Z(q, { children: u }, null, null, null) : u.__b > 0 ? Z(u.type, u.props, u.key, u.ref ? u.ref : null, u.__v) : u) != null ? (u.__ = n, u.__b = n.__b + 1, (T = St(u, C, y = s + w, k)) === -1 ? f = V : (f = C[T] || V, C[T] = void 0, k--), Ee(e, u, f, i, r, l, a, _, h, d), m = u.__e, (g = u.ref) && f.ref != g && (f.ref && we(f.ref, null, u), d.push(g, u.__c || m, u)), m != null && (E == null && (E = m), (I = f === V || f.__v === null) ? T == -1 && w-- : T !== y && (T === y + 1 ? w++ : T > y ? k > $ - y ? w += T - y : w-- : w = T < y && T == y - 1 ? T - y : 0), y = s + w, typeof u.type != \"function\" || T === y && f.__k !== u.__k ? typeof u.type == \"function\" || T === y && !I ? u.__d !== void 0 ? (_ = u.__d, u.__d = void 0) : _ = m.nextSibling : _ = lt(e, m, _) : _ = st(u, _, e), typeof n.type == \"function\" && (n.__d = _))) : (f = C[s]) && f.key == null && f.__e && (f.__e == _ && (_ = J(f)), Ae(f, f, !1)); for (n.__e = E, s = b; s--;)C[s] != null && (typeof n.type == \"function\" && C[s].__e != null && C[s].__e == n.__d && (n.__d = C[s].__e.nextSibling), Ae(C[s], C[s])) } function st(e, t, n) { for (var o, i = e.__k, r = 0; i && r < i.length; r++)(o = i[r]) && (o.__ = e, t = typeof o.type == \"function\" ? st(o, t, n) : lt(n, o.__e, t)); return t } function j(e, t) { return t = t || [], e == null || typeof e == \"boolean\" || (ue(e) ? e.some(function (n) { j(n, t) }) : t.push(e)), t } function lt(e, t, n) { return n == null || n.parentNode !== e ? e.insertBefore(t, null) : t == n && t.parentNode != null || e.insertBefore(t, n), t.nextSibling } function St(e, t, n, o) { var i = e.key, r = e.type, l = n - 1, a = n + 1, _ = t[n]; if (_ === null || _ && i == _.key && r === _.type) return n; if (o > (_ != null ? 1 : 0)) for (; l >= 0 || a < t.length;) { if (l >= 0) { if ((_ = t[l]) && i == _.key && r === _.type) return l; l-- } if (a < t.length) { if ((_ = t[a]) && i == _.key && r === _.type) return a; a++ } } return -1 } function Nt(e, t, n, o, i) { var r; for (r in n) r === \"children\" || r === \"key\" || r in t || le(e, r, null, n[r], o); for (r in t) i && typeof t[r] != \"function\" || r === \"children\" || r === \"key\" || r === \"value\" || r === \"checked\" || n[r] === t[r] || le(e, r, t[r], n[r], o) } function Ne(e, t, n) { t[0] === \"-\" ? e.setProperty(t, n ?? \"\") : e[t] = n == null ? \"\" : typeof n != \"number\" || kt.test(t) ? n : n + \"px\" } function le(e, t, n, o, i) { var r; e: if (t === \"style\") if (typeof n == \"string\") e.style.cssText = n; else { if (typeof o == \"string\" && (e.style.cssText = o = \"\"), o) for (t in o) n && t in n || Ne(e.style, t, \"\"); if (n) for (t in n) o && n[t] === o[t] || Ne(e.style, t, n[t]) } else if (t[0] === \"o\" && t[1] === \"n\") r = t !== (t = t.replace(/Capture$/, \"\")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + r] = n, n ? o || e.addEventListener(t, r ? Oe : Re, r) : e.removeEventListener(t, r ? Oe : Re, r); else if (t !== \"dangerouslySetInnerHTML\") { if (i) t = t.replace(/xlink(H|:h)/, \"h\").replace(/sName$/, \"s\"); else if (t !== \"width\" && t !== \"height\" && t !== \"href\" && t !== \"list\" && t !== \"form\" && t !== \"tabIndex\" && t !== \"download\" && t !== \"rowSpan\" && t !== \"colSpan\" && t in e) try { e[t] = n ?? \"\"; break e } catch{ } typeof n == \"function\" || (n == null || n === !1 && t[4] !== \"-\" ? e.removeAttribute(t) : e.setAttribute(t, n)) } } function Re(e) { return this.l[e.type + !1](p.event ? p.event(e) : e) } function Oe(e) { return this.l[e.type + !0](p.event ? p.event(e) : e) } function Ee(e, t, n, o, i, r, l, a, _, h) { var d, s, g, f, u, m, E, y, T, I, w, C, b, k, $, R = t.type; if (t.constructor !== void 0) return null; n.__h != null && (_ = n.__h, a = t.__e = n.__e, t.__h = null, r = [a]), (d = p.__b) && d(t); e: if (typeof R == \"function\") try { if (y = t.props, T = (d = R.contextType) && o[d.__c], I = d ? T ? T.props.value : d.__ : o, n.__c ? E = (s = t.__c = n.__c).__ = s.__E : (\"prototype\" in R && R.prototype.render ? t.__c = s = new R(y, I) : (t.__c = s = new L(y, I), s.constructor = R, s.render = Ot), T && T.sub(s), s.props = y, s.state || (s.state = {}), s.context = I, s.__n = o, g = s.__d = !0, s.__h = [], s._sb = []), s.__s == null && (s.__s = s.state), R.getDerivedStateFromProps != null && (s.__s == s.state && (s.__s = D({}, s.__s)), D(s.__s, R.getDerivedStateFromProps(y, s.__s))), f = s.props, u = s.state, s.__v = t, g) R.getDerivedStateFromProps == null && s.componentWillMount != null && s.componentWillMount(), s.componentDidMount != null && s.__h.push(s.componentDidMount); else { if (R.getDerivedStateFromProps == null && y !== f && s.componentWillReceiveProps != null && s.componentWillReceiveProps(y, I), !s.__e && (s.shouldComponentUpdate != null && s.shouldComponentUpdate(y, s.__s, I) === !1 || t.__v === n.__v)) { for (t.__v !== n.__v && (s.props = y, s.state = s.__s, s.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function (B) { B && (B.__ = t) }), w = 0; w < s._sb.length; w++)s.__h.push(s._sb[w]); s._sb = [], s.__h.length && l.push(s); break e } s.componentWillUpdate != null && s.componentWillUpdate(y, s.__s, I), s.componentDidUpdate != null && s.__h.push(function () { s.componentDidUpdate(f, u, m) }) } if (s.context = I, s.props = y, s.__P = e, s.__e = !1, C = p.__r, b = 0, \"prototype\" in R && R.prototype.render) { for (s.state = s.__s, s.__d = !1, C && C(t), d = s.render(s.props, s.state, s.context), k = 0; k < s._sb.length; k++)s.__h.push(s._sb[k]); s._sb = [] } else do s.__d = !1, C && C(t), d = s.render(s.props, s.state, s.context), s.state = s.__s; while (s.__d && ++b < 25); s.state = s.__s, s.getChildContext != null && (o = D(D({}, o), s.getChildContext())), g || s.getSnapshotBeforeUpdate == null || (m = s.getSnapshotBeforeUpdate(f, u)), it(e, ue($ = d != null && d.type === q && d.key == null ? d.props.children : d) ? $ : [$], t, n, o, i, r, l, a, _, h), s.base = t.__e, t.__h = null, s.__h.length && l.push(s), E && (s.__E = s.__ = null) } catch (B) { t.__v = null, (_ || r != null) && (t.__e = a, t.__h = !!_, r[r.indexOf(a)] = null), p.__e(B, t, n) } else r == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Rt(n.__e, t, n, o, i, r, l, _, h); (d = p.diffed) && d(t) } function at(e, t, n) { for (var o = 0; o < n.length; o++)we(n[o], n[++o], n[++o]); p.__c && p.__c(t, e), e.some(function (i) { try { e = i.__h, i.__h = [], e.some(function (r) { r.call(i) }) } catch (r) { p.__e(r, i.__v) } }) } function Rt(e, t, n, o, i, r, l, a, _) { var h, d, s, g = n.props, f = t.props, u = t.type, m = 0; if (u === \"svg\" && (i = !0), r != null) { for (; m < r.length; m++)if ((h = r[m]) && \"setAttribute\" in h == !!u && (u ? h.localName === u : h.nodeType === 3)) { e = h, r[m] = null; break } } if (e == null) { if (u === null) return document.createTextNode(f); e = i ? document.createElementNS(\"http://www.w3.org/2000/svg\", u) : document.createElement(u, f.is && f), r = null, a = !1 } if (u === null) g === f || a && e.data === f || (e.data = f); else { if (r = r && Q.call(e.childNodes), d = (g = n.props || V).dangerouslySetInnerHTML, s = f.dangerouslySetInnerHTML, !a) { if (r != null) for (g = {}, m = 0; m < e.attributes.length; m++)g[e.attributes[m].name] = e.attributes[m].value; (s || d) && (s && (d && s.__html == d.__html || s.__html === e.innerHTML) || (e.innerHTML = s && s.__html || \"\")) } if (Nt(e, f, g, i, a), s) t.__k = []; else if (it(e, ue(m = t.props.children) ? m : [m], t, n, o, i && u !== \"foreignObject\", r, l, r ? r[0] : n.__k && J(n, 0), a, _), r != null) for (m = r.length; m--;)r[m] != null && ot(r[m]); a || (\"value\" in f && (m = f.value) !== void 0 && (m !== e.value || u === \"progress\" && !m || u === \"option\" && m !== g.value) && le(e, \"value\", m, g.value, !1), \"checked\" in f && (m = f.checked) !== void 0 && m !== e.checked && le(e, \"checked\", m, g.checked, !1)) } return e } function we(e, t, n) { try { typeof e == \"function\" ? e(t) : e.current = t } catch (o) { p.__e(o, n) } } function Ae(e, t, n) { var o, i; if (p.unmount && p.unmount(e), (o = e.ref) && (o.current && o.current !== e.__e || we(o, null, t)), (o = e.__c) != null) { if (o.componentWillUnmount) try { o.componentWillUnmount() } catch (r) { p.__e(r, t) } o.base = o.__P = null, e.__c = void 0 } if (o = e.__k) for (i = 0; i < o.length; i++)o[i] && Ae(o[i], t, n || typeof e.type != \"function\"); n || e.__e == null || ot(e.__e), e.__ = e.__e = e.__d = void 0 } function Ot(e, t, n) { return this.constructor(e, n) } function xt(e, t, n) { var o, i, r, l; p.__ && p.__(e, t), i = (o = typeof n == \"function\") ? null : n && n.__k || t.__k, r = [], l = [], Ee(t, e = (!o && n || t).__k = ie(q, null, [e]), i || V, V, t.ownerSVGElement !== void 0, !o && n ? [n] : i ? null : t.firstChild ? Q.call(t.childNodes) : null, r, !o && n ? n : i ? i.__e : t.firstChild, o, l), at(r, e, l) } function $t(e, t, n) { var o, i, r, l, a = D({}, e.props); for (r in e.type && e.type.defaultProps && (l = e.type.defaultProps), t) r == \"key\" ? o = t[r] : r == \"ref\" ? i = t[r] : a[r] = t[r] === void 0 && l !== void 0 ? l[r] : t[r]; return arguments.length > 2 && (a.children = arguments.length > 3 ? Q.call(arguments, 2) : n), Z(e.type, a, o || e.key, i || e.ref, null) } function ct(e, t) { var n = { __c: t = \"__cC\" + tt++, __: e, Consumer: function (o, i) { return o.children(i) }, Provider: function (o) { var i, r; return this.getChildContext || (i = [], (r = {})[t] = this, this.getChildContext = function () { return r }, this.shouldComponentUpdate = function (l) { this.props.value !== l.value && i.some(function (a) { a.__e = !0, Te(a) }) }, this.sub = function (l) { i.push(l); var a = l.componentWillUnmount; l.componentWillUnmount = function () { i.splice(i.indexOf(l), 1), a && a.call(l) } }), o.children } }; return n.Provider.__ = n.Consumer.contextType = n } Q = nt.slice, p = { __e: function (e, t, n, o) { for (var i, r, l; t = t.__;)if ((i = t.__c) && !i.__) try { if ((r = i.constructor) && r.getDerivedStateFromError != null && (i.setState(r.getDerivedStateFromError(e)), l = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, o || {}), l = i.__d), l) return i.__E = i } catch (a) { e = a } throw e } }, Ye = 0, L.prototype.setState = function (e, t) { var n; n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = D({}, this.state), typeof e == \"function\" && (e = e(D({}, n), this.props)), e && D(n, e), e != null && this.__v && (t && this._sb.push(t), Te(this)) }, L.prototype.forceUpdate = function (e) { this.__v && (this.__e = !0, e && this.__h.push(e), Te(this)) }, L.prototype.render = q, U = [], et = typeof Promise == \"function\" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ye = function (e, t) { return e.__v.__b - t.__v.__b }, se.__r = 0, tt = 0; var z, A, he, xe, ae = 0, _t = [], ne = [], $e = p.__b, Me = p.__r, Pe = p.diffed, Le = p.__c, De = p.unmount; function de(e, t) { p.__h && p.__h(A, e, ae || t), ae = 0; var n = A.__H || (A.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({ __V: ne }), n.__[e] } function N(e) { return ae = 1, Mt(dt, e) } function Mt(e, t, n) { var o = de(z++, 2); if (o.t = e, !o.__c && (o.__ = [n ? n(t) : dt(void 0, t), function (a) { var _ = o.__N ? o.__N[0] : o.__[0], h = o.t(_, a); _ !== h && (o.__N = [h, o.__[1]], o.__c.setState({})) }], o.__c = A, !A.u)) { var i = function (a, _, h) { if (!o.__c.__H) return !0; var d = o.__c.__H.__.filter(function (g) { return g.__c }); if (d.every(function (g) { return !g.__N })) return !r || r.call(this, a, _, h); var s = !1; return d.forEach(function (g) { if (g.__N) { var f = g.__[0]; g.__ = g.__N, g.__N = void 0, f !== g.__[0] && (s = !0) } }), !(!s && o.__c.props === a) && (!r || r.call(this, a, _, h)) }; A.u = !0; var r = A.shouldComponentUpdate, l = A.componentWillUpdate; A.componentWillUpdate = function (a, _, h) { if (this.__e) { var d = r; r = void 0, i(a, _, h), r = d } l && l.call(this, a, _, h) }, A.shouldComponentUpdate = i } return o.__N || o.__ } function K(e, t) { var n = de(z++, 3); !p.__s && ut(n.__H, t) && (n.__ = e, n.i = t, A.__H.__h.push(n)) } function Pt(e) { return ae = 5, Lt(function () { return { current: e } }, []) } function Lt(e, t) { var n = de(z++, 7); return ut(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__ } function Dt(e) { var t = A.context[e.__c], n = de(z++, 9); return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(A)), t.props.value) : e.__ } function Ht() { for (var e; e = _t.shift();)if (e.__P && e.__H) try { e.__H.__h.forEach(oe), e.__H.__h.forEach(Ce), e.__H.__h = [] } catch (t) { e.__H.__h = [], p.__e(t, e.__v) } } p.__b = function (e) { A = null, $e && $e(e) }, p.__r = function (e) { Me && Me(e), z = 0; var t = (A = e.__c).__H; t && (he === A ? (t.__h = [], A.__h = [], t.__.forEach(function (n) { n.__N && (n.__ = n.__N), n.__V = ne, n.__N = n.i = void 0 })) : (t.__h.forEach(oe), t.__h.forEach(Ce), t.__h = [], z = 0)), he = A }, p.diffed = function (e) { Pe && Pe(e); var t = e.__c; t && t.__H && (t.__H.__h.length && (_t.push(t) !== 1 && xe === p.requestAnimationFrame || ((xe = p.requestAnimationFrame) || Ut)(Ht)), t.__H.__.forEach(function (n) { n.i && (n.__H = n.i), n.__V !== ne && (n.__ = n.__V), n.i = void 0, n.__V = ne })), he = A = null }, p.__c = function (e, t) { t.some(function (n) { try { n.__h.forEach(oe), n.__h = n.__h.filter(function (o) { return !o.__ || Ce(o) }) } catch (o) { t.some(function (i) { i.__h && (i.__h = []) }), t = [], p.__e(o, n.__v) } }), Le && Le(e, t) }, p.unmount = function (e) { De && De(e); var t, n = e.__c; n && n.__H && (n.__H.__.forEach(function (o) { try { oe(o) } catch (i) { t = i } }), n.__H = void 0, t && p.__e(t, n.__v)) }; var He = typeof requestAnimationFrame == \"function\"; function Ut(e) { var t, n = function () { clearTimeout(o), He && cancelAnimationFrame(t), setTimeout(e) }, o = setTimeout(n, 100); He && (t = requestAnimationFrame(n)) } function oe(e) { var t = A, n = e.__c; typeof n == \"function\" && (e.__c = void 0, n()), A = t } function Ce(e) { var t = A; e.__c = e.__(), A = t } function ut(e, t) { return !e || e.length !== t.length || t.some(function (n, o) { return n !== e[o] }) } function dt(e, t) { return typeof t == \"function\" ? t(e) : t } var Ft = {}; function Y(e, t) { for (var n in t) e[n] = t[n]; return e } function Xt(e, t, n) { var o, i = /(?:\\?([^#]*))?(#.*)?$/, r = e.match(i), l = {}; if (r && r[1]) for (var a = r[1].split(\"&\"), _ = 0; _ < a.length; _++) { var h = a[_].split(\"=\"); l[decodeURIComponent(h[0])] = decodeURIComponent(h.slice(1).join(\"=\")) } e = be(e.replace(i, \"\")), t = be(t || \"\"); for (var d = Math.max(e.length, t.length), s = 0; s < d; s++)if (t[s] && t[s].charAt(0) === \":\") { var g = t[s].replace(/(^:|[+*?]+$)/g, \"\"), f = (t[s].match(/[+*?]+$/) || Ft)[0] || \"\", u = ~f.indexOf(\"+\"), m = ~f.indexOf(\"*\"), E = e[s] || \"\"; if (!E && !m && (f.indexOf(\"?\") < 0 || u)) { o = !1; break } if (l[g] = decodeURIComponent(E), u || m) { l[g] = e.slice(s).map(decodeURIComponent).join(\"/\"); break } } else if (t[s] !== e[s]) { o = !1; break } return (n.default === !0 || o !== !1) && l } function Wt(e, t) { return e.rank < t.rank ? 1 : e.rank > t.rank ? -1 : e.index - t.index } function Bt(e, t) { return e.index = t, e.rank = function (n) { return n.props.default ? 0 : be(n.props.path).map(Vt).join(\"\") }(e), e.props } function be(e) { return e.replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\") } function Vt(e) { return e.charAt(0) == \":\" ? 1 + \"*+?\".indexOf(e.charAt(e.length - 1)) || 4 : 5 } var Gt = {}, F = [], Ue = [], O = null, ft = { url: Ie() }, qt = ct(ft); function Ie() { var e; return \"\" + ((e = O && O.location ? O.location : O && O.getCurrentLocation ? O.getCurrentLocation() : typeof location < \"u\" ? location : Gt).pathname || \"\") + (e.search || \"\") } function W(e, t) { return t === void 0 && (t = !1), typeof e != \"string\" && e.url && (t = e.replace, e = e.url), function (n) { for (var o = F.length; o--;)if (F[o].canRoute(n)) return !0; return !1 }(e) && function (n, o) { o === void 0 && (o = \"push\"), O && O[o] ? O[o](n) : typeof history < \"u\" && history[o + \"State\"] && history[o + \"State\"](null, null, n) }(e, t ? \"replace\" : \"push\"), pt(e) } function pt(e) { for (var t = !1, n = 0; n < F.length; n++)F[n].routeTo(e) && (t = !0); return t } function jt(e) { if (e && e.getAttribute) { var t = e.getAttribute(\"href\"), n = e.getAttribute(\"target\"); if (t && t.match(/^\\//g) && (!n || n.match(/^_?self$/i))) return W(t) } } function zt(e) { return e.stopImmediatePropagation && e.stopImmediatePropagation(), e.stopPropagation && e.stopPropagation(), e.preventDefault(), !1 } function Zt(e) { if (!(e.ctrlKey || e.metaKey || e.altKey || e.shiftKey || e.button)) { var t = e.target; do if (t.localName === \"a\" && t.getAttribute(\"href\")) { if (t.hasAttribute(\"data-native\") || t.hasAttribute(\"native\")) return; if (jt(t)) return zt(e) } while (t = t.parentNode) } } var Fe = !1; function ht(e) { e.history && (O = e.history), this.state = { url: e.url || Ie() } } Y(ht.prototype = new L, { shouldComponentUpdate: function (e) { return e.static !== !0 || e.url !== this.props.url || e.onChange !== this.props.onChange }, canRoute: function (e) { var t = j(this.props.children); return this.g(t, e) !== void 0 }, routeTo: function (e) { this.setState({ url: e }); var t = this.canRoute(e); return this.p || this.forceUpdate(), t }, componentWillMount: function () { this.p = !0 }, componentDidMount: function () { var e = this; Fe || (Fe = !0, O || addEventListener(\"popstate\", function () { pt(Ie()) }), addEventListener(\"click\", Zt)), F.push(this), O && (this.u = O.listen(function (t) { var n = t.location || t; e.routeTo(\"\" + (n.pathname || \"\") + (n.search || \"\")) })), this.p = !1 }, componentWillUnmount: function () { typeof this.u == \"function\" && this.u(), F.splice(F.indexOf(this), 1) }, componentWillUpdate: function () { this.p = !0 }, componentDidUpdate: function () { this.p = !1 }, g: function (e, t) { e = e.filter(Bt).sort(Wt); for (var n = 0; n < e.length; n++) { var o = e[n], i = Xt(t, o.props.path, o.props); if (i) return [o, i] } }, render: function (e, t) { var n, o, i = e.onChange, r = t.url, l = this.c, a = this.g(j(e.children), r); if (a && (o = $t(a[0], Y(Y({ url: r, matches: n = a[1] }, n), { key: void 0, ref: void 0 }))), r !== (l && l.url)) { Y(ft, l = this.c = { url: r, previous: l && l.url, current: o, path: o ? o.props.path : null, matches: n }), l.router = this, l.active = o ? [o] : []; for (var _ = Ue.length; _--;)Ue[_]({}); typeof i == \"function\" && i(l) } return ie(qt.Provider, { value: l }, o) } }); const Jt = \"https://api.cogniflow.ai\"; class Kt { constructor(t) { pe(this, \"get\", this.req(\"GET\")); pe(this, \"post\", this.req(\"POST\")); this.headers = { \"Content-Type\": \"application/json\" }, localStorage.getItem(\"access_token\") && this.setTokenInHeaders(localStorage.getItem(\"access_token\")), this.baseUrl = t } setTokenInHeaders(t) { this.headers = { ...this.headers, Authorization: `Bearer ${t}` } } req(t) { return (n, o, i, r = \"normal\") => r === \"normal\" ? fetch(`${this.baseUrl}/${n}`, { method: t, headers: { ...this.headers, ...i ?? {}}, body: o }).then(l => { if (!l.ok) { const a = new Error(\"HTTP status code: \" + l.status); throw a.response = l, a.status = l.status, a } return l.json() }).then(l => l) : fetchRetry(`${this.baseUrl}/${n}`, 12e4, 200, { method: t, headers: { ...this.headers, ...i ?? {}}, body: o }).then(l => { if (!l.ok) { const a = new Error(\"HTTP status code: \" + l.status); throw a.response = l, a.status = l.status, a } return l.json() }).then(l => l) } } const X = new Kt(Jt), Qt = e => X.post(\"login\", new URLSearchParams({ ...e }), { \"Content-Type\": \"application/x-www-form-urlencoded\" }), Yt = () => X.get(\"user/\"), en = ({ visibility: e = 0, type: t }) => { const n = t.toString ? `&type=${t}` : \"\"; return X.get(`experiment/?visibility=${e}${n}`) }, tn = e => X.get(`experiment/${e}`); var nn = 0; function c(e, t, n, o, i, r) { var l, a, _ = {}; for (a in t) a == \"ref\" ? l = t[a] : _[a] = t[a]; var h = { type: e, props: _, key: n, ref: l, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --nn, __source: i, __self: r }; if (typeof e == \"function\" && (l = e.defaultProps)) for (a in l) _[a] === void 0 && (_[a] = l[a]); return p.vnode && p.vnode(h), h } const me = \"access_token\", mt = ct({ user: {}, login: () => { }, token: null }), fe = () => Dt(mt), on = ({ children: e }) => { const [t, n] = N({}), [o, i] = N(null); K(() => { o && Yt().then(a => { n(a) }).catch(a => { }) }, [n, o]), K(() => { const a = localStorage.getItem(me); a ? (X.setTokenInHeaders(a), i(!0)) : i(!1) }, []); const r = (a, _) => Qt({ username: a, password: _ }).then(({ access_token: h, ...d }) => { X.setTokenInHeaders(h), localStorage.setItem(me, h), i(!0) }), l = () => { localStorage.removeItem(me), X.setTokenInHeaders(\"\"), i(!1) }; return c(mt.Provider, { value: { login: r, logout: l, user: t, isAuthenticated: o }, children: e }) }; function rn(e, t) { for (var n in t) e[n] = t[n]; return e } function Xe(e, t) { for (var n in e) if (n !== \"__source\" && !(n in t)) return !0; for (var o in t) if (o !== \"__source\" && e[o] !== t[o]) return !0; return !1 } function We(e) { this.props = e } (We.prototype = new L).isPureReactComponent = !0, We.prototype.shouldComponentUpdate = function (e, t) { return Xe(this.props, e) || Xe(this.state, t) }; var Be = p.__b; p.__b = function (e) { e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Be && Be(e) }; var sn = p.__e; p.__e = function (e, t, n, o) { if (e.then) { for (var i, r = t; r = r.__;)if ((i = r.__c) && i.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), i.__c(e, t) } sn(e, t, n, o) }; var Ve = p.unmount; function vt(e, t, n) { return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function (o) { typeof o.__c == \"function\" && o.__c() }), e.__c.__H = null), (e = rn({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function (o) { return vt(o, t, n) })), e } function gt(e, t, n) { return e && (e.__v = null, e.__k = e.__k && e.__k.map(function (o) { return gt(o, t, n) }), e.__c && e.__c.__P === t && (e.__e && n.insertBefore(e.__e, e.__d), e.__c.__e = !0, e.__c.__P = n)), e } function ve() { this.__u = 0, this.t = null, this.__b = null } function yt(e) { var t = e.__.__c; return t && t.__a && t.__a(e) } function ee() { this.u = null, this.o = null } p.unmount = function (e) { var t = e.__c; t && t.__R && t.__R(), t && e.__h === !0 && (e.type = null), Ve && Ve(e) }, (ve.prototype = new L).__c = function (e, t) { var n = t.__c, o = this; o.t == null && (o.t = []), o.t.push(n); var i = yt(o.__v), r = !1, l = function () { r || (r = !0, n.__R = null, i ? i(a) : a()) }; n.__R = l; var a = function () { if (!--o.__u) { if (o.state.__a) { var h = o.state.__a; o.__v.__k[0] = gt(h, h.__c.__P, h.__c.__O) } var d; for (o.setState({ __a: o.__b = null }); d = o.t.pop();)d.forceUpdate() } }, _ = t.__h === !0; o.__u++ || _ || o.setState({ __a: o.__b = o.__v.__k[0] }), e.then(l, l) }, ve.prototype.componentWillUnmount = function () { this.t = [] }, ve.prototype.render = function (e, t) { if (this.__b) { if (this.__v.__k) { var n = document.createElement(\"div\"), o = this.__v.__k[0].__c; this.__v.__k[0] = vt(this.__b, n, o.__O = o.__P) } this.__b = null } var i = t.__a && ie(q, null, e.fallback); return i && (i.__h = null), [ie(q, null, t.__a ? null : e.children), i] }; var Ge = function (e, t, n) { if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== \"t\" || !e.o.size)) for (n = e.u; n;) { for (; n.length > 3;)n.pop()(); if (n[1] < n[0]) break; e.u = n = n[2] } }; (ee.prototype = new L).__a = function (e) { var t = this, n = yt(t.__v), o = t.o.get(e); return o[0]++ , function (i) { var r = function () { t.props.revealOrder ? (o.push(i), Ge(t, e, o)) : i() }; n ? n(r) : r() } }, ee.prototype.render = function (e) { this.u = null, this.o = new Map; var t = j(e.children); e.revealOrder && e.revealOrder[0] === \"b\" && t.reverse(); for (var n = t.length; n--;)this.o.set(t[n], this.u = [1, 0, this.u]); return e.children }, ee.prototype.componentDidUpdate = ee.prototype.componentDidMount = function () { var e = this; this.o.forEach(function (t, n) { Ge(e, n, t) }) }; var ln = typeof Symbol < \"u\" && Symbol.for && Symbol.for(\"react.element\") || 60103, an = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, cn = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, _n = /[A-Z0-9]/g, un = typeof document < \"u\", dn = function (e) { return (typeof Symbol < \"u\" && typeof Symbol() == \"symbol\" ? /fil|che|rad/ : /fil|che|ra/).test(e) }; L.prototype.isReactComponent = {}, [\"componentWillMount\", \"componentWillReceiveProps\", \"componentWillUpdate\"].forEach(function (e) { Object.defineProperty(L.prototype, e, { configurable: !0, get: function () { return this[\"UNSAFE_\" + e] }, set: function (t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t }) } }) }); var qe = p.event; function fn() { } function pn() { return this.cancelBubble } function hn() { return this.defaultPrevented } p.event = function (e) { return qe && (e = qe(e)), e.persist = fn, e.isPropagationStopped = pn, e.isDefaultPrevented = hn, e.nativeEvent = e }; var mn = { enumerable: !1, configurable: !0, get: function () { return this.class } }, je = p.vnode; p.vnode = function (e) { typeof e.type == \"string\" && function (t) { var n = t.props, o = t.type, i = {}; for (var r in n) { var l = n[r]; if (!(r === \"value\" && \"defaultValue\" in n && l == null || un && r === \"children\" && o === \"noscript\" || r === \"class\" || r === \"className\")) { var a = r.toLowerCase(); r === \"defaultValue\" && \"value\" in n && n.value == null ? r = \"value\" : r === \"download\" && l === !0 ? l = \"\" : a === \"ondoubleclick\" ? r = \"ondblclick\" : a !== \"onchange\" || o !== \"input\" && o !== \"textarea\" || dn(n.type) ? a === \"onfocus\" ? r = \"onfocusin\" : a === \"onblur\" ? r = \"onfocusout\" : cn.test(r) ? r = a : o.indexOf(\"-\") === -1 && an.test(r) ? r = r.replace(_n, \"-$&\").toLowerCase() : l === null && (l = void 0) : a = r = \"oninput\", a === \"oninput\" && i[r = a] && (r = \"oninputCapture\"), i[r] = l } } o == \"select\" && i.multiple && Array.isArray(i.value) && (i.value = j(n.children).forEach(function (_) { _.props.selected = i.value.indexOf(_.props.value) != -1 })), o == \"select\" && i.defaultValue != null && (i.value = j(n.children).forEach(function (_) { _.props.selected = i.multiple ? i.defaultValue.indexOf(_.props.value) != -1 : i.defaultValue == _.props.value })), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, \"className\", mn)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), t.props = i }(e), e.$$typeof = ln, je && je(e) }; var ze = p.__r; p.__r = function (e) { ze && ze(e), e.__c }; var Ze = p.diffed; p.diffed = function (e) { Ze && Ze(e); var t = e.props, n = e.__e; n != null && e.type === \"textarea\" && \"value\" in t && t.value !== n.value && (n.value = t.value == null ? \"\" : t.value) }; const vn = () => c(\"svg\", { id: \"Capa_1\", \"data-name\": \"Capa 1\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 841.89 235.28\", class: \"jss32\", children: [c(\"defs\", {}), c(\"title\", { children: \"1a\" }), c(\"path\", { style: { fill: \"#141624\" }, class: \"cls-1\", d: \"M169.59,144.1a30.6,30.6,0,0,1,0-43.49v-.06h0a30.72,30.72,0,0,1,41.44-1.86,5.32,5.32,0,0,1,2,3.1c.07.9.11,1.44.11,1.63a6.16,6.16,0,0,1-1.41,3.88c-1.12,1.32-2.13,2-3,2.09s-1.4.11-1.55.11a6.56,6.56,0,0,1-4.05-1.41,18.53,18.53,0,0,0-24.94,27.36,18.54,18.54,0,0,0,24.94,1.13,6.16,6.16,0,0,1,3.88-1.41,6,6,0,0,1,4.73,2.2,6.18,6.18,0,0,1-.73,8.61,30.18,30.18,0,0,1-9.29,5.29,29.35,29.35,0,0,1-10.41,1.86A29.75,29.75,0,0,1,169.59,144.1Z\" }), c(\"path\", { style: { fill: \"#141624\" }, class: \"cls-1\", d: \"M244,144.1a30.72,30.72,0,0,1,0-43.49l.05-.06a30.8,30.8,0,0,1,52.53,21.79A30.78,30.78,0,0,1,244,144.1Zm34.85-8.67a18.52,18.52,0,1,0-13.09,5.43A17.84,17.84,0,0,0,278.88,135.43Z\" }), c(\"path\", { class: \"cls-1\", style: { fill: \"#141624\" }, d: \"M335.54,176.5a30.56,30.56,0,0,1-9.51-7.32,6.18,6.18,0,0,1-1.47-4,6.06,6.06,0,0,1,2.09-4.62,6,6,0,0,1,3.94-1.52,6.12,6.12,0,0,1,4.67,2.09,19.75,19.75,0,0,0,5.74,4.44,18.07,18.07,0,0,0,8.22,1.92,18.64,18.64,0,0,0,18.52-18.58v-2a30.82,30.82,0,0,1-49.37-24.54,29.63,29.63,0,0,1,9.06-21.73v-.06a30.78,30.78,0,0,1,43.52,0A30.78,30.78,0,0,1,380,122.17v26.74a30.86,30.86,0,0,1-30.8,30.8A30.18,30.18,0,0,1,335.54,176.5Zm26.74-41.07a18.53,18.53,0,1,0-13.06,5.43A17.82,17.82,0,0,0,362.28,135.43Z\" }), c(\"path\", { class: \"cls-1\", style: { fill: \"#141624\" }, d: \"M442.33,151.33a5.91,5.91,0,0,1-1.8-4.33V114.23a9,9,0,0,0-3.55-7,15.46,15.46,0,0,0-19.42,0,9,9,0,0,0-3.55,7V147a6.15,6.15,0,0,1-6.13,6.13,5.82,5.82,0,0,1-4.31-1.8A6,6,0,0,1,401.8,147V97.62a6,6,0,0,1,6.08-6.08,6,6,0,0,1,5.63,3.6,26.9,26.9,0,0,1,13.79-3.6,26.22,26.22,0,0,1,17.62,6.36q7.89,6.7,7.88,16.33V147a6.13,6.13,0,0,1-10.47,4.33Z\" }), c(\"path\", { class: \"cls-1\", style: { fill: \"#141624\" }, d: \"M476.38,78.14a5.9,5.9,0,0,1-1.8-4.33V71.05a6.14,6.14,0,0,1,12.28,0v2.76a6.14,6.14,0,0,1-10.48,4.33Zm0,73.19a5.91,5.91,0,0,1-1.8-4.33V97.62a5.84,5.84,0,0,1,1.8-4.31,6.19,6.19,0,0,1,8.67,0,5.85,5.85,0,0,1,1.81,4.31V147a6.14,6.14,0,0,1-10.48,4.33Z\" }), c(\"path\", { class: \"cls-2\", style: { fill: \"#eb5e60\" }, d: \"M510.8,177.93a5.87,5.87,0,0,1-1.77-4.31V122.34a29.7,29.7,0,0,1,9-21.73l.05-.06a29.74,29.74,0,0,1,21.74-9,6,6,0,0,1,4.33,1.77,5.84,5.84,0,0,1,1.8,4.31,6.15,6.15,0,0,1-6.13,6.14,18.64,18.64,0,0,0-18.58,18.58v18.52h18.58a6.14,6.14,0,0,1,0,12.27H521.25v20.49a6.08,6.08,0,0,1-6.08,6.09A6,6,0,0,1,510.8,177.93Z\" }), c(\"path\", { class: \"cls-2\", style: { fill: \"#eb5e60\" }, d: \"M588.57,153.13a20.91,20.91,0,0,1-20.83-20.83V71.05a6.14,6.14,0,0,1,12.28,0V132.3a8.55,8.55,0,0,0,8.55,8.56h10.81a5.91,5.91,0,0,1,4.37,1.8,6.19,6.19,0,0,1,0,8.67,5.91,5.91,0,0,1-4.37,1.8Z\" }), c(\"path\", { class: \"cls-2\", style: { fill: \"#eb5e60\" }, d: \"M630.7,144.1a30.72,30.72,0,0,1,0-43.49l.05-.06a30.8,30.8,0,0,1,52.53,21.79A30.78,30.78,0,0,1,630.7,144.1Zm34.85-8.67a18.52,18.52,0,1,0-13.09,5.43A17.88,17.88,0,0,0,665.55,135.43Z\" }), c(\"path\", { class: \"cls-2\", style: { fill: \"#eb5e60\" }, d: \"M761.62,152.79a6.22,6.22,0,0,1-3.55-3l-11.76-23.53-11.77,23.53a5.86,5.86,0,0,1-2.7,2.71,6.36,6.36,0,0,1-2.76.67,5.64,5.64,0,0,1-1.92-.34,6.18,6.18,0,0,1-3.54-3L699,100.38a6.37,6.37,0,0,1-.68-2.76,5.83,5.83,0,0,1,.34-1.91,6.3,6.3,0,0,1,3-3.55,6.47,6.47,0,0,1,2.7-.62,5.88,5.88,0,0,1,5.52,3.38l19.2,38.45,11.76-23.53a5.92,5.92,0,0,1,5.47-3.38,6.3,6.3,0,0,1,2.75.68,5.91,5.91,0,0,1,2.71,2.7l11.76,23.53,19.2-38.45a5.88,5.88,0,0,1,5.52-3.38,6.47,6.47,0,0,1,2.7.62,5.84,5.84,0,0,1,3.38,5.46,6.37,6.37,0,0,1-.68,2.76L769,149.75a6.21,6.21,0,0,1-2.75,2.71,6.05,6.05,0,0,1-2.71.67A5.62,5.62,0,0,1,761.62,152.79Z\" }), c(\"polyline\", { class: \"cls-3\", style: { fill: \"none\", stroke: \"#eb5e60\", strokeLinecap: \"round\", strokeMiterlimit: 10, strokeWidth: \"14px\" }, points: \"75.47 79.2 47.03 119.07 75.47 164.07\" }), c(\"polyline\", { class: \"cls-3\", style: { fill: \"none\", stroke: \"#eb5e60\", strokeLinecap: \"round\", strokeMiterlimit: 10, strokeWidth: \"14px\" }, points: \"113.2 79.2 84.76 119.07 113.2 164.07\" }), c(\"line\", { class: \"cls-3\", x1: \"101.72\", y1: \"145.91\", x2: \"133.07\", y2: \"104.48\" })] }), gn = () => c(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", style: \"fill: rgba(0, 0, 0, 1);transform: ;msFilter:;\", children: [c(\"path\", { d: \"M16 13v-2H7V8l-5 4 5 4v-3z\" }), c(\"path\", { d: \"M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z\" })] }), yn = () => c(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", style: \"fill: rgba(0, 0, 0, 1);transform: ;msFilter:;\", children: c(\"path\", { d: \"m6.293 13.293 1.414 1.414L12 10.414l4.293 4.293 1.414-1.414L12 7.586z\" }) }), Tn = () => c(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", style: \"fill: rgba(0, 0, 0, 1);transform: ;msFilter:;\", children: c(\"path\", { d: \"M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z\" }) }), An = () => c(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", style: \"fill: rgba(0, 0, 0, 1);transform: ;msFilter:;\", children: c(\"path\", { d: \"M13.293 6.293 7.586 12l5.707 5.707 1.414-1.414L10.414 12l4.293-4.293z\" }) }), Cn = \"_logoWrapper_1phh2_1\", bn = \"_formWrapper_1phh2_12\", En = \"_subtitle_1phh2_17\", wn = \"_formField_1phh2_23\", In = \"_loginButton_1phh2_52\", kn = \"_info_1phh2_74\", Sn = \"_link_1phh2_81\", Nn = \"_errorWrapper_1phh2_88\", M = { logoWrapper: Cn, formWrapper: bn, subtitle: En, formField: wn, loginButton: In, info: kn, link: Sn, errorWrapper: Nn }, Rn = () => { const { login: e } = fe(), [t, n] = N({ email: \"\", password: \"\" }), [o, i] = N(!1), r = () => { if (!t.email || !t.password) { i(\"Please fill all fields\"); return } i(!1), e(t.email, t.password).then(a => { W(\"/dashboard\", !0) }).catch(a => { let _ = `Error: ${a.message}`; switch (a.status) { case 400: _ = \"Invalid email or password\" }i(_) }) }, l = a => { n({ ...t, [a.target.name]: a.target.value }) }; return c(\"div\", { className: M.loginPage, children: [c(\"div\", { className: M.logoWrapper, children: c(vn, {}) }), c(\"div\", { className: M.formWrapper, children: [c(\"h3\", { className: M.subtitle, children: \"Sign in to Cogniflow\" }), c(\"div\", { className: M.formField, children: [c(\"label\", { children: \"Email\" }), c(\"input\", { placeholder: \"youremail@gmail.com\", name: \"email\", onChange: l, type: \"email\" })] }), c(\"div\", { className: M.formField, children: [c(\"label\", { children: \"Password\" }), c(\"input\", { placeholder: \"******\", onChange: l, name: \"password\", type: \"password\" })] }), c(\"div\", { className: M.info, children: c(\"small\", { children: [\"You need to have a Cogniflow password to access our Excel Add-in, if you don't have one, create it\", \" \", c(\"a\", { className: M.link, href: \"https://app.cogniflow.ai/settings/profile\", target: \"_blank\", children: \"here\" })] }) }), c(\"button\", { className: M.loginButton, onClick: r, children: \"Login\" }), o && c(\"div\", { className: M.errorWrapper, children: c(\"div\", { className: M.error, children: c(\"small\", { children: o }) }) })] })] }) }, On = { \"lds-ring\": \"_lds-ring_1im9c_1\" }, Tt = () => c(\"div\", { className: On[\"lds-ring\"], children: [c(\"div\", {}), c(\"div\", {}), c(\"div\", {}), c(\"div\", {})] }), xn = (e, t) => { K(() => { function n(o) { e.current && !e.current.contains(o.target) && t() } return document.addEventListener(\"mousedown\", n), () => { document.removeEventListener(\"mousedown\", n) } }, [e]) }; function $n(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, \"default\") ? e.default : e } var At = { exports: {} };/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/(function (e) { (function () { var t = {}.hasOwnProperty; function n() { for (var o = [], i = 0; i < arguments.length; i++) { var r = arguments[i]; if (r) { var l = typeof r; if (l === \"string\" || l === \"number\") o.push(r); else if (Array.isArray(r)) { if (r.length) { var a = n.apply(null, r); a && o.push(a) } } else if (l === \"object\") { if (r.toString !== Object.prototype.toString && !r.toString.toString().includes(\"[native code]\")) { o.push(r.toString()); continue } for (var _ in r) t.call(r, _) && r[_] && o.push(_) } } } return o.join(\" \") } e.exports ? (n.default = n, e.exports = n) : window.classNames = n })() })(At); var Mn = At.exports; const Ct = $n(Mn), Pn = \"_dropdown_7fpzl_19\", Ln = \"_active_7fpzl_51\", te = { \"trigger-button\": \"_trigger-button_7fpzl_1\", \"dropdown-wrapper\": \"_dropdown-wrapper_7fpzl_19\", dropdown: Pn, active: Ln }, ce = ({ items: e = [], initialValue: t, className: n, onChange: o }) => { const [i, r] = N(!1), [l, a] = N(t), _ = Pt(null); xn(_, () => { r(!1) }); const h = d => { a(d), r(!1), o(d) }; return c(\"div\", { class: Ct(te[\"dropdown-wrapper\"], n), ref: _, children: [c(\"div\", { onClick: () => { r(d => !d) }, className: te[\"trigger-button\"], children: [l.label, i ? c(yn, {}) : c(Tn, {})] }), c(\"ul\", { className: i ? te.active : \"\", children: e.map(({ label: d, value: s }) => c(\"li\", { onClick: () => h({ label: d, value: s }), className: te.dropdownItem, children: d })) })] }) }, v = { TEXT_CLASSIFICATION: 0, TEXT_TRANSLATION: 1, TEXT_NER_RESPONSE: 2, TEXT_QANDA: 3, SMART_EXTRACTOR: 4, IMAGE_CLASSIFICATION: 100, IMAGE_OBJECT_DETECTION: 101, IMAGE_OCR: 102, IMAGE_FACE_SIMILARITY: 103, IMAGE_CUSTOM_ENTITY_EXTRACTOR: 4, AUDIO_CLASSIFICATION: 200, AUDIO_SPEECH2TEXT: 201 }, Dn = [v.TEXT_CLASSIFICATION, v.TEXT_TRANSLATION, v.TEXT_NER_RESPONSE, v.TEXT_QANDA, v.SMART_EXTRACTOR, v.IMAGE_CLASSIFICATION, v.IMAGE_OBJECT_DETECTION, v.IMAGE_OCR, v.AUDIO_CLASSIFICATION, v.AUDIO_SPEECH2TEXT], re = { TEXT: 0, IMAGE: 1, AUDIO: 2 }, bt = { [re.TEXT]: \"Text\", [re.IMAGE]: \"Image\", [re.AUDIO]: \"Audio\" }, Hn = { [v.TEXT_CLASSIFICATION]: \"Classification\", [v.AUDIO_CLASSIFICATION]: \"Classification\", [v.AUDIO_SPEECH2TEXT]: \"Transcription\", [v.TEXT_TRANSLATION]: \"Translation\", [v.TEXT_NER_RESPONSE]: \"Named Entity Recognition (NER)\", [v.TEXT_QANDA]: \"Question-Answering\", [v.IMAGE_OCR]: \"OCR\", [v.SMART_EXTRACTOR]: \"Smart extractor\", [v.IMAGE_CLASSIFICATION]: \"Classification\", [v.IMAGE_OBJECT_DETECTION]: \"Object detection\", [v.IMAGE_FACE_SIMILARITY]: \"Image verification\" }, Un = { [v.TEXT_CLASSIFICATION]: \"#ffe5e3\", [v.AUDIO_CLASSIFICATION]: \"#ffede3\", [v.AUDIO_SPEECH2TEXT]: \"#fff5e3\", [v.TEXT_TRANSLATION]: \"#fffae3\", [v.TEXT_NER_RESPONSE]: \"#fffde3\", [v.TEXT_QANDA]: \"#ffffe3\", [v.IMAGE_OCR]: \"#f2ffe3\", [v.SMART_EXTRACTOR]: \"#e6ffe3\", [v.IMAGE_CLASSIFICATION]: \"#d9ffe3\", [v.IMAGE_OBJECT_DETECTION]: \"#e3ffec\", [v.IMAGE_FACE_SIMILARITY]: \"#e3fff4\" }, Fn = \"_nav_1arwg_1\", Xn = \"_logout_1arwg_19\", Wn = \"_logoutItems_1arwg_33\", Bn = \"_dropdowns_1arwg_49\", Vn = \"_dropdownLabel_1arwg_60\", Gn = \"_experimentItem_1arwg_67\", qn = \"_content_1arwg_71\", jn = \"_cardsWrapper_1arwg_75\", zn = \"_loader_1arwg_83\", P = { nav: Fn, logout: Xn, logoutItems: Wn, dropdowns: Bn, dropdownLabel: Vn, experimentItem: Gn, content: qn, cardsWrapper: jn, loader: zn }, Zn = \"_card_1pg1x_1\", Jn = \"_wave_1pg1x_16\", Kn = \"_imgBackground_1pg1x_25\", Qn = \"_title_1pg1x_35\", Yn = \"_experimentClassification_1pg1x_44\", eo = \"_image_1pg1x_53\", to = \"_dot_1pg1x_74\", no = \"_cardFooter_1pg1x_82\", H = { card: Zn, wave: Jn, imgBackground: Kn, title: Qn, experimentClassification: Yn, image: eo, dot: to, cardFooter: no }, oo = ({ title: e, type: t, task: n, logo: o, ...i }) => { const r = o ? \"https://s3.us-east-2.amazonaws.com/static-cogniflow-prod/\" + o : \"https://app.cogniflow.ai/static/media/img-placeholder.3c18e621361480e8272e676738157c04.svg\"; return c(\"div\", { className: H.card, children: [c(\"div\", { className: H.wave, children: c(\"div\", { className: H.imgBackground }) }), c(\"p\", { className: H.title, children: e }), c(\"div\", { className: H.image, children: c(\"img\", { src: r }) }), c(\"div\", { className: H.cardFooter, children: [c(\"div\", { className: H.dot, style: { backgroundColor: Un[n] } }), c(\"p\", { className: H.experimentClassification, children: [bt[t], \" | \", Hn[n]] })] })] }) }, Je = [{ label: \"Public\", value: 1 }, { label: \"Private\", value: 0 }, { label: \"Community\", value: 3 }, { label: \"Organization\", value: 2 }], Ke = [{ label: \"All\", value: \"\" }, { label: \"Text\", value: 0 }, { label: \"Image\", value: 1 }, { label: \"Audio\", value: 2 }], ro = () => { const [e, t] = N(!1), [n, o] = N([]), { logout: i } = fe(), [r, l] = N(0), [a, _] = N(\"\"); K(() => { t(!0), en({ visibility: r, type: a }).then(f => { const u = f.filter(m => Dn.includes(m.task)); o(u), t(!1) }).catch(f => { t(!1), console.log(\"failing\", f) }) }, [r, a]); const h = f => { W(`/test/${f}`) }, d = () => { i(), W(\"/login\") }, s = f => { l(f.value) }, g = f => { _(f.value) }; return c(\"div\", { children: [c(\"div\", { className: P.nav, children: [c(\"div\", { className: P.logout, children: c(\"div\", { className: P.logoutItems, onClick: d, children: c(gn, {}) }) }), c(\"h4\", { children: \"Experiments\" }), c(\"div\", {})] }), c(\"div\", { className: P.content, children: [c(\"div\", { className: P.dropdowns, children: [c(\"div\", { children: [c(\"small\", { className: P.dropdownLabel, children: \"Visibility:\" }), c(ce, { items: Je, initialValue: Je[1], onChange: s })] }), c(\"div\", { children: [c(\"small\", { className: P.dropdownLabel, children: \"Type:\" }), c(ce, { items: Ke, initialValue: Ke[0], onChange: g })] })] }), e && c(\"div\", { className: P.loader, children: c(Tt, {}) }), !e && n.length ? c(\"div\", { className: P.cardsWrapper, children: n.map(({ id: f, ...u }) => c(\"div\", { className: P.experimentItem, onClick: () => h(f), children: c(oo, { ...u }) })) }) : c(\"div\", { children: c(\"h3\", { style: { textAlign: \"center\", fontWeight: \"400\" }, children: \"No experiments found\" }) })] })] }) }, io = \"_nav_r1i7b_1\", so = \"_title_r1i7b_20\", lo = \"_icon_r1i7b_24\", ao = \"_content_r1i7b_32\", co = \"_dropdowns_r1i7b_36\", _o = \"_runModel_r1i7b_42\", uo = \"_subtitleBlock_r1i7b_68\", fo = \"_checkboxes_r1i7b_76\", po = \"_checkboxText_r1i7b_83\", ho = \"_loading_r1i7b_87\", mo = \"_runModelDisabled_r1i7b_93\", vo = \"_warning_r1i7b_108\", S = { nav: io, title: so, icon: lo, content: ao, dropdowns: co, runModel: _o, subtitleBlock: uo, checkboxes: fo, checkboxText: po, loading: ho, runModelDisabled: mo, warning: vo }, G = { TEXT: 0, IMAGE: 1, AUDIO: 2 }, x = { TEXT_CLASSIFICATION: 0, TEXT_TRANSLATION: 1, TEXT_QANDA: 3, IMAGE_CLASSIFICATION: 100, IMAGE_OBJECT_DETECTION: 101, IMAGE_OCR: 102, AUDIO_CLASSIFICATION: 200, SMART_EXTRACTOR: 4 }, ke = { [G.TEXT]: { time: 1e3, limit: 3 }, [G.IMAGE]: { time: 1e3, limit: 2 }, [G.AUDIO]: { time: 1e3, limit: 1 }, index: 0 }; async function go(e) { await Excel.run(async t => { const n = t.workbook.worksheets.getActiveWorksheet(), o = bo(t); let i = t.workbook.getSelectedRange(); if (!e.hasHeaders && x.SMART_EXTRACTOR === e.task && wo(t), await o(i, [\"isEntireColumn\"]), i.isEntireColumn) { const _ = i.getUsedRange(); await o(_, [\"values\", \"address\"]); const h = await Eo(_, t); i = n.getRange(h) } await o(i, [\"values\", \"address\"]), await Io({ range: i, task: e.task, config: e.experimentConfig, context: t, sheet: n, parameters: e }); const r = i.values.map(([_]) => _), l = yo({ parameters: e, cells: r }); e.task === x.SMART_EXTRACTOR && e.hasHeaders && l.shift(); const a = ko(l, ke[e.type].limit); switch (e.task) { case x.SMART_EXTRACTOR: await To({ requests: a, requestRange: i, config: e.experimentConfig, sheet: n, context: t, type: e.type, hasHeaders: e.hasHeaders, callback: e.predictionCallback }); return; default: Ao({ sheet: n, context: t, requestRange: i, chunks: a, includeConfidence: e.includeConfidence, type: e.type, task: e.task, callback: e.predictionCallback }) } }) } function yo({ parameters: e, cells: t }) { var l; const n = []; let o = 0; const r = { [x.TEXT_QANDA]: { result: [{ answer: \"\" }] }, [x.SMART_EXTRACTOR]: [(l = e.experimentConfig.entities) == null ? void 0 : l.reduce((a, _) => ({ ...a, [_.name]: \"\" }), {})] }[e.task] || { result: \"\" }; for (const a of t) { if (e.hasHeaders && o === 0) { n.push(Promise.resolve({ result: r })), o++; continue } n.push(fetch(`${e.url}/${e.modelId}`, { method: \"POST\", headers: { \"Content-Type\": \"application/json\", \"x-api-key\": e.apikey }, body: JSON.stringify({ [So(e.type, e.task)]: a, format: \"jpg\" }) }).then(_ => _.ok ? _.json() : new Promise((h, d) => { _.json().then(s => { h({ message: \"error\", status: _.status, result: s }) }) }))), o++ } return n } function Et(e, t) { switch (e) { case 400: return \"Bad Request: The request was unacceptable, often due to missing a required parameter.\"; case 401: return \"Unauthorized: Prediction quota exceede or no valid API key provided.\"; case 403: return \"Forbidden: The API key doesn’t have permissions to perform the request.\"; case 404: return \"Not Found: The requested resource doesn’t exist.\"; case 429: return \"Too Many Requests: Too many requests hit the API too quickly.\"; case 500: return \"Internal Server Error: We had a problem with our server. Try again later.\"; case 503: return (t.includes(\"OpenAI\") ? \"Please enter your OpenAI API key in https://app.cogniflow.ai/settings/apikeys to enable the model to work.\" : \"\") || \"Service Unavailable: We’re temporarily offline for maintenance. Please try again later.\"; default: return \"Unknown error\" } } async function To({ requests: e, requestRange: t, config: n, sheet: o, context: i, type: r, hasHeaders: l, callback: a }) { const _ = n.entities.map(({ name: d }) => d); let h = t.getOffsetRange(l ? 1 : 0, 1); for (const d of e) { const s = await Promise.allSettled(d), g = h.getCell(0, 0), f = h.getCell(s.length - 1, _.length - 1); for (const y of [g, f]) y.load(\"address\"); await i.sync(); const u = `${_e(g.address)}:${_e(f.address)}`, m = []; for (const { value: y } of s) { if (y.message === \"error\") { m.push(_.map((I, w) => { var C; return w === 0 ? Et(y.status, (C = y == null ? void 0 : y.result) == null ? void 0 : C.detail) : \"\" })); continue } const T = _.map(I => { const w = y.result[0][I] || \"\"; return Array.isArray(w) ? JSON.stringify(w) : w }); T.length || T.push(\"---\"), m.push(T) } const E = o.getRange(u); E.values = m, h = E.getLastRow().getRowsBelow(1), await Co(ke[r].time) } a && a() } async function Ao({ sheet: e, context: t, requestRange: n, chunks: o, includeConfidence: i, type: r, task: l, callback: a }) { let _ = Qe(n.address).startNumber; const { startLetter: h } = Qe(n.address); for (const d of o) { const s = await Promise.allSettled(d), [g, f] = [`${h}${_}`, `${h}${_ + d.length - 1}`], u = e.getRange(`${g}:${f}`), m = s.map(E => [No(E.value, l)]); u.values = m, i && (u.getColumnsAfter(1).values = s.map(E => [Ro(E.value, l) || -1])), await t.sync(), await new Promise(E => setTimeout(E, ke[r].time)), _ += d.length } a && a() } function Co(e) { return new Promise(t => setTimeout(t, e)) } function bo(e) { return async (t, n) => { t.load(n), await e.sync() } } async function Eo(e, t) { const n = e.address.split(\"!\")[1].split(\":\")[0]; let o = 0; for (const [l] of e.values) { if (!l) break; o++ } const i = e.getCell(o - 1, 0); i.load(\"address\"), await t.sync(); const r = i.address.split(\"!\")[1]; return `${n}:${r}` } function wo(e) { e.workbook.worksheets.getActiveWorksheet().getRange(\"A1:A1\").getCell(0, 0).getEntireRow().insert(Excel.InsertShiftDirection.down) } async function Io({ range: e, task: t, config: n, context: o, sheet: i, parameters: r }) { switch (t) { case x.SMART_EXTRACTOR: const l = n.entities.map(({ name: g }) => g); if (r.action == \"insert\" && l.forEach(() => { e.getEntireColumn().getColumnsAfter(1).insert(\"Right\") }), r.hasHeaders) return; const a = Oo(e.address), _ = i.getRange(`${a}2:${a}2`), h = _.getRowsAbove(1).getCell(0, 1), d = _.getRowsAbove(1).getCell(0, l.length); for (const g of [h, d]) g.load(\"address\"); await o.sync(); const s = `${_e(h.address)}:${_e(d.address)}`; i.getRange(s).values = [l]; return; default: r.action == \"insert\" && (e.getEntireColumn().getColumnsAfter(1).insert(\"Right\"), r.includeConfidence && e.getEntireColumn().getColumnsAfter(1).insert(\"Right\")), r.hasHeaders && r.task === x.SMART_EXTRACTOR && (e.getCell(-1, 1).values = [[r.experiment]], r.includeConfidence && (e.getCell(-1, 2).values = [[\"Confidence\"]])) } } function _e(e) { return e.split(\"!\")[1] } function Qe(e) { const t = e.split(\"!\")[1], [n, ...o] = t.split(\":\")[0].split(\"\"); return { startLetter: String.fromCharCode(n.charCodeAt(0) + 1), startNumber: parseInt(o.join(\"\")) } } function ko(e, t) { const n = []; for (let o = 0; o < e.length; o += t) { const i = e.slice(o, o + t); n.push(i) } return n } function So(e, t) { switch (e) { case G.TEXT: return t === x.TEXT_QANDA ? \"question\" : \"text\"; case G.IMAGE: return \"url\"; case G.AUDIO: return \"url\"; default: return \"url\" } } function No(e, t) { if (e.message === \"error\") return Et(e.status); switch (t) { case x.TEXT_QANDA: return e.result[0].answer; case x.SMART_EXTRACTOR: return JSON.stringify(e.result); case x.IMAGE_OBJECT_DETECTION: return JSON.stringify(e.result); case x.IMAGE_OCR: return JSON.stringify(e.result); default: return e.result } } function Ro(e, t) { switch (t) { case x.TEXT_QANDA: return -1; default: return e.confidence_score } } function Oo(e) { const t = e.split(\"!\")[1].match(/[A-Za-z]+/); return t ? t[0] : null } const xo = { [v.TEXT_CLASSIFICATION]: \"text/classification/predict\", [v.TEXT_NER_RESPONSE]: \"text/information-extraction/extract-entities\", [v.TEXT_TRANSLATION]: \"text/translation/translate\", [v.TEXT_QANDA]: \"text/question-answering/ask\", [v.SMART_EXTRACTOR]: \"smart-extraction/extract\", [v.IMAGE_CLASSIFICATION]: \"image/classification/predict\", [v.IMAGE_OBJECT_DETECTION]: \"image/object-detection/detect-from-web\", [v.IMAGE_OCR]: \"image/ocr/recognize-from-web\", [v.IMAGE_FACE_SIMILARITY]: \"face-similarity/predict-from-web\", [v.AUDIO_CLASSIFICATION]: \"audio/classification/predict-from-web\", [v.AUDIO_SPEECH2TEXT]: \"audio/speech2text/transcribe-from-web\" }, $o = \"https://predict.cogniflow.ai\", ge = [{ label: \"Insert results at the right\", value: \"insert\" }, { label: \"Replace results at the right\", value: \"replace\" }], Mo = 0, Po = ({ id: e }) => { const t = () => { W(\"/dashboard\") }, [n, o] = N(null), [i, r] = N(!1), [l, a] = N(ge[0]), [_, h] = N(\"\"), [d, s] = N(!1), { user: g } = fe(); K(() => { r(!0), tn(e).then(({ title: b, type: k, task: $, models: R, config: B, ...Do }) => { o({ title: b, type: k, task: $, models: R, config: B }), h(R[0].id), r(!1) }) }, []); const { api_keys: f } = g, u = n && !!n.models.length && n.models[0], [m, E] = N({ hasHeaders: !1, includeConfidence: !1 }), y = b => { E(k => ({ ...k, [b.target.name]: b.target.checked })) }, T = b => { a(b) }, I = b => { h(b.id) }, w = () => { s(!1) }, C = async () => { let b = xo[n.task]; const k = re.IMAGE === n.type ? \"-from-web\" : \"\"; n.task === v.SMART_EXTRACTOR && (b = `${bt[n.type].toLowerCase()}/${b}`), b = `${$o}/${b}${k}`, s(!0), await go({ ...m, modelId: _, action: l.value, experiment: n.title, experimentConfig: n.config, type: n.type, task: n.task, url: b, apikey: f.find($ => $.provider === Mo).key, predictionCallback: w }) }; return c(\"div\", { children: [c(\"div\", { className: S.nav, children: [c(\"div\", { children: c(\"div\", { className: S.icon, onClick: t, children: c(An, {}) }) }), c(\"h4\", { className: S.title, children: \"Run model\" }), c(\"div\", {})] }), i && c(\"div\", { className: S.loading, children: c(Tt, {}) }), n && c(\"div\", { className: S.content, children: [c(\"div\", { className: S.title, children: c(\"h3\", { children: n && n.title }) }), c(\"div\", { className: S.dropdowns, children: [c(\"div\", { className: S.subtitleBlock, children: [c(\"p\", { children: \"Model to use\" }), c(ce, { initialValue: { label: u.name, id: u.id }, items: n.models.map(({ name: b, id: k }) => ({ label: b, value: k })), onChange: I })] }), c(\"div\", { className: S.subtitleBlock, children: [c(\"p\", { children: \"Place result\" }), c(ce, { initialValue: ge[0], items: ge, onChange: T })] }), c(\"div\", { children: [v.SMART_EXTRACTOR !== n.task && c(\"div\", { className: S.checkboxes, children: [c(\"input\", { type: \"checkbox\", id: \"confidence\", name: \"includeConfidence\", value: m.includeConfidence, onChange: y }), \" \", c(\"label\", { className: S.checkboxText, htmlFor: \"confidence\", children: \"Show confidence\" })] }), c(\"div\", { className: S.checkboxes, children: [c(\"input\", { type: \"checkbox\", id: \"headers\", name: \"hasHeaders\", value: m.hasHeaders, onChange: y }), \" \", c(\"label\", { className: S.checkboxText, htmlFor: \"headers\", children: \"My sheet includes headers\" })] })] })] }), d && c(\"div\", { className: S.warning, children: \"Please do not edit the document while the model is running.\" }), c(\"button\", { className: Ct({ [S.runModel]: !0, [S.runModelDisabled]: d }), onClick: C, disabled: d, children: d ? \"Running model...\" : \"Run model\" })] })] }) }; function Lo() { const { isAuthenticated: e } = fe(); return c(ht, { onChange: async n => { switch (n.url) { case \"/\": e && W(\"/dashboard\", !0); default: e || W(\"/\", !0) } }, children: [c(Rn, { path: \"/\" }), c(ro, { path: \"/dashboard\" }), c(Po, { path: \"/test/:id\" })] }) } xt(c(on, { children: c(Lo, {}) }), document.getElementById(\"app\"));\n"
language: typescript
template:
content: <div id="app"></div>
language: html
style:
content: >
@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap";._logoWrapper_1phh2_1{border-bottom:1px
solid
var(--gray-300);display:flex;justify-content:center}._logoWrapper_1phh2_1
svg{width:300px;height:auto}._formWrapper_1phh2_12{padding:24px 0;margin:0
24px}._subtitle_1phh2_17{font-weight:600;color:var(--gray-800);margin-bottom:24px}._formField_1phh2_23{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}._formField_1phh2_23
label{font-size:14px;font-weight:500;color:var(--gray-800)}._formField_1phh2_23
input{padding:8px;border-radius:4px;font-size:12px;font-family:Poppins,sans-serif;border:1px
solid var(--gray-300)}._formField_1phh2_23
input:focus{outline:none;-webkit-box-shadow:0px 5px 10px -5px
rgba(168,168,168,1);-moz-box-shadow:0px 5px 10px -5px
rgba(168,168,168,1);box-shadow:0 5px 10px -5px
#a8a8a8}._loginButton_1phh2_52{margin-top:24px;padding:10px
8px;border-radius:4px;font-size:14px;font-family:Poppins,sans-serif;border:1px
solid
var(--gray-300);background-color:var(--primary-color);color:var(--white-color);cursor:pointer;border:none;font-weight:600;width:100%;-webkit-box-shadow:0px
5px 10px -5px rgba(253,121,114,1);-moz-box-shadow:0px 5px 10px -5px
rgba(253,121,114,1);box-shadow:0 5px 10px -5px
#fd7972}._loginButton_1phh2_52:hover{background-color:#fd7972}._info_1phh2_74{line-height:1.2;margin-bottom:12px;font-size:14px;color:var(--gray-600)}._link_1phh2_81{color:var(--primary-color);cursor:pointer;font-weight:600;text-decoration:underline}._errorWrapper_1phh2_88{margin-top:12px;padding:8px;border-radius:4px;background-color:#fde2e2;border:1px
solid
#fca5a5;color:#c53030;font-size:12px;font-weight:500}._lds-ring_1im9c_1{display:inline-block;position:relative;width:80px;height:80px}._lds-ring_1im9c_1
div{box-sizing:border-box;display:block;position:absolute;width:64px;height:64px;margin:8px;border:8px
solid var(--secondary-color);border-radius:50%;animation:_lds-ring_1im9c_1
1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--secondary-color)
transparent transparent transparent}._lds-ring_1im9c_1
div:nth-child(1){animation-delay:-.45s}._lds-ring_1im9c_1
div:nth-child(2){animation-delay:-.3s}._lds-ring_1im9c_1
div:nth-child(3){animation-delay:-.15s}@keyframes
_lds-ring_1im9c_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._trigger-button_7fpzl_1{padding:5px
10px;background:var(--white-color);color:var(--secondary-color);font-size:16px;border:1px
solid
var(--secondary-color-100);border-radius:3px;cursor:pointer;font-size:14px;display:flex;justify-content:space-between;align-items:center}._trigger-button_7fpzl_1:hover{background:#f6f6f6}._dropdown-wrapper_7fpzl_19{position:relative;width:100%}._dropdown-wrapper_7fpzl_19
._dropdown_7fpzl_19{background:#fff;width:200px;position:absolute;top:50px;left:0;font-family:Poppins;font-size:14px;display:flex;align-items:center}ul{background:#fff;color:#000;list-style:none;margin:0;font-size:16px;overflow:hidden;height:0px;position:absolute;transition:height
.3s
ease;padding:0;z-index:1}ul._active_7fpzl_51{height:120px;overflow:auto;position:absolute;width:100%;-webkit-box-shadow:0px
5px 10px -5px rgba(168,168,168,1);-moz-box-shadow:0px 5px 10px -5px
rgba(168,168,168,1);box-shadow:0 5px 10px -5px
#a8a8a8}li{margin-bottom:2px;padding:10px;font-size:12px;transition:all .2s
ease}li:hover{font-weight:600;cursor:pointer;background-color:var(--primary-color);color:#fff}._nav_1arwg_1{display:flex;border-bottom:1px
solid var(--gray-300);padding:0
16px;margin-bottom:12px}._nav_1arwg_1>div{flex:1;display:flex;align-items:center}._nav_1arwg_1
h4{margin:12px
0;font-weight:600;color:var(--primary-color)}._logout_1arwg_19{display:flex}._logout_1arwg_19
div{display:flex;justify-content:flex-start}._logout_1arwg_19
svg{width:18px;height:18px}._logoutItems_1arwg_33{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background-color:var(--gray-200);padding:3px;cursor:pointer}._dropdowns_1arwg_49{display:flex;gap:12px;margin-bottom:14px}._dropdowns_1arwg_49>div{width:100%}._dropdownLabel_1arwg_60{font-weight:600;margin-bottom:8px;font-size:12px}._experimentItem_1arwg_67{cursor:pointer}._content_1arwg_71{margin:0
24px}._cardsWrapper_1arwg_75{margin-top:20px;display:grid;grid-template-columns:repeat(4,1fr);flex-direction:column;gap:20px}._loader_1arwg_83{display:flex;justify-content:center;align-items:center;margin-top:42px}@media
(max-width:
1024px){._cardsWrapper_1arwg_75{grid-template-columns:repeat(3,1fr)}}@media
(max-width:
768px){._cardsWrapper_1arwg_75{grid-template-columns:repeat(2,1fr)}}@media
(max-width:
480px){._cardsWrapper_1arwg_75{grid-template-columns:repeat(1,1fr)}}._card_1pg1x_1{height:130px;box-shadow:0
10px 24px #00000012;border-radius:5px;padding:14px;transition:all .2s
ease;overflow:hidden;position:relative}._wave_1pg1x_16{position:absolute;top:-15px;transform:rotate(183deg);left:0;z-index:-1;width:105%}._imgBackground_1pg1x_25{background-image:url(https://app.cogniflow.ai/img/imgTextPattern.png);height:45px}._card_1pg1x_1:hover{box-shadow:none}._title_1pg1x_35{font-size:16px;font-weight:600;color:var(--gray-700);margin:50px
0
0;text-align:center;color:#000}._experimentClassification_1pg1x_44{font-size:12px;color:var(--gray-800);text-align:center;font-weight:600;margin:0}._image_1pg1x_53{width:40px;height:40px;border-radius:12px;position:absolute;top:15px;left:50%;transform:translate(-50%);overflow:hidden;display:flex;justify-content:center;align-items:center}._image_1pg1x_53>img{object-fit:contain;width:100%;height:100%}._dot_1pg1x_74{width:4px;height:4px;border:1px
solid
var(--gray-400)}._cardFooter_1pg1x_82{display:flex;justify-content:center;align-items:center;gap:4px}._nav_r1i7b_1{display:flex;border-bottom:1px
solid var(--gray-300);padding:0
16px;margin-bottom:12px}._nav_r1i7b_1>div{flex:1;display:flex;align-items:center}._nav_r1i7b_1
h4{margin:12px
0;font-weight:600;color:var(--primary-color)}._title_r1i7b_20{text-align:center}._icon_r1i7b_24{width:24px;height:24px;border-radius:50%;background-color:var(--gray-200);padding:3px}._content_r1i7b_32{margin:0
24px}._dropdowns_r1i7b_36{display:flex;flex-direction:column;gap:12px}._runModel_r1i7b_42{padding:10px
8px;border-radius:4px;font-size:14px;font-family:Poppins,sans-serif;border:1px
solid
var(--gray-300);background-color:var(--primary-color);color:var(--white-color);cursor:pointer;border:none;font-weight:600;width:100%;-webkit-box-shadow:0px
5px 10px -5px rgba(253,121,114,1);-moz-box-shadow:0px 5px 10px -5px
rgba(253,121,114,1);box-shadow:0 5px 10px -5px
#fd7972;margin-top:12px}._runModel_r1i7b_42:hover{background-color:#fd7972}._title_r1i7b_20
h3{font-weight:500}._subtitleBlock_r1i7b_68{font-size:14px}._subtitleBlock_r1i7b_68
p{margin:8px
0}._checkboxes_r1i7b_76{display:flex;align-items:center;margin-top:12px;gap:4px}._checkboxText_r1i7b_83{font-size:14px}._loading_r1i7b_87{display:flex;justify-content:center;align-items:center}._runModelDisabled_r1i7b_93{margin-top:32px;padding:10px
8px;border-radius:4px;font-size:14px;font-family:Poppins,sans-serif;border:1px
solid
var(--gray-300);background-color:var(--gray-300);color:var(--white-color);cursor:pointer;border:none;font-weight:600;width:100%}._warning_r1i7b_108{background-color:#ffffce;font-size:12px;font-weight:500;margin-top:24px;padding:12px}body,p,span,div,button,h1,h2,h3,h4,h5,h6{font-family:Poppins,sans-serif}body{margin:0}:root{--secondary-color:
#272c4d;--secondary-color-100: #d8ddeb;--primary-color:
#ff6a61;--white-color: #fff;--black-color: #000;--warning-color:
#ffff61;--gray-100: #f7fafc;--gray-200: #edf2f7;--gray-300:
#e2e8f0;--gray-400: #cbd5e0;--gray-500: #a0aec0;--gray-600:
#718096;--gray-700: #4a5568;--gray-800: #2d3748}
language: css
libraries: |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
office-ui-fabric-js@1.4.0/dist/css/fabric.min.css
office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css
core-js@2.4.1/client/core.min.js
@types/core-js
jquery@3.1.1
@types/jquery@3.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment