Socket
Socket
Sign inDemoInstall

atomic-router

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atomic-router - npm Package Compare versions

Comparing version 0.5.0-dev.10 to 0.5.0-dev.11

77

dist/atomic-router.cjs.development.js

@@ -1101,2 +1101,6 @@ 'use strict';

sid: "ghza91"
});
var $isFirstCheckPassed = effector.createStore(false, {
name: "$isFirstCheckPassed",
sid: "-bpyumz"
}); // @ts-expect-error

@@ -1109,3 +1113,3 @@

name: "$history",
sid: "-7h197a"
sid: "-6zzmt3"
});

@@ -1131,3 +1135,3 @@ $history.on(setHistory, function (_, nextHistory) {

name: "pushFx",
sid: "ejo7z4"
sid: "oynwne"
}

@@ -1153,3 +1157,3 @@ }); // Triggered whenever some route.navigate.doneData is triggered

name: "openedFx",
sid: "1o3d9f"
sid: "254znm"
}); // Recalculate opened/closed routes

@@ -1186,3 +1190,3 @@

name: "recalculateFx",
sid: "-7w9bjj"
sid: "-7f7p5c"
});

@@ -1209,3 +1213,3 @@ $path.on(recalculateFx.done, function (_prev, _ref4) {

or: {
sid: "7dceng"
sid: "7dw78t"
}

@@ -1228,3 +1232,3 @@ }); // sample({

or: {
sid: "7tu8ga"
sid: "7ue11n"
}

@@ -1245,3 +1249,3 @@ });

name: "$isOpenedManually",
sid: "cf3gjv"
sid: "cw52y2"
}); // Watch for route.navigate.doneData to build new path and push

@@ -1266,3 +1270,3 @@

or: {
sid: "-jwvp5p"
sid: "-jwbwkc"
}

@@ -1287,3 +1291,3 @@ });

name: "opened",
sid: "ankvn"
sid: "rp79u"
}

@@ -1298,3 +1302,3 @@ }),

name: "updated",
sid: "-xpqf1c"
sid: "-x8osn5"
}

@@ -1309,3 +1313,3 @@ }),

name: "closed",
sid: "2t1awe"
sid: "d80zko"
}

@@ -1328,3 +1332,3 @@ })

name: "updated",
sid: "-i38vyc"
sid: "-hm79k5"
}

@@ -1336,3 +1340,3 @@ });

name: "source",
sid: "-1th5mi"
sid: "-1cfj8b"
}),

@@ -1352,3 +1356,3 @@ clock: effector.guard({

name: "clock",
sid: "cdcuni"
sid: "cueh1p"
}

@@ -1362,3 +1366,3 @@ }),

or: {
sid: "-i4jrqg"
sid: "-i3zz53"
}

@@ -1376,3 +1380,3 @@ }); // Trigger .opened() for the routes marked as "opened"

or: {
sid: "-hlayyt"
sid: "-hkr6dg"
}

@@ -1387,3 +1391,3 @@ }); // Trigger .closed() for the routes marked as "closed"

or: {
sid: "-h6giy2"
sid: "-h5wqcp"
}

@@ -1397,3 +1401,3 @@ }); // Reset $isOpenedManually

or: {
sid: "-wz7y6w"
sid: "-wi6bsp"
}

@@ -1447,3 +1451,3 @@ }));

name: "recheckFx",
sid: "fr6h5h"
sid: "g883jo"
}

@@ -1457,3 +1461,3 @@ });

or: {
sid: "-g52ioy"
sid: "-g4iq3l"
}

@@ -1504,3 +1508,3 @@ }); // Triggered whenever history instance is set

name: "subscribeHistoryFx",
sid: "bp94to"
sid: "c6ar7v"
}

@@ -1517,3 +1521,3 @@ }); // If `hydrate` flag is set,

or: {
sid: "-4uqk3n"
sid: "-4u6ria"
}

@@ -1529,5 +1533,31 @@ });

