You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

471 lines
13 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyBootstrap4 = {}));
  5. }(this, (function (exports) { 'use strict';
  6. function _typeof(obj) {
  7. "@babel/helpers - typeof";
  8. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  9. _typeof = function (obj) {
  10. return typeof obj;
  11. };
  12. } else {
  13. _typeof = function (obj) {
  14. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  15. };
  16. }
  17. return _typeof(obj);
  18. }
  19. function _classCallCheck(instance, Constructor) {
  20. if (!(instance instanceof Constructor)) {
  21. throw new TypeError("Cannot call a class as a function");
  22. }
  23. }
  24. function _defineProperties(target, props) {
  25. for (var i = 0; i < props.length; i++) {
  26. var descriptor = props[i];
  27. descriptor.enumerable = descriptor.enumerable || false;
  28. descriptor.configurable = true;
  29. if ("value" in descriptor) descriptor.writable = true;
  30. Object.defineProperty(target, descriptor.key, descriptor);
  31. }
  32. }
  33. function _createClass(Constructor, protoProps, staticProps) {
  34. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  35. if (staticProps) _defineProperties(Constructor, staticProps);
  36. return Constructor;
  37. }
  38. function _inherits(subClass, superClass) {
  39. if (typeof superClass !== "function" && superClass !== null) {
  40. throw new TypeError("Super expression must either be null or a function");
  41. }
  42. subClass.prototype = Object.create(superClass && superClass.prototype, {
  43. constructor: {
  44. value: subClass,
  45. writable: true,
  46. configurable: true
  47. }
  48. });
  49. if (superClass) _setPrototypeOf(subClass, superClass);
  50. }
  51. function _getPrototypeOf(o) {
  52. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  53. return o.__proto__ || Object.getPrototypeOf(o);
  54. };
  55. return _getPrototypeOf(o);
  56. }
  57. function _setPrototypeOf(o, p) {
  58. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  59. o.__proto__ = p;
  60. return o;
  61. };
  62. return _setPrototypeOf(o, p);
  63. }
  64. function _isNativeReflectConstruct() {
  65. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  66. if (Reflect.construct.sham) return false;
  67. if (typeof Proxy === "function") return true;
  68. try {
  69. Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
  70. return true;
  71. } catch (e) {
  72. return false;
  73. }
  74. }
  75. function _assertThisInitialized(self) {
  76. if (self === void 0) {
  77. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  78. }
  79. return self;
  80. }
  81. function _possibleConstructorReturn(self, call) {
  82. if (call && (typeof call === "object" || typeof call === "function")) {
  83. return call;
  84. }
  85. return _assertThisInitialized(self);
  86. }
  87. function _createSuper(Derived) {
  88. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  89. return function _createSuperInternal() {
  90. var Super = _getPrototypeOf(Derived),
  91. result;
  92. if (hasNativeReflectConstruct) {
  93. var NewTarget = _getPrototypeOf(this).constructor;
  94. result = Reflect.construct(Super, arguments, NewTarget);
  95. } else {
  96. result = Super.apply(this, arguments);
  97. }
  98. return _possibleConstructorReturn(this, result);
  99. };
  100. }
  101. function _toConsumableArray(arr) {
  102. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  103. }
  104. function _arrayWithoutHoles(arr) {
  105. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  106. }
  107. function _iterableToArray(iter) {
  108. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  109. }
  110. function _unsupportedIterableToArray(o, minLen) {
  111. if (!o) return;
  112. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  113. var n = Object.prototype.toString.call(o).slice(8, -1);
  114. if (n === "Object" && o.constructor) n = o.constructor.name;
  115. if (n === "Map" || n === "Set") return Array.from(o);
  116. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  117. }
  118. function _arrayLikeToArray(arr, len) {
  119. if (len == null || len > arr.length) len = arr.length;
  120. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  121. return arr2;
  122. }
  123. function _nonIterableSpread() {
  124. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  125. }
  126. function noop() {}
  127. function run(fn) {
  128. return fn();
  129. }
  130. function blank_object() {
  131. return Object.create(null);
  132. }
  133. function run_all(fns) {
  134. fns.forEach(run);
  135. }
  136. function is_function(thing) {
  137. return typeof thing === 'function';
  138. }
  139. function safe_not_equal(a, b) {
  140. return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function';
  141. }
  142. function is_empty(obj) {
  143. return Object.keys(obj).length === 0;
  144. }
  145. function detach(node) {
  146. node.parentNode.removeChild(node);
  147. }
  148. function children(element) {
  149. return Array.from(element.childNodes);
  150. }
  151. var current_component;
  152. function set_current_component(component) {
  153. current_component = component;
  154. }
  155. var dirty_components = [];
  156. var binding_callbacks = [];
  157. var render_callbacks = [];
  158. var flush_callbacks = [];
  159. var resolved_promise = Promise.resolve();
  160. var update_scheduled = false;
  161. function schedule_update() {
  162. if (!update_scheduled) {
  163. update_scheduled = true;
  164. resolved_promise.then(flush);
  165. }
  166. }
  167. function add_render_callback(fn) {
  168. render_callbacks.push(fn);
  169. }
  170. var flushing = false;
  171. var seen_callbacks = new Set();
  172. function flush() {
  173. if (flushing) return;
  174. flushing = true;
  175. do {
  176. // first, call beforeUpdate functions
  177. // and update components
  178. for (var i = 0; i < dirty_components.length; i += 1) {
  179. var component = dirty_components[i];
  180. set_current_component(component);
  181. update(component.$$);
  182. }
  183. set_current_component(null);
  184. dirty_components.length = 0;
  185. while (binding_callbacks.length) {
  186. binding_callbacks.pop()();
  187. } // then, once components are updated, call
  188. // afterUpdate functions. This may cause
  189. // subsequent updates...
  190. for (var _i = 0; _i < render_callbacks.length; _i += 1) {
  191. var callback = render_callbacks[_i];
  192. if (!seen_callbacks.has(callback)) {
  193. // ...so guard against infinite loops
  194. seen_callbacks.add(callback);
  195. callback();
  196. }
  197. }
  198. render_callbacks.length = 0;
  199. } while (dirty_components.length);
  200. while (flush_callbacks.length) {
  201. flush_callbacks.pop()();
  202. }
  203. update_scheduled = false;
  204. flushing = false;
  205. seen_callbacks.clear();
  206. }
  207. function update($$) {
  208. if ($$.fragment !== null) {
  209. $$.update();
  210. run_all($$.before_update);
  211. var dirty = $$.dirty;
  212. $$.dirty = [-1];
  213. $$.fragment && $$.fragment.p($$.ctx, dirty);
  214. $$.after_update.forEach(add_render_callback);
  215. }
  216. }
  217. var outroing = new Set();
  218. function transition_in(block, local) {
  219. if (block && block.i) {
  220. outroing["delete"](block);
  221. block.i(local);
  222. }
  223. }
  224. function mount_component(component, target, anchor) {
  225. var _component$$$ = component.$$,
  226. fragment = _component$$$.fragment,
  227. on_mount = _component$$$.on_mount,
  228. on_destroy = _component$$$.on_destroy,
  229. after_update = _component$$$.after_update;
  230. fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
  231. add_render_callback(function () {
  232. var new_on_destroy = on_mount.map(run).filter(is_function);
  233. if (on_destroy) {
  234. on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy));
  235. } else {
  236. // Edge case - component was destroyed immediately,
  237. // most likely as a result of a binding initialising
  238. run_all(new_on_destroy);
  239. }
  240. component.$$.on_mount = [];
  241. });
  242. after_update.forEach(add_render_callback);
  243. }
  244. function destroy_component(component, detaching) {
  245. var $$ = component.$$;
  246. if ($$.fragment !== null) {
  247. run_all($$.on_destroy);
  248. $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
  249. // preserve final state?)
  250. $$.on_destroy = $$.fragment = null;
  251. $$.ctx = [];
  252. }
  253. }
  254. function make_dirty(component, i) {
  255. if (component.$$.dirty[0] === -1) {
  256. dirty_components.push(component);
  257. schedule_update();
  258. component.$$.dirty.fill(0);
  259. }
  260. component.$$.dirty[i / 31 | 0] |= 1 << i % 31;
  261. }
  262. function init(component, options, instance, create_fragment, not_equal, props) {
  263. var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1];
  264. var parent_component = current_component;
  265. set_current_component(component);
  266. var prop_values = options.props || {};
  267. var $$ = component.$$ = {
  268. fragment: null,
  269. ctx: null,
  270. // state
  271. props: props,
  272. update: noop,
  273. not_equal: not_equal,
  274. bound: blank_object(),
  275. // lifecycle
  276. on_mount: [],
  277. on_destroy: [],
  278. before_update: [],
  279. after_update: [],
  280. context: new Map(parent_component ? parent_component.$$.context : []),
  281. // everything else
  282. callbacks: blank_object(),
  283. dirty: dirty,
  284. skip_bound: false
  285. };
  286. var ready = false;
  287. $$.ctx = instance ? instance(component, prop_values, function (i, ret) {
  288. var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret;
  289. if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
  290. if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);
  291. if (ready) make_dirty(component, i);
  292. }
  293. return ret;
  294. }) : [];
  295. $$.update();
  296. ready = true;
  297. run_all($$.before_update); // `false` as a special case of no DOM component
  298. $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
  299. if (options.target) {
  300. if (options.hydrate) {
  301. var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  302. $$.fragment && $$.fragment.l(nodes);
  303. nodes.forEach(detach);
  304. } else {
  305. // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  306. $$.fragment && $$.fragment.c();
  307. }
  308. if (options.intro) transition_in(component.$$.fragment);
  309. mount_component(component, options.target, options.anchor);
  310. flush();
  311. }
  312. set_current_component(parent_component);
  313. }
  314. var SvelteComponent = /*#__PURE__*/function () {
  315. function SvelteComponent() {
  316. _classCallCheck(this, SvelteComponent);
  317. }
  318. _createClass(SvelteComponent, [{
  319. key: "$destroy",
  320. value: function $destroy() {
  321. destroy_component(this, 1);
  322. this.$destroy = noop;
  323. }
  324. }, {
  325. key: "$on",
  326. value: function $on(type, callback) {
  327. var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
  328. callbacks.push(callback);
  329. return function () {
  330. var index = callbacks.indexOf(callback);
  331. if (index !== -1) callbacks.splice(index, 1);
  332. };
  333. }
  334. }, {
  335. key: "$set",
  336. value: function $set($$props) {
  337. if (this.$$set && !is_empty($$props)) {
  338. this.$$.skip_bound = true;
  339. this.$$set($$props);
  340. this.$$.skip_bound = false;
  341. }
  342. }
  343. }]);
  344. return SvelteComponent;
  345. }();
  346. var position = "PrependContainer";
  347. var defaults = {};
  348. function init$1(eventDetail) {
  349. eventDetail.defaults.styling = {
  350. prefix: "bootstrap4",
  351. container: "alert",
  352. notice: "alert-warning",
  353. info: "alert-info",
  354. success: "alert-success",
  355. error: "alert-danger",
  356. // Confirm Module
  357. "action-bar": "bootstrap4-ml",
  358. "prompt-bar": "bootstrap4-ml",
  359. btn: "btn mx-1",
  360. "btn-primary": "btn-primary",
  361. "btn-secondary": "btn-secondary",
  362. input: "form-control"
  363. };
  364. }
  365. var Bootstrap4 = /*#__PURE__*/function (_SvelteComponent) {
  366. _inherits(Bootstrap4, _SvelteComponent);
  367. var _super = _createSuper(Bootstrap4);
  368. function Bootstrap4(options) {
  369. var _this;
  370. _classCallCheck(this, Bootstrap4);
  371. _this = _super.call(this);
  372. init(_assertThisInitialized(_this), options, null, null, safe_not_equal, {});
  373. return _this;
  374. }
  375. return Bootstrap4;
  376. }(SvelteComponent);
  377. exports.default = Bootstrap4;
  378. exports.defaults = defaults;
  379. exports.init = init$1;
  380. exports.position = position;
  381. Object.defineProperty(exports, '__esModule', { value: true });
  382. })));