Onionr/static-data/www/shared/node_modules/pnotify/dist/iife/PNotifyConfirm.js

2 lines
11 KiB
JavaScript
Raw Permalink Normal View History

var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_extends=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},PNotifyConfirm=function(e){"use strict";e=e&&e.__esModule?e.default:e;var t;function n(t){var n=this._svelte,e=n.component,i=n.ctx;e.handleClick(i.button,t)}function f(t,n,e){var i=Object.create(t);return i.button=n[e],i}function i(e,t){var i,o=(t.confirm||t.prompt)&&r(e,t);return{c:function(){o&&o.c(),i=document.createComment("")},m:function(t,n){o&&o.m(t,n),g(t,i,n)},p:function(t,n){n.confirm||n.prompt?o?o.p(t,n):((o=r(e,n)).c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d:function(t){o&&o.d(t),t&&h(i)}}}function r(o,n){for(var r,s,u,c,a=n.prompt&&m(o,n),l=n.buttons,p=[],t=0;t<l.length;t+=1)p[t]=y(o,f(n,l,t));return{c:function(){r=_("div"),a&&a.c(),s=b("\n "),u=_("div");for(var t=0;t<p.length;t+=1)p[t].c();u.className=c="\n ui-pnotify-action-bar\n "+(n._notice.get()._styles.actionBar?n._notice.get()._styles.actionBar:"")+"\n "+(n._notice.get()._styles.text?n._notice.get()._styles.text:"")+"\n svelte-1y9suua",v(u,"justify-content",n.align),r.className="ui-pnotify-confirm"},m:function(t,n){g(t,r,n),a&&a.m(r,null),d(r,s),d(r,u);for(var e=0;e<p.length;e+=1)p[e].m(u,null);o.refs.buttons=u},p:function(t,n){if(n.prompt?a?a.p(t,n):((a=m(o,n)).c(),a.m(r,s)):a&&(a.d(1),a=null),t.buttons||t._notice){l=n.buttons;for(var e=0;e<l.length;e+=1){var i=f(n,l,e);p[e]?p[e].p(t,i):(p[e]=y(o,i),p[e].c(),p[e].m(u,null))}for(;e<p.length;e+=1)p[e].d(1);p.length=l.length}t._notice&&c!==(c="\n ui-pnotify-action-bar\n "+(n._notice.get()._styles.actionBar?n._notice.get()._styles.actionBar:"")+"\n "+(n._notice.get()._styles.text?n._notice.get()._styles.text:"")+"\n svelte-1y9suua")&&(u.className=c),t.align&&v(u,"justify-content",n.align)},d:function(t){t&&h(r),a&&a.d(),function(t,n){for(var e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(p,t),o.refs.buttons===u&&(o.refs.buttons=null)}}}function m(e,t){var i,o;function r(t){return t.promptMultiLine?a:c}var s=r(t),u=s(e,t);return{c:function(){i=_("div"),u.c(),i.className=o="\n ui-pnotify-prompt-bar\n "+(t._notice.get()._styles.promptBar?t._notice.get()._styles.promptBar:"")+"\n "+(t._notice.get()._styles.text?t._notice.get()._styles.text:"")+"\n svelte-1y9suua"},m:function(t,n){g(t,i,n),u.m(i,null)},p:function(t,n){s===(s=r(n))&&u?u.p(t,n):(u.d(1),(u=s(e,n)).c(),u.m(i,null)),t._notice&&o!==(o="\n ui-pnotify-prompt-bar\n "+(n._notice.get()._styles.promptBar?n._notice.get()._styles.promptBar:"")+"\n "+(n._notice.get()._styles.text?n._notice.get()._styles.text:"")+"\n svelte-1y9suua")&&(i.className=o)},d:function(t){t&&h(i),u.d()}}}function c(e,i){var o,r,s=!1;function n(){s=!0,e.set({promptValue:o.value}),s=!1}function u(t){e.handleKeyPress(t)}return{c:function(){x(o=_("input"),"input",n),x(o,"keypress",u),function(t,n,e){null==e?t.removeAttribute(n):t.setAttribute(n,e)}(o,"type","text"),o.className=r="\n ui-pnotify-prompt-input\n "+(i._notice.get()._styles.input?i._notice.get()._styles.input:"")+"\n "+i.promptClass+"\n svelte-1y9suua"},m:function(t,n){g(t,o,n),(e.refs.promptSingle=o).value=i.promptValue},p:function(t,n){!s&&t.promptValue&&(o.value=n.promptValue),(t._notice||t.promptClass)&&r!==(r="\n ui-pnotify-prompt-input\n "+(n._notice.get()._styles.input?n._notice.get()._styles.input:"")+"\n "+n.promptClass+"\n svelte-1y9suua")&&(o.className=r)},d:function(t){t&&h(o),C(o,"input",n),C(o,"keypress",u),e.refs.promptSingle===o&&(e.refs.promptSingle=null)}}}function a(e,i){var o,r,s=!1;function n(){s=!0,e.set({promptValue:o.value}),s=!1}function u(t){e.handleKeyPre
//# sourceMappingURL=PNotifyConfirm.js.map