@veltdev/client
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,a)}c((r=r.apply(e,t||[])).next())}))}function t(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var n=function(e){return new Promise((function(t,n){var r=document.getElementById("veltScript"),o=!1,i="latest";if(e&&(e.staging&&(o=e.staging),e.version&&(i=e.version)),(null==e?void 0:e.version)||(i="1.0.11"),r)t();else{var l=document.createElement("script");l.src=o?"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getPrivateNpmPackageFile?packageName=sdk-staging&packageVersion=".concat(i&&"latest"!==i?i:"1.0.1","&filePath=velt.js&orgName=@veltdev"):"https://cdn.jsdelivr.net/npm/@veltdev/sdk@".concat(i,"/velt.js"),l.id="veltScript",l.type="module",document.body.appendChild(l),l.onload=function(){t()},l.onerror=function(){n(new Error("Failed to load Velt script"))}}}))};exports.getVeltClient=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),window.Velt?[3,2]:[4,n()];case 1:t.sent(),t.label=2;case 2:return[2,window.Velt];case 3:return e=t.sent(),console.error(e),[2,null];case 4:return[2]}}))}))},exports.initVelt=function(r,o){return e(void 0,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,6,,7]),[4,n(null==o?void 0:o.options)];case 1:return t.sent(),e=window.Velt,o?[4,e.init(r,o)]:[3,3];case 2:return t.sent(),[3,5];case 3:return[4,e.init(r)];case 4:t.sent(),t.label=5;case 5:return(null==e?void 0:e.st)&&(null==e||e.st("client")),[2,e];case 6:return i=t.sent(),console.error(i),[2,null];case 7:return[2]}}))}))}; | ||
"use strict";function e(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,a)}c((r=r.apply(e,t||[])).next())}))}function t(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var n=function(e){return new Promise((function(t,n){var r=document.getElementById("veltScript"),o=!1,i="latest";if(e&&(e.staging&&(o=e.staging),e.version&&(i=e.version)),(null==e?void 0:e.version)||(i="1.0.13"),r)t();else{var l=document.createElement("script");l.src=o?"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getPrivateNpmPackageFile?packageName=sdk-staging&packageVersion=".concat(i&&"latest"!==i?i:"1.0.1","&filePath=velt.js&orgName=@veltdev"):"https://cdn.jsdelivr.net/npm/@veltdev/sdk@".concat(i,"/velt.js"),l.id="veltScript",l.type="module",document.body.appendChild(l),l.onload=function(){t()},l.onerror=function(){n(new Error("Failed to load Velt script"))}}}))};exports.getVeltClient=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),window.Velt?[3,2]:[4,n()];case 1:t.sent(),t.label=2;case 2:return[2,window.Velt];case 3:return e=t.sent(),console.error(e),[2,null];case 4:return[2]}}))}))},exports.initVelt=function(r,o){return e(void 0,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,6,,7]),[4,n(null==o?void 0:o.options)];case 1:return t.sent(),e=window.Velt,o?[4,e.init(r,o)]:[3,3];case 2:return t.sent(),[3,5];case 3:return[4,e.init(r)];case 4:t.sent(),t.label=5;case 5:return(null==e?void 0:e.st)&&(null==e||e.st("client")),[2,e];case 6:return i=t.sent(),console.error(i),[2,null];case 7:return[2]}}))}))}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
function e(e,n,t,r){return new(t||(t=Promise))((function(o,i){function l(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(l,a)}c((r=r.apply(e,n||[])).next())}))}function n(e,n){var t,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(l=0)),l;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=n.call(e,l)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var t=function(e){return new Promise((function(n,t){var r=document.getElementById("veltScript"),o=!1,i="latest";if(e&&(e.staging&&(o=e.staging),e.version&&(i=e.version)),(null==e?void 0:e.version)||(i="1.0.11"),r)n();else{var l=document.createElement("script");l.src=o?"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getPrivateNpmPackageFile?packageName=sdk-staging&packageVersion=".concat(i&&"latest"!==i?i:"1.0.1","&filePath=velt.js&orgName=@veltdev"):"https://cdn.jsdelivr.net/npm/@veltdev/sdk@".concat(i,"/velt.js"),l.id="veltScript",l.type="module",document.body.appendChild(l),l.onload=function(){n()},l.onerror=function(){t(new Error("Failed to load Velt script"))}}}))},r=function(r,o){return e(void 0,void 0,void 0,(function(){var e,i;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),[4,t(null==o?void 0:o.options)];case 1:return n.sent(),e=window.Velt,o?[4,e.init(r,o)]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,e.init(r)];case 4:n.sent(),n.label=5;case 5:return(null==e?void 0:e.st)&&(null==e||e.st("client")),[2,e];case 6:return i=n.sent(),console.error(i),[2,null];case 7:return[2]}}))}))},o=function(){return e(void 0,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),window.Velt?[3,2]:[4,t()];case 1:n.sent(),n.label=2;case 2:return[2,window.Velt];case 3:return e=n.sent(),console.error(e),[2,null];case 4:return[2]}}))}))};export{o as getVeltClient,r as initVelt}; | ||
function e(e,n,t,r){return new(t||(t=Promise))((function(o,i){function l(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(l,a)}c((r=r.apply(e,n||[])).next())}))}function n(e,n){var t,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(l=0)),l;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=n.call(e,l)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var t=function(e){return new Promise((function(n,t){var r=document.getElementById("veltScript"),o=!1,i="latest";if(e&&(e.staging&&(o=e.staging),e.version&&(i=e.version)),(null==e?void 0:e.version)||(i="1.0.13"),r)n();else{var l=document.createElement("script");l.src=o?"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getPrivateNpmPackageFile?packageName=sdk-staging&packageVersion=".concat(i&&"latest"!==i?i:"1.0.1","&filePath=velt.js&orgName=@veltdev"):"https://cdn.jsdelivr.net/npm/@veltdev/sdk@".concat(i,"/velt.js"),l.id="veltScript",l.type="module",document.body.appendChild(l),l.onload=function(){n()},l.onerror=function(){t(new Error("Failed to load Velt script"))}}}))},r=function(r,o){return e(void 0,void 0,void 0,(function(){var e,i;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),[4,t(null==o?void 0:o.options)];case 1:return n.sent(),e=window.Velt,o?[4,e.init(r,o)]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,e.init(r)];case 4:n.sent(),n.label=5;case 5:return(null==e?void 0:e.st)&&(null==e||e.st("client")),[2,e];case 6:return i=n.sent(),console.error(i),[2,null];case 7:return[2]}}))}))},o=function(){return e(void 0,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),window.Velt?[3,2]:[4,t()];case 1:n.sent(),n.label=2;case 2:return[2,window.Velt];case 3:return e=n.sent(),console.error(e),[2,null];case 4:return[2]}}))}))};export{o as getVeltClient,r as initVelt}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@veltdev/client", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet