1"use strict";(self.webpackChunk_aqx_member_web=self.webpackChunk_aqx_member_web||[]).push([["9763"],{62648:function(e,t,r){r.d(t,{e:()=>C}),r(42295);var o=r(32735),n=r(99773),i=r(84823),l=r(48881),a=r(36333),u=r(57358),s=r(19554),c=r(1403),f=r(50255),d=r(13266),y=r(58822),b=r(48260),p=r(61856),m=r(37402),S=r(18699),T=r(92963),L=r(64989),g=r(20231),h=r(3827),x=r(24936),v=r(59395);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,o,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P=i.Ry().shape({lotSize:(0,v.sT)(i.Z_()),fillPolicy:(0,v.Ke)(i.nK()),price:i.Z_().test("test-price",L.UF,function(e){return(0,L.FY)(e)}).when(["$orderTypeLabel","$priceLabel"],function(e,t){var r=z(e,2),o=r[0],n=r[1];return o!==S.Zk.MARKET_TO_LIMIT?t.required((0,L.$A)({label:n||""})):t}),priceTrigger:i.Z_().test("test-price-trigger",L.UF,function(e){return(0,L.FY)(e)}).when(["$orderTypeLabel","$priceTriggerLabel"],function(e,t){var r=z(e,2),o=r[0],n=r[1];return o===S.Zk.STOP_LIMIT?t.required((0,L.$A)({label:n||""})):t}),stopLoss:i.Z_().test("test-stop-loss",L.UF,function(e){return(0,L.FY)(e)}).test((0,v.wQ)(m.Qr.STOP_LOSS)),takeProfit:i.Z_().test("test-take-profit",L.UF,function(e){return(0,L.FY)(e)}).test((0,v.wQ)(m.Qr.TAKE_PROFIT)),expiration:i.hT().transform(L.mf).when(["fillPolicy","$expirationLabel"],function(e,t){var r=z(e,2),o=r[0],n=r[1];return o===l.T3.GTD?t.required((0,L.$A)({label:n||""})):t}),centroidDeviation:(0,v.zA)(i.Z_())}),C=function(e){var t=e.disablePreservedValues,r=e.onSuccess,i=e.onError,l=e.showTradeConfirmationModal,m=(0,c.jO)(),S=m.isCentroid,T=m.isMT4,L=(0,u.K)(),h=(0,d._f)(["lotSizeStep","type","symbol","maxContractLotSize","minContractLotSize","contractSize"]),v=h.lotSizeStep,_=h.type,z=h.symbol,C=h.maxContractLotSize,E=h.minContractLotSize,w=h.contractSize,Z=(0,s.Q9)(),j=(0,f.d6)(null!=z?z:"")||{},I=j.maxQuantity,A=j.minQuantity,F=M(),O=F.expirationLabel,k=F.orderTypeLabel,q=F.priceLabel,V=F.priceTriggerLabel,D=F.sizeLabel,R=(0,p.GM)().lotSizeMode,Q=(0,y.tl)(),$=(0,y.zi)(),K=(0,g.A)(),U=K.fillPolicyOptions,X=K.initialFillPolicy,G=(0,o.useMemo)(function(){return(0,n.X)(P)},[]),Y=(0,a.w)({resolver:G,mode:"onBlur",context:{orderTypeLabel:k,lotSizeStep:v,maxContractLotSize:C,minContractLotSize:E,contractSize:w,sizeLabel:D,lotSizeMode:R,isFillPolicyRequired:!T,isCentroid:S,hasMarketRange:S,hasQuoteboardHandling:L,quoteboardMinQuantity:A,quoteboardMaxQuantity:I,priceLabel:q,priceTriggerLabel:V,expirationLabel:O,buySellType:Q},shouldFocusError:!1,defaultValues:{lotSize:$.lotSize,units:$.units,fillPolicy:X}}),N=Y.handleSubmit,B=Y.reset,H=Y.setValue,W=Y.trigger,J=(0,o.useCallback)(function(e){var t=function(t){b._.createOrder({formData:e,onSuccess:function(){var o;r(),null==t||t(),B({fillPolicy:null!=(o=null==U?void 0:U[0])?o:b._.getFillPolicyDefaultValue({orderTypeLabel:k,symbolCategory:_}),tradeExpiry:b._.getTradeExpiryDefaultValue(),lotSize:e.lotSize,units:e.units})},onError:function(e){i(e),null==t||t()}})};Z?t():l({formValues:e,formMethods:Y,onConfirm:function(e){t(e)}})},[Z,i,r,B,k,l,_,Y,U]),ee=(0,o.useCallback)(function(e){N(J)(e)},[N,J]);return(0,o.useEffect)(function(){var e;H("fillPolicy",null!=(e=null==U?void 0:U[0])?e:b._.getFillPolicyDefaultValue({orderTypeLabel:k,symbolCategory:_})),H("tradeExpiry",b._.getTradeExpiryDefaultValue())},[U,k,H,_,z]),(0,o.useEffect)(function(){W(["stopLoss","takeProfit"])},[Q,W]),(0,x.Z)(Y,void 0!==t&&t),{formMethods:Y,onSubmit:ee}},M=function(){var e=(0,c.$X)(),t=(0,y.XT)(),r=(0,h.h)();return(0,o.useMemo)(function(){var o=(0,T.qn)(T.tV.PRICE,e),n=(0,T.qn)(T.tV.PRICE_TRIGGER,e);return{expirationLabel:(0,T.qn)(T.tV.EXPIRATION,e),priceLabel:o,priceTriggerLabel:n,orderTypeLabel:t,sizeLabel:r}},[e,t,r])}},45262:function(e,t,r){r.r(t),r.d(t,{default:()=>h});var o=r(74512);r(32735);var n=r(10281),i=r(82647),l=r(82391),a=r(62648),u=r(1403),s=r(57753),c=r(13266),f=r(65528),d=r(15861),y=r(26448),b=r(58118),p=r(31111),m=r(85029),S=r(62772),T=r(6904),L=r(16208),g=r(44536);let h=function(){var e=(0,c._f)(["symbol","type","expiration"]),t=e.symbol,r=e.type,n=e.expiration,h=(0,u.jO)().isMT5,v=(0,d.R)(),_=v.onError,z=v.onSuccessDefault,P=(0,a.e)({onSuccess:z,onError:_,showTradeConfirmationModal:f.d}),C=P.formMethods,M=P.onSubmit;return(0,o.jsxs)(l.q,{modalType:s.XV.OPW,methods:C,children:[(0,o.jsx)(b.Z,{}),h&&(0,o.jsx)(L.Z,{symbolId:t,symbolCategory:r,symbolMaturityDate:n}),(0,o.jsx)(x,{children:(0,o.jsx)(p.Z,{})}),(0,o.jsx)(m.Z,{}),(0,o.jsx)(S.default,{}),(0,o.jsx)(T.default,{}),(0,o.jsx)(y.Z,{dropdownPlacement:i.s1.TOP_END,symbolMaturityDate:void 0}),(0,o.jsx)(g.Z,{onSubmit:M})]})};var x=n.ZP.div.withConfig({componentId:"sc-a18f94dd-0"})(["margin-bottom:-6px;"])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.