or: {
sid: "-4rzl8a"
sid: "-4rfsmx"
}
});
$isFirstCheckPassed.on(recalculateFx.doneData, function () {
return true;
}).reset($history);
var initialized = effector.sample({
and: [{
clock: effector.guard({
and: [{
clock: $isFirstCheckPassed,
filter: Boolean
}],
or: {
name: "clock",
sid: "cb8dke"
}
}),
source: {
activeRoutes: $activeRoutes,
path: $path,
query: $query
}
}],
or: {
name: "initialized",
sid: "r0pz07"
}
});
return {

@@ -1541,2 +1571,3 @@ $path: $path,

routes: remappedRoutes,
initialized: initialized,
routeNotFound: routeNotFound

@@ -1543,0 +1574,0 @@ };

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("effector"),t=require("path-to-regexp");function r(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,u,"next",e)}function u(e){r(i,o,a,c,u,"throw",e)}c(void 0)}))}}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=(function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=Object.create((t&&t.prototype instanceof f?t:f).prototype),a=new k(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=b(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function f(){}function p(){}function l(){}var h={};c(h,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&r.call(y,o)&&(h=y);var v=l.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var n;this._invoke=function(o,a){function i(){return new t((function(n,i){!function n(o,a,i,c){var u=s(e[o],e,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){d.value=e,i(d)}),(function(e){return n("throw",e,i,c)}))}c(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function b(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:q}}function q(){return{value:void 0,done:!0}}return p.prototype=l,c(v,"constructor",l),c(l,"constructor",p),p.displayName=c(l,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(c={exports:{}}),c.exports),s={ROUTE:Symbol()},d=function(){var t=e.createEffect(function(){var e=n(u.mark((function e(t){return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{params:t.params||{},query:t.query||{}});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{name:"navigateFx",sid:"-apj8ex"}),r=e.attach({and:{effect:t,mapParams:function(e){return{params:e||{},query:{}}}},or:{name:"openFx",sid:"-ju5g7s"}}),o=e.createStore(!1,{name:"$isOpened",sid:"7ntohw"}),a=e.createStore({},{name:"$params",sid:"1blfp4"}),i=e.createStore({},{name:"$query",sid:"rvelj"}),c=e.createEvent({name:"opened",sid:"-f8s17u"}),d=e.createEvent({name:"updated",sid:"slzlyp"}),f=e.createEvent({name:"left",sid:"yy6ys3"}),p=e.createEvent({name:"closed",sid:"-say4ff"});return o.on(c,(function(){return!0})).on(f,(function(){return!1})),a.on(c,(function(e,t){return t.params})).on(d,(function(e,t){return t.params})),i.on(c,(function(e,t){return t.query})).on(d,(function(e,t){return t.query})),e.split({and:[{source:t.doneData,match:o.map((function(e){return e?"updated":"opened"})),cases:{opened:c,updated:d}}],or:{sid:"-x6h86m"}}),e.sample({and:[{clock:p,target:f}],or:{sid:"-wqj6z5"}}),{$isOpened:o,$params:a,$query:i,opened:c,updated:d,closed:p,left:f,navigate:t,open:r,kind:s.ROUTE}};function f(e){var r=e.params,n=e.query;return t.compile(e.pathCreator)(r)+(Object.keys(n).length?"?"+new URLSearchParams(n):"")}function p(e){var r=e.actualPath,n=t.match(e.pathCreator)(new URL("http://_"+r).pathname);return n?{matches:!0,params:n.params}:{matches:!1}}var l=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(e[r]!==t[r])return!1;return!0},h=e.createEffect((function(e){if(!e.history)throw new Error("[Routing] No history provided");return e.history[e.method](e.path,{}),e}),{name:"historyPushFx",sid:"t43sn8"}),m=function(e){return"object"==typeof e&&null!==e&&"kind"in e&&e.kind===s.ROUTE},y=function(t){return e.is.store(t,{sid:"-v906zu"})?t:e.createStore(t,{sid:"-v904rr"})};exports.Kind=s,exports.buildPath=f,exports.chainRoute=function(t){var r=function(t){if(m(t))return{route:t,chainedRoute:e.withFactory({sid:"jogy9l",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:e.createEvent({name:"beforeOpen",sid:"8mpttm"}),openOn:[t.opened,t.closed],cancelOn:[e.createEvent({name:"cancelOn",sid:"ahjdm4"})]};var r=t;if(!("enterOn"in r)&&e.is.effect(r.beforeOpen,{sid:"fx5yhy"}))return{route:r.route,chainedRoute:r.chainedRoute||e.withFactory({sid:"fyulbq",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:r.beforeOpen,openOn:r.beforeOpen.doneData,cancelOn:r.beforeOpen.failData};var n=t;return{route:n.route,chainedRoute:n.chainedRoute||e.withFactory({sid:"u6793u",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:n.beforeOpen,openOn:e.sample({and:[{clock:n.openOn}],or:{name:"openOn",sid:"-mm7rdb"}}),cancelOn:e.sample({and:[{clock:n.cancelOn||e.createEvent({name:"clock",sid:"y2etk0"})}],or:{name:"cancelOn",sid:"-vntqxj"}})}}(t),n=r.route,o=r.chainedRoute,a=r.beforeOpen,i=r.openOn,c=r.cancelOn,u=e.createStore({},{name:"$params",sid:"ru233x"}),s=e.createStore({},{name:"$query",sid:"2tnaew"}),f=e.combine({and:[e.combine({and:[[n.$params,n.$query]],or:{name:"and",sid:"-t8sbqu"}}),e.combine({and:[[u,s]],or:{name:"and",sid:"-t8s8s2"}}),function(e,t){return e[0]===t[0]&&e[1]===t[1]}],or:{name:"$hasSameParams",sid:"-w0fyuc"}}),p=e.sample({and:[{clock:[n.opened,n.updated]}],or:{name:"routeOpened",sid:"nobe5z"}});e.sample({and:[{clock:p,target:a}],or:{sid:"n0i9a7"}}),u.on(p,(function(e,t){return t.params})),s.on(p,(function(e,t){return t.query}));var l=e.guard({and:[{clock:i,source:{params:u,query:s},filter:f}],or:{name:"chainedRouteResolved",sid:"-qurk3a"}});e.sample({and:[{clock:l,target:o.navigate}],or:{sid:"ningv4"}});var h=e.merge([n.closed,c],{name:"aborted",sid:"-qm6c6a"});return u.reset(h),s.reset(h),e.sample({and:[{clock:h,target:o.closed}],or:{sid:"nz5any"}}),o},exports.createHistoryRouter=function(t){var r=function(e){for(var t,r=[],n=function(){var e=t.value;Array.isArray(e.route)?r.push.apply(r,e.route.map((function(t){return o({},e,{route:t})}))):r.push(e)},a=i(e);!(t=a()).done;)n();return r}(t.routes),a=e.createEvent({name:"setHistory",sid:"-clu30d"}),c=e.createEvent({name:"routeNotFound",sid:"-xnr4av"}),s=e.createStore({},{name:"$query",sid:"i4zffs"}),d=e.createStore("",{name:"$path",sid:"-rt73a5"}),m=e.createStore([],{and:{serialize:"ignore"},name:"$activeRoutes",sid:"ghza91"}),y=e.createStore(null,{and:{serialize:"ignore"},name:"$history",sid:"-7h197a"});y.on(a,(function(e,t){return t}));var v=e.attach({and:{source:{history:y},effect:h,mapParams:function(e,t){return o({history:t.history},e)}},or:{name:"pushFx",sid:"ejo7z4"}}),g=e.createEffect((function(e){var t=e.params,r=e.query;return{path:f({pathCreator:e.route.path,params:t,query:r}),params:t,query:r,method:"push"}}),{name:"openedFx",sid:"1o3d9f"}),w=e.createEffect((function(e){for(var t,n=e.path,o=e.query,a=[],c=[],u=i(r);!(t=u()).done;){var s=t.value,d=p({pathCreator:s.path,actualPath:n});(d.matches?a:c).push({route:s,params:d.params,query:o})}return{opened:a,closed:c}}),{name:"recalculateFx",sid:"-7w9bjj"});d.on(w.done,(function(e,t){return t.params.path})),s.on(w.done,(function(e,t){return t.params.query})),m.on(w.doneData,(function(e,t){return t.opened.map((function(e){return e.route.route}))})),e.sample({and:[{clock:g.doneData,target:v}],or:{sid:"7dceng"}}),e.guard({and:[{clock:w.doneData,filter:function(e){return 0===e.opened.length},target:c}],or:{sid:"7tu8ga"}});for(var b,x=w.doneData.map((function(e){return e.opened})),O=w.doneData.map((function(e){return e.closed})),k=function(){var t=b.value,r=e.createStore(!1,{name:"$isOpenedManually",sid:"cf3gjv"}),n=t.route.navigate.done;e.sample({and:[{clock:n,fn:function(e){var r=e.result;return{route:t,params:r.params,query:r.query}},target:g}],or:{sid:"-jwvp5p"}});var o=function(e){return e.find((function(e){return e.route===t}))},a={opened:e.guard({and:[{clock:x.filterMap(o),filter:t.route.$isOpened.map((function(e){return!e}))}],or:{name:"opened",sid:"ankvn"}}),updated:e.guard({and:[{clock:x.filterMap(o),filter:t.route.$isOpened}],or:{name:"updated",sid:"-xpqf1c"}}),closed:e.guard({and:[{clock:O.filterMap(o),filter:t.route.$isOpened}],or:{name:"closed",sid:"2t1awe"}})};r.on(n,(function(){return!0}));var i=e.guard({and:[{clock:a.updated,filter:r.map((function(e){return!e}))}],or:{name:"updated",sid:"-i38vyc"}});e.sample({and:[{source:e.restore(i,null,{name:"source",sid:"-1th5mi"}),clock:e.guard({and:[{clock:i,source:[t.route.$params,t.route.$query],filter:function(e,t){var r=e[1];return!l(e[0],t.params)||!l(r,t.query)}}],or:{name:"clock",sid:"cdcuni"}}),fn:function(e){return e},target:t.route.updated}],or:{sid:"-i4jrqg"}}),e.guard({and:[{clock:a.opened,filter:r.map((function(e){return!e})),target:t.route.opened}],or:{sid:"-hlayyt"}}),e.sample({and:[{clock:a.closed,target:t.route.closed}],or:{sid:"-h6giy2"}}),r.reset(e.sample({and:[{clock:x}],or:{sid:"-wz7y6w"}}))},E=i(r);!(b=E()).done;)k();var q,j=e.attach({and:{source:{history:y},effect:(q=n(u.mark((function e(t){var r,n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[(r=t.history).location.pathname,Object.fromEntries(new URLSearchParams(r.location.search))],e.abrupt("return",{path:n[0],query:n[1]});case 3:case"end":return e.stop()}}),e)}))),function(e){return q.apply(this,arguments)})},or:{name:"recheckFx",sid:"fr6h5h"}});e.sample({and:[{source:j.doneData,target:w}],or:{sid:"-g52ioy"}});var L,R=e.attach({and:{source:{history:y},effect:(L=n(u.mark((function t(r){var n,o;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.history,o=j;try{o=e.scopeBind(j)}catch(e){}return n.listen((function(){o()})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)}))),function(e){return L.apply(this,arguments)})},or:{name:"subscribeHistoryFx",sid:"bp94to"}});return t.hydrate||e.sample({and:[{clock:R.doneData,target:j}],or:{sid:"-4uqk3n"}}),e.sample({and:[{clock:y,target:R}],or:{sid:"-4rzl8a"}}),{$path:d,$query:s,$activeRoutes:m,$history:y,setHistory:a,push:v,routes:r,routeNotFound:c}},exports.createRoute=d,exports.isRoute=m,exports.matchPath=p,exports.redirect=function(t){var r=t.clock?e.sample({and:[{clock:t.clock}],or:{name:"clock",sid:"-nsh945"}}):e.createEvent({name:"clock",sid:"-nbfmpy"}),n=y(t.params||{}),o=y(t.query||{});return e.sample({and:[{clock:r,source:{params:n,query:o},fn:function(e,t){var r=e.params,n=e.query;return{params:"function"==typeof r?r(t):r,query:"function"==typeof n?n(t):n}},target:t.route.navigate}],or:{sid:"-8kqnzy"}}),r};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("effector"),t=require("path-to-regexp");function r(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,u,"next",e)}function u(e){r(i,o,a,c,u,"throw",e)}c(void 0)}))}}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=(function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=Object.create((t&&t.prototype instanceof f?t:f).prototype),a=new O(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function f(){}function p(){}function l(){}var h={};c(h,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&r.call(y,o)&&(h=y);var v=l.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,a){function i(){return new t((function(n,i){!function n(o,a,i,c){var u=s(e[o],e,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){d.value=e,i(d)}),(function(e){return n("throw",e,i,c)}))}c(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:q}}function q(){return{value:void 0,done:!0}}return p.prototype=l,c(v,"constructor",l),c(l,"constructor",p),p.displayName=c(l,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(c={exports:{}}),c.exports),s={ROUTE:Symbol()},d=function(){var t=e.createEffect(function(){var e=n(u.mark((function e(t){return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{params:t.params||{},query:t.query||{}});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{name:"navigateFx",sid:"-apj8ex"}),r=e.attach({and:{effect:t,mapParams:function(e){return{params:e||{},query:{}}}},or:{name:"openFx",sid:"-ju5g7s"}}),o=e.createStore(!1,{name:"$isOpened",sid:"7ntohw"}),a=e.createStore({},{name:"$params",sid:"1blfp4"}),i=e.createStore({},{name:"$query",sid:"rvelj"}),c=e.createEvent({name:"opened",sid:"-f8s17u"}),d=e.createEvent({name:"updated",sid:"slzlyp"}),f=e.createEvent({name:"left",sid:"yy6ys3"}),p=e.createEvent({name:"closed",sid:"-say4ff"});return o.on(c,(function(){return!0})).on(f,(function(){return!1})),a.on(c,(function(e,t){return t.params})).on(d,(function(e,t){return t.params})),i.on(c,(function(e,t){return t.query})).on(d,(function(e,t){return t.query})),e.split({and:[{source:t.doneData,match:o.map((function(e){return e?"updated":"opened"})),cases:{opened:c,updated:d}}],or:{sid:"-x6h86m"}}),e.sample({and:[{clock:p,target:f}],or:{sid:"-wqj6z5"}}),{$isOpened:o,$params:a,$query:i,opened:c,updated:d,closed:p,left:f,navigate:t,open:r,kind:s.ROUTE}};function f(e){var r=e.params,n=e.query;return t.compile(e.pathCreator)(r)+(Object.keys(n).length?"?"+new URLSearchParams(n):"")}function p(e){var r=e.actualPath,n=t.match(e.pathCreator)(new URL("http://_"+r).pathname);return n?{matches:!0,params:n.params}:{matches:!1}}var l=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(e[r]!==t[r])return!1;return!0},h=e.createEffect((function(e){if(!e.history)throw new Error("[Routing] No history provided");return e.history[e.method](e.path,{}),e}),{name:"historyPushFx",sid:"t43sn8"}),m=function(e){return"object"==typeof e&&null!==e&&"kind"in e&&e.kind===s.ROUTE},y=function(t){return e.is.store(t,{sid:"-v906zu"})?t:e.createStore(t,{sid:"-v904rr"})};exports.Kind=s,exports.buildPath=f,exports.chainRoute=function(t){var r=function(t){if(m(t))return{route:t,chainedRoute:e.withFactory({sid:"jogy9l",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:e.createEvent({name:"beforeOpen",sid:"8mpttm"}),openOn:[t.opened,t.closed],cancelOn:[e.createEvent({name:"cancelOn",sid:"ahjdm4"})]};var r=t;if(!("enterOn"in r)&&e.is.effect(r.beforeOpen,{sid:"fx5yhy"}))return{route:r.route,chainedRoute:r.chainedRoute||e.withFactory({sid:"fyulbq",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:r.beforeOpen,openOn:r.beforeOpen.doneData,cancelOn:r.beforeOpen.failData};var n=t;return{route:n.route,chainedRoute:n.chainedRoute||e.withFactory({sid:"u6793u",fn:function(){return d()},name:"chainedRoute",method:"createRoute"}),beforeOpen:n.beforeOpen,openOn:e.sample({and:[{clock:n.openOn}],or:{name:"openOn",sid:"-mm7rdb"}}),cancelOn:e.sample({and:[{clock:n.cancelOn||e.createEvent({name:"clock",sid:"y2etk0"})}],or:{name:"cancelOn",sid:"-vntqxj"}})}}(t),n=r.route,o=r.chainedRoute,a=r.beforeOpen,i=r.openOn,c=r.cancelOn,u=e.createStore({},{name:"$params",sid:"ru233x"}),s=e.createStore({},{name:"$query",sid:"2tnaew"}),f=e.combine({and:[e.combine({and:[[n.$params,n.$query]],or:{name:"and",sid:"-t8sbqu"}}),e.combine({and:[[u,s]],or:{name:"and",sid:"-t8s8s2"}}),function(e,t){return e[0]===t[0]&&e[1]===t[1]}],or:{name:"$hasSameParams",sid:"-w0fyuc"}}),p=e.sample({and:[{clock:[n.opened,n.updated]}],or:{name:"routeOpened",sid:"nobe5z"}});e.sample({and:[{clock:p,target:a}],or:{sid:"n0i9a7"}}),u.on(p,(function(e,t){return t.params})),s.on(p,(function(e,t){return t.query}));var l=e.guard({and:[{clock:i,source:{params:u,query:s},filter:f}],or:{name:"chainedRouteResolved",sid:"-qurk3a"}});e.sample({and:[{clock:l,target:o.navigate}],or:{sid:"ningv4"}});var h=e.merge([n.closed,c],{name:"aborted",sid:"-qm6c6a"});return u.reset(h),s.reset(h),e.sample({and:[{clock:h,target:o.closed}],or:{sid:"nz5any"}}),o},exports.createHistoryRouter=function(t){var r=function(e){for(var t,r=[],n=function(){var e=t.value;Array.isArray(e.route)?r.push.apply(r,e.route.map((function(t){return o({},e,{route:t})}))):r.push(e)},a=i(e);!(t=a()).done;)n();return r}(t.routes),a=e.createEvent({name:"setHistory",sid:"-clu30d"}),c=e.createEvent({name:"routeNotFound",sid:"-xnr4av"}),s=e.createStore({},{name:"$query",sid:"i4zffs"}),d=e.createStore("",{name:"$path",sid:"-rt73a5"}),m=e.createStore([],{and:{serialize:"ignore"},name:"$activeRoutes",sid:"ghza91"}),y=e.createStore(!1,{name:"$isFirstCheckPassed",sid:"-bpyumz"}),v=e.createStore(null,{and:{serialize:"ignore"},name:"$history",sid:"-6zzmt3"});v.on(a,(function(e,t){return t}));var g=e.attach({and:{source:{history:v},effect:h,mapParams:function(e,t){return o({history:t.history},e)}},or:{name:"pushFx",sid:"oynwne"}}),b=e.createEffect((function(e){var t=e.params,r=e.query;return{path:f({pathCreator:e.route.path,params:t,query:r}),params:t,query:r,method:"push"}}),{name:"openedFx",sid:"254znm"}),w=e.createEffect((function(e){for(var t,n=e.path,o=e.query,a=[],c=[],u=i(r);!(t=u()).done;){var s=t.value,d=p({pathCreator:s.path,actualPath:n});(d.matches?a:c).push({route:s,params:d.params,query:o})}return{opened:a,closed:c}}),{name:"recalculateFx",sid:"-7f7p5c"});d.on(w.done,(function(e,t){return t.params.path})),s.on(w.done,(function(e,t){return t.params.query})),m.on(w.doneData,(function(e,t){return t.opened.map((function(e){return e.route.route}))})),e.sample({and:[{clock:b.doneData,target:g}],or:{sid:"7dw78t"}}),e.guard({and:[{clock:w.doneData,filter:function(e){return 0===e.opened.length},target:c}],or:{sid:"7ue11n"}});for(var k,x=w.doneData.map((function(e){return e.opened})),O=w.doneData.map((function(e){return e.closed})),E=function(){var t=k.value,r=e.createStore(!1,{name:"$isOpenedManually",sid:"cw52y2"}),n=t.route.navigate.done;e.sample({and:[{clock:n,fn:function(e){var r=e.result;return{route:t,params:r.params,query:r.query}},target:b}],or:{sid:"-jwbwkc"}});var o=function(e){return e.find((function(e){return e.route===t}))},a={opened:e.guard({and:[{clock:x.filterMap(o),filter:t.route.$isOpened.map((function(e){return!e}))}],or:{name:"opened",sid:"rp79u"}}),updated:e.guard({and:[{clock:x.filterMap(o),filter:t.route.$isOpened}],or:{name:"updated",sid:"-x8osn5"}}),closed:e.guard({and:[{clock:O.filterMap(o),filter:t.route.$isOpened}],or:{name:"closed",sid:"d80zko"}})};r.on(n,(function(){return!0}));var i=e.guard({and:[{clock:a.updated,filter:r.map((function(e){return!e}))}],or:{name:"updated",sid:"-hm79k5"}});e.sample({and:[{source:e.restore(i,null,{name:"source",sid:"-1cfj8b"}),clock:e.guard({and:[{clock:i,source:[t.route.$params,t.route.$query],filter:function(e,t){var r=e[1];return!l(e[0],t.params)||!l(r,t.query)}}],or:{name:"clock",sid:"cueh1p"}}),fn:function(e){return e},target:t.route.updated}],or:{sid:"-i3zz53"}}),e.guard({and:[{clock:a.opened,filter:r.map((function(e){return!e})),target:t.route.opened}],or:{sid:"-hkr6dg"}}),e.sample({and:[{clock:a.closed,target:t.route.closed}],or:{sid:"-h5wqcp"}}),r.reset(e.sample({and:[{clock:x}],or:{sid:"-wi6bsp"}}))},q=i(r);!(k=q()).done;)E();var j,L=e.attach({and:{source:{history:v},effect:(j=n(u.mark((function e(t){var r,n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[(r=t.history).location.pathname,Object.fromEntries(new URLSearchParams(r.location.search))],e.abrupt("return",{path:n[0],query:n[1]});case 3:case"end":return e.stop()}}),e)}))),function(e){return j.apply(this,arguments)})},or:{name:"recheckFx",sid:"g883jo"}});e.sample({and:[{source:L.doneData,target:w}],or:{sid:"-g4iq3l"}});var R,S=e.attach({and:{source:{history:v},effect:(R=n(u.mark((function t(r){var n,o;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.history,o=L;try{o=e.scopeBind(L)}catch(e){}return n.listen((function(){o()})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)}))),function(e){return R.apply(this,arguments)})},or:{name:"subscribeHistoryFx",sid:"c6ar7v"}});t.hydrate||e.sample({and:[{clock:S.doneData,target:L}],or:{sid:"-4u6ria"}}),e.sample({and:[{clock:v,target:S}],or:{sid:"-4rfsmx"}}),y.on(w.doneData,(function(){return!0})).reset(v);var $=e.sample({and:[{clock:e.guard({and:[{clock:y,filter:Boolean}],or:{name:"clock",sid:"cb8dke"}}),source:{activeRoutes:m,path:d,query:s}}],or:{name:"initialized",sid:"r0pz07"}});return{$path:d,$query:s,$activeRoutes:m,$history:v,setHistory:a,push:g,routes:r,initialized:$,routeNotFound:c}},exports.createRoute=d,exports.isRoute=m,exports.matchPath=p,exports.redirect=function(t){var r=t.clock?e.sample({and:[{clock:t.clock}],or:{name:"clock",sid:"-nsh945"}}):e.createEvent({name:"clock",sid:"-nbfmpy"}),n=y(t.params||{}),o=y(t.query||{});return e.sample({and:[{clock:r,source:{params:n,query:o},fn:function(e,t){var r=e.params,n=e.query;return{params:"function"==typeof r?r(t):r,query:"function"==typeof n?n(t):n}},target:t.route.navigate}],or:{sid:"-8kqnzy"}}),r};
//# sourceMappingURL=atomic-router.cjs.production.min.js.map

@@ -1097,2 +1097,6 @@ import { createEffect, attach, createStore, createEvent, split, sample, guard, restore, scopeBind, is, combine, merge, withFactory } from 'effector';

sid: "ghza91"
});
var $isFirstCheckPassed = createStore(false, {
name: "$isFirstCheckPassed",
sid: "-bpyumz"
}); // @ts-expect-error

@@ -1105,3 +1109,3 @@

name: "$history",
sid: "-7h197a"
sid: "-6zzmt3"
});

@@ -1127,3 +1131,3 @@ $history.on(setHistory, function (_, nextHistory) {

name: "pushFx",
sid: "ejo7z4"
sid: "oynwne"
}

@@ -1149,3 +1153,3 @@ }); // Triggered whenever some route.navigate.doneData is triggered

name: "openedFx",
sid: "1o3d9f"
sid: "254znm"
}); // Recalculate opened/closed routes

@@ -1182,3 +1186,3 @@

name: "recalculateFx",
sid: "-7w9bjj"
sid: "-7f7p5c"
});

@@ -1205,3 +1209,3 @@ $path.on(recalculateFx.done, function (_prev, _ref4) {

or: {
sid: "7dceng"
sid: "7dw78t"
}

@@ -1224,3 +1228,3 @@ }); // sample({

or: {
sid: "7tu8ga"
sid: "7ue11n"
}

@@ -1241,3 +1245,3 @@ });

name: "$isOpenedManually",
sid: "cf3gjv"
sid: "cw52y2"
}); // Watch for route.navigate.doneData to build new path and push

