OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiersQuery.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"applicationID"},{defaultValue:null,kind:"LocalArgument",name:"term"}],b=[{kind:"Variable",name:"application_id",variableName:"applicationID"},{kind:"Literal",name:"force_99_suffix",value:!0},{kind:"Variable",name:"subscription_term",variableName:"term"}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiersQuery",selections:[{alias:null,args:b,concreteType:"XOCApprovedPricePoint",kind:"LinkedField",name:"xoc_eligible_price_tiers",plural:!0,selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPriceChangeField_priceTiers"},{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPriceField_priceTiers"},{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiers"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiersQuery",selections:[{alias:null,args:b,concreteType:"XOCApprovedPricePoint",kind:"LinkedField",name:"xoc_eligible_price_tiers",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null}],storageKey:null}]},params:{id:"25173728328880868",metadata:{},name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiersQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiers.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:{plural:!0},name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_priceTiers",selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null}],type:"XOCApprovedPricePoint",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSection.react",["fbt","ix","GeoAccordionList.react","GeoAccordionListItem.react","GeoBaseRowLayout.react","GeoButton.react","GeoFlexbox.react","GeoListItem.react","GeoTextPairing.react","LocalDateTime","OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react","OCDevManageSubscriptionPricingIntroOfferSection_item.graphql","OCDevManageSubscriptionPricingIntroOfferSection_organization.graphql","OCDevManageSubscriptionUtils","RelayHooks","Timezone","fbicon","geoMargin","react"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m=l||d("react");function a(a){var e=a.formState,f=a.isAppLab,g=a.itemKey,l=a.organizationKey,n=a.setFormState,o=d("RelayHooks").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingIntroOfferSection_item.graphql"),g),p=d("RelayHooks").useFragment(k!==void 0?k:k=b("OCDevManageSubscriptionPricingIntroOfferSection_organization.graphql"),l);a=e.introOffers.filter(function(a){return a.status!=="CANCELLED"}).length;var q=function(a){n(function(b){return babelHelpers["extends"]({},b,{introOffers:b.introOffers.filter(function(b){return b.id!==a})})})};g=e.introOffers.filter(function(a){return a.status!=="CANCELLED"}).map(function(a,b){var g,h;g=o==null?void 0:(g=o.intro_offers)==null?void 0:(g=g.nodes)==null?void 0:g.find(function(b){return(b==null?void 0:b.id)===a.id});h=(h=g==null?void 0:g.price_with_formatted_term_and_label)!=null?h:d("OCDevManageSubscriptionUtils").getDefaultOfferLabel(b+1);b=g==null?void 0:g.status;return m.jsx(c("GeoAccordionListItem.react"),{isInitiallyExpanded:(g=a.id)==null?void 0:g.includes(d("OCDevManageSubscriptionUtils").NEW_INTRO_OFFER_KEY),item:m.jsx(c("GeoListItem.react"),{label:h},a.id),children:m.jsx(c("OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react"),{formState:e,isAppLab:f,offer:a,organizationKey:p,setOffer:function(a){return n(function(b){return babelHelpers["extends"]({},b,{introOffers:b.introOffers.map(function(b){return b.id===a.id?a:b})})})},status:b,onRemove:q})},a==null?void 0:a.id)});var r=function(a){a=d("OCDevManageSubscriptionUtils").getAvailableIntroOfferTerms(a);var b=d("OCDevManageSubscriptionUtils").getRandomID(),e=d("Timezone").getEnvironmentTimezoneID();return{endTime:0,id:d("OCDevManageSubscriptionUtils").NEW_INTRO_OFFER_KEY+"_"+b,price:null,maxTermCount:1,startTime:c("LocalDateTime").now(e).toInstant(e),status:"PENDING",trialTerm:a[0]}};return m.jsxs(m.Fragment,{children:[m.jsx(c("GeoBaseRowLayout.react"),{children:m.jsx(c("GeoTextPairing.react"),{description:h._("Intro offers are available to new and already-churned subscribers. After an intro offer is consumed, the subscription renews to the corresponding price for the same subscription term."),heading:h._("Introductory offer"),size:"header4"})}),m.jsxs(c("GeoFlexbox.react"),{direction:"column",children:[m.jsx(c("GeoAccordionList.react"),{xstyle:c("geoMargin").horiz8,children:g}),m.jsx(c("GeoButton.react"),{disabledMessage:f?h._("Only monthly intro offers are available to App Lab apps at the moment."):h._("You can only have one intro offer per subscription term that you have already created."),icon:d("fbicon")._(i("487086"),16),isDisabled:d("OCDevManageSubscriptionUtils").getAvailableIntroOfferTerms(e).length===0,label:a===0?h._("Add an introductory offer"):h._("Add another introductory offer"),xstyle:c("geoMargin").top16,onClick:function(){return n(function(a){return babelHelpers["extends"]({},a,{introOffers:[].concat(a.introOffers,[r(a)])})})}})]})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react",["fbt","ix","GeoButton.react","GeoDateTimeInput.react","GeoFlexbox.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoSelector.react","GeoSelectorItem.react","GeoText.react","LocalDateTime","OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization.graphql","OCDevManageSubscriptionUtils","OCDevManageSubscriptionsPriceInput.react","OCDevUISpacedLayout.react","Timezone","fbicon","geoMargin","getOCSubscriptionTermLabelV2","react","react-relay"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react")),m=k.useState;function a(a){var e=a.formState,f=a.isAppLab,g=a.offer,k=a.onRemove,n=a.organizationKey,o=a.setOffer;a=a.status;n=d("react-relay").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization.graphql"),n);a=a==="PUBLISHED";var p=d("OCDevManageSubscriptionUtils").getAvailableIntroOfferTerms(e),q=g.id,r=d("Timezone").getEnvironmentTimezoneID(),s=c("LocalDateTime").fromInstant(g.startTime,r),t=g.endTime===0?null:c("LocalDateTime").fromInstant(g.endTime,r),u=m(!1),v=u[0],w=u[1];if(q==null)return null;e=(u=e.paidOffers.find(function(a){return a.term===g.trialTerm}))==null?void 0:u.price;return l.jsxs(c("GeoFlexbox.react"),{direction:"column",children:[l.jsxs(c("GeoFlexbox.react"),{alignItems:"end",direction:"row",children:[l.jsx(c("GeoSelector.react"),{isDisabled:a,label:h._("Subscription term"),placeholder:h._("Select a term"),value:g.trialTerm,xstyle:c("geoMargin").end8,onChange:function(a){return o(babelHelpers["extends"]({},g,{trialTerm:a}))},children:d("OCDevManageSubscriptionUtils").getAllowedPaidTerms(f).map(function(a){return l.jsx(c("GeoSelectorItem.react"),{disabledMessage:h._("You can only have one introductory offer per billing term"),isDisabled:!p.includes(a)&&a!==g.trialTerm,label:c("getOCSubscriptionTermLabelV2")(a),value:a},a)})}),l.jsxs(c("GeoSelector.react"),{isDisabled:a,label:h._("Number of payments"),placeholder:h._("Select count"),tooltipText:h._("Indicates how many payments can be made at the intro price before the subscription is converted to the regular price."),value:g.maxTermCount,xstyle:c("geoMargin").end8,onChange:function(a){return o(babelHelpers["extends"]({},g,{maxTermCount:a}))},children:[l.jsx(c("GeoSelectorItem.react"),{label:h._("1 payment"),value:1}),l.jsx(c("GeoSelectorItem.react"),{label:h._("2 payments"),value:2}),l.jsx(c("GeoSelectorItem.react"),{label:h._("3 payments"),value:3})]}),l.jsx(c("OCDevManageSubscriptionsPriceInput.react"),{isAppLab:f,isDisabled:a,maxPrice:e,organization:n,term:(u=g.trialTerm)!=null?u:"NONE",value:g.price,onChange:function(a){if(a==null)return;o(babelHelpers["extends"]({},g,{price:a}))}})]}),l.jsx(c("GeoFlexbox.react"),{direction:"column",children:l.jsxs(c("GeoFlexbox.react"),{direction:"column",xstyle:c("geoMargin").vert8,children:[l.jsx(c("GeoDateTimeInput.react"),{description:h._("Choose when your introductory offer will start"),label:h._("Start"),value:s,xstyle:c("geoMargin").bottom16,onChange:function(a){if(a==null)return;o(babelHelpers["extends"]({},g,{startTime:a.toInstant(r)}))}},"start_date"),l.jsx(c("GeoDateTimeInput.react"),{dateRestraint:function(a){return s!=null&&a.isAfterOrEqual(s.toLocalDate())},description:h._("Choose when your introductory offer will end"),isDisabled:s==null,label:h._("End u2022 Optional"),value:t,onChange:function(a){if(a==null)return;o(babelHelpers["extends"]({},g,{endTime:a.toInstant(r)}))}},"end_date")]})}),l.jsx(c("GeoButton.react"),{icon:d("fbicon")._(i("483828"),16),label:h._("Remove offer"),xstyle:c("geoMargin").top8,onClick:function(){q.includes(d("OCDevManageSubscriptionUtils").NEW_INTRO_OFFER_KEY)?k(q):w(!0)}}),l.jsx(c("GeoModal.react"),{footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{label:h._("u79fbu9664"),variant:"primary",onClick:function(){o(babelHelpers["extends"]({},g,{status:"CANCELLED"})),w(!1)}}),secondaryButton:l.jsx(c("GeoButton.react"),{label:h._("u53d6u6d88"),onClick:function(){return w(!1)}})}),header:l.jsx(c("GeoModalHeader.react"),{heading:h._("Do you want to remove this introductory offer?")}),isShown:v,onHide:function(){return w(!1)},children:l.jsxs(c("OCDevUISpacedLayout.react"),{xstyle:c("geoMargin").horiz16,children:[l.jsx(c("GeoText.react"),{children:h._("This subscription will still be available to existing subscribers, but unavailable to new subscribers.")}),l.jsx(c("GeoText.react"),{children:h._("If you remove this subscription, you won"t be able to recover it later. However, you can recreate it at any time.")})]})})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
OCDevManageSubscriptionPricingIntroOfferSection_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSection_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionsPriceInput_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_organization",selections:[{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionsPriceInput_organization"}],type:"Organization",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSection.react",["fbt","GeoBaseRowLayout.react","GeoHeading.react","GeoSwitch.react","OCDevManageSubscriptionPricingCreateIntroOfferRowItem.react","OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react","OCDevManageSubscriptionPricingIntroOfferSection_item.graphql","OCDevManageSubscriptionPricingIntroOfferSection_organization.graphql","RelayHooks","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react")),m=k.useState;function a(a){var e,f=a.item;a=a.organizationKey;f=d("RelayHooks").useFragment(i!==void 0?i:i=b("OCDevManageSubscriptionPricingIntroOfferSection_item.graphql"),f);a=d("RelayHooks").useFragment(j!==void 0?j:j=b("OCDevManageSubscriptionPricingIntroOfferSection_organization.graphql"),a);e=Number((e=f==null?void 0:(e=f.intro_offers)==null?void 0:e.nodes.length)!=null?e:0);var g=m(e>0),k=g[0];g=g[1];return l.jsxs(l.Fragment,{children:[l.jsxs(c("GeoBaseRowLayout.react"),{children:[l.jsx(c("GeoHeading.react"),{level:4,children:h._("Introductory offer")}),l.jsx(c("GeoSwitch.react"),{isDisabled:e>0,label:"",value:k,onChange:g})]}),k&&(f==null?void 0:(e=f.intro_offers)==null?void 0:(g=e.nodes)==null?void 0:g.map(function(a){return l.jsx(c("OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react"),{offer:a},a.id)})),k&&l.jsx(c("OCDevManageSubscriptionPricingCreateIntroOfferRowItem.react"),{organizationKey:a})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),98);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem.react",["fbt","GeoBaseRowLayout.react","GeoTextInput.react","OCDevManageSubscriptionPricingIntroOfferSectionRowItem_offer.graphql","RelayHooks","getOCSubscriptionTermLabelV2","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k=j||d("react");function a(a){a=a.offer;a=d("RelayHooks").useFragment(i!==void 0?i:i=b("OCDevManageSubscriptionPricingIntroOfferSectionRowItem_offer.graphql"),a);return k.jsxs(c("GeoBaseRowLayout.react"),{children:[k.jsx(c("GeoTextInput.react"),{isDisabled:!0,label:h._("Term period"),value:c("getOCSubscriptionTermLabelV2")(a.trial_term).toString()}),k.jsx(c("GeoTextInput.react"),{isDisabled:!0,label:h._("Offer price"),value:a==null?void 0:(a=a.price)==null?void 0:a.formatted})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),98);
-----
OCDevManageSubscriptionPricingIntroOfferSection_item.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSection_item",selections:[{alias:null,args:[{kind:"Literal",name:"offer_statuses",value:["PENDING","PUBLISHED"]}],concreteType:"IAPItemIntroOffersConnection",kind:"LinkedField",name:"intro_offers",plural:!1,selections:[{alias:null,args:null,concreteType:"AppStoreTrialOffer",kind:"LinkedField",name:"nodes",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{args:null,kind:"FragmentSpread",name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_offer"}],storageKey:null}],storageKey:"intro_offers(offer_statuses:["PENDING","PUBLISHED"])"}],type:"IAPItem",abstractKey:null};e.exports=a}),null);
-----
OCDevManageSubscriptionPricingIntroOfferSectionRowItem_offer.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"OCDevManageSubscriptionPricingIntroOfferSectionRowItem_offer",selections:[{alias:null,args:null,kind:"ScalarField",name:"trial_term",storageKey:null},{alias:null,args:null,concreteType:"CurrencyQuantity",kind:"LinkedField",name:"price",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"formatted",storageKey:null}],storageKey:null}],type:"AppStoreTrialOffer",abstractKey:null};e.exports=a}),null);
-----