### Multi-Source Configuration Example Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/macros-configuration.md Provides examples of how to configure multi-source QuickBooks setups in dbt_project.yml using either multiple schemas or multiple databases. ```yaml vars: # Option 1: Multiple schemas, same database quickbooks_union_schemas: - quickbooks_usa - quickbooks_canada # Option 2: Multiple databases, same schema name quickbooks_union_databases: - quickbooks_usa - quickbooks_canada ``` -------------------------------- ### Install dbt QuickBooks Package Source: https://github.com/fivetran/dbt_quickbooks/blob/main/README.md Include this snippet in your `packages.yml` file to install the dbt QuickBooks package. Using version ranges is recommended to automatically capture non-breaking changes. ```yaml packages: - package: fivetran/quickbooks version: ["<1.7.0", ">=1.6.0"] ``` -------------------------------- ### Service Registration with $get Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Registers a service with the injector, using a factory function to define its $get method. Allows for optional disabling of the $get method. ```javascript m=function(e,t,n){return h(e,{$get:!1!==n?g(e,t):t})} ``` -------------------------------- ### Start Animation Progress Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Initializes animation state, setting start positions and styles or pan/zoom for animation. Used to prepare for animation updates. ```javascript function(e,t,n,r){var o=!r,i=e,a=e._private,l=r?e:e.cy(),s=l.style();if(o){var c=i.position();a.startPosition=a.startPosition||{x:c.x,y:c.y},a.startStyle=a.startStyle||s.getAnimationStartStyle(i,a.style)}if(r){var u=l._private.pan;a.startPan=a.startPan||{x:u.x,y:u.y},a.startZoom=null!=a.startZoom?a.startZoom:l._private.zoom}a.started=!0,a.startTime=n-a.progress*a.duration} ``` -------------------------------- ### Usage Example: Primary Partitioning Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/macros-configuration.md Demonstrates using partition_by_source_relation as the primary partitioning expression when no other partitions are defined. ```sql -- As primary partition (no other partitions) {{ dbt_utils.generate_surrogate_key( ['account_id', 'date', 'transaction_id' {{ quickbooks.partition_by_source_relation('no') }}] ) }} ``` -------------------------------- ### Making an HTTP GET Request Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html This snippet demonstrates how to make a simple HTTP GET request using the $http service. It includes basic success and error handling callbacks. ```javascript var req = { method: "GET", url: "http://example.com/data", headers: { "Content-Type": "application/json" } }; $http(req).then(function successCallback(response) { // this callback will be called on success // response.data, response.status, response.headers }, function errorCallback(response) { // this callback will be called on error }); ``` -------------------------------- ### Using dbt.type_string Macro Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/OVERVIEW.md Example of using the dbt.type_string macro for string type mapping in SQL. ```sql dbt.type_string(your_column) ``` -------------------------------- ### Usage Example: Window Function Partitioning Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/macros-configuration.md Shows how to use partition_by_source_relation within a window function when other partitioning expressions are already present. ```sql -- In window function (has other partitions: account_id, class_id) sum(adjusted_amount) over ( partition by account_id, class_id {{ quickbooks.partition_by_source_relation() }} order by transaction_date ) ``` -------------------------------- ### Using dbt.last_day Macro Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/OVERVIEW.md Example of using the dbt.last_day macro to get the last day of the month in SQL. ```sql dbt.last_day(your_date_column) ``` -------------------------------- ### Get Symbol Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the `Symbol` object. ```javascript var r=n(9325).Symbol; e.exports=r ``` -------------------------------- ### Usage Example: With Table Alias Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/macros-configuration.md Illustrates how to use the alias parameter with partition_by_source_relation to prefix the source_relation with a table alias. ```sql -- With table alias {{ quickbooks.partition_by_source_relation(alias='gl.') }} -- Output: , gl.source_relation ``` -------------------------------- ### Get Keys Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the own enumerable string keyed property names of `object`. ```javascript var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t} ``` -------------------------------- ### Using adapter.dispatch Macro Source: https://github.com/fivetran/dbt_quickbooks/blob/main/_autodocs/OVERVIEW.md Demonstrates the use of adapter.dispatch for database-specific implementations in SQL. ```sql adapter.dispatch('macro_name', 'package_name')() ``` -------------------------------- ### Get ValueOf Primitive Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Retrieves the valueOf method from Object.prototype, if available, to get the primitive value of an object. ```javascript e.exports=function(e){return i?Object(i.call(e)):{}} ``` -------------------------------- ### HTTP Request Methods (POST, PUT, DELETE) Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Provides examples for common HTTP methods like POST, PUT, and DELETE, including how to send data with the request. ```javascript // POST request $http.post('/api/items', { name: 'New Item', value: 100 }).then(function(res) { console.log('Item created:', res.data); }); // PUT request $http.put('/api/items/123', { name: 'Updated Item', value: 150 }).then(function(res) { console.log('Item updated:', res.data); }); // DELETE request $http.delete('/api/items/123').then(function(res) { console.log('Item deleted:', res.data); }); ``` -------------------------------- ### Dequeueing Setup Configuration Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Sets up the dequeueing mechanism with various configuration options that control its behavior, such as redraw thresholds, cost estimations, and redraw priorities. This allows fine-tuning of the rendering performance. ```javascript c.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n1?r:r[0]:(0,o.Kg)(e)&&(0,o.Tn)(t)?(n[e]=r,n[e].push(t),function(){return n[e].splice(n[e].indexOf(t,1))&&null}):void 0},e.prototype.build=function(e){var t=this.matcher,n=this.builders,o=this.parentName(e);if(o&&!t.find(o,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i].reduce((function(e,t){return function(n){return t(n,e)}}),r.lQ);e[i]=a(e)}return e},e.prototype.parentName=function(e){var t=e.name||"",n=t.split(".");if("**"===n.pop()&&n.pop(),n.length){if(e.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+t+")");return n.join(".")}return e.parent?(0,o.Kg)(e.parent)?e.parent:e.parent.name:""},e.prototype.name=function(e){var t=e.name;if(-1!==t.indexOf(".")||!e.parent)return t;var n=(0,o.Kg)(e.parent)?e.parent:e.parent.name;return n?n+"."+t:t},e}()} ``` -------------------------------- ### Get Last Element of Array Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the last element of `array`. Returns `undefined` if `array` is empty. ```javascript function Gi(e){var t=null==e?0:e.length;return t?e[t-1]:o} ``` -------------------------------- ### Check if a string starts with a specified prefix Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Checks if `string` starts with `target`. This is useful for prefix matching. ```javascript jn.startsWith=function(e,t,n){return e=ml(e),n=null==n?0:ir(pl(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t} ``` -------------------------------- ### Prism.js Initialization and Auto-Highlighting Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Handles the initialization of Prism.js, including setting up event listeners for automatic highlighting when the DOM is ready. ```javascript if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var l="";for(var s in i.attributes)l+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+l+">"+i.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function A(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",A):window.requestAnimationFrame?window.requestAnimationFrame(A):window.setTimeout(A,16)}return o} ``` -------------------------------- ### Force Directed Layout Algorithm - Initialization Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Initializes the data structures for the force-directed layout algorithm. This includes setting up node and edge data, component mapping, and initial layout parameters. ```javascript var u=function(e,t,n){for(var r=n.eles.edges(),o=n.eles.nodes(),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:o.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:i.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},s=n.eles.components(),c={},u=0;u0)for(l.graphSet.push(x.children),u=0;u Registering",e),this._viewConfigs.push(e)},e.prototype.sync=function(){var t=this,n=this._uiViews.map((function(e){return[e.fqn,e]}),{}).reduce(r.Ep,{});function i(e){for(var t=e.viewDecl.$context,n=0;++n&&t.parent;)t=t.parent;return n}var l=(0,o.cF)((function(e,t,n,r){return t*(e(n)-e(r))})),s=this._uiViews.sort(l((function(e){var t=function(e){return e&&e.parent?t(e.parent)+1:1};return 1e4*e.fqn.split(".").length+t(e.creationContext)}),1)).map((function(r){var o=t._viewConfigs.filter(e.matches(n,r));return o.length>1&&o.sort(l(i,-1)),{uiView:r,viewConfig:o[0]}})),c=s.map((function(e){return e.viewConfig})),u=this._viewConfigs.filter((function(e){return!(0,r.RV)(c,e)})).map((function(e){return{uiView:void 0,viewConfig:e}}));s.forEach((function(e){-1!==t._uiViews.indexOf(e.uiView)&&e.uiView.configUpdated(e.viewConfig)}));var d=s.concat(u);this._listeners.forEach((function(e){return e(d)})),a.uP.traceViewSync(d)},e.prototype.registerUIView=function(e){a.uP.traceViewServiceUIViewEvent("-> Registering",e);var t=this._uiViews;return t.filter((function(t){return t.fqn===e.fqn&&t.$type===e.$type})).length&&a.uP.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",e),t.push(e),this.sync(),function(){-1!==t.indexOf(e)?(a.uP.traceViewServiceUIViewEvent("<- Deregistering",e),(0,r.z1)(t)(e)):a.uP.traceViewServiceUIViewEvent("Tried removing non-registered uiView",e)}},e.prototype.available=function(){return this._uiViews.map((0,o._w)("fqn"))},e.prototype.active=function(){return this._uiViews.filter((0,o._w)("$config")).map((0,o._w)("name"))},e.matches=function(e,t){return function(n){if(t.$type!==n.viewDecl.$type)return!1;var o=n.viewDecl,i=o.$uiViewName.split("."),a=t.fqn.split(".");if(!(0,r.aI)(i,a.slice(0-i.length)))return!1;var l=1-i.length||void 0,s=a.slice(0,l).join("."),c=e[s].creationContext;return o.$uiViewContextAnchor===(c&&c.name)}},e}()} ``` -------------------------------- ### Get the last element of an array Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the last element of `array`. This is a convenient way to access the final item in a list. ```javascript jn.last=Gi ``` -------------------------------- ### Get the current timestamp Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the timestamp of the number of milliseconds elapsed since the Unix epoch. This is useful for logging or timing operations. ```javascript jn.now=ka ``` -------------------------------- ### Register Touchstart Event for Multi-touch Gestures and Element Interaction Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Handles the initial touch event for various interactions including multi-touch gestures (pinching, panning), context-tap start, and element grabbing. It identifies nearest elements, checks for grabbable nodes, and initiates drag or selection states. ```javascript var T, M, z, O, I = function(e, t, n, r) { return Math.sqrt((n - e) * (n - e) + (r - t) * (r - t)) }, U = function(e, t, n, r) { return (n - e) * (n - e) + (r - t) * (r - t) }; if (e.registerBinding(e.container, "touchstart", T = function(n) { if (_(n)) { e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var r = e.cy, o = e.touchData.now, i = e.touchData.earlier; if (n.touches[0]) { var a = e.projectIntoViewport(n.touches[0].clientX, n.touches[0].clientY); o[0] = a[0], o[1] = a[1] } if (n.touches[1] && (a = e.projectIntoViewport(n.touches[1].clientX, n.touches[1].clientY), o[2] = a[0], o[3] = a[1]), n.touches[2] && (a = e.projectIntoViewport(n.touches[2].clientX, n.touches[2].clientY), o[4] = a[0], o[5] = a[1]), n.touches[1]) { A(e.dragData.touchDragEles); var l = e.findContainerClientCoords(); k = l[0], S = l[1], E = l[2], D = l[3]; var m = n.touches[0].clientX - k, b = n.touches[0].clientY - S, C = n.touches[1].clientX - k, v = n.touches[1].clientY - S, $ = 0 <= m && m <= E && 0 <= C && C <= E && 0 <= b && b <= D && 0 <= v && v <= D; var c = r.pan(), p = r.zoom(); if (y = I(m, b, C, v), w = U(m, b, C, v), B = [(x = [(m + C) / 2, (b + v) / 2])[0] - c.x) / p, (x[1] - c.y) / p], w < 4e4 && !n.touches[2]) { var f = e.findNearestElement(o[0], o[1], !0, !0), h = e.findNearestElement(o[2], o[3], !0, !0); return f && f.isNode() ? (f.activate().emit({originalEvent: n, type: "cxttapstart", position: {x: o[0], y: o[1]}}), e.touchData.start = f) : h && h.isNode() ? (h.activate().emit({originalEvent: n, type: "cxttapstart", position: {x: o[0], y: o[1]}}), e.touchData.start = h) : r.emit({originalEvent: n, type: "cxttapstart", position: {x: o[0], y: o[1]}}), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !0, e.touchData.cxtDragged = !1, e.data.bgActivePosistion = void 0, void e.redraw() } if (n.touches[2]); else if (n.touches[1]); else if (n.touches[0]) { var g = e.findNearestElements(o[0], o[1], !0, !0), T = g[0]; if (null != T && (T.activate(), e.touchData.start = T, e.touchData.starts = g, e.nodeIsGrabbable(T))) { var M = e.dragData.touchDragEles = [], z = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), T.selected() ? (z = r.$((function(t) { return t.selected() && e.nodeIsGrabbable(t) })), u(z, {addToList: M})) : d(T, {addToList: M}), s(T); var O = function(e) { return {originalEvent: n, type: e, position: {x: o[0], y: o[1]}} }; T.emit(O("grabon")), z ? z.forEach((function(e) { e.emit(O("grab")) })) : T.emit(O("grab")), t(T, ["touchstart", "tapstart", "vmousedown"], n, {position: {x: o[0], y: o[1]}}) } null == T && (e.data.bgActivePosistion = {x: a[0], y: a[1]}, e.redrawHint("select", !0), e.redraw()) e.touchData.singleTouchMoved = !1, e.touchData.singleTouchStartTime = +new Date, clearTimeout(e.touchData.tapholdTimeout), e.touchData.tapholdTimeout = setTimeout((function() { !1 !== e.touchData.singleTouchMoved || e.pinching || e.touchData.selecting || (t(e.touchData.start, ["taphold"], n, {position: {x: o[0], y: o[1]}}), e.touchData.start || r.$(":selected").unselect()) }), e.tapholdDuration) } if (n.touches.length >= 1) { for (var N = e.touchData.startPosition = [], j = 0; j < o.length; j++) N[j] = i[j] = o[j]; var q = n.touches[0]; e.touchData.startGPosition = [q.clientX, q.clientY] } } } }), !1) ``` -------------------------------- ### Factory Function for Provider $get Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Creates a $get factory function for a provider. This function is responsible for returning the actual service instance. ```javascript g=function(e,t){return function(){var n=A.invoke(t,this);if(j(n))throw Ht("undef","Provider '{0}' must return a value from $get factory method.",e);return n}} ``` -------------------------------- ### Load Project Configuration Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Initiates the loading of the dbt project's manifest and catalog. It then processes and organizes this data for use within the application. ```JavaScript r.loadProject=function(){var t="?cb="+(new Date).getTime(),n=\[o("manifest","manifest.json"+t),o("catalog","catalog.json"+t) lay.all(n).then((function(e){u.each(e,(function(e){e?r.files[e.label]=e.data:console.error("FILE FAILED TO LOAD!")})),u.each(r.files.manifest.nodes,(function(e){"model"==e.resource_type&&null!=e.version?e.label=e.name+"_v"+e.version:e.label=e.name})),u.each(r.files.manifest.sources,(function(e){e.label=e.source_name+"."+e.name,r.files.manifest.nodes[e.unique_id]=e})),u.each(r.files.manifest.exposures,(function(e){e.label||(e.label=e.name),r.files.manifest.nodes[e.unique_id]=e})),u.each(r.files.manifest.metrics,(function(e){r.files.manifest.nodes[e.unique_id]=e})),u.each(r.files.manifest.semantic_models,(function(e){r.files.manifest.nodes[e.unique_id]=e,e.label=e.name})),u.each(r.files.manifest.saved_queries,(function(e){r.files.manifest.nodes[e.unique_id]=e,e.label=e.name})),u.each(r.files.manifest.unit_tests,(function(e){r.files.manifest.nodes[e.unique_id]=e,e.label=e.name})),u.each(r.files.manifest.functions,(function(e){e.label=e.name,r.files.manifest.nodes[e.unique_id]=e}));var t=r.files.manifest.metadata.adapter_type,n=function(e,t){var n={},r={};return u.each(n,(function(e){r[e.package_name]||(r[e.package_name]={}),r[e.package_name][e.name]=e})),e=[],u.each(r,(function(n,r){if("dbt"!=r&&r!="dbt_"+t){var o=function(e){var t={},n=e.name.split("__");return n.length>1?n.slice(1).join("__"):(n=e.name.split("_"),n.length>1?n.slice(1).join("_"):e.name)};u.each(n,(function(e){e.macro_sql.match(/{{\s*adapter_macro\([^)]+\)\s+}}/)&&(e.impls={"Adapter Macro":e.macro_sql},e.is_adapter_macro=!0,t[e.name]=e)}));var r=["postgres","redshift","bigquery","snowflake","spark","presto","default"],o=u.values(t),i=u.filter(e,(function(e){var t=e.name.split("__");return t.length>1&&"default"!=t[0]&&"dbt"!=t[0]&&"dbt_"+adapter_type!=t[0]&&"dbt_"+t[0]!=t[1]}))}}))}}))} ``` -------------------------------- ### Get and Set Data Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Handles getting and setting data for elements, including binding events and triggers. Useful for managing element-specific data. ```javascript data:o.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}) ``` ```javascript removeData:o.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}) ``` ```javascript scratch:o.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}) ``` ```javascript removeScratch:o.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}) ``` ```javascript rscratch:o.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}) ``` ```javascript removeRscratch:o.removeData({field:"rscratch",triggerEvent:!1}) ``` ```javascript id:function(){var e=this[0];if(e)return e._private.data.id}} ``` -------------------------------- ### Getting the Index of an Element Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Gets the index of a specified element relative to its siblings. If no element is specified, returns the index of the first element in the set. ```javascript var index = $("li").index(someListItem); ``` -------------------------------- ### Initialize Cytoscape Core Source: https://github.com/fivetran/dbt_quickbooks/blob/main/docs/index.html Initializes the Cytoscape core instance, setting up container, options, and rendering. Use this to create a new Cytoscape graph instance. ```javascript var p=this._private={container:n,ready:!1,options:d,elements:new i(this),listeners:[],aniEles:new i(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:A(!0,d.zoomingEnabled),userZoomingEnabled:A(!0,d.userZoomingEnabled),panningEnabled:A(!0,d.panningEnabled),userPanningEnabled:A(!0,d.userPanningEnabled),boxSelectionEnabled:A(!0,d.boxSelectionEnabled),autolock:A(!1,d.autolock,d.autolockNodes),autoungrabify:A(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:A(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?u:d.styleEnabled,zoom:a.number(d.zoom)?d.zoom:1,pan:{x:a.plainObject(d.pan)&&a.number(d.pan.x)?d.pan.x:0,y:a.plainObject(d.pan)&&a.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1};this.createEmitter();var f=d.selectionType;p.selectionType=void 0===f||"additive"!==f&&"single"!==f?"single":f,a.number(d.minZoom)&&a.number(d.maxZoom)&&d.minZoom0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:a.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer)),function(e,t){if(e.some(a.promise))return l.all(e).then(t);t(e)}([d.style,d.elements],(function(e){var n=e[0],r=e[1];p.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(a.plainObject(e)||a.array(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.emit("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var l=o.extend({},t._private.options.layout);l.eles=t.elements(),t.layout(l).run()}(r,(function(){t.startAnimationLoop(),p.ready=!0,a.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e