@@ -1262,3 +1266,3 @@

or: {
sid: "-jwvp5p"
sid: "-jwbwkc"
}

@@ -1283,3 +1287,3 @@ });

name: "opened",
sid: "ankvn"
sid: "rp79u"
}

@@ -1294,3 +1298,3 @@ }),

name: "updated",
sid: "-xpqf1c"
sid: "-x8osn5"
}

@@ -1305,3 +1309,3 @@ }),

name: "closed",
sid: "2t1awe"
sid: "d80zko"
}

@@ -1324,3 +1328,3 @@ })

name: "updated",
sid: "-i38vyc"
sid: "-hm79k5"
}

@@ -1332,3 +1336,3 @@ });

name: "source",
sid: "-1th5mi"
sid: "-1cfj8b"
}),

@@ -1348,3 +1352,3 @@ clock: guard({

name: "clock",
sid: "cdcuni"
sid: "cueh1p"
}

@@ -1358,3 +1362,3 @@ }),

or: {
sid: "-i4jrqg"
sid: "-i3zz53"
}

@@ -1372,3 +1376,3 @@ }); // Trigger .opened() for the routes marked as "opened"

or: {
sid: "-hlayyt"
sid: "-hkr6dg"
}

@@ -1383,3 +1387,3 @@ }); // Trigger .closed() for the routes marked as "closed"

