/home/techb158/immovalet.com/vendor/tightenco/ziggy/dist
Edit: /home/techb158/immovalet.com/vendor/tightenco/ziggy/dist/index.js (15284B)
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).route=n()}(this,function(){function t(t,n){for(var r=0;r
1;){var n=t.pop(),r=n.obj[n.prop];if(a(r)){for(var e=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?i+=e.charAt(o):u<128?i+=l[u]:u<2048?i+=l[192|u>>6]+l[128|63&u]:u<55296||u>=57344?i+=l[224|u>>12]+l[128|u>>6&63]+l[128|63&u]:(u=65536+((1023&u)<<10|1023&e.charCodeAt(o+=1)),i+=l[240|u>>18]+l[128|u>>12&63]+l[128|u>>6&63]+l[128|63&u])}return i},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,n){if(a(t)){for(var r=[],e=0;e-1?t.split(","):t},T=function(t,n,r,e){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(i),f=u?i.slice(0,u.index):i,c=[];if(f){if(!r.plainObjects&&S.call(Object.prototype,f)&&!r.allowPrototypes)return;c.push(f)}for(var a=0;r.depth>0&&null!==(u=o.exec(i))&&a=0;--o){var u,f=t[o];if("[]"===f&&r.parseArrays)u=[].concat(i);else{u=r.plainObjects?Object.create(null):{};var c="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,a=parseInt(c,10);r.parseArrays||""!==c?!isNaN(a)&&f!==c&&String(a)===c&&a>=0&&r.parseArrays&&a<=r.arrayLimit?(u=[])[a]=i:u[c]=i:u={0:i}}i=u}return i}(c,n,r,e)}},F=function(){function t(t,n,r){var e;this.name=t,this.definition=n,this.bindings=null!=(e=n.bindings)?e:{},this.config=r}var r=t.prototype;return r.matchesUrl=function(t){if(!this.definition.methods.includes("GET"))return!1;var n=this.template.replace(/\/{[^}?]*\?}/g,"(/[^/?]+)?").replace(/{[^}]+}/g,"[^/?]+").replace(/^\w+:\/\//,"");return new RegExp("^"+n+"$").test(t.replace(/\/+$/,"").split("?").shift())},r.compile=function(t){var n=this;return this.parameterSegments.length?this.template.replace(/{([^}?]+)\??}/g,function(r,e){var i;if([null,void 0].includes(t[e])&&n.parameterSegments.find(function(t){return t.name===e}).required)throw new Error("Ziggy error: '"+e+"' parameter is required for route '"+n.name+"'.");return encodeURIComponent(null!=(i=t[e])?i:"")}).replace(/\/+$/,""):this.template},n(t,[{key:"template",get:function(){return((this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:"")+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"parameterSegments",get:function(){var t,n;return null!=(t=null===(n=this.template.match(/{[^}?]+\??}/g))||void 0===n?void 0:n.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),$=function(t){var e,i;function o(n,e,i,o){var u,f;if(void 0===i&&(i=!0),(f=t.call(this)||this).t=null!=(u=null!=o?o:Ziggy)?u:null===globalThis||void 0===globalThis?void 0:globalThis.Ziggy,f.t=r({},f.t,{absolute:i}),n){if(!f.t.routes[n])throw new Error("Ziggy error: route '"+n+"' is not in the route list.");f.i=new F(n,f.t.routes[n],f.t),f.u=f.l(e)}return f}i=t,(e=o).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var u=o.prototype;return u.toString=function(){var t=this,n=Object.keys(this.u).filter(function(n){return!t.i.parameterSegments.some(function(t){return t.name===n})}).filter(function(t){return"_query"!==t}).reduce(function(n,e){var i;return r({},n,((i={})[e]=t.u[e],i))},{});return this.i.compile(this.u)+function(t,n){var r,e=t,i=function(t){if(!t)return E;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var n=t.charset||E.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=h.default;if(void 0!==t.format){if(!b.call(h.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var e=h.formatters[r],i=E.filter;return("function"==typeof t.filter||j(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:E.addQueryPrefix,allowDots:void 0===t.allowDots?E.allowDots:!!t.allowDots,charset:n,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:E.charsetSentinel,delimiter:void 0===t.delimiter?E.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:E.encode,encoder:"function"==typeof t.encoder?t.encoder:E.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:E.encodeValuesOnly,filter:i,formatter:e,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:E.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:E.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:E.strictNullHandling}}(n);"function"==typeof i.filter?e=(0,i.filter)("",e):j(i.filter)&&(r=i.filter);var o=[];if("object"!=typeof e||null===e)return"";var u=g[n&&n.arrayFormat in g?n.arrayFormat:n&&"indices"in n?n.indices?"indices":"repeat":"indices"];r||(r=Object.keys(e)),i.sort&&r.sort(i.sort);for(var f=0;f0?l+a:""}(r({},n,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,n){return"boolean"==typeof t?Number(t):n(t)}})},u.current=function(t,n){var r=this,e=this.t.absolute?this.s().host+this.s().pathname:this.s().pathname.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"),i=Object.entries(this.t.routes).find(function(n){return new F(t,n[1],r.t).matchesUrl(e)})||[void 0,void 0],o=i[0],u=i[1];if(!t)return o;var f=new RegExp("^"+t.replace(".","\\.").replace("*",".*")+"$").test(o);if([null,void 0].includes(n)||!f)return f;var c=new F(o,u,this.t);n=this.l(n,c);var a=this.v(u);return!(!Object.values(n).every(function(t){return!t})||Object.values(a).length)||Object.entries(n).every(function(t){return a[t[0]]==t[1]})},u.s=function(){var t,n,r,e,i,o,u="undefined"!=typeof window?window.location:{},f=u.host,c=u.pathname,a=u.search;return{host:null!=(t=null===(n=this.t.location)||void 0===n?void 0:n.host)?t:void 0===f?"":f,pathname:null!=(r=null===(e=this.t.location)||void 0===e?void 0:e.pathname)?r:void 0===c?"":c,search:null!=(i=null===(o=this.t.location)||void 0===o?void 0:o.search)?i:void 0===a?"":a}},u.has=function(t){return Object.keys(this.t.routes).includes(t)},u.l=function(t,n){var e=this;void 0===t&&(t={}),void 0===n&&(n=this.i),t=["string","number"].includes(typeof t)?[t]:t;var i=n.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,n,e){var o,u;return r({},t,i[e]?((o={})[i[e].name]=n,o):((u={})[n]="",u))},{});else if(1===i.length&&!t[i[0].name]&&(t.hasOwnProperty(Object.values(n.bindings)[0])||t.hasOwnProperty("id"))){var o;(o={})[i[0].name]=t,t=o}return r({},this.p(n),this.h(t,n.bindings))},u.p=function(t){var n=this;return t.parameterSegments.filter(function(t){return n.t.defaults[t.name]}).reduce(function(t,e,i){var o,u=e.name;return r({},t,((o={})[u]=n.t.defaults[u],o))},{})},u.h=function(t,n){return void 0===n&&(n={}),Object.entries(t).reduce(function(t,e){var i,o,u=e[0],f=e[1];if(!f||"object"!=typeof f||Array.isArray(f)||"_query"===u)return r({},t,((o={})[u]=f,o));if(!f.hasOwnProperty(n[u])){if(!f.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+u+"' parameter is missing route model binding key '"+n[u]+"'.");n[u]="id"}return r({},t,((i={})[u]=f[n[u]],i))},{})},u.v=function(t){var n,e=this.s().pathname.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,""),i=function(t,n,e){void 0===n&&(n="");var i=[t,n].map(function(t){return t.split(e)}),o=i[0];return i[1].reduce(function(t,n,e){var i;return/^{[^}?]+\??}$/.test(n)&&o[e]?r({},t,((i={})[n.replace(/^{|\??}$/g,"")]=o[e],i)):t},{})};return r({},i(this.s().host,t.domain,"."),i(e,t.uri,"/"),function(t,n){var r=C;if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var e="string"==typeof t?function(t,n){var r,e={},i=(n.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(n.delimiter,Infinity===n.parameterLimit?void 0:n.parameterLimit),o=-1,u=n.charset;if(n.charsetSentinel)for(r=0;r-1&&(c=x(c)?[c]:c),e[f]=S.call(e,f)?v.combine(e[f],c):c}return e}(t,r):t,i=r.plainObjects?Object.create(null):{},o=Object.keys(e),u=0;u