import{c as V,j as B,u as me,a as M,d as H,R as s,L as ge,O as pe,b as I,D as ye,s as he,T as O,e as $,C as ve,f as _e,g as w,h as be,i as Se,B as Ae,k as we,l as Ee,m as ke,E as De,n as xe,r as R,o as Le,p as Te,q as Oe,t as Ce,H as Pe,V as Ie,v as Fe,I as Me,w as Re,G as Ne,x as Ge,y as Ke,z as ze}from"./index.6894b23b.js";const qe=V(B.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"}),"DarkMode"),Ue=V(B.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}),"LightMode"),je=`import fiftyone as fo

# Name of an existing dataset
name = "quickstart"

dataset = fo.load_dataset(name)

# Launch a new App session
session = fo.launch_app(dataset)

# If you already have an active App session
# session.dataset = dataset`,Qe=`import fiftyone as fo

dataset = fo.load_dataset("$CURRENT_DATASET_NAME")

samples = []
for filepath, label in zip(filepaths, labels):
    sample = fo.Sample(filepath=filepath)
    sample["ground_truth"] = fo.Classification(label=label)
    samples.append(sample)

dataset.add_samples(samples)`,We=`import fiftyone as fo

# A name for the dataset
name = "my-dataset"

# The directory containing the data to import
dataset_dir = "/path/to/data"

# The type of data being imported
dataset_type = fo.types.COCODetectionDataset

dataset = fo.Dataset.from_dir(
    dataset_dir=dataset_dir,
    dataset_type=dataset_type,
    name=name,
)`,Ve={SELECT_DATASET:{title:"No dataset selected",code:je,subtitle:"Select a dataset with dataset selector above or",codeTitle:"Select a dataset with code",codeSubtitle:"Use Python or command line tools to set dataset for the current session",learnMoreLink:"https://docs.voxel51.com/user_guide/app.html",learnMoreLabel:"about using the Fiftyone App"},ADD_SAMPLE:{title:"No samples yet",code:Qe,subtitle:"Add samples to this dataset with code or",codeTitle:"Add samples with code",codeSubtitle:"Use Python or command line tools to add sample to this dataset",learnMoreLink:"https://docs.voxel51.com/user_guide/dataset_creation/index.html#custom-formats",learnMoreLabel:"about loading data into FiftyOne"},ADD_DATASET:{title:"No datasets yet",code:We,subtitle:"Add a dataset to FiftyOne with code or",codeTitle:"Create dataset with code",codeSubtitle:"Use Python or command line tools to add dataset to FiftyOne",learnMoreLink:"https://docs.voxel51.com/user_guide/dataset_creation/index.html",learnMoreLabel:"about loading data into FiftyOne"}},Q="@voxel51/utils/create_dataset",W="@voxel51/io/import_samples",Be="https://github.com/voxel51/fiftyone-plugins/tree/main/plugins/utils",He="https://github.com/voxel51/fiftyone-plugins/tree/main/plugins/io",$e="@voxel51/utils",Ye="@voxel51/io";function ut(o){const{mode:l}=o,d=me(!0),c=M(H);if(!l)return null;if(!d)return s.createElement(ge,null,"Pixelating...");const{code:p,codeTitle:y,learnMoreLabel:v,learnMoreLink:u,title:m}=Ve[l],f=p.replace("$CURRENT_DATASET_NAME",c),g=l==="SELECT_DATASET";return s.createElement(s.Fragment,null,s.createElement(pe,null),s.createElement(I,{spacing:6,divider:s.createElement(ye,{sx:{width:"100%"}}),sx:{fontWeight:"normal",alignItems:"center",width:"100%",py:8,overflow:"auto"},className:he},s.createElement(I,{alignItems:"center",spacing:1},s.createElement(O,{sx:{fontSize:16}},m),g&&s.createElement(O,{color:"text.secondary"},"You can use the selector above to open an existing dataset"),s.createElement(Ze,{...o}),!g&&s.createElement(O,{color:"text.secondary"},s.createElement($,{href:u,target:"_blank",sx:{textDecoration:"underline",":hover":{textDecoration:"none"}}},"Learn more"),"\xA0",v)),s.createElement(I,{alignItems:"center"},s.createElement(O,{sx:{fontSize:16}},y),s.createElement(O,{sx:{pb:2},color:"text.secondary"},"You can use Python to\xA0",l==="ADD_DATASET"&&s.createElement(s.Fragment,null,s.createElement(F,{href:u,target:"_blank"},"load data"),"\xA0into FiftyOne"),g&&s.createElement(s.Fragment,null,"load a dataset in the App"),l==="ADD_SAMPLE"&&s.createElement(s.Fragment,null,s.createElement(F,{href:u,target:"_blank"},"add samples"),"\xA0to this dataset")),s.createElement(ve,{tabs:[{id:"python",label:"Python",code:f}]}))))}function Ze(o){const{mode:l}=o,d=_e(),c=l==="ADD_SAMPLE",p=w.exports.useCallback(x=>Array.isArray(d.choices)?d.choices.some(T=>(T==null?void 0:T.value)===x):!1,[d]),y=w.exports.useMemo(()=>c?!1:p(Q),[c,p]),v=w.exports.useMemo(()=>c?p(W):!1,[c,p]),u=c?v:y,m=c?He:Be,f=c?Ye:$e,g=c?"add samples to this dataset":"create a new dataset",L=c?"add samples to datasets":"create datasets",D=c?W:Q;return s.createElement(O,{color:"text.secondary"},u?s.createElement(s.Fragment,null,s.createElement(Je,{uri:D}),"to ",g):s.createElement(s.Fragment,null,"Did you know? You can ",L," in the App by installing the\xA0",s.createElement(F,{href:m,target:"_blank"},f),"\xA0plugin"),", or\xA0",s.createElement(Y,{onClick:d.toggle},"browse operations")," for other options")}function Je(o){const{uri:l,prompt:d=!0}=o,c=be(),{execute:p}=Se(l),y=w.exports.useCallback(()=>{d?c(l):p({})},[d,c,l,p]);return s.createElement(Y,{onClick:y},"Click here")}function Y(o){return s.createElement(Ae,{...o,sx:{p:0,textTransform:"none",fontSize:"inherit",lineHeight:"inherit",verticalAlign:"baseline",color:l=>l.palette.text.primary,textDecoration:"underline",...(o==null?void 0:o.sx)||{}}})}function F(o){return s.createElement($,{...o,sx:{textDecoration:"underline",":hover":{textDecoration:"none"},...(o==null?void 0:o.sx)||{}}})}const Z={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"NavFragment",selections:[{args:null,kind:"FragmentSpread",name:"NavDatasets"},{args:null,kind:"FragmentSpread",name:"NavGA"}],type:"Query",abstractKey:null};Z.hash="f8b963593ae22123acdf5393b9a8a274";const J={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"NavGA",selections:[{alias:null,args:null,kind:"ScalarField",name:"context",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dev",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"doNotTrack",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"uid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"version",storageKey:null}],type:"Query",abstractKey:null};J.hash="a2d13e827ff06e46baffc9244d708b0a";const X=function(){var o=[{defaultValue:null,kind:"LocalArgument",name:"count"},{defaultValue:null,kind:"LocalArgument",name:"cursor"},{defaultValue:null,kind:"LocalArgument",name:"search"}],l=[{kind:"Variable",name:"after",variableName:"cursor"},{kind:"Variable",name:"first",variableName:"count"},{kind:"Variable",name:"search",variableName:"search"}];return{fragment:{argumentDefinitions:o,kind:"Fragment",metadata:null,name:"DatasetsPaginationQuery",selections:[{args:null,kind:"FragmentSpread",name:"NavDatasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:o,kind:"Operation",name:"DatasetsPaginationQuery",selections:[{alias:null,args:l,concreteType:"DatasetStrConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null},{alias:null,args:null,concreteType:"DatasetStrEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetStrPageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:l,filters:["search"],handle:"connection",key:"DatasetsList_query_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"51829dc84906da9b415d984d01b4ef24",id:null,metadata:{},name:"DatasetsPaginationQuery",operationKind:"query",text:`query DatasetsPaginationQuery(
  $count: Int
  $cursor: String
  $search: String
) {
  ...NavDatasets
}

fragment NavDatasets on Query {
  datasets(search: $search, first: $count, after: $cursor) {
    total
    edges {
      cursor
      node {
        name
        id
        __typename
      }
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}
`}}}();X.hash="c3d4960b5532b1af0f3fe881adf27805";const ee=function(){var o=["datasets"];return{argumentDefinitions:[{kind:"RootArgument",name:"count"},{kind:"RootArgument",name:"cursor"},{kind:"RootArgument",name:"search"}],kind:"Fragment",metadata:{connection:[{count:"count",cursor:"cursor",direction:"forward",path:o}],refetch:{connection:{forward:{count:"count",cursor:"cursor"},backward:null,path:o},fragmentPathInResult:[],operation:X}},name:"NavDatasets",selections:[{alias:"datasets",args:[{kind:"Variable",name:"search",variableName:"search"}],concreteType:"DatasetStrConnection",kind:"LinkedField",name:"__DatasetsList_query_datasets_connection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null},{alias:null,args:null,concreteType:"DatasetStrEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetStrPageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null}}();ee.hash="c3d4960b5532b1af0f3fe881adf27805";var te={},ae={},ne={};(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=function(){for(var p=arguments.length,y=new Array(p),v=0;v<p;v++)y[v]=arguments[v];if(typeof window<"u"){var u;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(u=window).gtag.apply(u,y)}},d=l;o.default=d})(ne);var re={};(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=v;var l=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function d(u){return u.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(m,f,g){return f>0&&f+m.length!==g.length&&m.search(l)>-1&&g.charAt(f-2)!==":"&&(g.charAt(f+m.length)!=="-"||g.charAt(f-1)==="-")&&g.charAt(f-1).search(/[^\s-]/)<0?m.toLowerCase():m.substr(1).search(/[A-Z]|\../)>-1?m:m.charAt(0).toUpperCase()+m.substr(1)})}function c(u){return typeof u=="string"&&u.indexOf("@")!==-1}var p="REDACTED (Potential Email Address)";function y(u){return c(u)?(console.warn("This arg looks like an email address, redacting."),p):u}function v(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,g=u||"";return m&&(g=d(u)),f&&(g=y(g)),g}})(re);(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.GA4=void 0;var l=v(ne),d=v(re),c=["eventCategory","eventAction","eventLabel","eventValue","hitType"],p=["title","location"],y=["page","hitType"];function v(n){return n&&n.__esModule?n:{default:n}}function u(n,e){if(n==null)return{};var t=m(n,e),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r<i.length;r++)a=i[r],!(e.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(n,a)||(t[a]=n[a]))}return t}function m(n,e){if(n==null)return{};var t={},a=Object.keys(n),r,i;for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&(t[r]=n[r]);return t}function f(n){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(n)}function g(n){return x(n)||D(n)||N(n)||L()}function L(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function x(n){if(Array.isArray(n))return P(n)}function T(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,a)}return t}function k(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?T(Object(t),!0).forEach(function(a){b(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}function oe(n,e){return se(n)||ie(n,e)||N(n,e)||le()}function le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(n,e){if(!!n){if(typeof n=="string")return P(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P(n,e)}}function P(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function ie(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var a,r,i,h,_=[],S=!0,A=!1;try{if(i=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;S=!1}else for(;!(S=(a=i.call(t)).done)&&(_.push(a.value),_.length!==e);S=!0);}catch(E){A=!0,r=E}finally{try{if(!S&&t.return!=null&&(h=t.return(),Object(h)!==h))return}finally{if(A)throw r}}return _}}function se(n){if(Array.isArray(n))return n}function ue(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function G(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,K(a.key),a)}}function ce(n,e,t){return e&&G(n.prototype,e),t&&G(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function b(n,e,t){return e=K(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function K(n){var e=de(n,"string");return f(e)==="symbol"?e:String(e)}function de(n,e){if(f(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var a=t.call(n,e||"default");if(f(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var z=function(){function n(){var e=this;ue(this,n),b(this,"reset",function(){e.isInitialized=!1,e._testMode=!1,e._currentMeasurementId,e._hasLoadedGA=!1,e._isQueuing=!1,e._queueGtag=[]}),b(this,"_gtag",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];e._testMode||e._isQueuing?e._queueGtag.push(a):l.default.apply(void 0,a)}),b(this,"_loadGA",function(t,a){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!e._hasLoadedGA){var i=document.createElement("script");i.async=!0,i.src="".concat(r,"?id=").concat(t),a&&i.setAttribute("nonce",a),document.body.appendChild(i),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},e._hasLoadedGA=!0}}),b(this,"_toGtagOptions",function(t){if(!!t){var a={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},r=Object.entries(t).reduce(function(i,h){var _=oe(h,2),S=_[0],A=_[1];return a[S]?i[a[S]]=A:i[S]=A,i},{});return r}}),b(this,"initialize",function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!t)throw new Error("Require GA_MEASUREMENT_ID");var r=typeof t=="string"?[{trackingId:t}]:t;e._currentMeasurementId=r[0].trackingId;var i=a.gaOptions,h=a.gtagOptions,_=a.nonce,S=a.testMode,A=S===void 0?!1:S,E=a.gtagUrl;if(e._testMode=A,A||e._loadGA(e._currentMeasurementId,_,E),e.isInitialized||(e._gtag("js",new Date),r.forEach(function(C){var j=k(k(k({},e._toGtagOptions(k(k({},i),C.gaOptions))),h),C.gtagOptions);Object.keys(j).length?e._gtag("config",C.trackingId,j):e._gtag("config",C.trackingId)})),e.isInitialized=!0,!A){var q=g(e._queueGtag);for(e._queueGtag=[],e._isQueuing=!1;q.length;){var U=q.shift();e._gtag.apply(e,g(U)),U[0]==="get"&&(e._isQueuing=!0)}}}),b(this,"set",function(t){if(!t){console.warn("`fieldsObject` is required in .set()");return}if(f(t)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(t).length===0&&console.warn("empty `fieldsObject` given to .set()"),e._gaCommand("set",t)}),b(this,"_gaCommandSendEvent",function(t,a,r,i,h){e._gtag("event",a,k(k({event_category:t,event_label:r,value:i},h&&{non_interaction:h.nonInteraction}),e._toGtagOptions(h)))}),b(this,"_gaCommandSendEventParameters",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];if(typeof a[0]=="string")e._gaCommandSendEvent.apply(e,g(a.slice(1)));else{var i=a[0],h=i.eventCategory,_=i.eventAction,S=i.eventLabel,A=i.eventValue;i.hitType;var E=u(i,c);e._gaCommandSendEvent(h,_,S,A,E)}}),b(this,"_gaCommandSendTiming",function(t,a,r,i){e._gtag("event","timing_complete",{name:a,value:r,event_category:t,event_label:i})}),b(this,"_gaCommandSendPageview",function(t,a){if(a&&Object.keys(a).length){var r=e._toGtagOptions(a),i=r.title,h=r.location,_=u(r,p);e._gtag("event","page_view",k(k(k(k({},t&&{page_path:t}),i&&{page_title:i}),h&&{page_location:h}),_))}else t?e._gtag("event","page_view",{page_path:t}):e._gtag("event","page_view")}),b(this,"_gaCommandSendPageviewParameters",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];if(typeof a[0]=="string")e._gaCommandSendPageview.apply(e,g(a.slice(1)));else{var i=a[0],h=i.page;i.hitType;var _=u(i,y);e._gaCommandSendPageview(h,_)}}),b(this,"_gaCommandSend",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];var i=typeof a[0]=="string"?a[0]:a[0].hitType;switch(i){case"event":e._gaCommandSendEventParameters.apply(e,a);break;case"pageview":e._gaCommandSendPageviewParameters.apply(e,a);break;case"timing":e._gaCommandSendTiming.apply(e,g(a.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(i));break;default:console.warn("Send command doesn't exist: ".concat(i))}}),b(this,"_gaCommandSet",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];typeof a[0]=="string"&&(a[0]=b({},a[0],a[1])),e._gtag("set",e._toGtagOptions(a[0]))}),b(this,"_gaCommand",function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];switch(t){case"send":e._gaCommandSend.apply(e,r);break;case"set":e._gaCommandSet.apply(e,r);break;default:console.warn("Command doesn't exist: ".concat(t))}}),b(this,"ga",function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];if(typeof a[0]=="string")e._gaCommand.apply(e,a);else{var i=a[0];e._gtag("get",e._currentMeasurementId,"client_id",function(h){e._isQueuing=!1;var _=e._queueGtag;for(i({get:function(E){return E==="clientId"?h:E==="trackingId"?e._currentMeasurementId:E==="apiVersion"?"1":void 0}});_.length;){var S=_.shift();e._gtag.apply(e,g(S))}}),e._isQueuing=!0}return e.ga}),b(this,"event",function(t,a){if(typeof t=="string")e._gtag("event",t,e._toGtagOptions(a));else{var r=t.action,i=t.category,h=t.label,_=t.value,S=t.nonInteraction,A=t.transport;if(!i||!r){console.warn("args.category AND args.action are required in event()");return}var E={hitType:"event",eventCategory:(0,d.default)(i),eventAction:(0,d.default)(r)};h&&(E.eventLabel=(0,d.default)(h)),typeof _<"u"&&(typeof _!="number"?console.warn("Expected `args.value` arg to be a Number."):E.eventValue=_),typeof S<"u"&&(typeof S!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):E.nonInteraction=S),typeof A<"u"&&(typeof A!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(A)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),E.transport=A)),e._gaCommand("send",E)}}),b(this,"send",function(t){e._gaCommand("send",t)}),this.reset()}return ce(n,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),n}();o.GA4=z;var fe=new z;o.default=fe})(ae);(function(o){function l(u){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},l(u)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.ReactGAImplementation=void 0;var d=p(ae);function c(u){if(typeof WeakMap!="function")return null;var m=new WeakMap,f=new WeakMap;return(c=function(L){return L?f:m})(u)}function p(u,m){if(!m&&u&&u.__esModule)return u;if(u===null||l(u)!=="object"&&typeof u!="function")return{default:u};var f=c(m);if(f&&f.has(u))return f.get(u);var g={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in u)if(D!=="default"&&Object.prototype.hasOwnProperty.call(u,D)){var x=L?Object.getOwnPropertyDescriptor(u,D):null;x&&(x.get||x.set)?Object.defineProperty(g,D,x):g[D]=u[D]}return g.default=u,f&&f.set(u,g),g}var y=d.GA4;o.ReactGAImplementation=y;var v=d.default;o.default=v})(te);const Xe=we(te);function et(o,l){l===void 0&&(l=0);var d=w.exports.useRef(!1),c=w.exports.useRef(),p=w.exports.useRef(o),y=w.exports.useCallback(function(){return d.current},[]),v=w.exports.useCallback(function(){d.current=!1,c.current&&clearTimeout(c.current),c.current=setTimeout(function(){d.current=!0,p.current()},l)},[l]),u=w.exports.useCallback(function(){d.current=null,c.current&&clearTimeout(c.current)},[]);return w.exports.useEffect(function(){p.current=o},[o]),w.exports.useEffect(function(){return v(),u},[l]),[y,u,v]}function tt(o,l,d){l===void 0&&(l=0),d===void 0&&(d=[]);var c=et(o,l),p=c[0],y=c[1],v=c[2];return w.exports.useEffect(v,d),[p,y]}const at={app_ids:{prod:"G-NT3FLN0QHF",dev:"G-7TMZEFFWB7"},dimensions:{dev:"dimension1",version:"dimension2",context:"dimension3"}},nt=({className:o,value:l})=>s.createElement("a",{className:o,title:l},l),rt=({useSearch:o})=>{const l=Ee(),d=M(H);return s.createElement(ke,{component:nt,placeholder:"Select dataset",inputStyle:{height:40,maxWidth:300},containerStyle:{position:"relative"},onSelect:async c=>(l(c),c),overflow:!0,useSearch:o,value:d})};function ot(){return s.createElement(De,{href:"https://voxel51.com/book-a-demo/?utm_source=FiftyOneApp"},s.createElement(xe,null,"Have a Team?"))}const lt=o=>l=>{const d=M(ze),{data:c,refetch:p}=R.exports.usePaginationFragment(ee,o);return tt(()=>{p({search:l})},200,[l,d]),w.exports.useMemo(()=>({total:c.datasets.total===null?void 0:c.datasets.total,values:c.datasets.edges.map(y=>y.node.name)}),[c])},it=o=>{const l=R.exports.useFragment(J,o);w.exports.useEffect(()=>{if(l.doNotTrack)return;const c=l.dev?"dev":"prod";Xe.initialize(at.app_ids[c],{testMode:!1,gaOptions:{storage:"none",cookieDomain:"none",clientId:l.uid,page_location:"omitted",page_path:"omitted",kind:Ke()?"Desktop":"Web",version:l.version,context:l.context,checkProtocolTask:null}})},[])},ct=({fragment:o,hasDataset:l})=>{const d=R.exports.useFragment(Z,o);it(d);const c=lt(d),p=Le(),{mode:y,setMode:v}=Te(),[u,m]=Oe(Ce);return s.createElement(Pe,{title:"FiftyOne",onRefresh:p,navChildren:s.createElement(rt,{useSearch:c})},l&&s.createElement(w.exports.Suspense,{fallback:s.createElement("div",{style:{flex:1}})},s.createElement(Ie,null)),!l&&s.createElement("div",{style:{flex:1}}),s.createElement("div",{className:Fe},s.createElement(ot,null),s.createElement(Me,{title:y==="dark"?"Light mode":"Dark mode",onClick:()=>{const f=y==="dark"?"light":"dark";v(f),m(f)},sx:{color:f=>f.palette.text.secondary,pr:0}},y==="dark"?s.createElement(Ue,{color:"inherit"}):s.createElement(qe,null)),s.createElement(Re,null),s.createElement(Ne,null),s.createElement(Ge,null)))};export{ct as N,ut as S};