or: {
sid: "-h6giy2"
sid: "-h5wqcp"
}

@@ -1393,3 +1397,3 @@ }); // Reset $isOpenedManually

or: {
sid: "-wz7y6w"
sid: "-wi6bsp"
}

@@ -1443,3 +1447,3 @@ }));

name: "recheckFx",
sid: "fr6h5h"
sid: "g883jo"
}

@@ -1453,3 +1457,3 @@ });

or: {
sid: "-g52ioy"
sid: "-g4iq3l"
}

@@ -1500,3 +1504,3 @@ }); // Triggered whenever history instance is set

name: "subscribeHistoryFx",
sid: "bp94to"
sid: "c6ar7v"
}

@@ -1513,3 +1517,3 @@ }); // If `hydrate` flag is set,

or: {
sid: "-4uqk3n"
sid: "-4u6ria"
}

@@ -1525,5 +1529,31 @@ });

or: {
sid: "-4rzl8a"
sid: "-4rfsmx"
}
});
$isFirstCheckPassed.on(recalculateFx.doneData, function () {
return true;
}).reset($history);
var initialized = sample({
and: [{
clock: guard({
and: [{
clock: $isFirstCheckPassed,
filter: Boolean
}],
or: {
name: "clock",
sid: "cb8dke"
}
}),
source: {
activeRoutes: $activeRoutes,
path: $path,
query: $query
}
}],
or: {
name: "initialized",
sid: "r0pz07"
}
});
return {

@@ -1537,2 +1567,3 @@ $path: $path,

routes: remappedRoutes,
initialized: initialized,
routeNotFound: routeNotFound

@@ -1539,0 +1570,0 @@ };

@@ -29,4 +29,9 @@ import { History } from 'history';

routes: RouteObject<any>[];
initialized: import("effector").Event<{
activeRoutes: RouteInstance<any>[];
path: string;
query: {};
}>;
routeNotFound: import("effector").Event<void>;
};
export {};
{
"version": "0.5.0-dev.10",
"version": "0.5.0-dev.11",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -83,2 +83,3 @@ import { buildPath, matchPath } from './utils/build-path';

});
const $isFirstCheckPassed = createStore(false);

@@ -318,2 +319,12 @@ // @ts-expect-error

$isFirstCheckPassed.on(recalculateFx.doneData, () => true).reset($history);
const initialized = sample({
clock: guard({
clock: $isFirstCheckPassed,
filter: Boolean,
}),
source: { activeRoutes: $activeRoutes, path: $path, query: $query },
});
return {

@@ -327,4 +338,5 @@ $path,

routes: remappedRoutes,
initialized,
routeNotFound,
};
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc