var/cache/dev/twig/d4/d4006d78f5a0e5b3658a7c05cb879051.php line 409

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\MacroNamespace;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Sandbox\SecurityNotAllowedTestError;
  14. use Twig\Source;
  15. use Twig\Template;
  16. use Twig\TemplateWrapper;
  17. /* front/tunnel/step1a.html.twig */
  18. class __TwigTemplate_e3becf286465203dda5576c9cbf3e45d extends Template
  19. {
  20.     private Source $source;
  21.     /**
  22.      * @var array<string, MacroNamespace>
  23.      */
  24.     private array $macros = [];
  25.     private \Twig\Runtime\EscaperRuntime $escaper;
  26.     public function __construct(Environment $env)
  27.     {
  28.         parent::__construct($env);
  29.         $this->source = $this->getSourceContext();
  30.         $this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
  31.         $this->blocks = [
  32.             'head' => [$this, 'block_head'],
  33.             'body' => [$this, 'block_body'],
  34.             'javascripts' => [$this, 'block_javascripts'],
  35.         ];
  36.     }
  37.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  38.     {
  39.         // line 1
  40.         return $this->parent ??= $this->load("front/tunnel/layout.html.twig", 1);
  41.     }
  42.     protected function doDisplay(array $context, array $blocks = []): iterable
  43.     {
  44.         $macros = $this->macros;
  45.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/tunnel/step1a.html.twig"));
  47.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/tunnel/step1a.html.twig"));
  49.         $this->parent = $this->load("front/tunnel/layout.html.twig", 1);
  50.         yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  51.         
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  53.         
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  55.     }
  56.     // line 2
  57.     /**
  58.      * @return iterable<null|scalar|\Stringable>
  59.      */
  60.     public function block_head(array $context, array $blocks = []): iterable
  61.     {
  62.         $macros = $this->macros;
  63.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  64.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
  65.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
  67.         // line 3
  68.         yield "  <title>Étape 1</title>
  69. ";
  70.         
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  72.         
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  74.         return; yield;
  75.     }
  76.     // line 5
  77.     /**
  78.      * @return iterable<null|scalar|\Stringable>
  79.      */
  80.     public function block_body(array $context, array $blocks = []): iterable
  81.     {
  82.         $macros = $this->macros;
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  84.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  85.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  86.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  87.         // line 6
  88.         yield "
  89.   <!-- Timeline -->
  90.   <section class=\"w-full py-10 sm:py-20\">
  91.     <ol class=\"flex flex-row w-full\">
  92.       <!--first item-->
  93.       <li class=\"relative flex-1\">
  94.         <div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
  95.         <div class=\"relative z-10 flex flex-col items-center\">
  96.           <div class=\"size-5 rounded-full bg-bleuindigo border-4 border-bleuindigo\"></div>
  97.           <p class=\"mt-4 sm:mt-2 text-sm sm:text-lg font-bold text-bleuindigo text-center px-2\">
  98.             1. Je sélectionne la durée
  99.           </p>
  100.         </div>
  101.       </li>
  102.       <!--Second item-->
  103.       <li class=\"relative flex-1\">
  104.         <div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
  105.         <div class=\"relative z-10 flex flex-col items-center\">
  106.           <div class=\"size-5 rounded-full bg-lavande\"></div>
  107.           <p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
  108.             2. J\x27accède à mon compte
  109.           </p>
  110.         </div>
  111.       </li>
  112.       <!--Third item-->
  113.       <li class=\"relative flex-1\">
  114.         <div class=\"relative z-10 flex flex-col items-center\">
  115.           <div class=\"size-5 rounded-full bg-lavande\"></div>
  116.           <p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
  117.             3. Je procède au paiement
  118.           </p>
  119.         </div>
  120.       </li>
  121.     </ol>
  122.   </section>
  123. ";
  124.         // line 47
  125.         if ((($tmp = (isset($context["mode_free"]) || array_key_exists("mode_free", $context) ? $context["mode_free"] : (function () { throw new RuntimeError('Variable "mode_free" does not exist.', 47, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  126.             // line 48
  127.             yield "  <section class=\"flex justify-center mb-8 sm:mb-16\">
  128.     <div class=\"text-center bg-jaune text-bleuindigo font-bold py-2 px-4 rounded-full text-sm sm:text-lg\">
  129.       Vous ne serez pas débité avant la fin de votre essai de 7 jours, résiliable à tout moment.
  130.     </div>
  131.   </section>
  132. ";
  133.         }
  134.         // line 54
  135.         yield "
  136.   <!--Offres-->
  137.   <section class=\"flex justify-center\">
  138.     <div class=\"flex flex-col lg:flex-row justify-between\">
  139.       <!--Colonne gauche-->
  140.       <div class=\"flex flex-col lg:w-6/12 xl:w-7/12\">
  141.         ";
  142.         // line 61
  143.         if ( !(($tmp = (isset($context["fromDashboardParent"]) || array_key_exists("fromDashboardParent", $context) ? $context["fromDashboardParent"] : (function () { throw new RuntimeError('Variable "fromDashboardParent" does not exist.', 61, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  144.             // line 62
  145.             yield "        <div>
  146.           <label for=\"enfants\" class=\"text-bleuindigo tracking-tight sm:tracking-normal\">
  147.             Combien d’enfants souhaitez-vous inscrire&nbsp;?
  148.           </label>
  149.           <div class=\"flex items-center mt-2\">
  150.             <div>
  151.               <select id=\"nbr-child\" name=\"nbr-child\" class=\"block rounded-3xl border-lavande py-1.5 text-gris text-sm\">
  152.                 <option value=\"1\">1 enfant</option>
  153.                 <option value=\"2\">2 enfants</option>
  154.                 <option value=\"3\">3 enfants</option>
  155.                 <option value=\"4\">4 enfants</option>
  156.                 <option value=\"5\">5 enfants</option>
  157.               </select>
  158.             </div>
  159.             <div class=\"text-xs text-framboise font-bold ml-5\">
  160.               <p>-50% pour chaque enfant supplémentaire</p>
  161.             </div>
  162.           </div>
  163.         </div>
  164.         ";
  165.         } else {
  166.             // line 82
  167.             yield "          <input type=\"hidden\" name=\"nbr-child\" value=\"1\" id=\"nbr-child\">
  168.         ";
  169.         }
  170.         // line 84
  171.         yield "        <div>
  172.           <p class=\"text-bleuindigo mt-14\">Sélectionnez la durée</p>
  173.         </div>
  174.         ";
  175.         // line 87
  176.         $context['_parent'] = $context;
  177.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["listOffer"]) || array_key_exists("listOffer", $context) ? $context["listOffer"] : (function () { throw new RuntimeError('Variable "listOffer" does not exist.', 87, $this->source); })()));
  178.         $context['loop'] = [
  179.           'parent' => $context['_parent'],
  180.           'index0' => 0,
  181.           'index'  => 1,
  182.           'first'  => true,
  183.         ];
  184.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  185.             $length = count($context['_seq']);
  186.             $context['loop']['revindex0'] = $length - 1;
  187.             $context['loop']['revindex'] = $length;
  188.             $context['loop']['length'] = $length;
  189.             $context['loop']['last'] = 1 === $length;
  190.         }
  191.         foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
  192.             // line 88
  193.             yield "          ";
  194.             $context["noDiscountAuto"] = ((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 88)) || ( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 88)) && ($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 88), "U") < $this->extensions['Twig\Extension\CoreExtension']->formatDate("now", "U"))));
  195.             // line 89
  196.             yield "          ";
  197.             if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 89, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  198.                 // line 90
  199.                 yield "            ";
  200.                 $context["priceReducePercent"] = abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 90) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 90)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 90, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 90, $this->source); })())) * 100), 0, ",", "."));
  201.                 // line 91
  202.                 yield "          ";
  203.             } else {
  204.                 // line 92
  205.                 yield "            ";
  206.                 $context["priceReducePercent"] = (((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 92))) ? (abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 92) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 92)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 92, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 92, $this->source); })())) * 100), 0, ",", "."))) : (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 92)));
  207.                 // line 93
  208.                 yield "            ";
  209.             }
  210.             // line 94
  211.             yield "          ";
  212.             $context["amount"] = (((($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 94, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 94)) : (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 94)));
  213.             // line 95
  214.             yield "        <!--Carte 24 mois-->
  215.         <div class=\"flex flex-col sm:flex-row lg:flex-col xl:flex-row items-start relative justify-between border-lavande border rounded-lg p-5 mt-2\">
  216.           ";
  217.             // line 97
  218.             if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 97)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  219.                 // line 98
  220.                 yield "          <div class=\"flex items-center absolute text-bleuindigo text-[10px] font-bold bg-jaune rounded-xl px-2 -top-[8px] right-[20px]\"><span class=\"text-lg -my-1 pr-1\">♥</span> LE CHOIX DES PARENTS</div>
  221.           ";
  222.             }
  223.             // line 100
  224.             yield "          <div class=\"flex items-center gap-x-3\">
  225.             <input id=\"p-";
  226.             // line 101
  227.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 101), "html", null, true);
  228.             yield "\" name=\"price\" type=\"radio\" value=\"";
  229.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "slug", [], "any", false, false, false, 101), "html", null, true);
  230.             yield "\" class=\"input-price h-4 w-4 border-lavande";
  231.             if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 101, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  232.                 yield " js-auto-discount";
  233.             }
  234.             yield "\" ";
  235.             if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 101, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  236.                 yield "data-discount=\"";
  237.                 yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "codePromo", [], "any", false, false, false, 101), "html", null, true);
  238.                 yield "\" data-multi-discount=\"";
  239.                 if ( !(null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "moreChildReduce", [], "any", false, false, false, 101))) {
  240.                     yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "moreChildReduce", [], "any", false, false, false, 101), "percent", [], "any", false, false, false, 101), "html", null, true);
  241.                 }
  242.                 yield "\"";
  243.             }
  244.             yield " data-id=\"";
  245.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "id", [], "any", false, false, false, 101), "html", null, true);
  246.             yield "\" data-title=\"";
  247.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "title", [], "any", false, false, false, 101), "html", null, true);
  248.             yield "\" data-price=\"";
  249.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 101), "html", null, true);
  250.             yield "\" data-month=\"";
  251.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101), "html", null, true);
  252.             yield "\" data-period=\"";
  253.             if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101) > 1)) {
  254.                 yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101), "html", null, true);
  255.             }
  256.             yield " mois\">
  257.             <label for=\"p-";
  258.             // line 102
  259.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 102), "html", null, true);
  260.             yield "\" class=\"flex flex-row items-center text-nowrap\">
  261.               <span class=\"text-bleuindigo font-bold text-xl mr-5\">";
  262.             // line 103
  263.             yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 103), "html", null, true);
  264.             yield " mois</span>
  265.               ";
  266.             // line 104
  267.             if (((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 104) > 1) || (($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 104)) && $tmp instanceof Markup ? (string) $tmp : $tmp))) {
  268.                 // line 105
  269.                 yield "              <span class=\"text-white bg-pervenche text-[10px] rounded-4xl py-1 px-2\">";
  270.                 if (( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105)) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105)))) {
  271.                     yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105), "html", null, true);
  272.                 } else {
  273.                     yield (string) $this->escaper->escape((isset($context["priceReducePercent"]) || array_key_exists("priceReducePercent", $context) ? $context["priceReducePercent"] : (function () { throw new RuntimeError('Variable "priceReducePercent" does not exist.', 105, $this->source); })()), "html", null, true);
  274.                 }
  275.                 yield "% DE RÉDUCTION</span>
  276.               ";
  277.             }
  278.             // line 107
  279.             yield "            </label>
  280.           </div>
  281.           <div class=\"flex flex-col sm:items-end sm:w-full sm:size-auto lg:w-full xl:size-auto sm:text-right mt-4 sm:mt-0\">
  282.             <span class=\"text-xl\">
  283.               <span class=\"text-pervenche sm:text-bleuindigo font-bold\">";
  284.             // line 111
  285.             yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round(((isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 111, $this->source); })()) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 111)), 2, "floor"), 2, ",", "."), "html", null, true);
  286.             yield "€/mois</span>
  287.             </span>
  288.             ";
  289.             // line 113
  290.             if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 113, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  291.                 // line 114
  292.                 yield "            <span class=\"text-base line-through\">";
  293.                 yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round((isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 114, $this->source); })()), 2, "floor"), 2, ",", "."), "html", null, true);
  294.                 yield "€/mois</span>
  295.             ";
  296.             }
  297.             // line 116
  298.             yield "            <span class=\"text-xs\">";
  299.             if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 116) > 1)) {
  300.                 yield "Paiement unique de ";
  301.                 yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 116, $this->source); })()), 2, ",", "."), "html", null, true);
  302.                 yield " €";
  303.                 if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 116) < 13)) {
  304.                     yield ", reconduction tacite, annulable à tout moment";
  305.                 } else {
  306.                     yield ".";
  307.                 }
  308.             } else {
  309.                 yield "Sans engagement, reconduction tacite";
  310.             }
  311.             yield "</span>
  312.             ";
  313.             // line 117
  314.             if (((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 117) > 1) && (($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["row"], "displayEcoText", [], "any", false, false, false, 117)) && $tmp instanceof Markup ? (string) $tmp : $tmp))) {
  315.                 yield " <span class=\"text-xs text-pervenche\">soit ";
  316.                 yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((((isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 117, $this->source); })()) * CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 117)) - (isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 117, $this->source); })())), 2, ",", "."), "html", null, true);
  317.                 yield "€ économisés</span>";
  318.             }
  319.             // line 118
  320.             yield "          </div>
  321.         </div>
  322.         ";
  323.             ++$context['loop']['index0'];
  324.             ++$context['loop']['index'];
  325.             $context['loop']['first'] = false;
  326.             if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  327.                 --$context['loop']['revindex0'];
  328.                 --$context['loop']['revindex'];
  329.                 $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  330.             }
  331.         }
  332.         $_parent = $context['_parent'];
  333.         unset($context['_seq'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
  334.         $context = array_intersect_key($context, $_parent);
  335.         $context += $_parent;
  336.         // line 121
  337.         yield "      </div>
  338.       <!--Colonne droite-->
  339.       <div class=\"flex flex-col lg:w-5/12 xl:w-4/12 my-16 lg:mt-0\">
  340.         <!--Encadré lavande-->
  341.         <div class=\"flex flex-col bg-lavandeclair rounded-2xl text-sm sm:text-base gap-y-2 p-5 sm:p-10\">
  342.           <div class=\"text-bleuindigo font-bold text-xl\">
  343.             Vous avez choisi l’offre
  344.           </div>
  345.           <div class=\"text-pervenche font-bold text-2xl sm:text-3xl\">
  346.             ";
  347.         // line 134
  348.         yield (string) $this->escaper->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 134, $this->source); })()), "title", [], "any", false, false, false, 134)), "html", null, true);
  349.         yield "
  350.           </div>
  351.           <div class=\"text-lavande text-xs font-bold\">
  352.             <a href=\"https://www.lesbonsprofs.com/nos-offres/\" class=\"flex items-center hover:underline\"><img src=\"/static/img/tunnel/stylo.webp\" alt=\"Changer d\x27offre\" class=\"w-3 mr-1\">Changer d\x27offre</a>
  353.           </div>
  354.           <div class=\"font-bold mt-2\">
  355.             ";
  356.         // line 140
  357.         yield (string) CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 140, $this->source); })()), "textPaid", [], "any", false, false, false, 140);
  358.         yield "
  359.           </div>
  360.           <div class=\"flex justify-between items-center mt-4\">
  361.             <span class=\"flex text-bleuindigo font-bold\">
  362.               <span class=\"flex items-center bg-jaune rounded-xl px-2 mr-1\"><span class=\"text-lg -my-1 pr-1\">&#9733</span> 4,6</span>+ 300 avis Trustpilot
  363.             </span>
  364.             <span class=\"text-pervenche text-xs hover:underline\"><a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\">Voir les avis</a></span>
  365.           </div>
  366.           ";
  367.         // line 148
  368.         if ((($tmp = (isset($context["mode_free"]) || array_key_exists("mode_free", $context) ? $context["mode_free"] : (function () { throw new RuntimeError('Variable "mode_free" does not exist.', 148, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  369.             // line 149
  370.             yield "          <div class=\"flex justify-between text-franboise font-bold mt-4\">
  371.             <span>Montant dû aujourd\x27hui</span>
  372.             <span>0€</span>
  373.           </div>
  374.           <hr class=\"border-lavande border my-2\" />
  375.           <div class=\"flex justify-between text-bleuindigo\">
  376.             <span>Montant dû au ";
  377.             // line 155
  378.             yield (string) $this->escaper->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, $this->extensions['Twig\Extension\CoreExtension']->modifyDate("now", "+8 day"), null, null, "dd MMMM YYYY", null, null, "fr"), "html", null, true);
  379.             yield "</span>
  380.             <span class=\"font-bold\" id=\"som-toto\"></span>
  381.           </div>
  382.           ";
  383.         } else {
  384.             // line 159
  385.             yield "            <div class=\"flex justify-between text-franboise font-bold mt-4\">
  386.               <span>Montant dû aujourd\x27hui</span>
  387.               <span id=\"som-toto\"></span>
  388.             </div>
  389.           ";
  390.         }
  391.         // line 164
  392.         yield "          <button type=\"submit\" class=\"bg-framboise hover:bg-bleuindigo hover:cursor-pointer text-white rounded-3xl font-bold py-3 mt-4 btn-form\">Démarrer l\x27essai gratuit</button>
  393.           <div class=\"flex items-center text-pervenche font-bold mt-4\">
  394.             <img src=\"/static/img/tunnel/coupon.webp\" alt=\"Code promo\" class=\"w-5 mr-2\">Vous avez un code promo ?
  395.           </div>
  396.           <div class=\"flex mt-1\">
  397.             <input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 py-1.5 pl-5 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-3xl border-lavande border\" placeholder=\"Entrez votre code promo\">
  398.             <button type=\"submit\" class=\"bg-pervenche px-3 py-2 text-3xl font-bold text-white shadow-xs hover:bg-framboise hover:cursor-pointer rounded-r-3xl\" id=\"button-code-promo\">&#65515;</button>
  399.           </div>
  400.           <div class=\"\" id=\"tr-code\">
  401.             <div style=\"padding: 2%;\" class=\"mt-2\">
  402.               <div class=\"remise-appliquee font-bold\"></div>
  403.               <div id=\"text-percent\"></div>
  404.             </div>
  405.           </div>
  406.         </div>
  407.       </div>
  408.     </div>
  409.   </section>
  410. <form class=\"form-next-step-2\" action=\"";
  411.         // line 184
  412.         yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("choix-formule-step");
  413.         yield "?offre=";
  414.         yield (string) $this->escaper->escape((isset($context["getOffer"]) || array_key_exists("getOffer", $context) ? $context["getOffer"] : (function () { throw new RuntimeError('Variable "getOffer" does not exist.', 184, $this->source); })()), "html", null, true);
  415.         yield "\" method=\"post\" id=\"parents_registration_first_step_";
  416.         if (((isset($context["getOffer"]) || array_key_exists("getOffer", $context) ? $context["getOffer"] : (function () { throw new RuntimeError('Variable "getOffer" does not exist.', 184, $this->source); })()) == "essentielle")) {
  417.             yield "essentielle";
  418.         } else {
  419.             yield "assistancevisio";
  420.         }
  421.         yield "\">
  422. </form>
  423. ";
  424.         
  425.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  426.         
  427.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  428.         return; yield;
  429.     }
  430.     // line 188
  431.     /**
  432.      * @return iterable<null|scalar|\Stringable>
  433.      */
  434.     public function block_javascripts(array $context, array $blocks = []): iterable
  435.     {
  436.         $macros = $this->macros;
  437.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  438.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  439.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  440.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  441.         // line 189
  442.         yield "
  443.   <!--footer-->
  444. <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js\"></script>
  445. <script type=\"text/javascript\">
  446.   \$(document).ready(function(){
  447.     function calculPrice(){
  448.       var nbrChild = parseInt(\$(\x27#nbr-child\x27).val());
  449.       var som = 0;
  450.       if(\$(\x27input[name=\"price\"]:checked\x27).length==1){
  451.         var period = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-period\x27);
  452.         var month  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-month\x27);
  453.         var price  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-price\x27);
  454.         var realPrice    = parseFloat(price);
  455.         var multiPercent = 50;
  456.         var percent      = \x27null\x27;
  457.         var moreChildrenActive = ";
  458.         // line 208
  459.         yield (string) (((($tmp = (isset($context["moreChildrenActive"]) || array_key_exists("moreChildrenActive", $context) ? $context["moreChildrenActive"] : (function () { throw new RuntimeError('Variable "moreChildrenActive" does not exist.', 208, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (1) : (0));
  460.         yield ";
  461.         if(\$(\x27#button-code-promo\x27).is(\"[data-percent]\")){
  462.           percent      = \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27);
  463.           multiPercent = \$(\x27#button-code-promo\x27).attr(\x27data-multi-percent\x27)
  464.         }
  465.         if(\$(\x27input[name=\"price\"]:checked\x27).is(\x27[data-multi-discount]\x27)){
  466.           multiPercent = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-multi-discount\x27);
  467.         }
  468.         var priceMoreChild  = (realPrice - realPrice*(parseFloat(multiPercent)/100));
  469.         for(var i = 0;i<nbrChild;i++){
  470.           if(percent != \x27null\x27 && percent != 0){
  471.             if( moreChildrenActive || i>0){
  472.               som = som + priceMoreChild;
  473.             }else{
  474.               som = som + (realPrice - realPrice*(parseFloat(percent)/100));
  475.             }
  476.           }else{
  477.             if(moreChildrenActive || i>0){
  478.               som = som + priceMoreChild;
  479.             }else{
  480.               som = som + realPrice;
  481.             }
  482.           }
  483.         }
  484.         \$(\x27#som-toto\x27).text(\x27\x27).text((som.toFixed(2)).replaceAll(\x27.\x27,\x27,\x27)+\x27 €\x27);
  485.         \$(\x27#som-toto\x27).attr(\x27data-som\x27,som.toFixed(2))
  486.         \$(\x27.total-price\x27).text(\x27 / \x27+period);
  487.       }
  488.     }
  489.     \$(\x27#nbr-child\x27).change(function(){
  490.       var val = \$(this).val();
  491.       calculPrice();
  492.       if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).length==0){
  493.         \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"child\" value=\"\x27+val+\x27\"/>\x27)
  494.       }else{
  495.         \$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).val(val);
  496.       }
  497.     })
  498.     var percent = 0;
  499.     var coupon
  500.     \$(\x27#button-code-promo\x27).click(function(){
  501.       if (\$(\x27input[name=\"price\"]:checked\x27).length==1){
  502.         var priceId  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-id\x27);
  503.         var self = \$(this);
  504.         \$(this).prev().removeClass(\x27is-invalid\x27);
  505.         coupon = \$(this).prev().val();
  506.         self.parent().parent().find(\x27.invalid-feedback\x27).text(\x27\x27)
  507.         \$.ajax({
  508.           url:\"";
  509.         // line 267
  510.         yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
  511.         yield "\",
  512.           data:\"coupon=\"+coupon,
  513.           success:function(elem){
  514.             var verif= true;
  515.             self.parent().find(\x27input\x27).val(\x27\x27);
  516.             if(elem.success){
  517.               if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
  518.                 verif = false;
  519.               }
  520.               if(verif){
  521.                 if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
  522.                   \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
  523.                 }else{
  524.                   \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
  525.                 }
  526.                 percent = elem.data.percent;
  527.                 self.attr(\x27data-percent\x27,percent);
  528.                 self.attr(\x27data-multi-percent\x27,elem.data.percentMulti);
  529.                 //\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
  530.                 \$(\x27.remise-appliquee\x27).text(\x27\x27).html(\x27<span class=\"font-bold me-2\">Promotion appliquée :</span>\x27+elem.data.description);
  531.                 self.addClass(\x27js-calculate-auto\x27);
  532.                 calculPrice();
  533.               }
  534.             }
  535.             if(!elem.success || !verif){
  536.               self.parents(\x27.input-group\x27).parent().find(\x27.invalid-feedback\x27).text(\x27\x27).text(\x27Ce code promo est invalide !\x27);
  537.               if(!self.parents(\x27.input-group\x27).find(\x27input\x27).hasClass(\x27is-invalid\x27)){
  538.                 self.parents(\x27.input-group\x27).find(\x27input\x27).addClass(\x27is-invalid\x27);
  539.               }
  540.             }
  541.           }
  542.         })
  543.       }else{
  544.         alert(\x27Veuillez choisir une durée de votre offre\x27)
  545.       }
  546.     })
  547.     \$(\x27input[name=\"price\"]\x27).change(function(){
  548.       if(\$(this).is(\x27:checked\x27)){
  549.         var price = parseFloat(\$(this).attr(\x27data-price\x27));
  550.         var period = \$(this).attr(\x27data-period\x27);
  551.         var offer = \$(this).val();
  552.         var month = \$(this).attr(\x27data-month\x27);
  553.         if(\$(this).hasClass(\x27js-auto-discount\x27)){
  554.           var coupon = \$(this).attr(\x27data-discount\x27);
  555.           \$(\x27.u-spinner\x27).addClass(\x27open\x27)
  556.           \$.ajax({
  557.             url:\"";
  558.         // line 328
  559.         yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
  560.         yield "\",
  561.             data:\"coupon=\"+coupon,
  562.             success:function(elem){
  563.               if(elem.success){
  564.                 //\$(\x27#tr-code\x27).removeClass(\x27d-none\x27)
  565.                 if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
  566.                   \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
  567.                 }else{
  568.                   \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
  569.                 }
  570.                 percent = elem.data.percent;
  571.                 \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27,percent);
  572.                 if(!\$(\x27#button-code-promo\x27).hasClass(\x27js-calculate-auto\x27)){
  573.                   \$(\x27#button-code-promo\x27).addClass(\x27js-calculate-auto\x27)
  574.                 }
  575.                 // self.attr(\x27data-percent\x27,percent);
  576.                 //\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
  577.                 \$(\x27.remise-appliquee\x27).text(\x27\x27).text(\x27Promotion appliquée : \x27+elem.data.description);
  578.                 calculPrice();
  579.               }
  580.               \$(\x27.u-spinner\x27).removeClass(\x27open\x27)
  581.             }
  582.           })
  583.         }else{
  584.           if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==1){
  585.             \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).remove()
  586.           }
  587.           //\$(\x27#text-percent\x27).text(\x27\x27)
  588.           \$(\x27.remise-appliquee\x27).text(\x27\x27);
  589.           calculPrice()
  590.         }
  591.         if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
  592.           \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"offer\" value=\"\x27+offer+\x27\"/>\x27)
  593.         }else{
  594.           \$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).val(offer);
  595.         }
  596.         // \$(\x27#text-toto-offer-period\x27).removeClass(\x27d-none\x27).addClass(\x27d-block\x27)
  597.         //  \$(\x27#toto-offer-period\x27).text(period.toLowerCase())
  598.       }
  599.     })
  600.     \$(\x27input[name=\"price\"]\x27).change()
  601.     \$(\x27.btn-form\x27).click(function(){
  602.       if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
  603.       }else{
  604.         \$(\x27.form-next-step-2\x27).submit();
  605.       }
  606.     })
  607.     ";
  608.         // line 388
  609.         if ( !(($tmp = (isset($context["getPrice"]) || array_key_exists("getPrice", $context) ? $context["getPrice"] : (function () { throw new RuntimeError('Variable "getPrice" does not exist.', 388, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  610.             // line 389
  611.             yield "      \$(\x27#p-1\x27).click();
  612.     ";
  613.         } else {
  614.             // line 391
  615.             yield "      \$(\x27.input-price[data-id=\"";
  616.             yield (string) $this->escaper->escape((isset($context["getPrice"]) || array_key_exists("getPrice", $context) ? $context["getPrice"] : (function () { throw new RuntimeError('Variable "getPrice" does not exist.', 391, $this->source); })()), "html", null, true);
  617.             yield "\"]\x27).click();
  618.     ";
  619.         }
  620.         // line 393
  621.         yield "
  622.   })
  623. </script>
  624. ";
  625.         
  626.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  627.         
  628.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  629.         return; yield;
  630.     }
  631.     /**
  632.      * @codeCoverageIgnore
  633.      */
  634.     public function getTemplateName(): string
  635.     {
  636.         return "front/tunnel/step1a.html.twig";
  637.     }
  638.     /**
  639.      * @codeCoverageIgnore
  640.      */
  641.     public function isTraitable(): bool
  642.     {
  643.         return false;
  644.     }
  645.     /**
  646.      * @codeCoverageIgnore
  647.      */
  648.     public function getDefaultEscapeStrategy(): string|false
  649.     {
  650.         return "html";
  651.     }
  652.     /**
  653.      * @codeCoverageIgnore
  654.      */
  655.     public function getDebugInfo(): array
  656.     {
  657.         return array (  703 => 393,  697 => 391,  693 => 389,  691 => 388,  628 => 328,  564 => 267,  502 => 208,  481 => 189,  468 => 188,  445 => 184,  423 => 164,  416 => 159,  409 => 155,  401 => 149,  399 => 148,  388 => 140,  379 => 134,  364 => 121,  347 => 118,  341 => 117,  325 => 116,  319 => 114,  317 => 113,  312 => 111,  306 => 107,  296 => 105,  294 => 104,  290 => 103,  286 => 102,  254 => 101,  251 => 100,  247 => 98,  245 => 97,  241 => 95,  238 => 94,  235 => 93,  232 => 92,  229 => 91,  226 => 90,  223 => 89,  220 => 88,  203 => 87,  198 => 84,  194 => 82,  172 => 62,  170 => 61,  161 => 54,  153 => 48,  151 => 47,  108 => 6,  95 => 5,  83 => 3,  70 => 2,  47 => 1,);
  658.     }
  659.     public function getSourceContext(): Source
  660.     {
  661.         return new Source("{% extends \x27front/tunnel/layout.html.twig\x27 %}
  662. {% block head %}
  663.   <title>Étape 1</title>
  664. {% endblock %}
  665. {% block body %}
  666.   <!-- Timeline -->
  667.   <section class=\"w-full py-10 sm:py-20\">
  668.     <ol class=\"flex flex-row w-full\">
  669.       <!--first item-->
  670.       <li class=\"relative flex-1\">
  671.         <div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
  672.         <div class=\"relative z-10 flex flex-col items-center\">
  673.           <div class=\"size-5 rounded-full bg-bleuindigo border-4 border-bleuindigo\"></div>
  674.           <p class=\"mt-4 sm:mt-2 text-sm sm:text-lg font-bold text-bleuindigo text-center px-2\">
  675.             1. Je sélectionne la durée
  676.           </p>
  677.         </div>
  678.       </li>
  679.       <!--Second item-->
  680.       <li class=\"relative flex-1\">
  681.         <div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
  682.         <div class=\"relative z-10 flex flex-col items-center\">
  683.           <div class=\"size-5 rounded-full bg-lavande\"></div>
  684.           <p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
  685.             2. J\x27accède à mon compte
  686.           </p>
  687.         </div>
  688.       </li>
  689.       <!--Third item-->
  690.       <li class=\"relative flex-1\">
  691.         <div class=\"relative z-10 flex flex-col items-center\">
  692.           <div class=\"size-5 rounded-full bg-lavande\"></div>
  693.           <p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
  694.             3. Je procède au paiement
  695.           </p>
  696.         </div>
  697.       </li>
  698.     </ol>
  699.   </section>
  700. {% if mode_free %}
  701.   <section class=\"flex justify-center mb-8 sm:mb-16\">
  702.     <div class=\"text-center bg-jaune text-bleuindigo font-bold py-2 px-4 rounded-full text-sm sm:text-lg\">
  703.       Vous ne serez pas débité avant la fin de votre essai de 7 jours, résiliable à tout moment.
  704.     </div>
  705.   </section>
  706. {% endif %}
  707.   <!--Offres-->
  708.   <section class=\"flex justify-center\">
  709.     <div class=\"flex flex-col lg:flex-row justify-between\">
  710.       <!--Colonne gauche-->
  711.       <div class=\"flex flex-col lg:w-6/12 xl:w-7/12\">
  712.         {% if not fromDashboardParent %}
  713.         <div>
  714.           <label for=\"enfants\" class=\"text-bleuindigo tracking-tight sm:tracking-normal\">
  715.             Combien d’enfants souhaitez-vous inscrire&nbsp;?
  716.           </label>
  717.           <div class=\"flex items-center mt-2\">
  718.             <div>
  719.               <select id=\"nbr-child\" name=\"nbr-child\" class=\"block rounded-3xl border-lavande py-1.5 text-gris text-sm\">
  720.                 <option value=\"1\">1 enfant</option>
  721.                 <option value=\"2\">2 enfants</option>
  722.                 <option value=\"3\">3 enfants</option>
  723.                 <option value=\"4\">4 enfants</option>
  724.                 <option value=\"5\">5 enfants</option>
  725.               </select>
  726.             </div>
  727.             <div class=\"text-xs text-framboise font-bold ml-5\">
  728.               <p>-50% pour chaque enfant supplémentaire</p>
  729.             </div>
  730.           </div>
  731.         </div>
  732.         {% else %}
  733.           <input type=\"hidden\" name=\"nbr-child\" value=\"1\" id=\"nbr-child\">
  734.         {% endif %}
  735.         <div>
  736.           <p class=\"text-bleuindigo mt-14\">Sélectionnez la durée</p>
  737.         </div>
  738.         {% for row in listOffer %}
  739.           {% set noDiscountAuto = row.discount is null or (row.discountDate is not null and row.discountDate|date(\x27U\x27) < \"now\"|date(\x27U\x27) ) %}
  740.           {% if not noDiscountAuto %}
  741.             {% set priceReducePercent = (((((row.price/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, \x27,\x27, \x27.\x27)|abs) %}
  742.           {% else %}
  743.             {% set priceReducePercent = row.percentDiscount is null?(((((row.getAmount()/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, \x27,\x27, \x27.\x27)|abs) : row.percentDiscount %}
  744.             {% endif %}
  745.           {% set amount = noDiscountAuto ? row.price : row.getAmount() %}
  746.         <!--Carte 24 mois-->
  747.         <div class=\"flex flex-col sm:flex-row lg:flex-col xl:flex-row items-start relative justify-between border-lavande border rounded-lg p-5 mt-2\">
  748.           {% if loop.first %}
  749.           <div class=\"flex items-center absolute text-bleuindigo text-[10px] font-bold bg-jaune rounded-xl px-2 -top-[8px] right-[20px]\"><span class=\"text-lg -my-1 pr-1\">♥</span> LE CHOIX DES PARENTS</div>
  750.           {% endif %}
  751.           <div class=\"flex items-center gap-x-3\">
  752.             <input id=\"p-{{ loop.index }}\" name=\"price\" type=\"radio\" value=\"{{ row.slug }}\" class=\"input-price h-4 w-4 border-lavande{% if not noDiscountAuto %} js-auto-discount{% endif %}\" {% if not noDiscountAuto%}data-discount=\"{{ row.discount.codePromo }}\" data-multi-discount=\"{% if row.discount.moreChildReduce is not null %}{{ row.discount.moreChildReduce.percent }}{% endif %}\"{% endif%} data-id=\"{{ row.id }}\" data-title=\"{{ row.title }}\" data-price=\"{{ row.price }}\" data-month=\"{{ row.monthValid }}\" data-period=\"{% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois\">
  753.             <label for=\"p-{{ loop.index }}\" class=\"flex flex-row items-center text-nowrap\">
  754.               <span class=\"text-bleuindigo font-bold text-xl mr-5\">{{ row.monthValid }} mois</span>
  755.               {% if row.monthValid>1 or row.percentDiscount %}
  756.               <span class=\"text-white bg-pervenche text-[10px] rounded-4xl py-1 px-2\">{% if row.percentDiscount is not null and row.percentDiscount is not empty %}{{ row.percentDiscount }}{% else %}{{ priceReducePercent }}{% endif %}% DE RÉDUCTION</span>
  757.               {% endif%}
  758.             </label>
  759.           </div>
  760.           <div class=\"flex flex-col sm:items-end sm:w-full sm:size-auto lg:w-full xl:size-auto sm:text-right mt-4 sm:mt-0\">
  761.             <span class=\"text-xl\">
  762.               <span class=\"text-pervenche sm:text-bleuindigo font-bold\">{{ (amount/row.monthValid)|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}€/mois</span>
  763.             </span>
  764.             {% if not noDiscountAuto %}
  765.             <span class=\"text-base line-through\">{{ priceMark|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}{#{{ (row.price/row.monthValid)|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}#}€/mois</span>
  766.             {% endif %}
  767.             <span class=\"text-xs\">{% if row.monthValid>1 %}Paiement unique de {{ amount|number_format(2, \x27,\x27, \x27.\x27) }} €{% if row.monthValid<13 %}, reconduction tacite, annulable à tout moment{% else %}.{% endif %}{% else %}Sans engagement, reconduction tacite{% endif%}</span>
  768.             {% if row.monthValid > 1 and row.displayEcoText %} <span class=\"text-xs text-pervenche\">soit {{ (priceMark * row.monthValid - amount)|number_format(2, \x27,\x27, \x27.\x27) }}€ économisés</span>{% endif%}
  769.           </div>
  770.         </div>
  771.         {% endfor %}
  772.       </div>
  773.       <!--Colonne droite-->
  774.       <div class=\"flex flex-col lg:w-5/12 xl:w-4/12 my-16 lg:mt-0\">
  775.         <!--Encadré lavande-->
  776.         <div class=\"flex flex-col bg-lavandeclair rounded-2xl text-sm sm:text-base gap-y-2 p-5 sm:p-10\">
  777.           <div class=\"text-bleuindigo font-bold text-xl\">
  778.             Vous avez choisi l’offre
  779.           </div>
  780.           <div class=\"text-pervenche font-bold text-2xl sm:text-3xl\">
  781.             {{ typeOffer.title|upper }}
  782.           </div>
  783.           <div class=\"text-lavande text-xs font-bold\">
  784.             <a href=\"https://www.lesbonsprofs.com/nos-offres/\" class=\"flex items-center hover:underline\"><img src=\"/static/img/tunnel/stylo.webp\" alt=\"Changer d\x27offre\" class=\"w-3 mr-1\">Changer d\x27offre</a>
  785.           </div>
  786.           <div class=\"font-bold mt-2\">
  787.             {{ typeOffer.textPaid|raw }}
  788.           </div>
  789.           <div class=\"flex justify-between items-center mt-4\">
  790.             <span class=\"flex text-bleuindigo font-bold\">
  791.               <span class=\"flex items-center bg-jaune rounded-xl px-2 mr-1\"><span class=\"text-lg -my-1 pr-1\">&#9733</span> 4,6</span>+ 300 avis Trustpilot
  792.             </span>
  793.             <span class=\"text-pervenche text-xs hover:underline\"><a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\">Voir les avis</a></span>
  794.           </div>
  795.           {% if mode_free %}
  796.           <div class=\"flex justify-between text-franboise font-bold mt-4\">
  797.             <span>Montant dû aujourd\x27hui</span>
  798.             <span>0€</span>
  799.           </div>
  800.           <hr class=\"border-lavande border my-2\" />
  801.           <div class=\"flex justify-between text-bleuindigo\">
  802.             <span>Montant dû au {{ \"now\"|date_modify(\"+8 day\")|format_datetime(locale=\x27fr\x27,pattern=\"dd MMMM YYYY\") }}</span>
  803.             <span class=\"font-bold\" id=\"som-toto\"></span>
  804.           </div>
  805.           {% else %}
  806.             <div class=\"flex justify-between text-franboise font-bold mt-4\">
  807.               <span>Montant dû aujourd\x27hui</span>
  808.               <span id=\"som-toto\"></span>
  809.             </div>
  810.           {% endif %}
  811.           <button type=\"submit\" class=\"bg-framboise hover:bg-bleuindigo hover:cursor-pointer text-white rounded-3xl font-bold py-3 mt-4 btn-form\">Démarrer l\x27essai gratuit</button>
  812.           <div class=\"flex items-center text-pervenche font-bold mt-4\">
  813.             <img src=\"/static/img/tunnel/coupon.webp\" alt=\"Code promo\" class=\"w-5 mr-2\">Vous avez un code promo ?
  814.           </div>
  815.           <div class=\"flex mt-1\">
  816.             <input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 py-1.5 pl-5 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-3xl border-lavande border\" placeholder=\"Entrez votre code promo\">
  817.             <button type=\"submit\" class=\"bg-pervenche px-3 py-2 text-3xl font-bold text-white shadow-xs hover:bg-framboise hover:cursor-pointer rounded-r-3xl\" id=\"button-code-promo\">&#65515;</button>
  818.           </div>
  819.           <div class=\"\" id=\"tr-code\">
  820.             <div style=\"padding: 2%;\" class=\"mt-2\">
  821.               <div class=\"remise-appliquee font-bold\"></div>
  822.               <div id=\"text-percent\"></div>
  823.             </div>
  824.           </div>
  825.         </div>
  826.       </div>
  827.     </div>
  828.   </section>
  829. <form class=\"form-next-step-2\" action=\"{{ path(\x27choix-formule-step\x27) }}?offre={{ getOffer }}\" method=\"post\" id=\"parents_registration_first_step_{% if getOffer == \"essentielle\" %}essentielle{% else %}assistancevisio{% endif %}\">
  830. </form>
  831. {% endblock %}
  832. {% block javascripts %}
  833.   <!--footer-->
  834. <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js\"></script>
  835. <script type=\"text/javascript\">
  836.   \$(document).ready(function(){
  837.     function calculPrice(){
  838.       var nbrChild = parseInt(\$(\x27#nbr-child\x27).val());
  839.       var som = 0;
  840.       if(\$(\x27input[name=\"price\"]:checked\x27).length==1){
  841.         var period = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-period\x27);
  842.         var month  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-month\x27);
  843.         var price  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-price\x27);
  844.         var realPrice    = parseFloat(price);
  845.         var multiPercent = 50;
  846.         var percent      = \x27null\x27;
  847.         var moreChildrenActive = {{ moreChildrenActive?1:0 }};
  848.         if(\$(\x27#button-code-promo\x27).is(\"[data-percent]\")){
  849.           percent      = \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27);
  850.           multiPercent = \$(\x27#button-code-promo\x27).attr(\x27data-multi-percent\x27)
  851.         }
  852.         if(\$(\x27input[name=\"price\"]:checked\x27).is(\x27[data-multi-discount]\x27)){
  853.           multiPercent = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-multi-discount\x27);
  854.         }
  855.         var priceMoreChild  = (realPrice - realPrice*(parseFloat(multiPercent)/100));
  856.         for(var i = 0;i<nbrChild;i++){
  857.           if(percent != \x27null\x27 && percent != 0){
  858.             if( moreChildrenActive || i>0){
  859.               som = som + priceMoreChild;
  860.             }else{
  861.               som = som + (realPrice - realPrice*(parseFloat(percent)/100));
  862.             }
  863.           }else{
  864.             if(moreChildrenActive || i>0){
  865.               som = som + priceMoreChild;
  866.             }else{
  867.               som = som + realPrice;
  868.             }
  869.           }
  870.         }
  871.         \$(\x27#som-toto\x27).text(\x27\x27).text((som.toFixed(2)).replaceAll(\x27.\x27,\x27,\x27)+\x27 €\x27);
  872.         \$(\x27#som-toto\x27).attr(\x27data-som\x27,som.toFixed(2))
  873.         \$(\x27.total-price\x27).text(\x27 / \x27+period);
  874.       }
  875.     }
  876.     \$(\x27#nbr-child\x27).change(function(){
  877.       var val = \$(this).val();
  878.       calculPrice();
  879.       if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).length==0){
  880.         \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"child\" value=\"\x27+val+\x27\"/>\x27)
  881.       }else{
  882.         \$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).val(val);
  883.       }
  884.     })
  885.     var percent = 0;
  886.     var coupon
  887.     \$(\x27#button-code-promo\x27).click(function(){
  888.       if (\$(\x27input[name=\"price\"]:checked\x27).length==1){
  889.         var priceId  = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-id\x27);
  890.         var self = \$(this);
  891.         \$(this).prev().removeClass(\x27is-invalid\x27);
  892.         coupon = \$(this).prev().val();
  893.         self.parent().parent().find(\x27.invalid-feedback\x27).text(\x27\x27)
  894.         \$.ajax({
  895.           url:\"{{ path(\x27valid_coupon\x27) }}\",
  896.           data:\"coupon=\"+coupon,
  897.           success:function(elem){
  898.             var verif= true;
  899.             self.parent().find(\x27input\x27).val(\x27\x27);
  900.             if(elem.success){
  901.               if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
  902.                 verif = false;
  903.               }
  904.               if(verif){
  905.                 if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
  906.                   \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
  907.                 }else{
  908.                   \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
  909.                 }
  910.                 percent = elem.data.percent;
  911.                 self.attr(\x27data-percent\x27,percent);
  912.                 self.attr(\x27data-multi-percent\x27,elem.data.percentMulti);
  913.                 //\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
  914.                 \$(\x27.remise-appliquee\x27).text(\x27\x27).html(\x27<span class=\"font-bold me-2\">Promotion appliquée :</span>\x27+elem.data.description);
  915.                 self.addClass(\x27js-calculate-auto\x27);
  916.                 calculPrice();
  917.               }
  918.             }
  919.             if(!elem.success || !verif){
  920.               self.parents(\x27.input-group\x27).parent().find(\x27.invalid-feedback\x27).text(\x27\x27).text(\x27Ce code promo est invalide !\x27);
  921.               if(!self.parents(\x27.input-group\x27).find(\x27input\x27).hasClass(\x27is-invalid\x27)){
  922.                 self.parents(\x27.input-group\x27).find(\x27input\x27).addClass(\x27is-invalid\x27);
  923.               }
  924.             }
  925.           }
  926.         })
  927.       }else{
  928.         alert(\x27Veuillez choisir une durée de votre offre\x27)
  929.       }
  930.     })
  931.     \$(\x27input[name=\"price\"]\x27).change(function(){
  932.       if(\$(this).is(\x27:checked\x27)){
  933.         var price = parseFloat(\$(this).attr(\x27data-price\x27));
  934.         var period = \$(this).attr(\x27data-period\x27);
  935.         var offer = \$(this).val();
  936.         var month = \$(this).attr(\x27data-month\x27);
  937.         if(\$(this).hasClass(\x27js-auto-discount\x27)){
  938.           var coupon = \$(this).attr(\x27data-discount\x27);
  939.           \$(\x27.u-spinner\x27).addClass(\x27open\x27)
  940.           \$.ajax({
  941.             url:\"{{ path(\x27valid_coupon\x27) }}\",
  942.             data:\"coupon=\"+coupon,
  943.             success:function(elem){
  944.               if(elem.success){
  945.                 //\$(\x27#tr-code\x27).removeClass(\x27d-none\x27)
  946.                 if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
  947.                   \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
  948.                 }else{
  949.                   \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
  950.                 }
  951.                 percent = elem.data.percent;
  952.                 \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27,percent);
  953.                 if(!\$(\x27#button-code-promo\x27).hasClass(\x27js-calculate-auto\x27)){
  954.                   \$(\x27#button-code-promo\x27).addClass(\x27js-calculate-auto\x27)
  955.                 }
  956.                 // self.attr(\x27data-percent\x27,percent);
  957.                 //\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
  958.                 \$(\x27.remise-appliquee\x27).text(\x27\x27).text(\x27Promotion appliquée : \x27+elem.data.description);
  959.                 calculPrice();
  960.               }
  961.               \$(\x27.u-spinner\x27).removeClass(\x27open\x27)
  962.             }
  963.           })
  964.         }else{
  965.           if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==1){
  966.             \$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).remove()
  967.           }
  968.           //\$(\x27#text-percent\x27).text(\x27\x27)
  969.           \$(\x27.remise-appliquee\x27).text(\x27\x27);
  970.           calculPrice()
  971.         }
  972.         if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
  973.           \$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"offer\" value=\"\x27+offer+\x27\"/>\x27)
  974.         }else{
  975.           \$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).val(offer);
  976.         }
  977.         // \$(\x27#text-toto-offer-period\x27).removeClass(\x27d-none\x27).addClass(\x27d-block\x27)
  978.         //  \$(\x27#toto-offer-period\x27).text(period.toLowerCase())
  979.       }
  980.     })
  981.     \$(\x27input[name=\"price\"]\x27).change()
  982.     \$(\x27.btn-form\x27).click(function(){
  983.       if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
  984.       }else{
  985.         \$(\x27.form-next-step-2\x27).submit();
  986.       }
  987.     })
  988.     {% if not getPrice %}
  989.       \$(\x27#p-1\x27).click();
  990.     {% else %}
  991.       \$(\x27.input-price[data-id=\"{{ getPrice }}\"]\x27).click();
  992.     {% endif %}
  993.   })
  994. </script>
  995. {% endblock %}
  996. ", "front/tunnel/step1a.html.twig", "/var/www/dashboard/templates/front/tunnel/step1a.html.twig");
  997.     }
  998. }